• 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
  • Ron McLeod
  • Paul Clapham
  • Tim Cooke
  • Devaka Cooray
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
Bartenders:
  • Carey Brown
  • Roland Mueller

In which tier should servlets be ?

 
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I mean, according with SUN�s blueprint, Servlets should always be in view tier
or if it may be in business tier also ?
I think it is very subjective, don�t you ?

Regards,
 
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Servlets and JSPs are in web tier with Servlet as controllar and JSP as view, EJBs are in business tier.
 
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Some references classify Servlet as the controller in MVC and therefore consider it in Business tier. Other references classifies it as View (its responsibility should be concerned only with views while the Controllers do Business Logic) so it lies in the web tier.

One wants to know what the exam authors consider it
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Basically, Servlets and JSP are components in Web Tier, whereas EJB is components in Business Tier.

The questions in the exam will be very clear so that you know what you have to choose.

Nick
 
Eusebio Floriano
Ranch Hand
Posts: 241
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Nicholas Cheung:
Basically, Servlets and JSP are components in Web Tier, whereas EJB is components in Business Tier.

The questions in the exam will be very clear so that you know what you have to choose.

Nick



But when we�re talking about web-based apps with no EJB. A servlet could be the controller, couldn�t it ? Or even in a web-based app should i consider Servlets for view�s purpose only ?

Like i said, i just think that this is very subjective.

Regards,
 
Ranch Hand
Posts: 3178
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vinicius Boson:


But when we�re talking about web-based apps with no EJB. A servlet could be the controller, couldn�t it ? Or even in a web-based app should i consider Servlets for view�s purpose only ?

Like i said, i just think that this is very subjective.

Regards,



As someone has just mentioned above, Servlet is responsible for the controller role in MVC model, but that so-called controller is still in presentation(web) tier...
 
Mahesh Kumaraguru
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
From Designing Enterprise Applications with the J2EE(TM) Platform, Second Edition :-
1.2.1.1 Multitier Model
The J2EE architecture defines a client tier, a middle tier (consisting of one or more subtiers), and a back-end tier. The client tier supports a variety of client types, both outside and inside of corporate firewalls. The middle tier supports client services through Web containers in the Web tier and supports business logic component services through Enterprise JavaBeanstm (EJBtm) containers in the EJB tier. On the back end, the enterprise information systems in the EIS tier are accessible by way of standard APIs.

Also refer 4.4.2 Web-Tier MVC Controller Design
[ July 06, 2005: Message edited by: Mahesh Kumaraguru ]
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I would say, arguments are correct here.

However, when you sit in the SCJA exam, there will be obvious choices that you will definitely select them.

Moreover, SCJA is too preliminary that it does not care too much about the detail.

Nick
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


But when we�re talking about web-based apps with no EJB. A servlet could be the controller, couldn�t it ? Or even in a web-based app should i consider Servlets for view�s purpose only ?

Like i said, i just think that this is very subjective.


I agree, even JSP can be business tier in such sense because we can always code business logic there, even connect to legacy systems.

Nick
 
Mahesh Kumaraguru
Ranch Hand
Posts: 109
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


I agree, even JSP can be business tier in such sense because we can always code business logic there, even connect to legacy systems.



If we do this then we are not talking about Model 2 / MVC architecture / N-Tier systems. Then it becomes like an old Cobol program where a single program displays an input screen, reads user input, validates it, does database I/O, displays output screen - Model, View & Controller in a single program.
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


If we do this then we are not talking about Model 2 / MVC architecture / N-Tier systems


In fact, the questions do not specify what models or what patterns are using. Modelling & patterns are too details for SCJA. It just simply ask which technologies are used in xxx tier. Thus, normal assumption will be fine. Web tier is JSP & Servlets; Business tier is EJB.

Moreover, the SUN exams clearly show SUN's point of view. Web Components (SCWCD) are Servlets and JSPs while Business Components (SCBCD) are EJBs. Based on our discussions, Servlets can also be a business components but SCBCD does not include it.

When you take the exam and read the questions, you will find that no arguments for this issue.

Nick
 
I yam what I yam and that's all that I yam - the great philosopher Popeye. Tiny ad:
We need your help - Coderanch server fundraiser
https://coderanch.com/wiki/782867/Coderanch-server-fundraiser
reply
    Bookmark Topic Watch Topic
  • New Topic