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
0 answers

SAP Hana integration with Business One user Accounts Login

I have a basic problem with SAP Hana and Integration of it with B1. I have developed a project for loading data from B1 using calculation and attribute views accessed by xsodata services, and also Insert and Update using xsjs services. Now I want to…
Yasin
  • 51
  • 11
1
vote
1 answer

Service layer validation - throw exceptions or have wrapper ServiceResponse type

This is a general, architecture question, not a request for code examples or particular code solutions. In a multi-layered applications we have 2 major options of handlings service layer validations: Service layer throws exception which…
dee zg
  • 13,793
  • 10
  • 42
  • 82
1
vote
1 answer

Parameter not registered when using Simple Injector to inject into an web api Controller Constructor

currently getting the following error The constructor of type ChurchController contains the parameter with name 'churchService' and type IChurchService that is not registered. Please ensure IChurchService is registered, or change the constructor of…
user2286483
  • 169
  • 1
  • 3
  • 11
1
vote
0 answers

SSL certificate in godaddy rounting to two different internal ports

I would like your help to understand a little bit how HTTPS and SSL certificates works. I have a Salesforce org that needs to connect to SAP Business One Integration Framework (SAP B1IF that runw on Windows-Tomcat) by https and to the SAP Service…
MANUELAN00
  • 119
  • 8
1
vote
1 answer

Repository pattern and service layer

Seems like repository pattern is responsible from CRUD operations and data access methods (ex: stored procedure), and service layer is utilizing repository's methods to carry on its job. My question is, would I be able to put methods in service…
1
vote
1 answer

What's a design pattern to decouple services for owned entities?

I'm looking for a design pattern or convention to decouple services that handle owned entities. Let's say I have a ThemeService, which handles creating Themes. At first, ThemeService just persists Themes for each user's UserData, but requirements…
GuitarStrum
  • 713
  • 8
  • 24
1
vote
0 answers

Should I be passing around entitiy models as parameters? (using RedBean ORM)

I'm just beginning to experiment with the Slim framework and RedBean ORM in PHP. Let's say I have a CommentService registered with Slim's Dependency Injection Container. Also, I have a data model named Comment_Model which is used by RedBean to…
Magnus
  • 17,157
  • 19
  • 104
  • 189
1
vote
2 answers

service layer are bound to DB tecnology in a spring application

my question is: Are your service layer bound to tecnology you use? For example, if you using hibernate, you put into your service layer some hql-queries or criteria-queries that are only hibernate features or you call simply DAO(and dao has…
blow
  • 12,811
  • 24
  • 75
  • 112
1
vote
2 answers

How to get visibility to inserted records where DbContext is not saved yet

I am implementing a service layer where I need to make sure that certain number of operations across multiple tables happen in a transaction. Here is the work flow. I get an instance of HistoricalData object that need to be stored in…
1
vote
1 answer

How to write test using xUnit for service layer?

How do I write a test using xUnit for a service layer? I'm using dependency injection for my service layer, but how can I make an instance of it using an in memory database? Here is what I got so far: I follow this link and here is what I came up to…
1
vote
1 answer

ASP MVC 5 Organizing Project To Avoid Duplicating Code

I am building an asp mvc 5 support ticket helpdesk application. The application will require users to signup to submit a support ticket. Users actions would be to update the ticket by adding notes like a thread. Agents will manage the ticket and…
adam78
  • 9,668
  • 24
  • 96
  • 207
1
vote
0 answers

Business logic placement clarification

I'm working on a .Net WebApi project in which I've got Api controllers making calls to a service layer. Let's say I want to set up an end-point to delete a resource if it exists. If nothing is found, return an error message to that effect. I need…
Talha
  • 373
  • 3
  • 9
1
vote
1 answer

Unit Test Crossing Layer Boundaries

I have a unit test in which I'm testing that my Service class inserts data into the correct place in my Repository class under various conditions. My Repository class has three "storage" locations, and my Service class has a single public AddData…
Ben Rubin
  • 6,909
  • 7
  • 35
  • 82
1
vote
2 answers

Force .NET MVC Controller to Call Service Methods Rather Than Directly Calling Base Class

I have a standard class stack in a .NET MVC5 using Entity Framework 6: MyController() MyService() : ServiceBase() ServiceBase() : IServiceBase All methods/classes are public at the moment. ServiceBase() contains generic(T) methods and is inherited…
1
vote
1 answer

What to do when data from the service layer needs to be shared between different presentation entitites

first of all, please forgive me if I get the terminology wrong. Terminology is important, but similar concepts are often expressed with different terms. Let's say I have two, not well defined, "entities" in my presentation layer that must use the…
sebas
  • 1,045
  • 12
  • 27