The tag has no usage guidance.

learn more… | top users | synonyms

1
vote
1answer
65 views

Are repositories meant just for storing data?

One of the major benefits of the repository pattern is that you can easily switch out implementations for other implementations. After learning about this pattern I started to make tons of things ...
-2
votes
0answers
34 views

Browsing a repo on Android?

For example, I want to understand CPython's implementation of dict, enough to rewrite parts of it. Desired features: Remember where I left off. I want to be able to do something else, and come back ...
0
votes
1answer
160 views

Should I have code that only exists for testing?

I have a service class which is responsible for instantiating repositories and using them. It makes an external Http request which ideally I would like to mock for testing. However, I am not quite ...
-1
votes
0answers
51 views

Two repositories for the same project

I have a project that contains php files and swf files, all swf files are in a folder called "/swf" and the size of that folder exceeds 1GB. And the most of the work consists of php files. I have ...
-2
votes
1answer
47 views

Repository UUID equivalent

I am converting an old Subversion repository to Git. Here is an example: $ svn info http://alfa.com/bravo/charlie Path: charlie URL: http://alfa.com/bravo/charlie Relative URL: ^/charlie Repository ...
4
votes
2answers
147 views

Are Repositories needed any longer in ASP.net 5 & EF7?

I posted a question on github to the EF Team. I got a reply saying it would be better to ask this question here so I will copy and paste it here as we as a link so other can see the few replies on ...
4
votes
4answers
210 views

If Repository Pattern is overkill for modern ORMs (EF, nHibernate), what is a better abstraction?

I've recently read a lot of arguments against using the repository pattern with powerful ORM's like Entity Framework as it incorporates repository-like functionality, along with Unit of Work ...
3
votes
1answer
28 views

How can I have multiple issue trackers with a shared repository?

I work on a large software project where many vendors contribute have forks of a shared repository. Everyone has their own internal repositories and issue trackers. The problem that I'm trying to ...
1
vote
1answer
44 views

Suggestions: Good format for short/commit messages for User Story and Sub tasks

I would like your opinion regarding a good style/format for short messages when committing into a repository (GIT or SVN). Considering we are using a feature branch development approach, with one ...
2
votes
1answer
37 views

Save Two Different Domain Objects in One Service Call

Think that when one Branch saved, a Customer entity must created in n tier layered system architecture. All validation has already implemented in CustomerService. Should BranchService create ...
0
votes
0answers
39 views

What is a good directory structure for projects with versioned code but huge data files

We work with genomics and imaging data. Our data are large, but our code is small. We sometimes work on code collaboratively, and also wish to share it with the researchers we do analysis for. We are ...
2
votes
1answer
68 views

Structuring git repository as a 'catch-all'

I have a really old install of Debian on my Thinkpad, and I want to refresh it now that I'm using it again. However, I have a LOT of old scripts all over this install for beauty fixes, shortcuts, and ...
2
votes
1answer
216 views

How to refactor services into API, repository and caching (.NET)?

I am working on a .NET project with, which started out as a prototype that now has to scale. We have the ASP.NET MVC stack with Entity Framework (code first). I would like to hear how to scale this ...
2
votes
0answers
64 views

How to implement Repository that supports ORM's validation?

DDD has an abstract repository pattern to handle saving and fetching/finding entities in storage (db, external service, doesn't matter). My question is if Repository pattern has to only bring the ...
1
vote
2answers
106 views

Repositories, Gateways, Models and Architecture Questions

I am working with a Laravel project and I am looking for a way to solve the issue of bloated models and cross referencing between them. I had started extracting higher level methods to a repository ...
0
votes
1answer
123 views

Neat way on passing interface parameter to a constructor

Having lots of Interface that needs to pass in a constructor looks messy, is there any neat way of doing it? Code snippet: public class Foo { private readonly IRepository1 _repository1; ...
1
vote
1answer
47 views

Repository Pattern Class Collection examples with Lazy/Eager loading

When implementing the repository it's fairly easy for a stand alone class. Unfortunately, we are unable to use an ORM to manage our data access, so I'm trying to recreate some of the functionality ...
3
votes
1answer
147 views

Understanding Generic Repository Pattern

I am trying to understand the generic repository implementation. I have seen this line (or similar to it) in many examples: public interface IRepository<TEntity> : IDisposable where TEntity : ...
2
votes
2answers
313 views

is it bad practice that controller call repository instead of service?

is it bad practice that controller call repository instead of service? to explain more: I figure out that in good design controllers call service and service use repository. but sometimes in ...
3
votes
3answers
367 views

in DDD, should repositories expose an entity or domain objects?

As I understand it, in DDD, it is appropriate to use a repository pattern with an aggregate root. My question is, should I return the data as an entity or domain objects/DTO? Maybe some code will ...
1
vote
2answers
104 views

Should I use a single repo when multiple parts of the same project are running on the same server? [duplicate]

I'm planning a project that consists of the following parts: REST API in Lumen Web client in Laravel Product website in Jekyll These separate products are going to be running on the same server. ...
8
votes
2answers
100 views

How viable is it to have a single webapp over several private small repositories?

We are a low budget team working on a web app. Due some complications we might need to work remotely from January and onward. After some consulting and googling, we concluded that several small ...
2
votes
2answers
296 views

Data Layer vs Business Layer

I think I'm in the minority on this but would be curious to see other perspectives. A lot of times I see people talk about the Data Layer like having functions like UpdateCustomer() or Summarize(). I ...
69
votes
10answers
7k views

Are (database) integration tests bad?

Some people maintain that integration tests are all kinds of bad and wrong - everything must be unit-tested, which means you have to mock dependencies; an option which, for various reasons, I'm not ...
6
votes
3answers
257 views

What data type should Gateway return in Repository Pattern to eliminate refactoring when switching persistence mechanisms?

Following this description of the Repository Pattern, we have three main concerns that need their own classes: The "Repository," which takes and returns Domain Models. The "Gateway," which takes ...
2
votes
0answers
83 views

Justification for different code bases on different branches in the same repo? [closed]

Branches in git repos or similar are practically always derived from the same code base; after all, they're usually merged back in to master later. But, if you wanted your open source project on ...
1
vote
2answers
54 views

Workflow for chains of dependent pull requests to projects that depend on other projects

Suppose you have project A and project B, where project B depends on project A - let's say A is a library. And project A and project B live in separate version control repositories - either because ...
2
votes
3answers
64 views

Does Git subtree count as distribution for copyleft licenses?

If I include, say, a GPLv3 repository in in my repository using git subtree, would that count as distribution? Am I now required to license my repository as GPLv3 as well? I don't intend to modify ...
3
votes
1answer
98 views

Hide authentication information on Github

When your creating a project that has some sort of information that needs to be private (authentication details, etc), but you want to use some public repo like Github, are there anything that can be ...
6
votes
2answers
407 views

How to populate Lazy object from database

I have these classes: public class Order { private Lazy<IEnumerable<Volume>> _volumes; long ID { get; private set; } string Description { get; private set; } ...
3
votes
5answers
329 views

Inheritance when following the Repository Pattern in PHP

I am trying to build a PHP application using the Repository Pattern but I'm not sure how I should implement the save method. I have an abstract class called ItemRepository which have the following ...
0
votes
0answers
42 views

Managing pagination or cursor with deleting items in the list

I have a REST API that could GET, POST, PUT, DELETE models. My problem is when I paginate that with ajax call combining with DELETE operations. My problem comes after few steps list one page list ...
7
votes
4answers
261 views

What's best practice when putting an abstraction layer over an ORM?

When working with an ORM such as Entity Framework, I've fallen into a comfortable habit. Make an interface with get/add methods on it, put this on a "Repository" class then add a constructor to each ...
2
votes
1answer
350 views

Decoupled architecture in Android

I am building an app for Android that will have multiple data sources depending on who is using it. N-tier architecture with a repository pattern seems like the right way to go about this but I am ...
1
vote
1answer
132 views

How to handle a project in git with the same code but different templates?

I have a project where the only difference are the templates. The question is how should I manage this with git now? At the moment I have 3 different git Repos, but it's hard to maintain all 3 of ...
2
votes
1answer
65 views

Who should be responsible for syncing a repository?

Given an app, controller, model and repository (which holds representation of model), where should the sync service for the repository live? In my specific implementation, my app/controller are ...
2
votes
2answers
193 views

Handling insertion to database with Repository pattern

I have a design question for working with databases in object-oriented PHP. I have a table in my database called products. Then I have 2 classes for this table in my PHP project. ...
3
votes
0answers
98 views

Proper GIT repository usage that accommodates feature branches and parallel testing

After reading around I found that there were various git workflows being used but there aren't enough (or I just haven't found them yet) info on how to use git properly with having test builds. I was ...
3
votes
3answers
174 views

Should you create a github repo/project for things as small as a useful function

Is it appropriate to make a fully blown github project/repo for something that you believe would be useful to others, but is as small as a single function?
1
vote
2answers
288 views

Git clone to memory

I'm making an app that is required to clone git repositories by a link to it and analyze the codebase. Pulling to the disk using the git clone command wouldn't scale well. Is there any way to clone ...
2
votes
1answer
88 views

What's the correct commit message in a multi-project repository

Somewhere else there was a discussion on putting several projects in one large repository. My question is, how does a good commit message look in those type of repos? I usually prepend each commit ...
2
votes
2answers
179 views

What's the correct approach to DAO layer in presence of ORM framework

I'm using JPA/Hibernate but probably it doesn't limit question. Currently I'm writing my data access code in my web controller classes. Thanks to JPA, in most cases this code is very simple, ...
0
votes
1answer
130 views

Sharing core repository and object mapping logic between Unit of Work methods

I'm wondering if there is a better way to do this or if I'm doing some anti-pattern here. Like I say in the subject, I'm trying to share repository calls and object mapping logic between Unit of Work ...
1
vote
1answer
128 views

How to name complex DAL/repository methods? [closed]

I'm beginning working with repository pattern. When it comes to simple queries I don't have problems with names. GetById GetByDay UpdateById If a method retrieves data filtered by two values also ...
10
votes
1answer
697 views

When making a fix to an earlier commit, should I rebase or add a separate fix up commit?

A common scenario in software development is code reviewing somebody else's code. A common tool for doing this is opening a Pull Request. My question is, when issues are found in the review, should ...
2
votes
2answers
159 views

For a concrete SQL Repository, should I encapsulate the SQL logic inside or outside the repository methods?

If I have a concrete repository based on SQL data access, should I pass in SQL to the repository methods or encapsulate them within the methods. I feel if I pass them in, then I am coupling my ...
2
votes
1answer
379 views

What is better repository design?

I have tables that I insert, delete and update, but I read from views. At times, I may read from the tables as well. What is a better generic interface for a Repository: public interface ...
3
votes
3answers
267 views

How granular should we get with repositories?

Is it better to have a repository per model (this could be a class that represents a table from the database) or should just have one big repository for all data access methods? I have done the ...
1
vote
1answer
319 views

Consuming a rest API that exposes nested objects

I have a series of nested objects, exposed over a REST API, like so: class Categories { int id; string name; List<Subcategories> subcategories; } class Subcategories { ...
1
vote
2answers
130 views

Is it a good idea to require passwords in offline applications?

I am developing an application which can install extension modules (plugins, if you will) from APT-style repositories hosted elsewhere. The plugins need not be signed (although the downloads are ...