Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7083229
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T07:09:09+00:00 2026-05-28T07:09:09+00:00

i have been using playframework since 2 years. Framework has JPA on streoids feature.

  • 0

i have been using playframework since 2 years. Framework has “JPA on streoids” feature. I loved it very much.

http://www.playframework.org/documentation/1.2.4/5things

This is the sample code:

User connectedUser = User.find("byEmail", connected()).first();
...
connectedUser.delete();
...
connectedUser.save();

This aproach uses lots of helper methods. Some of them are static methods.
Every model file extends Model class and voila. You may use find, save, delete, fetch…

Nowadays i use Spring MVC 3.1. I like its MVC usage.
But Connectivity system is a little bit complex.

I read lots of articles. Some of them use service layer, dao layer and model layer.
Some of them use only dao layer and model layer.
Somes are creating DAO interfaces and DAO classes for every single model object and also service classes and service interfaces.
And some of them use generic DAO classes.

in fact i am a little bit confused about all this variants.

  • Why are we using DAO layer. A single hibernateUtil class and named
    queries is not enough for CRUD operations.
  • Why don’t we use play framework approach?
  • Why do we use interfaces for every DAO class? Just implementation is not enough?
  • Why do we use unnecessary service layer?
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-28T07:09:10+00:00Added an answer on May 28, 2026 at 7:09 am

    A DAO layer is useful to isolate the data acess code from the business logic code. This is especially useful when you start unit-testing the business logic, because it allows mocking the DAOs. All the applications don’t simply have CRUD operations.

    Interfaces have the same testability advantages. Read what reasons are there to use interfaces (Java EE or Spring and JPA), where I explain the advantages of having interfaces.

    The service layer is the most important layer. It is the one used to demarcate transactions. You could avoid using a DAO layer, especially if you have extremely simple crud-like data access. But a service layer is crucial. You don’t want to have three inserts and one update each in their own transaction. See DAO Design Pattern and Servlets for a question where I explain why a service layer is so important.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been using the CSLA framework for couple of years now for windows
I have been using Castle MonoRail for the last two years, but in a
We have been using Scrum for around 9 months and it has largely been
I have been using ASP.NET for years, but I can never remember when using
I have been using SQL Server Management Studio for years. Yesterday, when I started
I have been using form inheritance for a while now but without doing much
I've been using the--quite excellent--playframework and have had trouble finding documentation/examples on how to
i have been using a modular structure for my zend framework application. This is
I have been using named branches both as feature branches and long lived branches.
I have been using TextPad for years and I am happy with it except

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.