Forum OpenACS Development: Response to Porting ACS 4 PL/Sql packages
7: Response to Porting ACS 4 PL/Sql packages (response to 1)
Posted by Steve Crossan on 10/24/00 12:40 PM
Sorry if this is going over old ground, but oughtn't we to be thinking about some kind of separation between the database layer and the application code? I was disappointed to see this hadn't been done in ACS4.0 - Oracle specific code appearing in .tcl pages, rather than hidden behind a function layer - which would have made the ACS port easier too. But Open/ACS doesn't necessarily have to go down the same route - especially if we're thinking beyond Postgres to other databases.
Ben mentioned nsjava in an earlier post - could that be a way forward? Either create a Java db access layer based on JDBC (therefore portable?) and call that from the pages using nsjava - or hide this behind a tcl function layer too so that java calls don't have to appear in the .tcl pages. In this scenario creation and deletion of database objects could map to creation and deletion of Java objects which manage their db storage separately and hide this from the page writers.