• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java application client

 
pinto sharma
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My question relates to j2ee architecture where we have to support both types of clients web and java application .
For the web client it is very clear how to implement front controller, business delegate and service locator patterns. But for java application I am confused as how to implement front controller, business delegate and service locator patterns i.e which tier should contain which component.
 
Hu Rui
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think only web is enough, at least according to my assignment.

Do you have different assignment? Specifically say Swing UI?

Swing is far more complex then Web. The internal interaction is very hard to draw with UML.

Does any body even seen JDK Swing lib implementation in UML?
 
I Roberts
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Unless you are considering to create the UI screen designs for the applications it is not possible to state the Swing components, as this could relate to JTable or any other number of components. I think for the Client Application the Swing components are not necessary and you can abstract you design to UI screen names as you would with JSP names. So long as you explain this approach in your design you should be able to justify the reasons for your abstraction.

Hope this helps!?
 
pinto sharma
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
dear Hu Rui
thanks for the reply ...

My question is if you have 2 differnt client than how do you make java application client to interface with ejb tier so that both application client and java client can share business functionalities ....

hope i have made myself clear...

Arvind
 
pinto sharma
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Roberts thanks for the reply..
actually i am a bit confused as ...if i am using folowing patterns for web client:
1. intercepting filter : for authentication
2. front controller : for deciding business flow
3. service locator : for locating business component...

now these 3 functionalities are very much required for java application client also....now which of these patterns will be put along with client application and which one will be pushed to ejb tier....

hope i have made myself clear...

Arvind
 
Bharat Ruparel
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Pinto,
You are absolutely right in your observation that the same model-view-controller logic is applicable to the Swing/Rich client interfaces as well. However, you don't have to present the same level of detail as you will for the web-client. Showing some sort of macro level components' organization and interaction within the Rich Client package should be enough. Realize that the same "Service Locator" component/service will be used to locate the EJB's in the business tier by both types of clients so the Service Locator component/service should be common.
Hope this helps.
Bharat
 
pinto sharma
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Bharat,
thanks for the reply...
Now I have 2 questions...

1. You said Service Locator can be shared by both the clients but how can we share it as service locator will be used by business delegate ...which will reside in web tier for web component.....
So in a way the copy of service locator component has to be prersent with java application also..

2. Does it mean that we should not show all these details for java application client in the diagram .

Pinto
 
Hu Rui
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Swing is not exactly MVC.
Web is very clear MVC architecture.

Swing is far more complex, each swing component is its own MVC. And it is twisted MVC. So swing is just many many MVC, with threads. Therefore it is so complex.

I think for assignment, you need only Web interface, uses Struts like MVC should be enough.
 
Bharat Ruparel
Ranch Hand
Posts: 493
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Pinto,
You can have a separate package (sub-system) which is called Locator /Look-up or something similar can't you? Service Locator should be a central component in this package besides others that you can think of...
Bharat
 
I Roberts
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pinto,

In response to your questions:

actually i am a bit confused as ...if i am using folowing patterns for web client:
1. intercepting filter : for authentication
2. front controller : for deciding business flow
3. service locator : for locating business component...

now these 3 functionalities are very much required for java application client also....now which of these patterns will be put along with client application and which one will be pushed to ejb tier....

hope i have made myself clear...

Arvind[/QB]


My reference of using abstract UI screen names were to encapsulate the fine details required when creating Swing components. Unlike JSPs, a Swing UI can consist of a number of Swing components to create the client application and there it is difficult to determine what component should be shown unless you are prepared to design the UI itself, which is not in scope for this assignment.

However, the Front Controller and Service Locator are "Presentation Tier" patterns and not specific to Swing or JSP abstractions. It can also be suggested that as a client application [using Swing] is basically a fat client solution, the application itself is not presentation but "Client Tier" and therefore a Service Locator may actually reside as part of the "Client Tier" if you decide to allow the Swing model to invoke the relevant EJBs on the "Business Tier" directly (i.e. without providing a "Presentation Tier" filter). Although this is quicker in response times, it obviously doesn't come without its negative impact.

Hope this helps!?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic