Hi All Just wondering if any of you have written classes where the SQL code is outside of java class, this is essential because say the schema changes I dont want to go to all the classes where my SQL code is scattered around and make the changes, instead I can go to one class and I am fine. If anyone of you have implemented this approach please share them. if not post your opinions on this approach. Thanks all for your time. Samson
Typically if you want a flexible data layer you can create a data access layer. If know EJBs than that is an example. You create classes with a bunch of bean properties that know how to write themselves to the database. You application logic doesn't even have to know anything about the database.
posted 19 years ago
David Ya I am familiar with Entity Beans and how SQL code is separated from the Bean especially in Bean Managed Persistence. But I am interested in applications where robust EJB implementation is not necessary. Samson
PI day is 3.14 (march 14th) and is also einstein's birthday. And this is merely a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop