• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Doubts about FrontController and CommandPattern in Model2 architecture

 
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I know that FrontController :
1) process operations that is encapsulates in request
2) Use screen flow manager and TemplateServices to return the next page.

My doubt is if in the url (Request) have a operation (action) always . For example imagine that you click in "search button" to find products. Is necesary some action (operation) ?? I think than here case only is necessary .forwar(nextPage()) witch use for example a bussiness delegate to retrieval information to server (EJB)

I think that operations in url only is necessary to change estates in session process or realizate any change in model (Entitys )

Can help me anybody ??? pleaseeeee �����
 
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

witch use for example a bussiness delegate



And who calls the business delegate? The idea is to deparate presentation, business and data tiers in which any request first comes to the presentation tier components (action or whatever you have), which "knows" which business tier component to invoke and how to perform the search.

In your example, I think when you click the search button, the search criteria should come to the action, which will populate the VO or DTO or whatever business tier data container class you have and then send the VO (containing the search criteria) to the business tier.

Even if you don't do much in the presentaion actions, your front controller should always invoke one type of classes (e.g. actions) as opposed to actions in some cases and delegates in others.
 
Jose Jim�nez
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
My doubs are with mapping *.screen --> TemplateServlet

For example in petstore, a page to search product go to link searchProduct.screen?id=233 ... then this url don't pass across FrontController because the views only retrieval information of server (Haven't action) . I think that is correct ..

What's do you think about ??
 
Chintan Rajyaguru
Ranch Hand
Posts: 341
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I hope I understand your question but here is what I think:

The whole point of having a front controller is to make every dynamic request pass through it. In this example, I believe there should be an action mapped to this URL (through an xml file or whatever). This action should
1. Instantiate the delegate
2. Invoke the delegate and ask it to retrieve the information
3. Put that information in a collection or java bean

The controller should then determine the page which will display the search results.
 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jose,

refer to this link:
http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/sample-app/sample-app1.3.1.html
Design and implementation of Petstore1.3.1
See also chapter 11: Architecture of the Sample Application from "Designing enterprise application with java J2EE 2nd edition"
(free pdf from Sun web site)

If there's no state change no event..)
"jsp--->view helper (custom tags)--->Business delegate--->facade--->business object".

Hope this helps

Marie Pierre
just a typo
[ August 23, 2005: Message edited by: Marie Pierre Courbevoie ]
 
Jose Jim�nez
Ranch Hand
Posts: 101
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes ������
Then is correct that not pass across FrontController , true ?
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic