Tagged Questions
42
votes
15answers
7k views
Is it better to return NULL or empty values from functions/methods where the return value is not present?
I am looking for a recommendation here. I am struggling with whether it is better to return NULL or an empty value from a method when the return value is not present or cannot be determined.
Take ...
28
votes
11answers
1k views
Well designed / high-quality open source software [closed]
I'm taking a software design class where I should choose an open source software to analyze from the Software Design point of view.
It has to be a big project: not less then 100,000 lines of code.
I ...
24
votes
6answers
3k views
How essential is it to make a service layer?
I started building an app in 3 layers (DAL, BL, UI) [it mainly handles CRM, some sales reports and inventory].
A colleague told me that I must move to service layer pattern, that developers came to ...
14
votes
2answers
2k views
Alternative patterns for web development? (non-MVC)
Recently I've been reading some blog posts regarding MVC and how it doesn't fit the web. I've learned about alternative patterns like the RMR Architecture.
I'm curious what other patterns people are ...
10
votes
6answers
947 views
How to Be a Software Engineer?
My problem is kind of weird so please bear with me.
I have been working in a start up concerned basically with mobile development since my graduation 2 years ago. I develop apps for iOS but it's not ...
10
votes
2answers
3k views
Relationship between Repository and Unit of Work
I am going to implement a repository, and I would like to use the UOW pattern since the consumer of the repository could do several operations, and I want to commit them at once.
After read several ...
9
votes
5answers
521 views
Do you leverage the benefits of the open-closed principle?
The open-closed principle (OCP) states that an object should be open for extension but closed for modification. I believe I understand it and use it in conjunction with SRP to create classes that do ...
9
votes
2answers
2k views
DDD - Does an aggregate root's repository handle saving aggregates?
I am using a DDD-like approach for a greenfield module of an existing application; it's not 100% DDD due to architecture but I'm trying to use some DDD concepts. I have a bounded context (I think ...
8
votes
4answers
1k views
On MVC can several views have the same controller or one view must have one unique controller?
I'm having some questions while designing a architecture for a project around MVC. (It's a C++/Marmalade SDK project, I'm not using any particular MVC framework, I'm making one.)
On several articles ...
7
votes
3answers
455 views
Motivation for a service layer (instead of just copying dlls)?
I'm creating an application which has 2 different UIs so I'm making it with a service layer which I understood is appropriate for such scenario.
However I found myself just creating web methods for ...
7
votes
4answers
505 views
Refactoring in domain driven design
I've just started working on a project and we're using domain-driven design (as defined by Eric Evans in Domain-Driven Design: Tackling Complexity in the Heart of Software. I believe that our project ...
7
votes
4answers
354 views
What “code smells” are there that are a symptom that an event listener model is required?
What are the symptoms in a code base that indicate that an event-listener approach is required?
It seems to me that when there are classes that need to be called by multiple, not defined at ...
6
votes
4answers
480 views
Modular Architecture for Processing Pipeline
I am trying to design the architecture of a system that I will be implementing in C++, and I was wondering if people could think of a good approach, or critique the approach that I have designed so ...
6
votes
1answer
223 views
Does current evidence support the adoption of Contextual over Canonical Data Models?
The "canonical" idea is pervasive in software; patterns like Canonical Model, Canonical Schema, Canonical Data Model and so on, seem to come up again and again in development.
Like many developers, ...
5
votes
4answers
484 views
Is there something like a polymorphic Singleton?
I have a resource loader object that loads objects from the disk or from a ZIP archive, depending on the platform.
It has state (e.g. the path to the directory or the ZIP archive, and possibly some ...