Linked Questions

64
votes
6answers
130k views

Service layer vs DAO — Why both?

I have been working with SpringMVC, Hibernate, and some databases in a java web application example. There are a few different ones that do this, but this Spring 3 and hibernate integration tutorial ...
10
votes
2answers
2k views

Application service layer calling database functions. Bad architecture?

Scenario: Stack: Java, Spring, Hibernate. Model: Client-Server Application. Pattern: Model-View-Controller (MVC). The Service Layer classes has three behaviors: Some services have the business ...
7
votes
3answers
1k views

Motivation for a service layer (instead of just copying dlls)?

I'm creating an application which has 2 different UIs so I'm making it with a service layer which I understood is appropriate for such scenario. However I found myself just creating web methods for ...
7
votes
4answers
5k views

How should UI layer pass user input to BL layer?

I'm building an n-tier application, I have UI, BL, DAL & Entities (built from POCO) projects. (All projects have a reference to the Entities). My question is - how should I pass user input from ...
2
votes
4answers
145 views

Why is code that wraps a call to a database or DAL not referred to as a client?

Both classes below implement the same interface and are in fact intended to be interchangeable one for the other. Why is the second one not referred to as a "client" in the literature? There are ...
2
votes
2answers
3k views

Design Patterns - Service Layer

I currently reading a lot about Design Patterns and I have been watching various Pluralsight videos from their library. Now so far I have learnt the following: Repository Pattern Unit of Work Pattern ...
2
votes
2answers
966 views

How should the service layer be done?

so I have this android app at work, if I understand it right the DAO/services/UI layers is to "decouple" the UI from the database. I have 2 problems with that : 1/ Decoupling Like this if things ...
1
vote
2answers
138 views

Bundling Model and Services in MVC pattern?

These days, all I hear is how MVC should contain additional layer called services, turning it into SMVC. But to me, it seems like too much of a decoupling and instead want to engineer my app something ...
1
vote
1answer
135 views

Issues with the intended behavior of a Service layer?

This analysis makes sense, and states anything that avoids code duplication and simplifies maintenance speaks for a service layer. What is the technical behavior? When a service client references a ...
0
votes
1answer
879 views

Am I doing it wrong with Hibernate DAO layer? i.e. Feature Bloat

For quick prototyping I have been actively using Hibernate. Recently I came back to an old project and I wondered why I had a lot of DAOs with what I suspect is commonly named feature bloat. E.g. I ...