Re: Databinding - Best Practice (object-oriented)

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Alfredo Novoa (alfredo_at_nospam.es)
Date: 06/04/04


Date: Fri, 04 Jun 2004 13:56:50 GMT

On Thu, 3 Jun 2004 15:07:53 -0500, "james" <nospam@hypercon.net>
wrote:

>> >The 1st solution works very well and is easy to implement but is not
>> >object-oriented.
>>
>> Why not?
>>
>
> Because it does not expose individual objects like Employee or Customer,
>it only exposes things like DataTable, DataView etc...

So what?

You still are using object orientation in your application.

OO does not imply to make mistakes like to create classes like
Employee or Customer.

>> Datatables and datagrids are objects.
>>
>
> Duh, we all understand that. The poster is talking about the DAL

DataAdapters, DataReaders, CommandBuilders, etc, are part of a DAL. A
silly acronym by the way.

>> >The 2nd one seems to be the logical way of doing it (creation of a
>> >'Employee' class etc)
>>
>> This is a superfluous class that does not add value.
>>
>
> If Employee, Customer, Invoice, InventoryItem do not add value to you
>then you probably feel real comfortable programming in C or Assembly

No, it is just the contrary, I don't feel comfortable coding
supefluous code in a low level language like C# or C, if I can achieve
the same through declarative 4GL code.

C and C# are still 3GLs

> Yeah, int x is so much more readable than int orderTotal. C'mon OO
>programming is superflous to begin with.

OO is not for data management. To use OO for data management is a
great blunder.

>> All the business logic should reside in the database.
>
> You must be a db Admin right ?

No, but I studied data management theory.

> Placing all the logic in the DB is by
>far the worst way to go.

Only a person without a grasp on data management theory could say
that.

> This has been so thouroughly discussed elsewhere
>by others much more intelligent than either of us

Talk about your intelligence only.

This has been so thouroughly discussed and DBMSs were created just for
that.

> maybe that is why you
>missed it.

Can you give a reference?

You seem very misinformed. It is just the contrary of what you said.
DMBSs are intended enforce the business logic. This is out of question
since decades ago among the serious researchers.

> And pray tell how can you do disconnected data if all your logic
>is in the database ?

You probably mean how to use an application when it is disconnected to
the DBMS. The answer is easy: the applications must be connected to a
DBMS all the time you work with them.

It is like to ask how to use the computer when it is disconnected.

>> The 2st solution is the worst thing you can do. It is a recipe for the
>> disaster.
>
> Tell the guys at MS and everywhere else that the 3 tier model is dead
>and the 1 tier model is the way to go.

The guys at MS have a lot to learn about data management, but we are
not talking about the number of application tiers. You are missing the
point.

Regards
  Alfredo



Relevant Pages

  • Re: Databinding - Best Practice (object-oriented)
    ... > Because it does not expose individual objects like Employee or Customer, ... OO is not for data management. ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • Re: move data from list box or combo box to another list
    ... employees is because each employee gets paid commission on the service they ... The customer and dates are ... Lets address your problem with your report which seems to be your main ... Oh yeah and also you should/could have a filter in your query so that your ...
    (microsoft.public.access.forms)
  • Re: Databinding - Best Practice (object-oriented)
    ... Suppose your Customer orders a product from you, ... Now if the business logic is ... If you have to build your app entirely around calling stored ... > OO is not for data management. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Databinding - Best Practice (object-oriented)
    ... Suppose your Customer orders a product from you, ... Now if the business logic is ... If you have to build your app entirely around calling stored ... > OO is not for data management. ...
    (microsoft.public.dotnet.framework.windowsforms.databinding)
  • Re: Simple question
    ... I have customer class, employee class. ... In that case the semantics of address may be the same. ... This is fine as long as a Person is always either a Customer or an Employee in the problem context. ...
    (comp.object)