Design question


Author
Message
Larry Caylor
Larry Caylor
StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)StrataFrame VIP (1.2K reputation)
Group: Awaiting Activation
Posts: 592, Visits: 3.7K
I've just completed a project and while it works well from the user's perspective, I'm not completely satisfied with the underlying design and was wondering how other SF developers address the following situation. SF provides a one-to-one mapping between a business object and data base table. However logically, a business object might be made up of a core database table and a number of associated tables. For example a customer might be represented by a core table that contains the customer ID and name along with an associated table that contains addresses.

The most direct approach to dealing with this is to drop all of the objects on a form and add the code to the form to keep the individual objects in sync and possibly update them all on a transaction. My issue with this is that it places what I consider to be business logic in the UI.

Another approach is to create a complex business object based on the core table that exposes the associated tables as properties. This allows all of the logic that maintains the relationships to reside in the complex BO. The problem with this approach is that you cannot bind to a property such as 'customer.address.zipcode'. This can be addressed by exposing the individual properties of the contained business objects as custom properties of the complex BO, but you have to manually code the custom properties and property descriptors. And if you change an underlying table you have to update all that custom code. While I feel this approach provides a more object oriented design, all the extra manual coding undermines the productivity gains of the framework.

Any comments and/or suggestions would be greatly appreciatedSmile

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Threaded View
Threaded View
Larry Caylor - 16 Years Ago
Greg McGuffey - 16 Years Ago
Ivan George Borges - 16 Years Ago
Richard Keller - 16 Years Ago
StrataFrame Team - 16 Years Ago
Trent L. Taylor - 16 Years Ago
Paul Chase - 16 Years Ago
Larry Caylor - 16 Years Ago
William Fields - 13 Years Ago
Michel Levy - 13 Years Ago
Edhy Rijo - 13 Years Ago
William Fields - 13 Years Ago
Michel Levy - 13 Years Ago
                         Michel, Thanks again for your input. I have just a few items in...
William Fields - 13 Years Ago
                             William, I understand the 2 SQL servers on both sides, and also the...
Michel Levy - 13 Years Ago

Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search