[Zope3-dev] Re: [Zope-DB] Relational Databases in Zope 2 and Zope
3
Luciano Ramalho
ramalho at hiper.com.br
Tue Jun 29 10:03:16 EDT 2004
On Tuesday 29 June 2004 05:22, Smith, Neil (Worcester) wrote:
> The point of the dtml-sqlgroup and dtml-sqltest is surely to provide a nice
> way of handling the case where you don't pass in the parameter, so it
> doesn't render the WHERE, AND, = etc. And it does this quite well.
Exactly. This is a very common case, when you offer users a "query by example"
interface, where they fill only the fields they want, and the application
builds a suitable query.
The combination of <dtml-sqlgroup> and <dtml-sqltest> is the best solution to
this problem that I have ever seen. Any other solution that I have seen is
much LESS readable and maintainable than <dtml-sqlgroup> and <dtml-sqltest>.
I also understand the limitations of using SQL directly at that level, and the
benefits of and object-relational bridge, or even better, using a pure
object-oriented approach whenever feasible. But SQL is not going away anytime
soon, and often the best way of integrating a legacy database into a Zope
application to be pragmatic and just use SQL methods.
--
Luciano
More information about the Zope-DB
mailing list