Bean.There.Done.Dat

Day 4 of J2EE training. Today, we completed everything on Enterprise Java Beans (EJB). For the past two days, we learnt about Session Beans, Entity Beans and today, Message-driven Beans. Also learnt about Bean Managed Persistence (BMP) and Container Managed Persistence (CMP). The IDE used in the course was Forte (also known as Netbeans).

So how does all the above compare with .NET? If you have done some architecture work, Session Beans are more like your Business Component classes where you handle all the complex business logic, manage transactions, manage your entity objects and etc. Entity Beans are your Business Entity objects. If you have been using my Paladin framework, you should be familiar with Entity objects. Basically they are classes that mapped to your database tables.

BMP and CMP are two ways of how a J2EE application server handles Entity Beans. In BMP, you have to write your own Data Access code - that includes your own SQL statements. CMP on the other hand, generates all the SQL statements for you behind the scene. Again, if you are using Paladin, you will have no problems visualizing it.

It is nice to see someone explain the concepts that I've already implemented in Paladin. It confirms that I'm on the right track. There seems to be a lot of similarities between CMP EJBs and Paladin although the implementations are different. To be realistic, there is also no way for me to grow Paladin to match their scale unless someone buy up my project ;P

One complaint I have is that it takes too much effort to write those Beans. I'm glad that I made Paladin simpler and gave it a more powerful wizard. The Attributes programming in .NET also gave me additional advantage in handling the mappings. However, CMP EJBs are managed and recognized by J2EE application servers - that's the part that I can't do with my limited skills. *BooHooHoo* Anyway, it is something nice to learn - Just for the kicks.

Tomorrow, it is all about Servlets and JSP.

No comments:

Post a Comment

Popular Post