Questions tagged [services]

117 questions
72
votes
7 answers

How essential is it to make a service layer?

I started building an app in 3 layers (DAL, BL, UI) [it mainly handles CRM, some sales reports and inventory]. A colleague told me that I must move to service layer pattern, that developers came to service pattern from their experience and it is the…
BornToCode
  • 1,273
  • 2
  • 13
  • 16
26
votes
4 answers

Web api authentication techniques

We have a asp.net MVC web service framework for serving out xml/json for peoples Get requests but are struggling to figure out the best way (fast, easy, trivial for users coding with javascript or OO languages) to authenticate users. It's not that…
Steve
  • 411
  • 1
  • 5
  • 10
25
votes
3 answers

What is a recommended pattern for REST endpoints planning for foresighted changes

Trying to design an API for external applications with foresight for change isn't easy, but a little thought up front can make life easier later on. I'm trying to establish a scheme that will support future changes while remaining backward…
Brett Ryan
  • 541
  • 1
  • 4
  • 12
23
votes
6 answers

Why use services (REST/SOAP) instead of a library?

Let's say you're looking at breaking up your applications into services. Are there any good reasons to adopt a SOA approach vs. just creating a library API that can be loaded by the applications that need it.
Nate Reed
  • 341
  • 1
  • 2
  • 6
21
votes
5 answers

If a microservice architecture needs a separate database per microservice then it's too costly & unmanageable. Why do we even need it?

I read about microservices and it seems illogical to me to create a separate DB per service just to achieve isolation. I can achieve the same using only web services and a single database. Why do we even need it? The thing that separate database is…
19
votes
2 answers

Anemic domain models and domain services injection

The anemic domain model is described as an anti-pattern in domain driven design by Martin Fowler. To have business logic on the domain models often domain services are used. But injecting domain services into domain models is considered harmful by…
18
votes
13 answers

What are the practical uses of Windows Services?

I am new to working with Windows Services. Although I have learnt to create Windows Services in VS2010 I would like to know some practical ways in which windows services could be used? I tried Googling with the current context in mind only to…
Karthik Sreenivasan
  • 1,025
  • 2
  • 10
  • 22
17
votes
3 answers

Is it ok for services to reference one another?

I have a service that needs information implemented by another service in the same layer. Is it good practice for one service to take a dependency on another service in the same layer?
TugboatCaptain
  • 281
  • 1
  • 2
  • 8
17
votes
4 answers

Use a service layer with MVC

If a controller gets too fat and model instantiation starts to add up, a service layer could be used. If I just wrap the logic inside a service class, I will get a bunch of Services with one/two methods. This feels like a code smell. Any best…
johnlemon
  • 601
  • 1
  • 6
  • 18
16
votes
4 answers

Micro-services and data replication

I am building a new application and was reading about micro-services architecture. The architecture itself makes lot of sense from a development, deployment and life cycle management point of view. However, one issue that came up was with regards to…
mithrandir
  • 299
  • 2
  • 4
13
votes
3 answers

Should I use a layer between service and repository for a clean architecture - Spring

I'm working in an architecture, it is going to offer a rest api for web client and mobile apps. I'm using Spring(spring mvc, spring data jpa, ...etc). The domain model is coded with JPA specification. I'm trying to apply some concepts of clean…
Alejandro
  • 139
  • 1
  • 1
  • 5
13
votes
5 answers

How can you effectively use web services in an enterprise environment if you can't use transactions?

The place I'm working at is trying to establish some ground rules, and the debate we're having now is local libraries vs web services for code reuse. Web services seem to be the popular pick in most companies, and that's what most of the developers…
ryeguy
  • 267
  • 1
  • 7
10
votes
9 answers

Should I require users to register to use my app?

So I'm very close to releasing an app I've been working on, and the server I integrate with allows me to register users. So I was wondering if I should require users to register with the app before they use it. The app wouldn't "need" the…
Andrew
  • 298
  • 3
  • 10
8
votes
1 answer

Is there a thing as "too many threads"

I wasn't sure if here or SO was the right place to ask this, but here goes anyway. So I want to improve a system that is currently running. It has services and many stand alone apps, but none of these things are properly coordinated. Now I want to…
JDProwler
  • 91
  • 1
  • 5
7
votes
1 answer

Service Design Pattern

I'm working with services and I found out there are at least 3 ways to use them inside controllers... Statically: Like helper, Text::uppercase('foo') Instancing it: $text = new Text(); $text->uppercase('foo'); Injecting with reflection through…
1
2 3 4 5 6 7 8