business logic creation

B

Bart

Using SQL Server...my question specifically revolves
around triggers

If there is business logic in triggers..should that be
moved over to the business layer when creating a new
application?
The reason I ask this is because the application I am
working with now, has lots of triggers. The only way
really to abstract large portions of it is to have stored
procedures (which has its faults, because u then have to
write loop logic instead of writing possible single
insert\update statemments using the inserted\deleted
tables). I was thinking to move this to the business
layer with transactional processing?
Any one else have come across a design problem like this?
 
K

Kevin Swarts

I always prefer to use the database as much as possible to control business
logic; although it's not always possible. By doing all that you can in the
database you can use something like nGen
http://www.nAlliance.com/Products/nGen to generate all the code for you to
access the database, and because all the business logic is in the database
you don't have to write more code by hand.

KS
 
K

Kevin Swarts

Don't start another thread on this. nGen neither sounds like, nor is spelled
like LLBLGen. There are other generators out there that also use the name
gen (AutoGen, Doxygen, e-GEN, iQgen, MDGen, MiddleGen, nTierGen, PHPGen);
the only company that has a trademark on Gen is a gas company. nGen was NOT
named after LLBLGen, LLBLGen was not even considered when choosing the name.
As for the SQL, nGen requires far fewer stored procedures to do just as
much. The @@Identity problem was fixed, and will be released in the next
beta. LLBLGen does not support UniqueIdentifiers, I know because that was
the main reason for creating nGen in the first place. The support that is in
place is limited, and would crumble if used in a UniqueIdentifier
environment.

KS
 
T

Thomas Tomicek [MVP]

Kevin Swarts said:
Don't start another thread on this. nGen neither sounds like, nor is
spelled

Well, it sounds like AND it looks like.

Now, when it also DOES like, then it IS like.

--
Regards

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Microsoft MVP C#/.NET)
 
B

Bart

Thanks for the reply!!! That was a very good analysis. I
am always intereted in the grey area\ "it depends"
decisions.
 
T

Thomas Tomicek [MVP]

Kevin Swarts said:
Okay, you go ahead and think what ever you want. And what nGen does is

This is a free country, after all.

Look, most companies in your position would have had the guts to apology for
choosing a stupid name that infringes other products.

Some even do some research before they choose a name - I remember having
rejected 5 names for our EntityBroker, and some of these were rejected
because thy were too similar to other products.

But then, there is always nAlliance.
completely different then LLBLGen, maybe you should take a look at the
output, and not rely on your fear of the unknown.

Maybe you should not try to be a smartass.

I have no need for a toy like nGen - I prefer working with O/R mappers.

--
Regards

Thomas Tomiczek
THONA Software & Consulting Ltd.
(Microsoft MVP C#/.NET)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top