A design pattern is a general reusable solution to a commonly occurring problem in software design.

learn more… | top users | synonyms

1
vote
1answer
32 views

JavaScript Singletons and Module Pattern

Is there a preferred way of doing what I describe here. I want to namespace my JavaScript code and use the Singleton Pattern so that only one instance of my JavaScript app exists. I have seen two ...
1
vote
0answers
36 views

Improve the architecture to cache data

I cache the data and use local database in my Windows Phone app. Algorithm is very simple: Get data from DB and show in UI Get data from a web service and show in UI Update data in DB from the web ...
1
vote
2answers
104 views

Which approach for checking for null is preferable?

In my Repository class: public class DeliveryRepository : IDeliveryRepository { private readonly List<Delivery> deliveries = new List<Delivery>(); public Delivery Add(Delivery ...
0
votes
0answers
33 views

What the best way to wire up Entity Framework database context (model) to ViewModel in MVVM WPF? [migrated]

As in the question above: What the best way to wire up Entity Framework database model (context) to viewModel in MVVM (WPF)? I am learning MVVM pattern in WPF, alot of examples shows how to implement ...
2
votes
1answer
43 views

Builder pattern for Codeigniter ActiveRecord queries

I am using Codeigniter and it's ActiveRecord. I had this idea for a base class that provided a generic getter/setter for doing simple queries on a database. I have a lot of database objects that ...
2
votes
0answers
85 views

Unit of work, Ninject, Repository and WebAPI implementation

so, after recently getting a bulk of work done on my WebAPI service layer, I thought I'd post some of my working on here for you guys to tear apart, generally, most of it 'feels' mostly ok, but I know ...
2
votes
0answers
53 views

Parallel Job Consumer using TPL

I need to provide a service (either a Windows Service or an Azure Worker Role) which will handle the parallel execution of jobs. These jobs could be anything from importing data to compiling of ...
1
vote
0answers
65 views

Entity Framework using Repository Pattern, Unit of Work and Unity - viable approach?

Using a combination provided from this example and this implementation, I'm creating a solution that decouples the UnitOfWork class from the individual repositories, as they violate the Open-Closed ...
1
vote
0answers
44 views

Basic structure of a simple php REST api

I've read plenty about php OOP design principles and patterns. I can work with classes and inheritance. My issue is with actually using classes for some purpose. In this case, I want to create a ...
2
votes
1answer
45 views

Collecting Parameter vs overloading addition

I'm reading TDD By Example by Kent Beck (which I highly recommend, if you haven't read it!) In The xUnit Example, he discusses how to collect the results of multiple tests in a single TestResult. His ...
3
votes
1answer
78 views

Parallel Job Consumer

Edit: A second iteration of this problem here. I need to provide a service (either a Windows Service or an Azure Worker Role) which will handle the parallel execution of jobs. These jobs could be ...
1
vote
1answer
123 views

Unit of Work and Repository Design Pattern Implementation

User and Role are just examples; also, code is sparse on purpose (i.e. for demonstration purposes only). Thoughts? (e.g. good, bad, etc.) Interfaces public interface IEntity { int Id { get; } } ...
1
vote
3answers
97 views

1000+ of JSON objects in my case

I try to make a data of 1000 objects (incress in the feature) My JSON look like... { "list": [ { "id": 1, ...
2
votes
0answers
35 views

Encapsulation with a dbParameter class

I am using the DatabaseHelper class to execute SQL statements e.g. ExecuteDataReader, ExecuteDataTable etc. The signature for ExecuteReader is: Public Overloads Shared Function ExecuteReader(ByVal ...
0
votes
0answers
79 views

Date Format provider

this is my first questions here. I am facing a issue with a API to handle Dates in JAVA. I am not a very experienced programmer and my english is very bad. Problem I'm working in a large project ...

15 30 50 per page