Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

A special purpose language is used to create logic in a language or using a tool that fits the specific need more appropriately than a general purpose procedural language like Java. This reduces code because it is easier to describe what you want in a context that closely matches the problem that needs to be solved than it is to use a generic language. High level conepts can be expressed without the need to write a lot of code.

Generic Versus Special Purpose

...

Artifacts

For OFBiz OOTB the point for the generic artifacts (in all tiers of the application) is to be as inclusive as possible. There is one reason for this: it is easier to know something is there and decide you don't want it and then to remove it than it is to not know that it exists and either try to find it or end up implementing it anew.

...

This has been thought through and the OFBiz framework was designed very specifically to handle this sort of thing. It is relatively easy to create user interfaces that are specific to certain roles within an organization, and that is what OFBiz customization or creation of derivative works or creation of special purpose user interfaces is all about. That's the very definition of it.

In all part of the framework the best practice is to first create a generic or general purpose artifact if it does not already exist. For anything that is specific to a certain role within an organization or that is for a special purpose the best practice is to derive the artifact from the generic one with as little redundant code as possible using the many override mechanisms that exist in OFBiz. For the most part this can be done without changing ANY of the base code from the open source project, making it easier to maintain over time.

Data Layer

The best-practice tool to use in the data layer is the OFBiz Entity Engine. For most applications the Entity Engine will elegantly do the work for 99% of your database interaction needs. In the few cases where the Entity Engine is not sufficient I recommend using custom JDBC code for your queries or other commands. That would be one of the second-best-practices that are sometimes needed.

...