Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Servlets and backend layer relationship

 
Harshana Dias
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 618
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64632
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Exactly. "Back end" is undefined. To me, as a web developer, the presentation layer (to include controllers) is "front end".
 
Chetan Natu
Greenhorn
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Harshana Dias
Ranch Hand
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 19
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 333
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic