I'm creating a transactional application insInternet and need to get some input regarding how to correctly encapsulate database access to ensure that:
- I do not have connection strings all within the place
- Multiple calls towards the same saved procedure from different functions
- or WORSE, multiple saved methods which are different with a single column
I'm thinking about knowing if utilizing an ORM like NHibernate is helpful, as it might just add another layer of complexity to some quickly altering data model, and items have to be created on a busy schedule.
I'm interested in techniques or designs Apart from ORM packages.
If, because it seems, it is really an important project and also the DAL is really a major risk factor, get someone involved that has tried it before. You are right that you will find a lot of methods to elope the rails by looking to get this right the very first time without solid experience.
You will find a variety of designs for achieving this, but I'd search for somebody who has an easy group of well-defined designs they're fully confident with.
as mentioned above, browse the repository and unit of labor designs. the books by fowler and evans are highly suggested. same with karl seguin's readers which offered me a cooler summary of the needed pointed out books. snap it up at http://codebetter.com/blogs/karlseguin/archive/2008/06/24/foundations-of-programming-ebook.aspx
As Java Developer, i possibly could suggest to see about jdbc templates, in spite of it s'n not .Internet you can find out how Spring framework encapsulates data access tier and obtain ideas.