Questions tagged [service]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
0answers
15 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
32 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
102 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
21 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
261 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
129 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
59 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
531 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
222 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
112 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 ...
49
votes
6answers
16k 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
2k 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
120 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
791 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 ...
2
votes
0answers
49 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
175 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
312 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
329 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
370 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
248 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
1k 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
4k 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
119 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
2k 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
132 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
690 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
11k 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
707 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
94 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 ...
1
vote
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 ...
10
votes
2answers
4k 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 ...
6
votes
1answer
19k 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
221 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
112 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
341 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 ...
2
votes
2answers
3k 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
624 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
534 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
523 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 ...
0
votes
1answer
682 views

Android Service vs Simple class with thread for network access [duplicate]

I am in quite a dilemma about how to solve my problem regarding network access. I checked this question but it does not really gives a solution for my problem. All of my REST based requests are ...
3
votes
1answer
2k views

Advice on architecture (WCF / MVC)

First of all, the basics. N-tier application: presentation, business layer, database. It is an old .NET 2.0 (WSE + WinForms) application, a bit more tightly coupled than I'd like, and the requirement ...
6
votes
1answer
163 views

Service repository and discovery without WSDL

I'm in the very early stages of moving a development team away from large monolithic app development to an SOA approach. One of the things that caught my eye in this article about SOA: Stevey's ...
0
votes
1answer
966 views

Would adding more digits be a way to scale a order generation service? [closed]

I am working on interview questions from Amazon.com Software Development Engineer Intern Interview Questions. One of the interviewees was asked "give a scalable system design of Amazon.com's order ...
3
votes
1answer
538 views

How do I create a modal service with AngularJS?

I'm trying to make a service that's polymorphic based upon what mode is specified in the URL. If the char param in the route is set to 'p', I want to use a PresentMode service. If the char param is ...
4
votes
2answers
3k views

local communications between two apps

To make a platform-independent program in C++ I want to separate the GUI (separate for each OS, using native libraries/APIs) and the actual program. Obviously those two need to communicate with each ...
1
vote
1answer
620 views

Duplicate method in spring services, how to refactor?

ServiceOne.java private void doStuff(){} ServiceTwo.java private void doStuff() Where to put common code ? Shall I create a new service, but then what interface will it implement ? Or shall I ...
0
votes
2answers
9k views

Calling another program from a Windows Service

Problem: I am working on a service which will do some automated processing at a configurable time each night. It does some communication over the internet, formats some information, and creates a file....