So, I’m an old mainframe dinosaur, and the meteor just hit (actuall, it hit in 2001, but I’ve been able to ignore until now).
So, I’ve got NetBeans 3.6, and Borland JBuilder on this machine. before I wade all the through the textbook (since when does it take 1,000 pages to write an intro to programming text? The 1970’s vintage COBOL book managed in about 250 pages, and procedural languages are a lot more complicated than O-O-P. Nevermind…)
So - I know that Java has “beans” and J2EE has “EJB’s” - I know they’re on this machine - so far I have been unable to find a simple chart showing bean/EJB name, function, and arguments.
I’m not the expert (because I don’t work a lot with the beans), but in my opinion a “bean” and an “EJB” are basically different names for the same concept. It’s just that J2EE is Java 1.4 and they call everything “enterprise” this-and-that. So J2EE and anything later would always call a bean an EJB. So J2EE has extra functionality in it, but a bean is a bean, whatever you call it.
I had a whole big post written up, but then the hampster ate it.
Anyway, EJBs are not the same as JavaBeans.
They’re both component APIs for writing reusable, modular components, but they’re not the same API, and they do different things.
JavaBeans are usually used for UI elements - buttons, text areas, scroll bars, etc. You’d use them in standalone programs and applets. Using the JavaBeans API gives the programmer the ability to use widgets without having to know specific information about the internals of the bean.
EJBs are server-side modules that run inside an application server like Tomcat, JBoss or Weblogic. The EJB API gives the programmer the ability to skip doing what can often be the most annoying parts of building a server-side application (usually a website), like maintaining object persistance, handling sessions, and providing backend database connections.
This is not quite true. J2EE != Java 1.4. There is Java 1.4 J2SE, which is the basic Java API, compiler, etc. The J2EE is additional stuff for building web-based applications as explained by buckgully. An EJB is a very specific type of bean which must conform to a certain API. An EJB is a bean, but not every bean is an EJB.