"Alan" wrote
Quote
I think I need a business object or/and controller.
Can you guru just give me sample code for this simple operation
Not really. Business objects and presentation controllers generally work
within the context of a layered architecture that might look something like
this
presentation layer (forms, dialogs)
\
presentation adapter layer (MVC/MVP controllers or other adapter
frameworks)
/
business logic layer (business objects, process engines)
\
data adapter layer (OO-RDBMS translation/adapter layer)
/
persistence layer (database interface)
Where both major adapter layers are generally driven by business object
metadata (RTTI or other attribute/aspect facilities).
The intent of this layering is to provide a space (the business logic layer)
that can be modeled entirely based on the user's problem domain (the
business problem) without being distorted or compromised by peripheral
details like db choice or web/GUI interface mechanisms. This leads
(hopefully) both to more complete, correct, and focused business models, and
to loosely coupled, easily adapted interfaces and persistence dependencies:
code that is easier to write, maintain, extend, and redeploy.
The difficulty of your question is that since this architecture and intent
precede their application to any specific business problem domain,
simplifying that domain does not completely simplify the solution. Joanna
can post code that gives a quick feel for the approach and what it might
look like to program against such an infrastructure, but realistically
behind her line
Quote
list := TPersistenceBroker.RetrieveCollectionForCriteria(criteria);
is 5-10K lines of implementing service code.
If I haven't been too completely discouraging--ask whatever questions you
have and we'll do our best to be helpful; it is just that the help probably
won't come in the form of small sample applications.
bobD