JSP and J2EE: The Big Picture


The phrase J2EE is bandied about a lot these days. It's worth understanding just what J2EE is, and how JSP (and Struts) fits into it.

J2EE (The Java 2 Enterprise Edition) can be thought of very narrowly or as a code word for a much larger body of technologies. As strictly defined by Sun, J2EE encompasses a bundle of Java technologies:

  • JavaServer Pages (JSP)

  • Java Servlets

  • Enterprise Java Beans (EJB)

  • The Java Naming and Directory Interface (JNDI)

  • The Java Transaction API (JTA)

  • The Java Database Connectivity API (JDBC)

  • Java Management Extension (JMX)

  • J2EE/CORBA Interface

  • J2EE Connector Architecture

  • Java Mail

  • Java Messaging Service (JMS)

Used together, these tools enable developers to create applications that are distributable across multiple tiers and are highly abstractable.

That said, there's a time and place for all of the above, and not necessarily all on the same projects. Just because you have a tool in your toolbelt doesn't mean you need to use it on every project.

THE RIGHT TOOL FOR THE RIGHT JOB

As an example, I have a friend who is working on a real-time application in which several subcomponents of a device need to communicate with each other over a private ethernet. A design decision was made early on to use CORBA for the various subdevices to communicate, which meant that each device had to implement a full TCP/IP stack. As a result, they were unable to achieve the cycle time they required because they kept hitting performance issues in the networking. My first question when I heard about this was, "Why didn't you just use raw ethernet packets to send the data around?" The answer was that someone had decided early on that CORBA was the " politically correct" technology to use, and mandated it.

In the same way, just because the platform you are deploying to supports J2EE, it doesn't mean you need to take advantage of every piece. Most applications will use JDBC because most applications talk to databases. You'll probably be using JSP ( especially in light of the fact that you're reading a book about Struts). But do you really need to deploy with EJB? Does this application need to be three-tiered , or can it be implemented two- tier ? Many of these tools can greatly complicate a project if they're used when inappropriate.

So, in the broadest sense, any platform that includes all the pieces of the J2EE spec can be thought of as a J2EE platform. These include all the major Java application servers, such as WebLogic Server and WebSphere. But many people mistake other features offered by these platforms, such as integration with MQueue, as being part of the J2EE spec. They are not, and should not be assumed to be part of a platform just because the platform is J2EE compliant.



Struts Kick Start
Struts Kick Start
ISBN: 0672324725
EAN: 2147483647
Year: 2002
Pages: 177

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net