Subject | RE: [firebird-support] Best place for rules: Front end or DB? |
---|---|
Author | Alan McDonald |
Post date | 2006-02-22T07:15:27Z |
> What is the perceived wisdom about where to put business rules for athat's a never ending debate....
> simple app? (Into the database or the front end?)
>
> I'm planning a commercial Win32 (Firebird) database application which
> will mainly be used as a single user standalone program, with a small
> percentage of users using a networked workgroup version, so this is
> unlikely to ever need 3 tier architecture.
>
> Is it better to put maximum "intelligence" into the DB in the form of
> referential rules, sql procedures and triggers etc, or should this be
> mainly in the (Delphi)front end?
>
> I'm concerned about:
>
> 1. Protection of the intellectual property.
> 2. Ease of design & maintenance.
>
> Thanks in advance for any guidance.
ultimately you have to do what you think is the right thing.
We all have a different set of criteria and therefore a different way we
approach this.
I always end up with a "nice" balance between the two sides.
logic in the backend offers very easy distribution of updates sometimes, ...
other times not. and the same for front end logic.
Some people even do the PK generation in the front end and leave the
datastore as a "stupid" datastore. They miss out, in my opinion, on a lot of
nice stuff.
If you need to develop for multiple backends, then backend logic is a pain.
For me - I tell my clients it's Firebird all the way - they get no choice,..
so I please myself what goes where. Makes development more enjoyable when I
have sole control over this. :-)
After all, if it's not enjoyable I don't want to do it.
Alan