Questions tagged [service]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-3
votes
1answer
75 views

What is meant by service? [closed]

We know there are services in windows but I am reading a book by Ed Snider and he uses the term “service” whenever his program requires a certain feature/functionality. Like he creates a navigation ...
0
votes
1answer
60 views

Gracefully handling failures in sequence of requests

I am designing architecture for service like pastebin.com. I plan to store user data on S3 storage and metadata with my own server.SO whenever user requests for some paste creation there are two steps ...
0
votes
0answers
32 views

Better understanding SRP: service for querying a REST api

I have a controller that receives some REQUEST parameters. These are forwarded to an importer service class. The importer then connects to a remote REST api which in turn will respond with a list of ...
0
votes
1answer
74 views

Can I put domain services inside domain entities?

Say I have a domain entity User: class User { constructor (username, email, password) { this.username = username this.email = email this.password = password } } Now, all users need a ...
0
votes
0answers
27 views

Migrating an application using a custom API logging system

I'm turning a VB6 application into a VB.NET (using a migration tool). This software relies on a custom DLL which handles logging. This DLL logs to flat files and optionnaly in a GUI component. Also ...
3
votes
1answer
89 views

Separation of concerns and other best practices across Controllers, Services, Providers and Stores in ASP.NET when building a REST web api

I am traditionally a desktop app developer, but circumstance has thrust me into the role of doing web client and corresponding REST api logic for a project I am involved in. Unfortunately, I'm a one-...
-1
votes
1answer
73 views

Need some criticism for my backend app Architecture

I have been learning Backend development for quite a while now and I decided to build a bigger project using Express.js and the MVC architecture, the project is basically a Restful API with Vue.js in ...
2
votes
1answer
46 views

Microservices for app with custom made API without imposing traffic load

Let's say you have an app like Facebook, where each Post can be tagged with a Place. Now, the whole social app backend api (basically the whole client api) is built using nodejs + postgres. But the ...
0
votes
0answers
32 views

Separating Model classes into Model Project with dependency on Service layer

I'm working with a C# API Wrapper project that is entirely flat, meaning 1 project and namespace for all the files. I'm attempting to put the Models into a separate Models project, but I've hit a ...
0
votes
1answer
59 views

Adding authentication and filtering in the service layer

I am currently developing a simple web-based application that consists of various layers: Model Layer Performs simple CRUD operations and provides access to the databes. Implements functions such as ...
2
votes
2answers
287 views

Do I use Repository or Service Object to Perform Logging?

I'm working in Java Spring, and I have typical service and repository layers. The repository grabs a JSON; passes it along to the service; service maps the repository response to a DTO. I also need ...
0
votes
0answers
31 views

What layer/object should I add a Helper method to get all Product objects from?

I have a Helper class and a Service class currently and I read this other question about the difference between a service class and a helper class and got confused. A method to get all products in my ...
0
votes
1answer
388 views

Angular 2+ Providers/Service on Parent or Child component?

I have recently started diving deeper into Angular 7 (with Ionic 3) and I have written a lot of code so far, and I have child & parent component relationships - but never like this before. I am ...
1
vote
3answers
193 views

Tracking state on entity and unit-of-work pattern

In my web app I have a long running operation that is processing some entity in the background. The state of this process should be visible to the clients. During the processing the UI should show ...
0
votes
1answer
66 views

Delete dependent entities

I have a temporary report table which has a foreign key (source_id), e.g. report table: | id | val1 | val2 | source_id | | -- | ---- | ---- | --------- | | 1 | 102 | 0.5 | 1 | | 2 | 99 |...
0
votes
1answer
1k views

DDD - Factory or Service?

I'm new to DDD, and I'm confused at the very start of my DDD project. To setup a context, I'm building the user management part of my app, so I'm building my Account entity, which contains an Id, a ...
0
votes
0answers
368 views

Clarification on the Onion architecture's Domain Service and Application Service

I am studying Onion Architeture but i got some doubts: All the samples (github) I found over internet are too simple, or are implemented under DDD (which I have not studied at the moment) so I can ...
2
votes
3answers
116 views

Should I be worried about having too many services?

I'm making an online game and it has a server handling smaller game server. We call it "MasterServer". This MasterServer listens to commands from both TCP and HTTP and answers to them using its own ...
60
votes
6answers
26k views

In microservice, is it single database or single database instance for each service?

I understand that a each service in a microservice architecture should have its own database. However, by having its own database, does it actually mean simply having another database within the same ...
4
votes
3answers
3k views

Calling service and repository layer from controller

A question came to the team and I'm asking you guys. Our application uses MVC with service layer. But sometimes our service layer just call the repository, without doing nothing Our questions is: in ...
2
votes
2answers
144 views

How to make a service running on a random port discoverable?

I want to create a service that would be running locally (not accessible from the internet) on a given port, then a browser extension will need to access this service. My problem is that I cannot ...
3
votes
1answer
1k views

Domain Model vs Service in a MVC context

At the end of this article from Martin Fowler there is this sentence: In general, the more behavior you find in the services, the more likely you are to be robbing yourself of the benefits of a ...
3
votes
0answers
52 views

Layer below Service and NetworkingManager to handle received data

I'm in the early stages of building a cryptocurrency tracking app for iOS and looking for a scalable design. My question specifically relates to the element of the app which retrieves data from an API ...
4
votes
3answers
247 views

Does Presentation Logic constrain design of Business layer?

We have an email plugin which encrypts a mail's attachments when the user sends an email and gives the mail's recipients permissions to decrypt the attachments. The recipient permissions are stored on ...
0
votes
2answers
378 views

How to design a business datetime service class that performs two types of calculations based on an argument passed in

Context I am making a service class that essentially functions as a business datetime calculator. That is, it can perform various calculations such as what date is X business days from a given date, ...
0
votes
2answers
628 views

An aggregate without an aggregate root?

This is not a problem I am having in my problem domain. It is just a thought exercise. Say I have a simple calculator like this: public class Calculator { public IEnumerable<KeyValuePair<...
1
vote
1answer
605 views

Windows Service with authentication, some UI required

I have to build a Windows Service which requires OAuth2 authentication. The service is intended (like all services should be) to run unattended (no user need to be logged in in Windows). The problem ...
2
votes
2answers
272 views

Is an imposed workflow of services call an antipattern?

We have an application using a bunch of services. As soon as the application is launched it should call a webservice method, "RegisterMachineSession". In this method we accomplish some basic work that ...
0
votes
1answer
2k views

If Service Layer is doing nothing, just calling methods in DAO . Can my Service Interface just extend DAO Interfaces?

Why do we need to write same methods in Service Interface, when we just want a replica of DAO Interface. interface DAOI { method1(); method2(); } interface ServiceI extends DAOI { } instead of ...
2
votes
1answer
6k views

DDD: How to distinguish between application and domain services?

I'm exploring Cargo DDD sample. There is BookingService which belongs to application layer. But looking at the code, it seems that all methods correspondent to Domain Logic (bookNewCargo, ...
0
votes
1answer
156 views

Windows Services - one Service to rule them all or multiple smaller services?

In our software, we have a windows service that performs all our background processing from sending scheduled SMS to performing backups, (maybe 10 different functions). I am questioning as to what ...
0
votes
2answers
3k views

Distinguishing the differences between view model and service layer

First project trying to use MVVM and Xamarin Forms, so please be gentle; however, I am at a lost on how to differentiate between the logic that belongs in the view model and model/service layer. I am ...
1
vote
0answers
134 views

Inversion of control in controller by a mediator

A user has to perform a somewhat complex task on my website (submitting a rating). For the sake of example, let's consider it's a rating for a movie, done through a controller. There are several ...
4
votes
1answer
3k views

Is Unit of Work valid under a service pattern?

I've been studying design patterns. I've learned about Repositories, Unit Of Work, Dependency Injection, MVC. I'm now learning about Service Layer pattern. I'm trying to grasp the utility purpose of ...
7
votes
2answers
917 views

What is a good reason for separating intelligence and dao layers in a microservice?

I am having a long-term debate with my architect about architecture choices. The entreprise where I work in is migrating from a monolithic architecture to a microservices one. The debate is located ...
2
votes
2answers
12k views

Inter-Process Communication in .NET on the same computer

I want to split a C++/CLI application on two parts : 1. Communication Part, with I/O + logging on text file : 3 COM Ports, 2 sockets and 1 log file 2. UI Part, to handle the data received from COM ...
0
votes
1answer
782 views

Android Activitiy and Service Sync

I've looked for the solution of my problem but I've failed in finding a suitable answer. I've been trying to develop an Android application with heavy asyncronous networking capabilities. The problem ...
0
votes
1answer
104 views

Where do we need to include non business logic validations in Service Layer

Currently um working in an application and it has the following hierarchy WEB API2 Controllers (hilds the end points) Business Logic Layer (Dedicated for business logic handling ) Data Access Layer ...
3
votes
1answer
1k views

Web API to Windows Service communication via ZeroMQ

I have an ASP.NET Web API 2 web service. This is the interface customers will use to submit data. I have a Windows Service running on an internal server. I will be sending the customer's POST data to ...
2
votes
1answer
2k views

Laravel 5.2 - Better to create a Service Provider or Helper class or otherwise?

So I have created an API endpoint (obviously not restful) that generates xml and returns the file path of the files. Its obviously more complicated but that is the gist. My issues is this. Inside my ...
14
votes
2answers
6k views

Is there an elegant way to check unique contraints on domain object attributes without moving business logic into service layer?

I have been adapting domain-driven design for about 8 years now and even after all these years, there is still one thing, that has been bugging me. That is checking for a unique record in data storage ...
14
votes
1answer
28k views

Controller calling multiple services

I have a few layers in my WebApplication: Presentation, Service, DAO, Domain. Services call DAO objects which reads data from a Database/File whatever. I have a Controller that needs to fetch data ...
0
votes
1answer
334 views

Is it a good practice to use a Service without Delegate?

I have a simple REST application with a single controller. The application needs to fetch data from a Database, convert it to JSON and return this to the caller. I need to decide what layers I should ...
3
votes
1answer
120 views

where to put methods that manipulate objects

I have a controller method as follow: public class RoomsController { @RequestMapping(method = RequestMethod.GET, path="/v1/rooms/{name}") public ResponseEntity<?> getRoomInformation(@...
4
votes
1answer
352 views

What's the purpose of having services in containers?

I've been very interested in Service Oriented Architecture, and Microservices. Many resources talk about having services in containers. To me, one of the big benefits of seperating an application ...
3
votes
2answers
4k views

Should controller layer create model objects or they should be created by service layer?

I have a small application with classic layers Controller-Service-Dao. Controller actually is REST resource, which deals with JSON data. And the questions are: 1. where is the best place to create ...
5
votes
3answers
2k views

Stateless service classes and method decomposition

I like implementing service classes as stateless. However, I also like to decompose my logic into more, simple methods or functions. In some scenarios it seems like the two are somewhat against each ...
3
votes
1answer
704 views

How to safely and cheaply delete a directory's contents that are constantly being deleted/overwritten

I'm coding something that will check a specific static location's directory, and if it exists, and a certain process has not run in n minutes, it deletes that directory's files and all sub-directory ...
0
votes
2answers
538 views

In AngularJS - should $resource be used from controller or service?

All the documentation, examples and tutorials I've found on $resource were using it directly in the controller. So far I'm just using $http from services and those services are further used in the ...
0
votes
1answer
612 views

Missing super class from dependencies could throw NullPointerException java

Can someone explain if creating an object of a class that have in constructor the super call and the super class are missing from dependencies jar could throw a null pointer exception? e.g. a class ...