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

Servlets or EJB?

 
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
We are developing a portal. The design specified is JSP-EJB's-DAO's-DB.
We are using struts framework n JSP for the view. EJB's for processing, DAO's for frequent data access and oracle as a DB. We are a company with moderate number of employees. around 2000. The portal is for providing access to people in all the departments about their own specific stuff. and managing data at a single space.

What I dont understand is do we need to use struts for the view and again EJB's for processing? Do we need to go for EJB's for this kind of a desining? isnt servlet a better option?

Thanks,
Padma.
 
author
Posts: 3892
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You're comparing apples and oranges. Struts is for view and controller, not model processing. Especially when combined with Tiles, Struts will give you most of the portal-like functionality (rectangular placement of items with individual controllers behind them) out of the box.

However, that still doesn't address your model logic. That can be done with either EJB's or straight Java beans (plain old java classes) or a combination of the two. Servlet's aren't appropriate here -- Servlets are also meant for controller logic, not model logic.

This is just standard MVC layering -- I'd strongly suggest you read a book that covers both Struts and Servlets so that you can better understand the differences between the two and the advantages/disadvantages of both.

Kyle
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic