design

C# DDD Populate Immutable Objects

Hi I have a immutable Customer class in my domain assembly. It contains the following GET properties : id, firstname and lastname. I have a CustomerRepository class in my persistence assembly. In turn, this CustomerRepository class should populate and return a Customer object using a remote web-serivce. My Customer class contains no se...

What makes my code DDD (domain-driven design) qualified?

Hi All, I'm new to DDD and am thinking about using this design technique in my project. However, what strikes me about DDD is that how basic the idea is. Unlike other design techniques such as MVC and TDD, it doesn't seems to contain any ground breaking ideas. For example, I'm sure some of you will have the same feeling that the idea ...

Is there anything wrong with having a few private methods exposing IQueryable<T> and all public methods exposing IEnumerable<T>?

I'm wondering if there is a better way to approach this problem. The objective is to reuse code. Let’s say that I have a Linq-To-SQL datacontext and I've written a "repository style" class that wraps up a lot of the methods I need and exposes IQueryables. (so far, no problem). Now, I'm building a service layer to sit on top of this rep...

Publish/Subscribe paradigm: Why must message classes not know about their subscribers?

From Wikipedia: "Publish/subscribe (or pub/sub) is a messaging paradigm where senders (publishers) of messages are not programmed to send their messages to specific receivers (subscribers). Rather, published messages are characterized into classes, without knowledge of what (if any) subscribers there may be" I can understand why a send...

How are cryptographic hash functions designed?

After reading about why one-way hash functions are one-way, I would like to know how to design a hash function. Yes, I know that it's a bad idea to not use a proven and tested hash function, but I would still like to know how what matters in the design, and what the design process is like. I'm familiar with Feistel-network ciphers but ...

What VS Projecttype for Model and Database?

Hello folks, i've just started a new asp.net project which could increase fastly(a small erp-system for our company). So i thought it would be a good idea to split at least the model from the view/controller(the asp.net project). Because it could be that i need to access some classes and the database from a windows app in future, i dicid...

How to design properly a hierarchy of classes using pointers in C++

Hello, I am trying to improve my knowledge on program architecture and recently arised a question to me which is related with this pointers issues I posted recently. The thing is that in a simple hierarchy in which you have Class A with a pointers to Class B and the last to Class C. Do not confuse the with the inheritage property of th...

Elaboration of A quotation on 'Simple Design'

An excerpt from Programming Perls: A Simple Design : Antonie de Saint-Exupery, the Fresh writer and aircraft designer, said that, *"A designer knows he has arrived at perfection not when there is no longer anything to add, but when there is no longer anything to take away."* More programmers should judge their work by this criteria. ...

Process for beginning a Ruby on Rails project

I'm about to begin a Ruby on Rails project and I'd love to hear how others go through the process of starting an application design. I have quite a bit of experience with RoR, but don't have that many starting from scratch with only a vision experiences and would appreciate the wisdom of others who've been there. I'm looking for an orde...

Best way to create 100% width middle column with css

Hey everyone, I have a pretty standard css layout where I use a container div that is 980px wide to hold everything. The only problem is that I want to have a 1900px wide banner half way down the page that is centered in the middle and is 100% width of the page. Is there any way to do this without getting rid of the container div? so I...

Adaptor Pattern

What are the practical uses of Adaptor Pattern? ...

What difference between web apps and desktop apps should one keep in mind to model the system correctly?

Sometimes it seems like some architectural techniques are not for the Web application I am building and then I just go and code =(, Though I really want to make a habit to architect system before moving to the code, as when I just code I endup writing some useless components which then I rewrite =(, So can you just point out some diffe...

Objective-c design advice for use of different data sources, swapping between test and live

I'm in the process of designing an application that is part of a larger piece of work, depending on other people to build an API that the app can make use of to retrieve data. While I was thinking about how to setup this project and design the architecture around it, something occurred to me, and I'm sure many people have been in simila...

Building Licensing server for per-seat licensing model - database design and payment aspects

Hi, sorry for lengthy post, and thanks in advance for reading through it. I am developing software that should use licensing model which is I believe similar to per-seat licensing: There is a central licensing server, which approves/denies licenses Central server allows customers to purchase certain number of licenses at any given mo...

Return an opaque object to the caller without violating type-safety

I have a method which should return a snapshot of the current state, and another method which restores that state. public class MachineModel { public Snapshot CurrentSnapshot { get; } public void RestoreSnapshot (Snapshot saved) { /* etc */ }; } The state Snapshot class should be completely opaque to the caller--no visible met...

what service class to use to incapsulate method

I have to write a simple method extractArticle() that returns Article object which is extracted from Message object. I have MessageService and ArticleService classes intended to handle tasks like this. What service class is more correctly to use to incapsulate extractArticle() funcionality? $article = MessageService::extractArticle(Mess...

Well written open source java projects

Possible Duplicate: well written java open source projects (for learning)? I want to improve my design and programming skills by understanding design & code of open source projects. I downloaded hadoop,groovy but they are very difficult to follow. I am not having a clue of how to follow this code without having a high level ov...

WinForm Design?

I'm coming from a web dev background, and do ok, but with WinForms, everything I make looks like crap. Can you guys point me to resources with WinForm design principles that will make my WinForms easier on the eyes? Thanks! ...

OOP design for DMS that allows searching and grouping

I'd like to make a searchable Document Management System and allow a user of this application to group documents together. On one hand, there would be a functionality that registers/fingerprints in a global linear fashion and, on the other, there would be a functionality that associates documents into distinct groups. How could I compr...

NoSQL vs Relational Coding Styles

When building objects that make use of data stored in a RDBMS, it's normally pretty clear what you're getting back, as dictated by the tables and columns being queried. However, when dealing with NoSQL, document-based systems, it's less clear what is being retrieved. What are common methods of keeping track of structure in which data...