File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes Petstore app. controller = the EJB controller + controller proxy? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "Petstore app. controller = the EJB controller + controller proxy?" Watch "Petstore app. controller = the EJB controller + controller proxy?" New topic
Author

Petstore app. controller = the EJB controller + controller proxy?

Rudi Vaum
Ranch Hand

Joined: May 02, 2003
Posts: 59
Could anybody clear how this works?
"The sample applications controller is in two parts: the EJB controller,
which interacts with enterprise beans and a controller proxy"
[..]
But the second edition only says:
"Each type of client needs its own controller, which specializes in the
protocols
for that client type. A particular type of client may also need different
presentation
components for form factor or other reasons."
Do you know if the code of the Petstore changed in that respect?
Thanx
Rudi
[..]
[ May 28, 2003: Message edited by: Rudi Vaum ]
Rudi Vaum
Ranch Hand

Joined: May 02, 2003
Posts: 59
Check out this prety good explanation of multi-tiered MVC:
http://mindtelligent.com/mvc.html
They describe a structure like this:
Front Controller(servlet) --> Request Processor --> App. Controller(a Web-tier proxy) --> app. Controller(SFSB).
Now, i had before in mind something like:
Client --> Business Delegate --> Session Facade(EJB) --> Business Objects(EJB)
It was clear to me that I missed the controller, but how do I make the best out of these two?

Any ideas?
Rudi
PS: is there any compatibility between business delegate and proxy, in this context?
[ May 28, 2003: Message edited by: Rudi Vaum ]
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
For Web clients, I recommend -
Web(View) --> Front Controller(servlet) --> Web Dispatcher --> Business Delegate--> Session Facade(SLSB) --> Entity bean/DAO
For non-web clients, I propose -
Client --> App Controller(SLSB) --> App Dispatcher --> Business Delegate--> Session Facade(SLSB) --> Entity bean/DAO
As you can see, everything beyond Business Delegate remains same. Only the Controller and Dispatcher are implemented differently for web and app clients. Request Processor can be implemented between Front Controller and Dispatcher, but in a simple implementation, you can roll it up into Front Controller.
Any comments?


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
Peter Dawson
Greenhorn

Joined: Apr 28, 2003
Posts: 19
Ajith,
Why do you model the App Controller as SLSB? This implies that the App Controller is remote from the app client, but the app client could be 'fat' and model the app controller as a javabean.
best
Peter
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
App Controller is an EJB so that non-web clients can direclty access it through RIM/IIOP ...
Rudi Vaum
Ranch Hand

Joined: May 02, 2003
Posts: 59
[...]
2nd question: Any stategy to reuse some part of the controller? If the clients expose the same functionality, this clearly should be the case.
3rd question: i'll make a new post of this...
please comment
[ May 30, 2003: Message edited by: Rudi Vaum ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Petstore app. controller = the EJB controller + controller proxy?