I thought a lot about Building Large Scale Applications and MVP Part I + II.
Let's say, I have three objects e.g. Companies, Contacts and Furniture.
Let's assume that these three objects can be viewed, edited and added and have relations with each other.
Would I really have
CompaniesView.ui.xml
, ContactView.ui.xml
, FurnitureView.ui.xml
CompaniesEdit.ui.xml
, ContactEdit.ui.xml
, FurnitureEdit.ui.xml
CompaniesViewImpl.java
, ContactViewImpl.java
, FurnitureViewImple.java
*View.java
Edit*ViewImpl.java
Edit*View.java
*Presenter
*ColumnsDefinitionsFactory
CompaniesServiceAsync.java
, ContactsServiceAsync.java
, FurnitureServiceAsync.java
for the RPCs"companiesList"
, "contactList"
, "furnitureList"
, 3x "*Add"
, 3x "*Edit"
Am I on the right way? Is it just normal that the application gets bigger at this way?
I could also view the three objects in the same view called ObjectView.ui.xml
.
I guess that's why generics (<T>
) are used in the article?
But then I have fear that I can not realize differences any more given due to my object design e.g. that I have a button ImportContacts but no button ImportCompanies.
How do you recommend I should extend my application?
It depends on the use case, but I would have a view and a Representer for each object, because basically the create/edit/view represent the same data and usually have the same layout, thus they could be made in on view and set some kind of modes.
But if the use case dictate completely different views layout, in that case you may create three views with tree displays interfaces attached to one Presenter.