• 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

java bean subsystem?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Currently I'm comin up with a internet portal for my final year project.Got some problems in understanding about system architecture.
When we talk about system architecture and the n-tier model,is javabeans included as a tier?
for example,The tiers used for this example include the client, presentation, business logic, integration, and data.
if i want to include a chat room or discussion forum in my structure, which tier does it fall under?
i used this site as reference
http://www.macromedia.com/desdev/articles/ntier.html
Can anyone kindly explain to mi?Or some reference sites that will enhance my understandin on this?
thank you.
 
Ranch Hand
Posts: 311
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Clarice Lin:
... n-tier model,is javabeans included as a tier?


Hi Clarice,
I assume you are talking about ordinary JavaBeans (according to JAF - Java Activation Framework) and not Enterprise JavaBeans (EJB), which have pretty different technologies.
JavaBeans when used in GUI programming I would put into client tier.
JavaBeans called in JSPs work for the server and can not make things like _client-side_ input validation.
JavaBeans called by JSPs or servlets (in web tier) may recide in the web tier too (but not EJBs). What good reasons exist to introduce an additional tier for the JavaBeans? They would have to be in the web container anyway (not EJB container). Logically splitting the web tier into a "normal web tier" and a "JavaBean web tier" would separate JSP/servlet code from JavaBean code, ok. You could have only your "JavaBean web tier" access the database directly via JDBC. The "normal web tier" would be free of data access functionality. But at this point I would think about treating the JavaBeans being "the data access tier", i.e. "the enterprise integration tier" (with no business logic (EJB) tier between). This assumes that you do not have EJBs anyway; otherwise there would be an uggly mix of EJBs and JavaBeans. I appreciate your intents but I would just put your JavaBeans into different _packages_. Do you others agree?
When your JavaBeans are to separate the business logic without using EJBs: Then the JavaBeans are the business logic tier but run in the web container (but are not part of the web tier). Would that still be worth to use a J2EE _application_ server?
You even could use JavaBeans in the business logic tier calling specialized JavaBeans in the data access tier for reasons of _logically_ splitting into all the recommended tiers. But only if you use an EJB tier as
your business logic tier then you get the additional _non-logical_ benefits of scalability for the business logic tier. So if you probabely will need scalability of the business logic tier then you should use EJBs instead of JavaBeans.


... chat room ..., which tier does it fall under?


Assuming your business logic tier is to be an EJB tier I would put the chatter into a session EJB. Each chatter starts a session. If there are member variables to be saved from request to request then you will need a statefull session EJB, otherwise a stateless one.


... discussion forum ..., which tier does it fall under?


The discussion forum can be a stateLESS EJB because a new topic is sent as "fire-and-forget". In replies each replier has his own session (i.e. with another session state). Do you agree?
(BTW the article you quoted did not help me deciding anything - too vendor specific and no relation to chat rooms or discussion forums)
Thomas.
 
reply
    Bookmark Topic Watch Topic
  • New Topic