This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Servlets and the fly likes Servlets and backend layer relationship Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Servlets and backend layer relationship" Watch "Servlets and backend layer relationship" New topic
Author

Servlets and backend layer relationship

Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327
Hi,

We can say Servelts are back end right? An interviewer once said "Servlets are not back end and for example Spring, EJB do". Is it right? Even spring MVC internally uses servlets to handle the requests right?

Thank You.
Tom Reilly
Rancher

Joined: Jun 01, 2010
Posts: 618
I guess it's all in the speaker's point of view. Some say the front-end is the presentation tier and the backend is everything else. Others will say the front-end is the presentation tier, servlets, Spring, and EJBs, etc. are in the middle tier, and the database is the backend. I once worked with someone who specialized in data warehousing. His view was there is the data warehouse database and everything else, including the transactional databases, is the front-end.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 60810
    
  65

Exactly. "Back end" is undefined. To me, as a web developer, the presentation layer (to include controllers) is "front end".


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Chetan Natu
Greenhorn

Joined: Dec 03, 2005
Posts: 19
Harshana Dias wrote:Hi,

We can say Servelts are back end right? An interviewer once said "Servlets are not back end and for example Spring, EJB do". Is it right? Even spring MVC internally uses servlets to handle the requests right?

Thank You.


Though I do agree with what Tom has mention ed, I would be loathe to call a Servlet as a back-end. To me, a back-end generally means a component which is either a data-storage mechanism, data-persistence mechanism or if I really want to ignore layered application design, business logic.

I can write business logic in servlets, but the design of servlets themselves forbid the use of business logic to be written inside it. Hence, personally if I am conducting your interview, I would agree with the statement that servlet can not be termed as a backend...

Servlet are at best part of the service layer, to paraphrase Tom and Bear, if you are a web-developer / Web designer where you focus is only on the user interface then yes Servlets could be thought of as a backend, but if you are talking about an application then Servlets cannot be called as a backend.

Hope that helps.


Never Remember the failure
Never Forget the mistake
Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327
Chetan Natu wrote: To me, a back-end generally means a component which is either a data-storage mechanism, data-persistence mechanism or if I really want to ignore layered application design, business logic.

I can write business logic in servlets, but the design of servlets themselves forbid the use of business logic to be written inside it. Hence, personally if I am conducting your interview, I would agree with the statement that servlet can not be termed as a backend...



well what i understood was term backend has different contexts. In high level we can say back end is what ever in server side. But then again back end components can act as front end too in back end technologies. i mean like for example servlet is a back end component where EJB is a back end technology. So when in comes to EJB context servlet act as front end. But lets think of a normal http client request web application where servlet is backend. So telling servlet is not backend is wrong where it depends on the context is correct.
Chetan Natu
Greenhorn

Joined: Dec 03, 2005
Posts: 19
Hi Harshana,

Yes, it does depend on the context under which you are looking at a servlet. Rather to rephrase that, let me say that it all depends on the role you are playing.

If you are acting as a web-designer (JSP, HTML), then a servlet would be a backend for you, but if you look at the application as a webapp developer in that case a servlet is just one component in the middle-ware and not a backend.

From the interviewer perspective, if I am interviewing you for a UI-developer post, then I might accept servlets being a backend, but if I am interviewing you for a post of a developer, then I would not accept the answer.
Harshana Dias
Ranch Hand

Joined: Jun 11, 2007
Posts: 327
Tom Reilly wrote:I guess it's all in the speaker's point of view. Some say the front-end is the presentation tier and the backend is everything else.


How about JSP Tom, though its belongs to presentation tier..but eventually its also a servlet know..so can you clarify this?
 
 
subject: Servlets and backend layer relationship
 
Similar Threads
Front end and server side programming
Sharing of Persistence Context - Multiple WAR
Spring servlet equivalent
What after OCJP ?
Need help and advice...