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

  • Home
  • SEARCH
  • 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 3236692
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T17:39:04+00:00 2026-05-17T17:39:04+00:00

I’m creating a data access object to retrieve information from Google App Engine for

  • 0

I’m creating a data access object to retrieve information from Google App Engine for a web app built on the Spring framework (first time for all).

I see a number of examples that use a Controller/webapp -> Service -> DAO -> JDO/Google-app-engine pattern.

In this pattern the DAO layer is the only one that knows about JDO, thus this layer is the only one needing replacement if the data store changed. The Services layer calls the DAO layer and formats/manipulates the data s needed.

My question is why the extra Service layer? At least initially it doesn’t seem like the Service layer is adding much to the equation. I would naturally think to just write a DAO layer to encapsulate the JDO requests and manipulate and return the data.

Can someone show me the rational for a separate Service layer, will this become obvious as the project becomes larges and more complex?

  • 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-17T17:39:05+00:00Added an answer on May 17, 2026 at 5:39 pm

    Typically you put DAOs in a service layer because as your app gets more complicated, you will do useful and non trivial things in the service. For example, you might coordinate complicated data operations with more than 1 DAO. Service layers also provide API boundaries that demarcate cross cutting concerns, like transaction management, authorization checks, performance logging, etc.

    Another reason its good to abstract your functionality into services is that it promotes reusable and maintainable components. When you start, you might be interested in just presenting some html. You write a service that loads some data, and handle the html part in the layer above the service layer (presentation layer). Now you want to stand up a RESTful webservice. Your service layer can be reused to load the data; all you have to worry about is the json or xml your webservice endpoint returns (and of course the REST semantics).

    So, for simple cases the Service layer might add little, but as your app expands they become worthwhile and even essential to keeping the code clean.

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

Sidebar

Related Questions

No related questions found

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.