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
0
votes
1 answer

Service Layer Pattern: Business logic that spans multiple services

In developing an n-tier application, I seem to have hit a scenario where one service say service A needs to consume a method in service B. I do not want to duplicate logic but it does not seem like I should not have services calling one another…
user1790300
  • 2,143
  • 10
  • 54
  • 123
0
votes
2 answers

How to avoid many service methods each one for a different query

This site only queries a database - NO CRUD I have a Service DLL that I call from a ApiController the ApiController methods are called by ajax requests in my HTML. My problem is it's getting pretty hairy in my service. Here are just a few examples…
Doug Chamberlain
  • 11,192
  • 9
  • 51
  • 91
0
votes
1 answer

Service Layer DTOs - Large Complex Interactive Report-Like Objects

I have Meeting objects that form the basis of a scheduling system, of which gridviews are used to display the important information. This is for the purpose of scheduling employees to meetings, and for employees to view what has been scheduled. I…
0
votes
2 answers

Inject Dependencies without Interfaces Defined nLayer

I have an n-layered application (DAL, BLL, Service Layer, and UI) that we are redeveloping with a new UI layer that will use MVC and inject service class dependencies in controllers. I believe we can achieve loose coupling with UI and Service Layer,…
0
votes
1 answer

N Layer .Net Message management

Im developing a N Layer web application (UI/Service/DAL). When in calling a certain service, inside the service layer sometimes theres an event that requires user notification. How should I pass these messages from the service layer to the UI…
Fex Rex
  • 17
  • 6
0
votes
1 answer

Passing forms vs raw input to service layer

Is it better to validate a form and pass its filtered input to the service layer, or to pass the raw input to the service layer, and have the service validate the input (with or without a form instance)? Obviously, if it's the latter, the controller…
glen-84
  • 1,778
  • 2
  • 18
  • 30
0
votes
2 answers

Spring service layer scoped as Singleton - is it thread safe?

Environment: Spring Container Say i have the service layer configured as Singleton and that there are no instance variables (state variables) in the service class. @Singleton class MyService{ public List getNames(){ List
user711189
  • 4,383
  • 4
  • 30
  • 48
0
votes
1 answer

Create service response in web method, service layer or DAO layer?

I am new to web services and Spring. I have a web service method like this: @WebMethod(operationName = "docSearch") public ServiceResponse docSearch(@WebParam(name = "docNum") String docNum) { //TODO lots of TODOs here: …
lamostreta
  • 2,359
  • 7
  • 44
  • 61
0
votes
1 answer

On Service Layer how to return couple entity from repository which is responsible of one entity

if i know correct each Repository is on Entity I have and ProductService then i need to get current product's images , there is not some repository for Images. And my Product repositoy is responsible of product Entity. Repository just return…
0
votes
1 answer

Proper place for validation code in a service?

I am using FluentValidation and a Service Layer for my MVC application. I have a question regarding where you would put logic to check for duplicate items. Say you have a CategoryService and a CategoryValidator, would you put the logic to check for…
Sam
  • 15,336
  • 25
  • 85
  • 148
0
votes
2 answers

Class Loading in Phalcon for plugins

When adding a dispacher in the services.php it doesnt seem to have access to the autoloader to include class's. Example: /config/services.php $di->set('dispatcher', function() use ($di) { require __DIR__.'/../../app/plugins/security.php'; …
0
votes
2 answers

Moving MVC-style service layer under WCF

Recently I've been working with MVC4 and have grown quite comfortable with the View > View Model > Controller > Service > Repository stack with IoC and all. I like this. It works well. However, we're moving towards company wide application platform…
0
votes
1 answer

Unable to Update Many to Many Relationship. Entity Framework Code First

I am trying to update a many to many relationship that I have setup in Entity Framework using Code First. I've created the following Models. [Serializable] public class ClientFormField : FormField { public ClientFormField() { …
0
votes
1 answer

Application Services referred as containing Business Logic

I have a question that twisted me over the last months. Some of the writers and persons (I would not say all of them) are associating the Business Logic with Application Services. According to what I know a business Logic contain the classes that…
0
votes
1 answer

How much resposibility should my repository/service have?

I have the following objects: Person <- Contact -> ClientsPerson <- Client I'm using the repository pattern with a service layer. But already here, being a perfectionist, I'm lost! I also have a PersonService, ClientService and I'm pretty sure I…
Kordonme
  • 2,314
  • 3
  • 20
  • 32