I have a requirement where there are few scenarios.
- User registration(There are different types of users say buyer, seller, moderator etc)
- search feature where a seller/buyer could be searched with few keywords
- user dashboards
search functionality can be exposed as webservice in future.
I identified that first 3 can go as separate portlets. Please correct me if i am wrong.
I want to know if all of these should go into same .war file or can be moved to separate war files. Point to note is that there are some classes which are common in all the 3 points.
For the purpose of modularity, I identified that dashboards can go into separate project and registration & search in another project. But both into single war file. Are we correct开发者_如何学JAVA?
We are using Liferay, spring, hibernate and JSF(icefaces)
Seems like a pretty basic MVC type app to me - which generally is fine all in one WAR. There may be some benefit to breaking it into separate services, if say you have other apps that would also like to use whatever login/authentication service you devise. My advice would be to keep it simple for now, if later you see a need to break out pieces into separate WARs then do some refactoring.
If your portlets are always deployed together, then put them in one WAR file. If there is a chance that they will be deployed separately on different servers/nodes/portals, then split that into several WAR files. In any case you can do the splitting when you really need that, for the purpose of faster deployment during development keep it in one WAR. Repackaging is not hard to do later.
精彩评论