Hi ! > Hi Sergio, > > > > I've add a new type of filter to dbforms's capability, an sql filter > > that is simply an SQL condition, passed as a DbFormTag's attribute. This > > type of filter is much better than the old one, but the coding changes > > are rilevant, so I post here the diff, and we can discuss about it pros > > and cons and decide what to do. In bookstore examples there is an > > application of filtering, in master and child forms. > > Good idea, but i would prefer a backward compatible mode. I think a new > attribute like SQLFilter would be better solution. I think there are lot of > applications outside the world wich work with the old filter and where attributes > and i do not like to break the compatiblity.
Ok, I must say currently I'm not working with DBForms code so I don't have the focus on the whole thing... anyway... I think that there should be only one mode to make a thing. But in this manner... compatibility will be broken. I suppose it's not a good idea try to implement a factory / strategy pattern only to incapsulate a filter functionality ... too complex to do, IMHO. Usually I prefer to specify "conditions" using SQL statements... you can have the most complex statement and then pass that damned string directly to the rdbms engine, without spending hours to debug a new "condition-meta-language". The problem is that DbForms original engine is built around this concept - it uses a "cumulation of rules" to build a final SQL statement. Ah, yes, you know ;^) Anyway, I saw the development trend is to improve the project trying also to *simplify / refactoring* the code where possible. Making UML diagrams I saw the new event handler is (am I right ?) simpler than the previous one. Events code is simpler and uses standard patterns (DAO). And I hope that there will ONLY one navigation system (the new one), not two. So I think another step could be to use standard SQL to specify "all type of filters". Having only whereClause and orderBy attributes could be the best thing to obtain. Having another (redundant) attribute is not a good idea, IMHO. Luca ------------------------------------------------------- This SF.Net email sponsored by: Free pre-built ASP.NET sites including Data Reports, E-commerce, Portals, and Forums are available now. Download today and enter to win an XBOX or Visual Studio .NET. http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01 _______________________________________________ DbForms Mailing List http://www.wap-force.net/dbforms
