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

Put this logic into a Repository or a Service

Should I put this method into my ISchoolclassCodeRepository or my ISchoolclassService? /// /// The client passes newly created and existing schoolclass codes. /// The newly created schoolclass codes are returned. …
Pascal
  • 12,265
  • 25
  • 103
  • 195
0
votes
2 answers

Work around for Generics and Dynamic arguments

I'm trying to write a wrapper to hide much of the code I find myself repeating for each db call in Dapper. (namely the Sql Connection, try, default catch and finally) Essentially I would like to do something like the following code but I understand…
Terrance
  • 11,764
  • 4
  • 54
  • 80
0
votes
1 answer

Binding ObjectDataSource to service or repository?

Roughly following some designs I've seen, I'm building an ASP.NET application where each of my business objects has an associated Repository and Service. The repositories use nHibernate's ISession to perform CRUD operations, and the corresponding…
Brett
  • 1,267
  • 1
  • 13
  • 21
0
votes
1 answer

Replacing Tuxedo calls with JDBC

I have been tasked with replacing some Tuxedo services with the equivalent JDBC calls. Considering a single Tuxedo service, I have started by creating a JDBC DAO, which implements the same interface as the existing Tuxedo DAO. I am calling methods…
James Hargreaves
  • 415
  • 1
  • 3
  • 15
0
votes
0 answers

Where to place modules related to AI in MVCS

I am bit confused, what is the right place to place the modules related to AI in an MVCS pattern ? Alongside with Model View Controller and Services folder ? V.
Vishwas
  • 1,533
  • 2
  • 19
  • 40
0
votes
1 answer

Service layer ModelState not updating in .net Web API

I'm implementing an MVC solution that has some Web API endpoints for various data queries. I'm using the techniques described in this post to separate my validation concerns to a Services layer. This post has a TL;DR at the end if you want to skip…
0
votes
1 answer

Proper Type for Date Object That Needs to be a LocalDate

If I would like to incorporate the JodaTime library into my MVC project. What would be the best way to write the setter/getter methods for my bean? I've currently tied my local variables to the LocalDate object in JodaTime, but this is probably not…
Robert
  • 1,638
  • 7
  • 34
  • 45
0
votes
2 answers

ASP.NET MVC client validation from Service Layer

I'm following this article http://www.asp.net/mvc/tutorials/older-versions/models-(data)/validating-with-a-service-layer-cs to include a Service Layer with Business Logic in my ASP.NET MVC Web Application. I'm able to pass messages from the Service…
GibboK
  • 71,848
  • 143
  • 435
  • 658
0
votes
2 answers

Move Data Access logic from the business layer to the data access layer

I am doing an asp.net mvc application having a Data Access Layer (DAL). Having done 90% of my database CRUD code I asked myself wether I need a Business Layer. But what should I put there? All my CRUD methods in the DAL are not single Selects on one…
Pascal
  • 12,265
  • 25
  • 103
  • 195
0
votes
1 answer

How do you namespace your service layer?

So for namespacing my repository layer, it's easy. I do something like this: The interfaces live in Models.Repositories. So maybe I'd have Models.Repositories.IUserRepository or something. Then I sub-namespace based on what the implementation…
Sean
  • 1,668
  • 1
  • 18
  • 28
0
votes
1 answer

Sorting in EF with Repository and a Service Layer

I have a couple of classes that implement a common repository interface, one of the methods in these classes is a method that returns a Paged Result and takes a Expression> OrderBy I have also created a Service Layer that will use the…
0
votes
3 answers

Can I use spring DataAccessException directly in service layer

Can I use spring DataAccessException directly in service layer?. Is this a good practice/design to spread a frame work class in service layer?. OR should i catch DataAccessException in dao layer and rethrow it as some more generic Exception?
rohit
  • 602
  • 4
  • 11
  • 24
0
votes
1 answer

Transaction support in struts2

I am using struts2.0 for my project named online examination system. I am using traditional JDBC approach in datya access layer. I can't use JPA. I want to make entire service layer transactional, but i searched for the transaction support in…
rohit
  • 602
  • 4
  • 11
  • 24
0
votes
1 answer

Service layer for an UI with multiple screens

I am building a winforms screen. On the screen, it will show Category1 Sub-1-1 Sub-1-2 Sub-1-3 Category2 Sub-2-1 Click on the sub-1-1 will popup an screen and show the data related to sub-1-1; same for sub-1-2, ... etc. So there will be…
ca9163d9
  • 27,283
  • 64
  • 210
  • 413
0
votes
1 answer

Is it a good practice to pass IQueryable as parameter in a Service layer method?

I have an ASP.NET application with 3 layers UI, Service Layer and Repository. I have to implement a search functionality on the products in the database. ProductRepository is my repository class and the signature of the method that gets all the…
CiccioMiami
  • 8,028
  • 32
  • 90
  • 151
1 2 3
26
27