Relative Content

Tag Archive for dao

Spring JDBC Template without DAO?

I am rather new to writing applications that interact with databases, and I’m curious about a project I’m working on. I have to write a very simple web app which is going to be displaying metric data based off a handful of various queries (probably not over 15) to various database tables. Based on my own research, Spring JDBC Template seemed like a good technology to go with based on the rather simplistic nature of my project. Every example I see for using it though seems to involve the use of the DAO pattern. I was under the assumption that usage of the DAO pattern wouldn’t be necessary for what I’m doing, but it seems extremely pervasive in the examples, so perhaps I’m mistaken.

Should service layer catch all dao exceptions and wrap them as service exceptions?

I have three layer Spring web app: dao, service and controllers. A controller never calls directly the dao, it does it through the service layer. Right now, most of the time if there is dao exception (runtime) that is not handled, it’ll be caught by a JSP showing an error message to the end user.
Should service layer catch all dao exceptions and wrap them as service exceptions?

Implementing a NoSQL and RDBMS compatible DAO

What would be the correct way to design a DAO which implementation is first going to be targeting a MS SQL database with a STAR model, but yet, business requirements specify the application must be flexible enough that it would be able to be migrated to a NoSQL database in the future if required. Which type of NoSQL, no idea…

Implementing a NoSQL and RDBMS compatible DAO

What would be the correct way to design a DAO which implementation is first going to be targeting a MS SQL database with a STAR model, but yet, business requirements specify the application must be flexible enough that it would be able to be migrated to a NoSQL database in the future if required. Which type of NoSQL, no idea…