-
1. Re: Splitting a large web app
jeanluc Jan 18, 2011 4:12 PM (in response to earnest.dyke)It depends a lot of how much separate at a code level those sub-applications are.
Also, it depends on what are the reasons for the separation. Different code bases that will be deployed separately? Less memory usage per application (different servers will host different sub-applications)? You get the idea.
In my experience, separating the source creates a lot of overhead for developers. You can opt for having a single source, with the build creating multiple artifacts, such as multiple EARs. This helps with refactoring (all developers continue to have the latest code and refactorings are easy across all modules). The opposite approach is to have have independent projects and developers only work with a subset. Good luck with that after a few months, when a piece of functionality that was considered in subproject A is now needed in subproject B as well, so it will go in Common.
If you only need runtime separation, it depends on whether you want to decrease the static memory used to keep the app in memory or the memory use while the app is accessed. In other words, is the EAR/WAR too big or you simply want to avoid the entire functionality being served from the same instance. Regarding the former, unless your WAR/EAR is really, really big, I wouldn't bother to save a few MB. I'd rather go with deploying the same EAR/WAR everywhere, but have server instances handling particular subsets of requests.
So the key is to clarify what you're looking for and then be mindful about how this impacts the life of developers and testing.
-
2. Re: Splitting a large web app
earnest.dyke Jan 19, 2011 7:50 AM (in response to earnest.dyke)Jean Luc,
Thanks for the reply. Our goal is to have smaller, easier to test units of functionality, for example, shopping cart or profile maintenance. As the app stands now, a change to shopping cart functionality requires a full regression test. We would like to be able to deploy just changes to the shopping cart and only have to regression test it.
The trickiest part to this, in my opinion, is the build. We have page templates and css and images that are shared across the different functions so I see that we will have to include these common items in each deployable unit. Not a huge thing I know but a
radical
departure from what we have been doing.Thanks again for your input.
Earnie!
-
3. Re: Splitting a large web app
pouria62 Jan 19, 2011 8:35 AM (in response to earnest.dyke)thanks for your reply.i know your mentioned things but i cannot persist oneList . excuse me but i really do not understand what exactly you mean?would you please more explain?
-
4. Re: Splitting a large web app
pouria62 Jan 22, 2011 7:25 AM (in response to earnest.dyke)more details of my problem is :
my xhtml tags :
<rich:dataTable var="_se" value="#{positionTypeSeverityConversation.GetSeverityTypeName()}">
<h:column>
<h:outputText value="#{_se.name}" />
</h:column>
<h:column>
<h:selectManyCheckbox id="severityList" onchange="submit()"
value="#{positionTypeSeverityConversation.?">
----> here i dont know what to place with ? (?=someKinfOfList)
<s:selectItems var="_seList"
value="#{positionTypeSeverityConversation.GetSeverityList(_se.id)"
label="#{_se.name}" />
<s:convertEntity />
</h:selectManyCheckbox>
</h:column>
</rich:dataTable>
</h:panelGrid>
</rich:panel>
<h:commandButton id="save" value="Save"
action="#{positionTypeSeverityConversation.save()}"
style="FONT-FAMILY: 'Abyssinica SIL';" />
<s:button view="/setting/hr/PositionType.xhtml" id="cancelAdd"
value="Cancel">
<f:param name="positionTypeId" value="#{positionTypeId}" />
</s:button>
with this tag ---> <s:selectItems var="_seList"
value="#{positionTypeSeverityConversation.GetSeverityList(_se.id)"
label="#{_se.name}" /> i fill list check box. and user can select of them.my problem is to sending id's of severityhai's which was selected to
---> <h:selectManyCheckbox id="severityList" onchange="submit()"
value="#{positionTypeSeverityConversation.?">. and atleast i should persist severity's at PositionTypeSeverity table.well i have 3 tables 1-Severity 2-SeverityType 3-PositionTypeSeverity and 1-Severity with 2-SeverityType has n--->1 relation And 1-Severity with 3-PositionTypeSeveity has 1---->n relation.
@Stateful
@Scope(ScopeType.CONVERSATION)
@Name("positionTypeSeverityConversation")
public class PositionTypeSeverityConversationBean implements
PositionTypeSeverityConversation, Serializable {
private static final long serialVersionUID = -3604911984259043624L;
@Logger
private Log log;
@In
private EntityManager entityManager;
private PositionTypeSeverity positionTypeSeverity;
private SeverityType severityType;
@SuppressWarnings("unchecked")
public List<SeverityType> GetSeverityTypeName(){
return (List<SeverityType>) this.entityManager.createQuery(
" from SeverityType s ("
. getResultList();
{
@SuppressWarnings("unchecked")
public List<SeverityType> GetSeverityList(long id) {
return (List<Severity>) this.entityManager.createQuery(
" from Severity s where s.severityType.id = :id("
. setParameter("id", id(
. getResultList();
{
...
with a hql query i did select from Severity and show the list in ---><s:selectItems var="_seList"
value="#{positionTypeSeverityConversation.GetSeverityList(_se.id)"
label="#{_se.name}" /> and do not know how to persist severity's which selectd . i need a java method to persist them.and i know i should send id of the severity's which selected to a list but i couldnt find good example most people use static list to show items and send a name to selectmanycheckbox value;