views:

299

answers:

2

Hi

I have a requirement where there are few scenarios.

  1. User registration(There are different types of users say buyer, seller, moderator etc)
  2. search feature where a seller/buyer could be searched with few keywords
  3. 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?

We are using Liferay, spring, hibernate and JSF(icefaces)

A: 

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.

Gandalf
A: 

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.

Superfilin
But if I repackage in different war files, how will my portlets communicate with each other as their application context itself will be different right? Also as I said they use some common classes. Will I have to duplicate them in both War files or should I place this in a separate war file?We would like to have a feature where say my UI is not deployed but should be able to test the webservice..Can I structure in a way that my UI is in multiple optional war files and service and DAO are in another? I am supposed to deploy this on Tomcat. Any other solutions?
1) As they are portlets, they will be accessed under the context of the portal which uses them. 2) I don't know about Tomcat, but for example WebLogic supports the notion of the shared libraries, JBoss has also a similar feature or otherwise you can use the system classpath to put common code on.
Superfilin