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 9325203
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 19, 20262026-06-19T04:46:49+00:00 2026-06-19T04:46:49+00:00

I have create a spring template project with many controllers. In my controllers, I

  • 0

I have create a spring template project with many controllers.
In my controllers, I will have a connection to my DAO object and my DAO will save/update/get hibernate objects from my local database.

What is the best way to make this? Should it be implemented on the same project or should I have a project for my controllers and another to represent my database access?

After this, I will develop one android app to call my controllers and make operations on database.

Can you help me this architecture?
Thanks

  • 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-06-19T04:46:50+00:00Added an answer on June 19, 2026 at 4:46 am

    One could certainly argue for either option (having them in the same project or in separate projects). In my projects I tend to take a pragmatic approach to it. If your project is small enough, it probably isn’t worth putting them into separate project modules; in this case just having them separated at a package level should suffice. However, as your project scales in size, it will be useful to separate out components based on their responsibilities and dependencies.

    I will suggest, however, that you avoid using DAOs directly in your controllers. It isn’t necessarily bad practice, but you will find that your controllers will quickly become flooded with business logic (type conversions, data manipulation, etc.) which is better handled somewhere else. Where is this somewhere else exactly? Well, you can build a service layer that bridges the gap between your DAOs and your Controllers. This way, your service layer can deal with data manipulation and other business logic, while your controllers can just worry about getting and serving up data from the service layer. Hope this helps.

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

Sidebar

Related Questions

I have Maven project with Hibernate and Spring framework. I want Hibernate to create
When I create a Spring MVC Template Project with the SpringSource IDE, I run
I create a Spring MVC project from Spring template using the STS plugin. However
A standard spring web application (created by Roo or Spring MVC Project Template) create
I have created simple HelloWorld project from Spring MVC template in Spring STS. I
Eclipse STS is reporting I have problem with my spring project. It's a fresh
I have an excel template that uses a macro to save the file, so
I really cannot fix that. First, I created a Spring Template Project (Spring MVC)
We have a TFS team project using the Agile process template. We have added
I'm using template functions for object construction to create objects from reflection data, and

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.