IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New EJB's and classic OO theory
I have been reading up on EJB's and find that the whole EJB paradigm seems to go against classic OO theory. In classic OO theory, an Object contains both data and methods, for example an account object would contain both the account data (name, number, balance, interest rate, etc.) plus all the business logic related to an account, deposits, withdrawal, interest rate calculation, etc. EJB's seem to separate these into 2 separate objects, the Entity Bean which represents the data in the database, and the session bean which performs all the actions. Am I missing something here?

New Somewhat...
The entity bean should have data and methods that directly work on that data. The session bean glues together entity beans with business logic that spans entity beans.

Of course, they also tell you to use session beans and direct database logic as well. Entity beans are the most ridiculously complex, useless bit of junk I've seen in a while. Three interfaces for each bean! And they don't even relate to each other except through the xml bindings! It's garbage.
Regards,

-scott anderson

"Welcome to Rivendell, Mr. Anderson..."
New As I understand it, the problem EJBs tried to solve was

the need for server logic that could be isolated & thus made persistent if needed, but more importantly an EJB conformed to a standard design that supported getters setters *and* introspection.

A EJB container being the mechanism for managing the persistence of the beans.

AFAIR IBM's Hursley lab (of CICS fame) had a lot to do with the architecting & developement of EJB despite any dubious claims to the contrary from Sun. IBM were trying to bring some scalability to Java.

As a former strong proponent of Java, I find it has become so damned complex and has so many non-OOT exceptions to the rule, that I wonder why the world missed ST.

But such is life ...

Doug Marker

(Java was so digestable to former C programmers)
New EJB Complexity
Just the fact that you need a Home Interface for EJB's is ridiculous. It stems from the static typing and function calling orientation of Java. In a true message passing system these issues go away.
New The Home interface is the class interface
Since Java doesn't have real class objects, they found they had to put the class hierarchy back via the home mechanism. Its quite lame.



"Packed like lemmings into shiny metal boxes.
Contestants in a suicidal race."
    - Synchronicity II - The Police
New Classic OO theory is fscked, modern OO is double fscked
If you wrap all the data behind behavior, then it is harder to share data with other languages, applications, and tools. You end up reinventing a little mini database for each class: get, set, find, delete, save, dump, semaphore, sort, one-to-many object pointer lists (indexes), etc. Relational factors that commonality of interface/operations into a single spot. OO is so hell-bent on hiding implimentation that it violates OnceAndOnlyOnce (factoring) WRT interfaces.
________________
oop.ismad.com
     EJB's and classic OO theory - (bluke) - (5)
         Somewhat... - (admin)
         As I understand it, the problem EJBs tried to solve was - (dmarker) - (2)
             EJB Complexity - (bluke) - (1)
                 The Home interface is the class interface - (tuberculosis)
         Classic OO theory is fscked, modern OO is double fscked - (tablizer)

Reason! Won't you put your blue dress on?
54 ms