The tag has no usage guidance.

learn more… | top users | synonyms

0
votes
1answer
61 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 ...
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 ...
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 ...
-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 ...
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
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 ...
3
votes
1answer
872 views

Should I have separate units of work for each EF bounded context?

I have some EF bounded contexts like follows public class BoundedContext_1 : DbContext { IDbSet<A> As { get; set; } IDbSet<B> Bs { get; set; } } public class BoundedContext_2 : ...
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 ...
2
votes
1answer
346 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 ...
-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
144 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 ...
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 ...
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 ...
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
212 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 ...
3
votes
2answers
2k views

Repository pattern vs DAO managing Entities

I am new to concepts like DAO, DAL and Domain Driven Design. In the end I want to decouple the persistence layer (mysql database) from my business objects and logic in a web application. I liked the ...
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 ...
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?
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; ...
3
votes
2answers
835 views

How do you apply Single Responsibility principle to a repository

I am trying to apply "SOLID" whenever I can and try to use common sense and avoid a pattern when I see that a pattern is creating more problems than it's trying to solve. I don't want to apply a ...
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 : ...
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 ...
2
votes
2answers
311 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
364 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
102 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. ...
3
votes
5answers
328 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 ...
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 ...
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 ...
12
votes
2answers
448 views

Big project layout : adding new feature on multiple sub-projects

I want to know how to manage a big project with many components with version control management system. In my current project there are 4 major parts. Web Server Admin console Platform. The web ...
37
votes
9answers
13k views

Should Repositories return IQueryable?

I have been seeing a lot of projects that have repositories that return instances of IQueryable. This allows additional filters and sorting can be performed on the IQueryable by other code, which ...
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 ...
6
votes
2answers
406 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; } ...
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 ...
0
votes
5answers
446 views

To which layer does this code belong?

When I say "Revisional Data Model", I mean a data model where information is never lost: Deletes never destroy any rows, and updates always cause an insert somewhere else to preserve a row's previous ...
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 ...
1
vote
3answers
403 views

Repository matrix pattern?

I'm trying really hard to refactor some of my legacy code in the project using best practices and design patterns + DDD so I'd love some feedback on an issue I'm currently having. Let's assume that I ...
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
192 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. ...
2
votes
2answers
121 views

Git Repository Setup

I am moving my companys source control from TFS to GIT. We have TFS currently defined as. Project Collection / / Client A / Product A / Product B / Product C / Client B / Product D / Product E / ...
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 ...
4
votes
1answer
2k views

How Add/Create* commands should be handled in CQRS + Event Sourcing architecture

I want to implement my first application using CQRS pattern along with Event Sourcing. I am wondering how creation of aggregate roots should be handled properly. Let's say someone sends CreateItem ...
3
votes
2answers
428 views

Should a domain object wrap/contain a DTO interface?

Using .NET - I have an interface IPerson. This interface is implemented by classes in multiple, separate repositories, e.g. EF6 (EfPerson), custom SQL (SqlPerson), or even custom assembly connecting ...
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 ...