design practice for business layer when supporting API versioning
Posted
by
user1186065
on Programmers
See other posts from Programmers
or by user1186065
Published on 2013-03-19T20:39:26Z
Indexed on
2013/11/01
22:10 UTC
Read the original article
Hit count: 255
Is there any design pattern or practice recommended for business layer when dealing with multiple API version.
For example, I have something like this.
http://site.com/blogs/v1/?count=10
which calls business object method GetAllBlogs(int count) to get information
http://site.com/blogs/v2/?blog_count=20
which calls business object method GetAllBlogs_v2(int blogCounts)
Since parameter name is changed, I created another business method for version 2. This is just one example but it could have other breaking changes for which it requires me to create another method to support both version. Is there any design pattern or best practice for business/data access layer I should follow when supporting API Versioning?
© Programmers or respective owner