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 [repository]

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. ...

0
votes
1answer
39 views

What should I prefer: An SCM subrepository, or a CMake ExternalProject?

I'm developing or maintaining a free software project Foo which uses CMake for a build system, as well as source control (e.g. Mercurial or Git), with the repository being available online. Now, this ...
1
vote
0answers
44 views

Should a UnitOfWork contain every Repository?

I'm trying to get the Repository/UnitOfWork pattern figured out. We're working on a project with EntityFramework and our DBContext contains 200+ tables. Right now our approach is to inject whatever ...
0
votes
0answers
24 views

Logic surrounding archiving an entity using the repository pattern

I am working on a live trip geolocation app. Basically the user creates a trip X days/hours in the future and once the trip starts the server will start receiving gps updates and persisting them to ...
4
votes
1answer
131 views

What tactics to use to load the referenced data in repository implementation?

Say that I have a repository that is used as READ-ONLY data provides (never for the writes/updates) - the query part of the CQS, NO event sourcing, hitting relational DB. One of the essential rules - ...
2
votes
2answers
142 views

Is it better to have a single query that returns all related entities, or separate queries for each case?

Summary When writing methods to query for related entities, is it better to have a single method for all related entities or separate methods for each combination? Full Problem I'm writing ...
0
votes
2answers
68 views

Is it a good idea to let database surrogate key values spill out into other aspects of code (HTML, Controllers, Model, Repository layer)?

Is it acceptable to use id in HTML forms and subsequent code processing (controller, view, model, repository layers)? For example I need to show something like this on a web page: Select Motor ...
1
vote
0answers
54 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 ...
7
votes
3answers
291 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
32 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 ...
2
votes
1answer
338 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
108 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
34 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
163 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
66 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
109 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 ...
4
votes
1answer
294 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
100 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
183 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
303 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 ...
3
votes
3answers
432 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 ...
5
votes
2answers
291 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
130 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
40 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
56 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
568 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
109 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
241 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
183 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
253 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
217 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
386 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
815 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
862 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
399 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
511 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
250 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
216 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
392 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
738 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
2k 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
416 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
541 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
131 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
465 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
160 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
183 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 ...