DAO + Webservice

1

I want to use the DAO standard to create a Java project in Eclipse to view data from a database. I just want to turn it into a Webservice .. How should I proceed? Just use that IDE Webservice creation option and you're done?

    
asked by anonymous 07.10.2015 / 20:30

2 answers

1

Well, apparently your question is about the structure of the project, right? In IDE you create a dynamic web project (Dynamic Web project), it also gives you support to choose the libraries that you will need in your project. As for the DAO pattern, it is a class design that you will use to manipulate the database. I advise you to structure your project using MVC with DAO.

    
07.10.2015 / 21:00
0

You should think about separating layers first.

Let's think, the DAO Pattern is a standard for database access, it's a layer for that, you should not imagine it with any other responsibility besides that, this is a SRP .

Separating in layers, we must have at least one more to implement the web services layer or endpoint, we must have this layer to expose its functionality or data.

That is, DAO + Rest, DAO + SOAP, DAO + RTC and etc.

And a tip, do this layer, do not let IDE or other tools do it for you, try to understand what you are writing and trying to implement.

    
07.10.2015 / 21:02