On Sep 9, 2009, at 2:29 PM, James McGill wrote:

On Wed, Sep 9, 2009 at 7:52 AM, Adrian Crum <[email protected]> wrote:

I don't know what you mean by all the Java methods are static.
-Adrian


With very few exceptions, all the service methods in all the applications,
as far as I've seen, are static.
I'm sure there's a solid rationale for this approach, but I'd like to know
the details.  It seems to make it
more of a "Class - function" oriented design, not "Object" oriented, and
it's unusual Java.

You're right, services are not object-oriented, they follow a service oriented architecture. You can use objects within the services, but the point of them is to operate in a more isolated and well-defined context. In other words they should only know about the parameters passed in and what they can find in the database or by calling another service, and likewise they should only persist in the database or by calling other services.

To better understand the architecture of OFBiz and to get an idea of the big picture (which will help this make more sense), please watch the framework introduction videos available here:

http://docs.ofbiz.org/display/OFBTECH/Framework+Introduction+Videos+and+Diagrams

-David


Reply via email to