-
1. Re: Why are SLSB not very object oriented?
christian.bauer Oct 23, 2005 5:56 PM (in response to drapierwim)It's typical for Gavin King documentation, you'll somtimes find "arguably not very object-oriented". I'm sure you can have an argument with him about the exact meaning, I had that a few times and I suppose we agree to disagree now. ;)
-
2. Re: Why are SLSB not very object oriented?
drapierwim Oct 24, 2005 5:47 PM (in response to drapierwim)Now I wonder why you disagree? For now I'm thinking of SLSB as not OO simply because they don't enclose state and behavior.
I'm just a student and still learing and very interested in this topic -
3. Re: Why are SLSB not very object oriented?
marius.oancea Oct 25, 2005 2:39 AM (in response to drapierwim)Yes, agree. This is the only reason to consider stateless bean not OO.
You could imagine stateless beans like static objects (even if they are not) and i think you already know static objects are also not considered part of OO paradigm.
Only my 2 cents
Marius -
4. Re: Why are SLSB not very object oriented?
christian.bauer Oct 25, 2005 4:59 AM (in response to drapierwim)I think object-orientation means "type inheritance" and that encapsulation is something completely different (basically, a scalar type that does not expose components but only operators is "encapsulated"). I can encapsulate stuff just fine in procedural programming languages. I can also put "state and behavior" with a type in procedural programming. But I can't do inheritance and polymorphism. You see why its arguable? :)
-
5. Re: Why are SLSB not very object oriented?
gavin.king Oct 26, 2005 6:23 AM (in response to drapierwim)The point is that OO programming is supposed to encourage a style where the functionality that operates upon state, and the state that is operated upon, are packaged into a single component definition. SLSBs package only operations, and must have their state stored elsewhere (eg, the HttpSession) and passed in as parameters. This is a procedural style of development.