Re: Thoughs after discussions at OSCON
От | Rick Morris |
---|---|
Тема | Re: Thoughs after discussions at OSCON |
Дата | |
Msg-id | 4301F50A.2070405@brainscraps.com обсуждение исходный текст |
Ответ на | Re: Thoughs after discussions at OSCON (John DeSoi <desoi@pgedit.com>) |
Ответы |
Re: Thoughs after discussions at OSCON
|
Список | pgsql-advocacy |
John DeSoi wrote: > On Aug 15, 2005, at 1:57 PM, Chris Browne wrote: > >> For someone to argue that implementing most business logic inside the >> DB isn't their favorite idea is something where there needs to be some >> room for disagreement :-). >> > > I don't disagree but after doing quite a bit of PHP the last few weeks > (using Drupal) I see more clearly why most people don't go to the > trouble. I can create all kinds of constraints in my database but when > I go to save a row that might violate several of them, I'll only get > one error back. This won't work in a web form interface where I should > provide feedback on all of the errors at once rather than one at a > time. So if I want this validation logic to be available at both the > application and database level, I have to somehow parse it from the > database or create some superset of the specification that will work in > the application and create the constraints in the database. Otherwise, > I need to maintain the constraints in both places and keep them in sync. IMHO, this is exactly where there needs to be more work done on application frameworks: automated ways to propagate constraints and business logic back into the application layer. I explored those concepts to a small extent (with code examples) in a couple articles for PHP|Architect. I think it is an area that would involve some serious work, but would bring some serious benefits. Regards, Rick Morris > > John DeSoi, Ph.D. > http://pgedit.com/ > Power Tools for PostgreSQL > > > ---------------------------(end of broadcast)--------------------------- > TIP 9: In versions below 8.0, the planner will ignore your desire to > choose an index scan if your joining column's datatypes do not > match > >
В списке pgsql-advocacy по дате отправления: