Questions tagged [service-layer]

A Service Layer represents one application boundary and consists of a set of available operations from the perspective of interfacing client layers. It encapsulates the application's business logic, controlling transactions and coordinating responses in the implementation of its operations. In enterprise OOP it is often the glue between an application's Model/Data Layers and its Presentation Layers.

A Service Layer represents one application boundary and consists of a set of available operations from the perspective of interfacing client layers. It encapsulates the application's business logic, controlling transactions and coordinating responses in the implementation of its operations. In enterprise OOP it is often the glue between an application's Model/Data Layers and its Presentation Layers.

This excerpt was heavily borrowed from Martin Fowler's book - http://martinfowler.com/eaaCatalog/serviceLayer.html

395 questions
1
vote
1 answer

Service References from Business Layer vs Service Layer

I looked at questions with similar titles with no success. Can I create service reference from Business Layer to pull data from another business entity? Or should it be done from Service Layer?
Manish Jain
  • 9,569
  • 5
  • 39
  • 44
1
vote
1 answer

Service Layers: Should it hide the domain models' API?

I'm loading up on Zend 1.11 and integration with Doctrine 1.2, and have been reading a lot about the use of Service Layers. To my understanding, Service Layers sits on top of the business logic, adding a layer between controllers and the domain…
Bez Hermoso
  • 1,132
  • 13
  • 20
0
votes
1 answer

Save and returning newly created object while employing Service and Entity Framework 4.1?

Recently, we turned Lazy loading and proxy generation off for Entity Framework. Before this, after we committed new changes to EF, we would receive the entire object graph back. What I am doing now is, after the commit I am calling a FindById method…
DDiVita
  • 4,225
  • 5
  • 63
  • 117
0
votes
1 answer

How to join multiple tables without using navigation properties in C#

I have an ASP.NET MVC3 application. In my application I have the following EF classes (hasCauses and isOfProblems are navigation properties): Problem {string ProblemId, string ProblemName, string ProblemDesc, bool solved, hasCauses} Cause {string…
CiccioMiami
  • 8,028
  • 32
  • 90
  • 151
0
votes
2 answers

In the architecture of an MVC application is it better to add a Service layer or create Database views?

Assume you have a database where you store the information about a ticketing system (like helpdesk). The (simplified) schema is: Ticket (TicketId(PK), TicketDesc, TicketCreated, TicketClosed, AssignedToEmployee(FK)) Employee (EmployeeId(PK),…
CiccioMiami
  • 8,028
  • 32
  • 90
  • 151
0
votes
2 answers

How to access EF class properties from Service Layer

I have an ASP.NET MVC3 in C# and Razor. The architecture of the application is divided in Data Access Layer (EF classes + Repository), Service Layer, Controller, ViewModels and View. From my Service Layer ProductServices I call the method…
CiccioMiami
  • 8,028
  • 32
  • 90
  • 151
0
votes
2 answers

In a ASP.NET MVC3 application, the ViewModel is filled by Service Layer or by the Controller?

I have an ASP.NET MVC3 in C# and Razor. The architecture of the application is divided in Data Access Layer (EF classes + Repository), Service Layer, Controller, ViewModels and View. My ViewModel exposes a method Fill which accepts as parameter the…
CiccioMiami
  • 8,028
  • 32
  • 90
  • 151
0
votes
1 answer

Models as pure data objects in Zend Framework and the service layer

It has become common to treat models in ZF as pure data objects, i.e. a class instance with a bunch of attributes and getters/setters. class Model_User { public $id; public $name; ... } What I'm wondering is whether or not it makes sense to,…
dianovich
  • 2,288
  • 21
  • 34
0
votes
2 answers

What to return from service to ASP MVC web app?

Right now I have an ASP MVC web application along a Models project, a Service project, an Utilities project, and a few Datastores projects that function as repository for one or more domain models. I'm pretty happy with the separation of each layer…
Jeff Huang
  • 23
  • 2
0
votes
0 answers

how to allow the service layer to manage multiple repository layers during insertion

Folks, The problem statement can be found as follows, Background: the application collect user information, which can be modeled by AggregateA, and AggregateB; AggregateA contains a collection of AggregateB AggregateA/B contains a small number of…
0
votes
0 answers

Implementation of ServiceLayer & DataAccessLayer in MVVM design pattern

I have just started a customer relation system and wanted to use MVVM design pattern in C#. But after some research, I get confuse with the view model and model. I am not sure where should I locate my code to access data from database. I believe…
0
votes
0 answers

Where i should map request dto linked fields

I have entity1. Request dto of that entity has field entity2Id. Entity1 instead of request dto entity2Id field contains entity2 field, which should store entity2 type info. I have main service layer and additional dto layer(which my main service use…
G H
  • 1
0
votes
1 answer

ModelMapper DTO-->Entity. How to skip unconditionally all fields not mapped

I have two classes (entity and DTO) public class Deliver { private Long id; private String uri; private Instant moment; private DeliverStatus status; // enum PENDING,ACCEPTED,REJECTED private String feedback; // feedback…
0
votes
1 answer

Can helpers methods be placed inside service?

I have a service that looks like: class UsersService { create() {...} update() {...} getRandomUsername() {...} isUserOld() {...} } Should methods "getRandomUsername" and "isUserOld" be placed inside service? Or they should be moved to…
eugenedrvnk
  • 408
  • 1
  • 5
  • 10
0
votes
0 answers

Can multiple threads call methods from same object from custom made ServiceProvider?

I have one question, I'll explain situation. I have Service which has field DAO. And I am making multithreaded application. Every time I make ClientHandler thread I pass it a new instance of Controller in which I have field Service. My question is…