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

Difference between the facade pattern and service layer pattern

what exactly is the difference between the facade pattern and service layer pattern? For facade patterns you can find definitions like: A facade encapsulates a complex subsystem behind a simple interface. It hides much of the complexity and makes…
widdow
  • 5
  • 2
0
votes
0 answers

Why Error Dialog Pattern Class interacts with Presentaion Layer objects?

I'm using a layered architecture. Presentation Layer Service Layer (Business Layer) Domain Layer (where my domain entities reside) Dao Layer My problem is: How can I handle exceptions using the Error Dialog Pattern. My professor said, if my MVC…
0
votes
1 answer

Service layer and UI interface

Generally speaking a service layer is completely separate from UI interface.. However, i would just like to know is there any possibility of some dependency (however little) between UI and service layer? Please give any example. I am asking this…
copenndthagen
  • 49,230
  • 102
  • 290
  • 442
0
votes
1 answer

SAP B1 - Get Purchase Orders and Sales Orders containing item

I need to find PO and SO using item code through Service Layer, but was not able to find a way to retrieve the items using a contain clause in child items. Any ideas on how to build this query?
Geovane
  • 31
  • 2
0
votes
1 answer

Why is my mocked repository trying to connect to the database?

So I'm trying to unittest the servicelayer of my "RESTful-like" API (RESTful-like because I'm not using Springboot or any other framework and instead try to code it from scratch...). The big problem here: the mocked repository, which I need for the…
0
votes
1 answer

Is this leaking domain knowledge to service layer?

Currently, my service layer handles loading aggregate roots that are responsible to react to some domain events. This involves calling the persistence layer to filter and load the responsible aggregate roots using some domain knowledge (who…
geeko
  • 2,649
  • 4
  • 32
  • 59
0
votes
0 answers

How to avoid clashes between ORM model name and service layer data model?

I am using Peewee as ORM provider and my BaseModel subclasses correspond to normalized database tables. These names will be part of my data access layer (DAL) API. Then we will want to define the higher level data model which will have probably…
SkyWalker
  • 13,729
  • 18
  • 91
  • 187
0
votes
0 answers

Is there any way to rectify Deployment Error while creating MVC application and trying to deploy the underlying database in Azure SQL Virtual Machine?

I created One MVC application where Repos and Service Layer are implemented. and I tried to deploy the underlying Database in azure SQL Virtual Machine(IAAS) and application in azure App service(Web app) as PAAS. When I deploy it in the cloud, I got…
0
votes
1 answer

Help with Common Service Layer (Using EF 4.1) for certain types of entities?

I need some advice on my Service layer. Let's say I have this model: public abstract class Entity { public Guid Id {get;set;} } public abstract class Document: Entity { public virtual ICollection
DDiVita
  • 4,225
  • 5
  • 63
  • 117
0
votes
1 answer

In SAP B1 Hana Transactions Notifications, is it possible to exclude the Service Layer from its action?

For SAP B1 HANA, I need to know the best way to exclude the Service Layer from the execution of a Transaction Notification or a TN PostNotification. Thanks in advance!
0
votes
2 answers

Asp.net mvc EF4.1 DbContext and Service Layer

Is it a bad practice to expose DbContext in your service layer? For Example: private readonly IRepository _repository; private readonly IDatabaseFactory _databaseFactory; private readonly IUnitOfWork _unitOfWork; public…
0
votes
1 answer

SAP b1 Service Layer - New Contact person for a Business Partner (REST API)

Would anybody know how to create a new Contact Persons for a Business Partner via the Service Layer (REST API json) ? Thanks
Patrick
  • 1
  • 1
0
votes
1 answer

Develop application layer which has no dependencies to Presentation Layer?

I am learning general development strategies but there are a lot question in my mind about them. One of them is about creating application layer which shouldn't have dependencies Presentation layer. For example, in MVC application lets say we have…
0
votes
1 answer

Generic Service layer with different results in swift

I have prepared a Generic Service layer in my tutorial, where the responses differ from one API call to another and as i know generic is capable of handling this. Yet i find it hard to call different APIs that has differnet responses. For example…
0
votes
1 answer

Should I catch exceptions in DAO layer or can I do it on service layer?

I have a DAO with different methods. An example of one of them: @Override public boolean insertUser(Connection connection,User user) { int rowNum = 0; String query = "INSERT INTO…
DozezQuest
  • 179
  • 7