7.2 WITH SERVLETS
With this introduction, how are Servlets and EJB's placed? Table 7.1 attempts to uncover this idea.
Table 7.1
EJB | Servlet | |
---|---|---|
Web positioning layer (tier) | More towards backend, but broad based | More towards presentation |
Primary responsibility | Persistence | Request-response mechanism |
Nature of functionality | Encapsulate data | Expose data (present) |
Enabler | Enterprise capability | Multi-threading capability |
Enterprise concerns | Scalability,transactions, load-balancing,component based model (promoting reusability) | Can act as the controller (C in MVC) in the application |
Tier | Three or more tier architecture | Two or three tier architecture |
Development complexity | Complex | Simpler |
Nature of application | Requirement for ... |
Get Web Technology: Theory and Practice now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.