Suppose that I have this project Structure (In this case the classical WebContent Folder was renamed as Interface):
(Eclipse IDE and omitting libraries)
Java Example
-src
-businessLogic
-data
-domain
-exceptions
-Build
-Interface
-Beans
-META-INF
-Views
-WEB-INF
As you can see I want to have a N-tier architecture but grouping beans with the Views (my .xhtml files) inside the Interface layer and then they will interact with other layers (with Business Logic first and so on) so I can have a well structured project, however, I don't know if placing java classes under the Interface folder is 'legal', allowed or considered a poor practice, if that's true, How could I achieve this architecture?.
This is the architecture that I have in mind:
E Interface D
X O
C businessLogic M
E A
P Data I
T N
I
O
N
Exception and Domain are transversal Layers because they will be used in the other layers, Exception is my layer with my own exceptions created and domain is the layer where my POJO will be (User class, Company class, etc.).
I want to do this because, since JSF is an MVP framework, I want to group all of those contents (.xhtml and Beans) in the "top" layer (I want to use MVP as a design pattern), am I misunderstanding the MVP architecture of JSF?
Thanks in advance.
P.D: I would like to put images but unfortunately I can't yet.
Aucun commentaire:
Enregistrer un commentaire