This is just a brief commentary on my experience with objects after about a year of using them intensively. I now use them extensively for certain things but have ditched them for others where I had initially thought they may have a role.
But one of the reasons I don’t use 4D objects too widely is because I find 4D global variables to really represent the skeleton of an application. I don’t mean that in a functional sense, but in an architectural sense because I see 4GL’s as tending to support a “top down” implementation and 3GL’s more suited to “bottom up” implementations. “Top down” being where properties & logic from systems analysis itself themselves explicitly in and detectably in the code, whereas ‘bottom up’ meaning you’re just developing a load of tools to do…whatever. If you use objects to represent major business logic properties that persist across methods, I’ve found you can end up with a whole load of extra work to do at the architecture level AND at the code level. For example: • one is constantly stuffing and unstuffing all kings of “property bags” in order to manipulate the properties to the point that the business logic gets drowned in a morass of utility code • much of the ‘formal verification’ role of the compiler is lost since objects obfuscate the identity of high level business logic properties that are otherwise completely unambiguous when they manifest as globals • refactoring is an order of magnitude more of a pain since the IDE is almost oblivious to property naming collisions and because we now have to levels of hierarchy to deal with instead of 1 (object and property) The original thread on "Arrays vs Object for Key/Value pair lookups” is a good case in point. Yes there is a huge performance boost in using objects (I hold my hands up - I’m doing it ! LoL), but I’m retaining the use of ‘parallel arrays’ for much of the code simply because they’re so nice and trackable everywhere. As David Adam’s say, the performance gain is huge but has to be weighed against other priorities. The are where I find objects of most benefit is in transport. For example you need to populate a field with some complex hierarchical data that gets passed to another table in a trigger or something like that. Here it really does something which 4D had very little support for before objects arrived. Just my 2c on objects so far ! Regards Peter ********************************************************************** 4D Internet Users Group (4D iNUG) FAQ: http://lists.4d.com/faqnug.html Archive: http://lists.4d.com/archives.html Options: http://lists.4d.com/mailman/options/4d_tech Unsub: mailto:[email protected] **********************************************************************

