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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T23:46:12+00:00 2026-05-31T23:46:12+00:00

Is model comprises of model object and classes that perform database connection and database

  • 0

Is model comprises of model object and classes that perform database connection and database operation and service class?

It is normally believed that service layer fills the gap between controller and model.So,what exactly service layer does,it creates the object of class that performs the database operation?

  • 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-31T23:46:13+00:00Added an answer on May 31, 2026 at 11:46 pm

    Structures in service layer do not make database connections.

    The connection is created at the bootstrapping stage of application and via builder/factory, it is passed to each of data access object (usually implementing DataMapper pattern). This is the part that actually interacts with database. The rest of structures in domain business logic part of application has no idea, where or how the information is stored.

    Service layer itself has two major groups of structures:

    • Third party or your own component that have no interaction with rest of your business logic (like some lib which deals with sending emails).
    • Public API for interacting with domain business objects (what people tend to mistakenly: models) and data access objects. This is to limit controllers involvement in business logic.
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a model object that's in fact an enum with fields and getters:
#model class Promotion(models.Model): name = models.CharField(max_length=200) start_date = models.DateTimeField() end_date = models.DateTimeField() #view def
model.py: class Tribes(Group): members = models.ManyToManyField(User, related_name='tribes', verbose_name=_('members')) i want to store a number
My model layer is being used by a handful of different projects and I'd
Should model objects that go to the view be checked for null before going
My model is like this class Foo(models.Model): user = models.ForeignKey(User) class Meta: abstract =
My model: public class Father { Set<Son> sons = new HashSet<Son>(); String name =
I've an Entity Framework model (v.1.0) that I'm trying to extends with a calculated
For anything but trivial view models, I use a view model builder that handles
I've just created a new MVC 2 application that references both an entity model

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.