I’m developing a restful webservice that will save data in a database and retrive data from a database. So I’m planning to implement webservice logic and datata access logic as two different projects. It would be great if you could discuss pros and cons in this approach.
I’m developing a restful webservice that will save data in a database and retrive
Share
I would recommend just one project. The web service will own the DAO and the database. No need for two.
As for pros, read Werner Vogel’s ACM interview about web services at Amazon. Pay special attention to his statement about “services owning their data.”
Cons? Your way adds complexity without benefit. It would encourage reusing that DAO somewhere else.