Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [service]

The tag has no usage guidance.

0
votes
1answer
47 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
138 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
111 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
105 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 ...
34
votes
6answers
8k 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 ...
3
votes
3answers
517 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
116 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 ...
2
votes
1answer
428 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
25 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
129 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
150 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
212 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
167 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
219 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
869 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 ...
1
vote
1answer
2k 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
94 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
1k 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
101 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
2k 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 ...
6
votes
2answers
527 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
8k 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
528 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
79 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
939 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 ...
7
votes
2answers
2k 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 ...
4
votes
1answer
12k 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
133 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
106 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
307 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
2k 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
1k 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
418 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
523 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
372 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
560 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
1k 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
157 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
932 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
482 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
2k 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
467 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
7k 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....
4
votes
2answers
7k views

Real time data synchronization techniques between two systems

I need to come up with a design for real-time data update from a COTS product (a Point of Sales system) to a custom-built .NET application (an Inventory Management system). Particularly, any sales ...
2
votes
0answers
65 views

Android network Lib development

I have to develop an Android library that should frequently communicate with a server in the background. Access to the lib Object should be guaranteed everywhere in the Apps that will use it, so I ...
1
vote
0answers
281 views

Web Services and Computer Services to access low level system functions

So I think I'm in the right place to ask this question. Its fairly conceptual. I love web development, I work in ASP.NET MVC 3/4/5 C# and have created industry standard applications such as CRM's and ...
10
votes
3answers
14k views

MVC: What is the difference between a model and a service?

Why in some frameworks the logic layer is called "Model" whereas in some it is called "Service". Are they different from each other or just different by naming conventions? UPDATE 1 The reason I'm ...
2
votes
1answer
269 views

Moving business logic from services to classes?

I have a Grails application with a number of services that are starting to get very large. The flow in the majority of my service methods is Database read (Returns DBCursor from MongoDB) Iterate ...
1
vote
2answers
4k views

Android Design - Service vs Thread for Networking

I am writing an Android app, finally (yay me) and for this app I need persistant, but user closeable, network sockets (yes, more than one). I decided to try my hand at writing my own version of an ...