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

A repository provides a storage mechanism for digital products. May refer to [version-control] like [git] or [svn]. An application specific tag should be used with this tag in order to identify the specific repository management interface that is being used unless the question is general in nature. ...

1
vote
0answers
51 views

How can I offload customer's data needs onto the customer?

I write code for an Engineering application where engineers keep giving me various specs in a form of tabular data - for example, a table with product model names and many various parameters for each ...
6
votes
3answers
174 views

Repository Pattern vs DAL Object Creation

As far as I've learned, the IRepository should contain CRUD. Then we inherit this IRepository in our other Interfaces like IProductand implement IProductconcrete class ProductRepository, with methods ...
-1
votes
1answer
30 views

how to merge or update a template repository?

I have a template repository consisting of a folder structure, scripts, makefiles, example files (text templates) etc. The easiest way would be to clone the repo, delete the .git folder and create a ...
1
vote
1answer
177 views

What is the difference between a Query Object and a Repository?

What is the difference between Query Object and Repository? Martin Fowler 'Patterns of Enterprise Architecture': “an object that represents a database query.”, Also should a QueryObject always be ...
0
votes
0answers
94 views

Can we use DAO(Data Access Object) instead repository in onion Architecture?

we are design a project in Onion Architecture. I read in various articles about the differences between dao(Data Access O and repository. In fact, we saw the structure of my project required to use ...
0
votes
0answers
32 views

Organizing Code Alongside a Large Neural Network

I am using the well documented and excellently maintained RetinaNet implementation in Keras Convolutional Neural Network to support some object detection tasks. I'm building a couple sets of ...
1
vote
2answers
104 views

What data should a repository return

I have a simple project where the controller calls the service, and the service calls the repository in order to get the needed data. Assuming that we have these domain models: // this model has a ...
1
vote
1answer
63 views

Handling generic and specific implementation

Normally we have some code that is common for many (if not all) derived classes. An example would be a generic repository (where I could have a generic Add, Remove, Count, Max, Load etc, or a generic ...
0
votes
1answer
101 views

Can source code, automake and configure files for multiple OS co-exist in one Git branch

I am working on an open source project that should be compiled for multiple operating systems including Ubuntu and Windows. I am working on how to structure the Git repositories and branches for ...
3
votes
1answer
165 views

Should unit of work create repository?

Our "unit of work" class has a method which takes a class type and creates a repository: public IRepository<TEntity> GetRepository<TEntity>() where TEntity : class { ...
0
votes
1answer
88 views

Swapping Entities or ORM in repository pattern

Lets say i am following Repository pattern in my application and i have class UserEntity { private $model; public function __construct() { $this->model = new UserModel(); } }...
3
votes
3answers
173 views

How can database-specific functionality, such as increment/decrement features, be used in DDD?

I have an entity that has a dollar balance property. Whenever an event occurs that causes the balance to change, such as a debit, within the same transaction the balance should be decremented by the ...
1
vote
2answers
254 views

Where to place POCOs validation - N-layers architecture

I am developing an n-layer app. One of the layer is the BusinessLayer and consumes a set of POCOs defined in the CoreLayer. Also I have a PresentationLayer (WinForms) CoreLayer POCOs (classes with ...
0
votes
2answers
91 views

Making utilities discoverable

I am currently working a data science team, and we write small utilities all the time to consolidate data, extract data, etc (an example is go through a folder of excel workbooks, convert all the ...
0
votes
3answers
252 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 ...
3
votes
1answer
210 views

Converting a very large remote subversion repository to a slimmed down Git repository

I have the pleasure of taking over 14 year old subversion repository that consists of two key elements: 111,000 revisions, about 10% of which are substantial; The repository dump is about 73 GB, ...
-3
votes
2answers
123 views

Source control with multiple customer-specific repositories

Here is a diagram of how our source control setup is configured. The issue with this setup is how we handle various customers. I would really like to use a different approach than copying the entire ...
0
votes
0answers
39 views

Repository Unit of Work object type reference

I'm confused on how to best use this pattern. I have a project that uses Devart's Entity Framework for Oracle. The context is provided by them. So I have an interface IRepository and a single ...
0
votes
1answer
48 views

How to handle pull requests merges in a service oriented environment that touch several repositories?

So we have a microservices architecture. Quite often we release features that require changes in several repos simultaneously. What approaches are best for handling this? Ex. Pull Request 1 from ...
4
votes
1answer
54 views

Organizing Ad-Hoc Tooling in a Muti-Repo Structure

Imagine you have the following scenario. Your organization deploys some app core to its mission. For example if you're Stack Exchange, this might be the customer facing web server. Let's also say you ...
0
votes
0answers
513 views

DAO vs Repository when extending spring data jpa repositories

I read several articles about diff between DAO and Repository patterns. From what I understood repository should not have query smth like this List query(AccountSpecification specification); and ...
0
votes
2answers
105 views

Should I create a Repository Container to get my repositories?

@Component public class RepositoryContainer { @Autowired public CommentRepository commentRepository; @Autowired public ItemRepository itemRepository; @Autowired public ...
3
votes
2answers
228 views

Are you supposed to fork a repo if you're porting it to another language?

I'm new to forking and open source and I'm porting a Rust library into Swift but I wasn't sure if I needed to fork the original repo and then replace it with my new files or just upload my own repo ...
1
vote
4answers
172 views

Use OOP approach for organize the business rules instead of SOA in a small project. Excluding DDD, is there some strategy to do this?

I was talking with a friend another day about OOP in small projects. In the most of projects that me and him worked the SOA was the rule. Per example, imagine a Order in a SOA application. The ...
5
votes
3answers
245 views

Repository pattern, different identifiers

TLDR; I have one repo interface and multiple data sources, each with a different data identifier - how can I maintain having only one method in my interface? I have a need to read a domain object ...
1
vote
0answers
194 views

Putting UnitofWork handler in the Request Model for DDD with Clean architecture?

I'm rearchitecting a system in Python, using SQLAlchemy for the data mapping layer, and the Zope Component Architecture for dependency injection and interface declaration. I am in the process of ...
0
votes
1answer
346 views

Two code bases in one repository… is there ever a good reason to do this?

I work on two code bases that are related, but independent. One is written in PHP, the other is Node JS. Currently, they are in a single repository. The repo is deployed to Heroku for the Node code, ...
1
vote
1answer
687 views

Service layer with DTO

I'm refactoring my desing to use a service layer - however I'm confused about how you would pass arguments, when it's only allowed to update certain fields of the entity. For instance I have some ...
5
votes
1answer
741 views

shared CD (Continuous Deployment) for multiple Git repositories

Long story short What is the best way to design a shared CD for multiple Git repositories (frontend and backend)? I'm struggling to find the best design for our CD. The hole picture (The details ...
3
votes
1answer
282 views

Domain Objects and How they Access the Database

Suppose I have the following class: public class Course { // data public string Name { get; } public List<Student> Students {get;} //... // logic public int ...
2
votes
2answers
471 views

Object To Be Used By Service Layer

My project has a UI layer, a Service Layer and a Repository layer. The latter has Entity objects as part of the ORM (.net Entity Framework). The service later returns a Dto to the UI layer. My ...
5
votes
2answers
2k views

monorepo - Single monorepo for multiple large-scale, company-sized projects

I'm in need of some advice before going foward. I want to build several large scale projects, like a marketplace product, and a few domain-specific products and libraries. The products may or may not ...
5
votes
3answers
247 views

How to notify a repository about persistence changes

I have a repository, which at the moment, reads from the database every time it is called. However, the data is only updated once a day, and to improve performance, I'd like the repository to store ...
0
votes
0answers
210 views

Is implementing anytime it makes sense aggregation and composition necessary good?

As I'm drawing my project's classes diagram, I'm wondering... Let's take Customer's relationship with Order for example. It seems pretty natural and logic to aggregate Orders to the User... So ...
2
votes
2answers
306 views

Best practice to keep different data sources in sync?

I'm having doubts about how to implement and keep synchronization between two datasources in a distributed system. In my case, I have a service that checks for expired jobs in a repository. If the job ...
2
votes
2answers
1k views

DDD: should entity method use repository for stored procedures (not CRUD)?

Imagine you have a Vehicle entity in your domain model. Vehicle entity has Reserve method that put vehicle in "reserved" state and do another stuff. But Reserve method have to do some checking first ...
2
votes
1answer
666 views

Avoid core layer referencing DAL when defining repository interface

I'm trying to learn the N-Layer architecture and several other things, and I have a C# solution where I have the following layers: Core/Infrastructure (Folder) Core (Project) ...
1
vote
2answers
1k views

Calling a service method from another service method

In the repository pattern, is it a "bad idea" to call a service method from another service method? In most cases, I naturally end up calling repository methods from my service methods. However, in ...
5
votes
1answer
374 views

Using SQL for DDD Persistence - Is Referential Integrity Mandatory?

I am writing DDD bounded contexts with some entities using event sourcing for their persistence and other entities using SQL databases. To simplify writing of the entities that use SQL persistence, ...
2
votes
0answers
498 views

Python and C++ repository structure

I'm refactoring the directory structure of a large Python repo that has a few dozen C and C++ files littered throughout. Is there a suggested architecture for a Python package that contains C/C++ code ...
0
votes
1answer
119 views

Should a repository transform data into the correct model?

I have some data in my ERP that is formed in a very odd way (think a HTML field that contains many different fields, formatted in HTML that need to be pulled out using XPath). Is the transformation ...
3
votes
1answer
348 views

How to design my repositories when there are multiple sources for the same sort of data?

In my application, I have to get data from our ERP. For this example, let's say product data. Some of the data will come from the API that our ERP has provided us, whilst some of it will come from ...
1
vote
1answer
141 views

Object oriented way of interacting with persistence layer

I have a hotel entity which has a set of images. I have some business rules which are basically simple crud operations right now. I have heard of repository pattern but working with it I feels like ...
-1
votes
1answer
179 views

How to maintain multiple or single repositories of a project developed by multiple people?

A while ago, I asked what are cons and pros between the two version control designs of a project: multiple repositories, vs single repository When a project has a single git repository and developed ...
0
votes
2answers
807 views

Can not understand how dependency injection can ease testing inside asp.net MVC

Each time i read an article or a book about asp.net MVC , there will be a chapter for dependency injection and repository . now i can easily feel the benefits of using repository over hard coding the ...
4
votes
2answers
138 views

README “Setup” section best practice?

In the SETUP section of my README, should I just link to instructions for each dependency like this: STEPS install Appium (guide) install XYZ (guide) Or should I reproduce all their instructions ...
1
vote
2answers
3k views

Should I mock Repository and Unit Of Work for Unit Testing?

I have read this article: https://www.gaui.is/how-to-mock-the-datacontext-linq/ Since this article is almost 4 years old I have no hope that in article's comments my question will be answered so I ...
6
votes
4answers
247 views

Storing directly in the model

Normally when I have some data to store, I do something like Model model = new Model(); Notifier notifier = new EventBus(); Store store = new DataStore(); model.updateTitle("new title"); store.save(...
0
votes
1answer
162 views

Does this Repository code violate SRP and DRY?

After reading this Stackoverflow question I have stumbled upon an MSDN article Implementing the Repository and Unit of Work Patterns in an ASP.NET MVC Application. There is a proposed implementation ...
2
votes
1answer
424 views

git: multiple repositories but still “grouped”

I have a rather simple application which consists of an angular frontend and a REST API done in C# For the frontend I use WebStorm and for the backend Visual Studio. Now we need to introduce a new ...