Hi Sergio,In my opinion, I think that the main problem in applying this pattern to dbform is that here we don't find records by position, but with keys. How this problem is solved here? look at goto event, where we made a select all and then we iterate until the record is found.
about problems related to big tables (select * from $table_name ... ):
I think using jdbc1.0 there's no a *pratical* solution (that I know) to retrieve a subset of records from a table (getting x records from table y starting at position z).
Anyway, Henner encapsulated the data access stuff used by event classes into the org.dbforms.event.datalist.dao.DataSourceXXX classes (that uses also a DAO design pattern). So I suppose it's possible to:
a) use the current DatasourceJDBC DAO class for JDBC1.0
c) make another "DatasourceJDBC2.0" class that could use JDBC2.0 and its resultSet cursor stuff... example code at:
http://pow2toolkit.sourceforge.net/ http://prdownloads.sourceforge.net/pow2toolkit/navigation_20021216.zip?download
it uses a *JDBC2.0* data list handler implementation (Henner used a simplified pattern for the current org.dbforms.event.datalist package).
See [http://www.theserverside.com/resources/article.jsp?l=DataListHandler] for the updated version of the original article by Claudio Fratarcangeli.
I *removed* the "long-lived open database connections" stuff - I prefer the simple "open connection / fire query / close connection" paradigm for simplicity
(also to avoid to burn all the db connections)
There's a brute example JSP page that uses the dataHandler to navigate a resultSet - see the ./var/web/index.jsp page
Let me know.
I proposed this stuff time ago but it will have forced DbForms to switch completely to JDBC2.0 - not an intelligent solution ;^)
But now, using a factory pattern, having decoupled event classes from concrete datasources...
In the few tests I've made, I find that old navigation system is more responsivness in the majority of the cases.
What I can propose now?, for me, the best option will be to adapt the navigation system to fit it in the event architecture you have done, but still I don't know if this is possible. What do you think about this?
By the way, it seems that I criticize you, because you have do it. Not at all, I thank you about it, and I hope to put my 2c to get it better.
cheers, Sergio Moretti
------------------------------------------------------- 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
