I am going to develop which will be web application as well as mobile (android / iOS / windows) application. The database in this application will be managed by Hibernate. Also as it is cross platform application, web service will also be used. What I know so far is:
HIBERNATE:
- POJO Files (the getter-setter ones which will create database tables)
- Model (the java class which will interact with database)
- Controller (basically servlet which will get data from view [jsp], set it in POJO object and pass this object to Model for any of CRUD operation)
- View (the jsp pages)
REST WEB SERVICE:
- Web service implementation class, which have web methods, which can be called by URL from client, and it can return JSON or XML format data.
So now my question is:
- How to integrate these both? Should I put my all POJOs and Model files to web service? If no, than what to do in this situation? If yes, than how to do that (simple example)?