You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ofbiz.apache.org by Adam Heath <do...@brainfood.com> on 2007/10/16 00:48:55 UTC

Best Practices - Re: Storage of Boolean in GenericEntity

David E Jones wrote:
> 
> Adam,
> 
> It's pretty clear you like this idea and don't want to back down, so I'm
> not going to push back.

It's been a problem for me(and Ean, my coworker) since we started using
OfBiz.  It's not something new.  It's made our job *more* difficult.

> What is wrong with the code already in the GenericEntity.java file that
> does this boolean conversion?

> As far as making it a best practice goes... maybe you should read
> through the best practices list and see if you can find where it might
> for it. For form, screen, tree, and menu widgets and for simple-methods
> it's a non-issue as Y/N are actually easier and less confusing (zero
> mapping beats single mapping any day). This only has an effect for
> business logic written Java, and I think that's a bad idea in the first
> place.

What do you mean, by zero-mapping vs single-mapping?

When I see code that compares a value to Y/N, I assume it's a
single-character string field, and can store any single character.  A
boolean comparison, on the other hand, tells me exactly what the field
holds.

> So:
> 
> 1. small issue; not going to save anyone any significant amount of time

For those that have dealt with OfBiz from the beginning, you are right,
that this will hurt their knowledge of the framework.

However, new users coming into the system have no idea about what the
Y/N stuff is about; they deal with java objects, and those are booleans.

We *want* new people to use OfBiz.  And this special case will cause
them grief.

> 2. bad for the best practices tools
> 
> If you want to argue with the best practices... feel free to start up a
> thread, just try to keep in mind limited resources, better things to
> work on for EVERYONE, and general ROI (starting with proving any sort of
> return, before even thinking about the investment required).

Switching to boolean values for boolean fields *will* reduce the code on
the system.

Another point; in lots of simple method definitions, there are blocks
for doing CRUD to entities; in the vast majority of cases, these method
definitions are *identical*, except for the entity name and property to
pull error messages from.  This points to a need to refactor.

> http://docs.ofbiz.org/display/OFBADMIN/Best+Practices+Guide

Nothing about booleans there.  And it mentions CVS, which is years out
of date.

And what is OOTB?  It's used, but never defined.

Re: Best Practices - Re: Storage of Boolean in GenericEntity

Posted by Ludovic Maitre <lu...@free.fr>.
Hi all,

Although i doesn't contribute to the codebase yet, i would like to say 
that i totally agree with Adam. This is stupid to do checks on character 
where we can do simple checks on boolean. I didn't see the point in 
arguing all the night that it's better to do string comparison than 
boolean comparison. (and i'm not a beginner at programming)

Best regards,

Adam Heath a écrit :
> David E Jones wrote:
>
>   
>> Is that what you are looking for? If so I apologize as I was confused. I
>> thought you were proposing that we force this throughout. The option to
>> treat the Y/N values as booleans has been around for a long time.
>>     
>
> Wasn't looking for anything.  I am aware of the methods on GenericEntity.
>
>   
>> If you're proposing that we change the get method to behave like the
>> getBoolean method by default, then I'd be pretty against that as it
>> would break a LOT code/etc, much of which is not compiled.
>>     
>
> I am proposing that, but it might wait for an extended period.  Code
> coverage will help with it.  And my grep foo is rather good and finding
> these things.
>
> I'm willing to do this in a git/svk branch, if there is worry about
> breakage.
>
>   
>> Whatever the case, again please be more specific about what you
>> propose... I kind of feel like I'm spinning my wheels... ;)
>>     
>
> Ok, let's do this another way:
>
> If I want an Integer from an entity, I do:
>
> 	(Integer) value.get("integerField");
>
> If I want a Timestamp from an entity, I do:
>
> 	(java.sql.Timestamp) value.get("timestampField");
>
> If I want a BigDecimal from an entity, I do:
>
> 	(BigDecimal) value.get("bigDecimalField");
>
> If I want a Blob from an entity, I do:
>
> 	(Blob) value.get("blobField");
>
> If I want a Boolean from an entity, I do:
>
> 	value.getBoolean("booleanField");
>
> or:
> 	"Y".equals(value.get("booleanField"))
>
> Note the pattern.
>
>
>   


-- 
Cordialement,
Ludo - http://www.ubik-products.com
---
"L'amour pour principe et l'ordre pour base; le progres pour but" (A.Comte) 


Re: Best Practices - Re: Storage of Boolean in GenericEntity

Posted by Adam Heath <do...@brainfood.com>.
David E Jones wrote:

> Is that what you are looking for? If so I apologize as I was confused. I
> thought you were proposing that we force this throughout. The option to
> treat the Y/N values as booleans has been around for a long time.

Wasn't looking for anything.  I am aware of the methods on GenericEntity.

> If you're proposing that we change the get method to behave like the
> getBoolean method by default, then I'd be pretty against that as it
> would break a LOT code/etc, much of which is not compiled.

I am proposing that, but it might wait for an extended period.  Code
coverage will help with it.  And my grep foo is rather good and finding
these things.

I'm willing to do this in a git/svk branch, if there is worry about
breakage.

> Whatever the case, again please be more specific about what you
> propose... I kind of feel like I'm spinning my wheels... ;)

Ok, let's do this another way:

If I want an Integer from an entity, I do:

	(Integer) value.get("integerField");

If I want a Timestamp from an entity, I do:

	(java.sql.Timestamp) value.get("timestampField");

If I want a BigDecimal from an entity, I do:

	(BigDecimal) value.get("bigDecimalField");

If I want a Blob from an entity, I do:

	(Blob) value.get("blobField");

If I want a Boolean from an entity, I do:

	value.getBoolean("booleanField");

or:
	"Y".equals(value.get("booleanField"))

Note the pattern.

Re: Best Practices - Re: Storage of Boolean in GenericEntity

Posted by David E Jones <jo...@hotwaxmedia.com>.
On Oct 15, 2007, at 5:21 PM, Adam Heath wrote:

> David E Jones wrote:
>>
>> On Oct 15, 2007, at 4:48 PM, Adam Heath wrote:
>>
>>> David E Jones wrote:
>>>>
>>>> Adam,
>>>>
>>>> It's pretty clear you like this idea and don't want to back  
>>>> down, so I'm
>>>> not going to push back.
>>>
>>> It's been a problem for me(and Ean, my coworker) since we started  
>>> using
>>> OfBiz.  It's not something new.  It's made our job *more* difficult.
>>
>> Could you be more specific? What has made your job more difficult?
>
> MyEvent.groovy:
>
> == What I currently do:
>
> def value = delegator.findByPrimaryKeyCache("EntityName", [fieldName:
> "fieldValue"])
> if ("Y".equals(value.booleanField)) {
> 	// default false logic
> ==
>
> == What I'd like to do:
> if (value.booleanField) {
> 	// default false logic
> ==

So what is making your job more difficult is having to do this:

if ("Y".equals(value.isSomething))

instead of this:

if (value.isSomething)

Is that right?

If you're looking for easy to understand this has been supported for  
half a dozen years:

if (value.getBoolean(isSomething).booleanValue())

Or if Groovy is like bsh you can just do:

if (value.getBoolean(isSomething))

Is that what you are looking for? If so I apologize as I was  
confused. I thought you were proposing that we force this throughout.  
The option to treat the Y/N values as booleans has been around for a  
long time.

If you're proposing that we change the get method to behave like the  
getBoolean method by default, then I'd be pretty against that as it  
would break a LOT code/etc, much of which is not compiled.

Whatever the case, again please be more specific about what you  
propose... I kind of feel like I'm spinning my wheels... ;)

-David



Re: Best Practices - Re: Storage of Boolean in GenericEntity

Posted by Adam Heath <do...@brainfood.com>.
David E Jones wrote:
> 
> On Oct 15, 2007, at 4:48 PM, Adam Heath wrote:
> 
>> David E Jones wrote:
>>>
>>> Adam,
>>>
>>> It's pretty clear you like this idea and don't want to back down, so I'm
>>> not going to push back.
>>
>> It's been a problem for me(and Ean, my coworker) since we started using
>> OfBiz.  It's not something new.  It's made our job *more* difficult.
> 
> Could you be more specific? What has made your job more difficult?

MyEvent.groovy:

== What I currently do:

def value = delegator.findByPrimaryKeyCache("EntityName", [fieldName:
"fieldValue"])
if ("Y".equals(value.booleanField)) {
	// default false logic
==

== What I'd like to do:
if (value.booleanField) {
	// default false logic
==

Groovy treats maps as objects with properties, and can automatically
pull out fields.  It also does automatic boxing/unboxing, including
handling nulls(so that sql trinary logic works as expected).

Additionally, Boolean.TRUE.equals(value.get("booleanField")) is easier
to understand, than "Y".equals(value.get("booleanField")).  In the
latter case, which scanning the code, it's hard to know if booleanField
is really a boolean-typed field, or a single-character string field.
I'd have to look at the entity definition to be sure.

So, there's a valid concern.  Seeing a compare to a "Y" or an "N", could
mean it's a single-character field, a string field, *or* a boolean
field.  It's not known by looking at just the code in question.  Whereas
if it was a boolean compare, there would be no doubt.

Additionally, as mentioned before, new users seeing ofbiz for the first
time are used to dealing with their language's native objects.  This Y/N
pattern is not really a boolean, but an attempt to graft something new
into the programming system.  It's more to learn.

Re: Best Practices - Re: Storage of Boolean in GenericEntity

Posted by David E Jones <jo...@hotwaxmedia.com>.
On Oct 15, 2007, at 4:48 PM, Adam Heath wrote:

> David E Jones wrote:
>>
>> Adam,
>>
>> It's pretty clear you like this idea and don't want to back down,  
>> so I'm
>> not going to push back.
>
> It's been a problem for me(and Ean, my coworker) since we started  
> using
> OfBiz.  It's not something new.  It's made our job *more* difficult.

Could you be more specific? What has made your job more difficult?

-David


Re: refactoring of similar simple-method

Posted by Adrian Crum <ad...@hlmksw.com>.
Something similar was done with permission checking - see the CommonPermissionServices.xml file in 
framework/common and how it is used in FixedAssetMaintServices.xml in specialpurpose/assetmaint.


Jacques Le Roux wrote:

> De : "Adam Heath" <do...@brainfood.com>
> 
>>Another point; in lots of simple method definitions, there are blocks
>>for doing CRUD to entities; in the vast majority of cases, these method
>>definitions are *identical*, except for the entity name and property to
>>pull error messages from.  This points to a need to refactor.
> 
> 
> IMHO, this point is very interesting, but of course need some work...
> 
> Jacques
> 


Re: refactoring of similar simple-method

Posted by Jonathon -- Improov <jo...@improov.com>.
 > So, yeah, it was intentional to have separate operations for things like (all
 > of these are just for creates, different combinations for different things):

Overly tight coupling of any of the building-block functions will mean less flexibility.

Quick example. I decide to create a class called MyGUI. Then I thought I would subclass that and 
create AnotherGUI. Before I know it, MyGUI and AnotherGUI drift apart and become less common. But 
because both classes use common methods, I have to be careful when changing MyGUI. At some point, 
possibly due to time constraints, I give up, and I create AnotherGUI from scratch, completely 
decoupled from MyGUI. When I do have time, I will refactor MyGUI and AnotherGUI, and possibly 
create BaseGUI as a parent for both classes. On hindsight, it was probably better to have started 
out with separate classes MyGUI and AnotherGUI, and then spot commonalities along the way. 
Hindsight is always better and cheaper than foresight.

 > We could identify a few variations and have single operations,

We could identify commonalities on hindsight, yes. Still, the basic building-block codes must be 
available, just so users and their myriad of use cases can still be served. On really clear 
hindsight in future, we may decide that 2 or more building-block codes simply CANNOT be split up 
or be called in any other than 1 order. Then we cobble those together for good.

 > It does us no good to create something that supports super fast development
 > if it makes ongoing maintenance and extension/customization more difficult

The Widget framework is already "shrink-wrapped" enough to make certain customizations difficult. 
Maybe we shouldn't "shrink-wrap" the CRUD-related minilang functions and shouldn't make 
customizations just that bit more difficult?

 > but rest assured that if I shut up others will fill in because lots of people
 > in the ofbiz community have experience with this and know what kind of a
 > difference it makes.

I don't mind additive changes. If functions need to be removed, deprecate obsolete usages and give 
us time to move!

Jonathon

David E Jones wrote:
> 
> On Oct 16, 2007, at 12:51 PM, Jacques Le Roux wrote:
> 
>> De : "Adam Heath" <do...@brainfood.com>
>>
>>> Another point; in lots of simple method definitions, there are blocks
>>> for doing CRUD to entities; in the vast majority of cases, these method
>>> definitions are *identical*, except for the entity name and property to
>>> pull error messages from.  This points to a need to refactor.
>>
>> IMHO, this point is very interesting, but of course need some work...
> 
> These were designed VERY specifically to be this way. It is true there 
> are only a few common variations for different data structures and 
> corresponding create/updated/delete operations.
> 
> The point of having simple-methods exist for this instead of just have 
> "call create variation A" in the service definition is to make it easy 
> to customize and enhance. As functionality around certain entities grows 
> these methods do tend to grow beyond the base 2-4 operations that the 
> typical minimal methods include.
> 
> So, yeah, it was intentional to have separate operations for things like 
> (all of these are just for creates, different combinations for different 
> things):
> 
> 1. make a value object
> 2. put a sequenced id in a single pk field for the object
> 3. move all primary key fields from the parameters or other Map into the 
> value
> 4. move non-pk fields from a Map into the value
> 5. set individual fields on the value
> 6. and so on...
> 
> We could identify a few variations and have single operations, or avoid 
> writing simple-methods altogether with the service def thing I mentioned 
> above, but that would just reduce consistency between different 
> simple-methods and make customization and extension more difficult.
> 
> It seems like some recent comments stem from a disagreement that 
> consistency and ease of customization are important... that might be an 
> interesting thing to talk about explicitly. Much of the OFBiz framework 
> is meant for help just those things, where necessary sacrificing other 
> priorities, all part of optimizing the development experience at the XML 
> file level.
> 
> The driving factor behind that priority is that in most large software 
> it is complexity that kills projects and causes budgets to spiral out of 
> control. As complexity increases the time and cost tends to increase in 
> a non-linear way, ie something like exponentially or logarithmically 
> instead of linearly. When I say complexity I mean general solution 
> complexity across hundreds of entities and services and screens, and not 
> the complexity of a single service. The point of defining the scope and 
> purpose of a service is to limit the complexity of that one piece to 
> make it possible to write and maintain it with a reasonable volume of 
> requirements.
> 
> For OFBiz (both the framework and the applications) it is critical that 
> we all keep this in mind. It does us no good to create something that 
> supports super fast development if it makes ongoing maintenance and 
> extension/customization more difficult (including other people's code or 
> years later when you've forgotten and it might as well be something 
> someone else wrote). The point is to be as clear and consistent as 
> possible across a variety of data structures and business processes.
> 
> When talking about framework improvements that should be the first thing 
> considered and written about when presenting ideas. Ideas that don't 
> help with that will be fought pretty hard by various people, me being 
> the most vocal, but rest assured that if I shut up others will fill in 
> because lots of people in the ofbiz community have experience with this 
> and know what kind of a difference it makes.
> 
> -David
> 


Re: refactoring of similar simple-method

Posted by David E Jones <jo...@hotwaxmedia.com>.
On Oct 16, 2007, at 2:51 PM, Adam Heath wrote:

>> The driving factor behind that priority is that in most large  
>> software
>> it is complexity that kills projects and causes budgets to spiral  
>> out of
>> control. As complexity increases the time and cost tends to  
>> increase in
>> a non-linear way, ie something like exponentially or logarithmically
>> instead of linearly. When I say complexity I mean general solution
>> complexity across hundreds of entities and services and screens,  
>> and not
>> the complexity of a single service. The point of defining the  
>> scope and
>> purpose of a service is to limit the complexity of that one piece to
>> make it possible to write and maintain it with a reasonable volume of
>> requirements.
>
> Exactly the point I'm trying to make.
>
> If every CRUD implementation on every entity has it's own
> implementation, then there are that many *more* things that have to be
> learned.

Um, but that's NOT the point I was making. You're talking about  
sacrificing flexibility and ease of customization for ease of initial  
implementation. As for understanding and reading, once you've seen  
one of each pattern you've seen them all so there isn't anything more  
to keep a handle on, until you find an exception to the pattern you  
are used to and then it's important to look and understand why it is  
different, and yada yada yada.

-David


Re: refactoring of similar simple-method

Posted by Adam Heath <do...@brainfood.com>.
David E Jones wrote:
> These were designed VERY specifically to be this way. It is true there
> are only a few common variations for different data structures and
> corresponding create/updated/delete operations.
> 
> The point of having simple-methods exist for this instead of just have
> "call create variation A" in the service definition is to make it easy
> to customize and enhance. As functionality around certain entities grows
> these methods do tend to grow beyond the base 2-4 operations that the
> typical minimal methods include.

The refactoring I mentioned never talked about implementation of the
common services; they could very well still be simple methods.

> So, yeah, it was intentional to have separate operations for things like
> (all of these are just for creates, different combinations for different
> things):
> 
> 1. make a value object
> 2. put a sequenced id in a single pk field for the object
> 3. move all primary key fields from the parameters or other Map into the
> value
> 4. move non-pk fields from a Map into the value
> 5. set individual fields on the value
> 6. and so on...
> 
> We could identify a few variations and have single operations, or avoid
> writing simple-methods altogether with the service def thing I mentioned
> above, but that would just reduce consistency between different
> simple-methods and make customization and extension more difficult.
> 
> It seems like some recent comments stem from a disagreement that
> consistency and ease of customization are important... that might be an
> interesting thing to talk about explicitly. Much of the OFBiz framework
> is meant for help just those things, where necessary sacrificing other
> priorities, all part of optimizing the development experience at the XML
> file level.
> 
> The driving factor behind that priority is that in most large software
> it is complexity that kills projects and causes budgets to spiral out of
> control. As complexity increases the time and cost tends to increase in
> a non-linear way, ie something like exponentially or logarithmically
> instead of linearly. When I say complexity I mean general solution
> complexity across hundreds of entities and services and screens, and not
> the complexity of a single service. The point of defining the scope and
> purpose of a service is to limit the complexity of that one piece to
> make it possible to write and maintain it with a reasonable volume of
> requirements.

Exactly the point I'm trying to make.

If every CRUD implementation on every entity has it's own
implementation, then there are that many *more* things that have to be
learned.

However, if you see that entity #1 uses one implementation, then entity
#2 uses it, and entity #3 uses it, ..., then that's *less* that you have
to learn.

It should *always* be possible to have per-entity implementations; no
one is suggesting that that feature be removed.  But reducing code, by
refactoring, and reducing the learning requirements, *is* a win.

Commonality is *good*.  If it weren't, we wouldn't have an entity
engine, or a service engine.  We'd have hard-coded jdbc calls and bsf
usage scattered all over.

If just 2 entities share the same CRUD implementation, then we have
reduced the knowledge workload, and that is a win.

> For OFBiz (both the framework and the applications) it is critical that
> we all keep this in mind. It does us no good to create something that
> supports super fast development if it makes ongoing maintenance and
> extension/customization more difficult (including other people's code or
> years later when you've forgotten and it might as well be something
> someone else wrote). The point is to be as clear and consistent as
> possible across a variety of data structures and business processes.

Please stop making my points for me.



Re: refactoring of similar simple-method

Posted by Jacques Le Roux <ja...@les7arts.com>.
I see the point, thanks for comment David

Jacques

De : "David E Jones" <jo...@hotwaxmedia.com>

> 
> On Oct 16, 2007, at 12:51 PM, Jacques Le Roux wrote:
> 
> > De : "Adam Heath" <do...@brainfood.com>
> >
> >> Another point; in lots of simple method definitions, there are blocks
> >> for doing CRUD to entities; in the vast majority of cases, these  
> >> method
> >> definitions are *identical*, except for the entity name and  
> >> property to
> >> pull error messages from.  This points to a need to refactor.
> >
> > IMHO, this point is very interesting, but of course need some work...
> 
> These were designed VERY specifically to be this way. It is true  
> there are only a few common variations for different data structures  
> and corresponding create/updated/delete operations.
> 
> The point of having simple-methods exist for this instead of just  
> have "call create variation A" in the service definition is to make  
> it easy to customize and enhance. As functionality around certain  
> entities grows these methods do tend to grow beyond the base 2-4  
> operations that the typical minimal methods include.
> 
> So, yeah, it was intentional to have separate operations for things  
> like (all of these are just for creates, different combinations for  
> different things):
> 
> 1. make a value object
> 2. put a sequenced id in a single pk field for the object
> 3. move all primary key fields from the parameters or other Map into  
> the value
> 4. move non-pk fields from a Map into the value
> 5. set individual fields on the value
> 6. and so on...
> 
> We could identify a few variations and have single operations, or  
> avoid writing simple-methods altogether with the service def thing I  
> mentioned above, but that would just reduce consistency between  
> different simple-methods and make customization and extension more  
> difficult.
> 
> It seems like some recent comments stem from a disagreement that  
> consistency and ease of customization are important... that might be  
> an interesting thing to talk about explicitly. Much of the OFBiz  
> framework is meant for help just those things, where necessary  
> sacrificing other priorities, all part of optimizing the development  
> experience at the XML file level.
> 
> The driving factor behind that priority is that in most large  
> software it is complexity that kills projects and causes budgets to  
> spiral out of control. As complexity increases the time and cost  
> tends to increase in a non-linear way, ie something like  
> exponentially or logarithmically instead of linearly. When I say  
> complexity I mean general solution complexity across hundreds of  
> entities and services and screens, and not the complexity of a single  
> service. The point of defining the scope and purpose of a service is  
> to limit the complexity of that one piece to make it possible to  
> write and maintain it with a reasonable volume of requirements.
> 
> For OFBiz (both the framework and the applications) it is critical  
> that we all keep this in mind. It does us no good to create something  
> that supports super fast development if it makes ongoing maintenance  
> and extension/customization more difficult (including other people's  
> code or years later when you've forgotten and it might as well be  
> something someone else wrote). The point is to be as clear and  
> consistent as possible across a variety of data structures and  
> business processes.
> 
> When talking about framework improvements that should be the first  
> thing considered and written about when presenting ideas. Ideas that  
> don't help with that will be fought pretty hard by various people, me  
> being the most vocal, but rest assured that if I shut up others will  
> fill in because lots of people in the ofbiz community have experience  
> with this and know what kind of a difference it makes.
> 
> -David
> 
> 

Re: refactoring of similar simple-method

Posted by David E Jones <jo...@hotwaxmedia.com>.
On Oct 16, 2007, at 12:51 PM, Jacques Le Roux wrote:

> De : "Adam Heath" <do...@brainfood.com>
>
>> Another point; in lots of simple method definitions, there are blocks
>> for doing CRUD to entities; in the vast majority of cases, these  
>> method
>> definitions are *identical*, except for the entity name and  
>> property to
>> pull error messages from.  This points to a need to refactor.
>
> IMHO, this point is very interesting, but of course need some work...

These were designed VERY specifically to be this way. It is true  
there are only a few common variations for different data structures  
and corresponding create/updated/delete operations.

The point of having simple-methods exist for this instead of just  
have "call create variation A" in the service definition is to make  
it easy to customize and enhance. As functionality around certain  
entities grows these methods do tend to grow beyond the base 2-4  
operations that the typical minimal methods include.

So, yeah, it was intentional to have separate operations for things  
like (all of these are just for creates, different combinations for  
different things):

1. make a value object
2. put a sequenced id in a single pk field for the object
3. move all primary key fields from the parameters or other Map into  
the value
4. move non-pk fields from a Map into the value
5. set individual fields on the value
6. and so on...

We could identify a few variations and have single operations, or  
avoid writing simple-methods altogether with the service def thing I  
mentioned above, but that would just reduce consistency between  
different simple-methods and make customization and extension more  
difficult.

It seems like some recent comments stem from a disagreement that  
consistency and ease of customization are important... that might be  
an interesting thing to talk about explicitly. Much of the OFBiz  
framework is meant for help just those things, where necessary  
sacrificing other priorities, all part of optimizing the development  
experience at the XML file level.

The driving factor behind that priority is that in most large  
software it is complexity that kills projects and causes budgets to  
spiral out of control. As complexity increases the time and cost  
tends to increase in a non-linear way, ie something like  
exponentially or logarithmically instead of linearly. When I say  
complexity I mean general solution complexity across hundreds of  
entities and services and screens, and not the complexity of a single  
service. The point of defining the scope and purpose of a service is  
to limit the complexity of that one piece to make it possible to  
write and maintain it with a reasonable volume of requirements.

For OFBiz (both the framework and the applications) it is critical  
that we all keep this in mind. It does us no good to create something  
that supports super fast development if it makes ongoing maintenance  
and extension/customization more difficult (including other people's  
code or years later when you've forgotten and it might as well be  
something someone else wrote). The point is to be as clear and  
consistent as possible across a variety of data structures and  
business processes.

When talking about framework improvements that should be the first  
thing considered and written about when presenting ideas. Ideas that  
don't help with that will be fought pretty hard by various people, me  
being the most vocal, but rest assured that if I shut up others will  
fill in because lots of people in the ofbiz community have experience  
with this and know what kind of a difference it makes.

-David


refactoring of similar simple-method

Posted by Jacques Le Roux <ja...@les7arts.com>.
De : "Adam Heath" <do...@brainfood.com>

> Another point; in lots of simple method definitions, there are blocks
> for doing CRUD to entities; in the vast majority of cases, these method
> definitions are *identical*, except for the entity name and property to
> pull error messages from.  This points to a need to refactor.

IMHO, this point is very interesting, but of course need some work...

Jacques