Are there any open source projects using DDD (Domain Driven Design)? [closed] - c#

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm trying to understand the concepts behind DDD, but I find it hard to understand just by reading books as they tend to discuss the topic in a rather abstract way. I would like to see some good implementations of DDD in code, preferably in C#.
Are there any good examples of projects practicing DDD in the open source world?

Eric Evans and a Swedish consulting company have released a sample application based on the shipping example that Eric uses throughout the book. It's in Java, but the concepts are well documented on the project page.
http://dddsample.sourceforge.net/
However, be warned that DDD is more about the journey than the destination. Understand that the sample code you are looking took many forms before it became what you see now. You did not see the awkward models that were used initially and you're missing the steps taken to refactor the model based on insight gained along the way. While the building blocks are important in DDD, Eric belives they are over-emphasized, so take all samples with a grain of salt.

I'm not sure how complete it is, but I found the NDDD Sample on Google Code.

I'm surprised no one mentioned Macto, Ayende's DDD sample. The most important thing about Macto is that the hole thinking process before the actual coding is presented in a series of posts. DDD is not about implementing a model, is about modeling a business domain. Decisions like "some concept is an Aggregate Root/Entity/Value Object" are far more important than how will an AR be persisted.
Also i would recommend Udi Dahan's videos about SOA and CQRS which might provide a better context on which to apply DDD.

This is not an open source project, but still it is an example in code: http://www.codeplex.com/dddpds
The example is used in the book .NET Domain-Driven Design with C#: Problem-Design-Solution
A made-up example that seems promising but might have died:
http://www.codeplex.com/domaindrivendesign

I'm afraid that http://www.codeplex.com/domaindrivendesign has indeed died, but if anyone is interested in contributing feel free to contact me.
Overall I would recommend against relying too much on examples of DDD, at best examples can show the results of the domain modelling and/or one approach for implementing the patterns. I would thus recommend reading the book and then asking questions at the forum.

http://kigg.codeplex.com/ is a good example for me.

I know it is not C#, but this is a java meta-framework that follows a domain driven approach: I don't know much about it but I'm willing to study it in the near future: Roma Framework

http://sellandbuy.codeplex.com/
another project DDD

A good read is Jimmi Nilssons book (and blog for that matter)
Applying domain driven design
It's a mixture of Evans and Fowlers books (Domain-Driven Design - Evans), and (Patterns of Enterprise Application Architecture - Fowler)

I haven't used any myself, but there are some tools mentioned on the DDD Wikipedia page. Most of them seem to be implemented in Java though.
http://en.wikipedia.org/wiki/Domain-driven_design#Software_tools_to_support_domain-driven_design

Ok, I found this, but it's Java not C#:
http://timeandmoney.domainlanguage.com/

Code Camp Server, Jeffrey Palermo's sample code for the book ASP.NET MVC in Action is open source and uses DDD.
(Same as my answer in Good Domain Driven Design samples)

Related

CQRS Examples and Screencasts [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I'm looking for some in depth end-to-end CQRS examples with a reasonable set of unit tests.
Also, if anyone knows of some CQRS screencasts as well it would be extremely handy.
I'm already aware of these examples
CQRS Info
Super Simple CQRS
There's a implementation here MarkNijhof.
But after reading the documents from the CQRS Info site my favourite resource is Think Before Coding look at the post Tags. (http://thinkbeforecoding.com/)
Some other useful resources...
http://distributedpodcast.com/
http://www.udidahan.com/
http://abdullin.com/
Microsoft patterns & practices is working on a guidance project called CQRS Journey. The idea is to develop a non-trivial system with multiple bounded contexts and apply CQRS, ES and other patterns & techniques where appropriate and document all lessons learnt along the way. The project is still in flight. Check out the journey progress at http://cqrsjourney.github.com
Code repo is at https://github.com/mspnp/cqrs-journey-code
Doc review via http://pundit.cloudapp.net
The project involves many community members and accepts contribitions!
http://ncqrs.org/
Is a useful resource...
Here is a complete example I wrote for my CQRS lib Scritchy:
Example.Domain: Domain implementation
Example.Specs : Domain behavior specs using MSpec
Example.Web : Example MVC web app (demo at http://scritchyExample.apphb.com )
Example.SignalR : Example html/Javascript/SignalR web app (using the same domain code)
Creating your CQRS app using the Scritchy nuget package is pretty straightforward and gets you up and running in a few minutes
Here's some more informational resources, but unfortunately no end-to-end code samples beyond SimpleCQRS and MarkNijhof.
http://seabites.wordpress.com/
http://richarddingwall.name/2010/06/15/brownfield-cqrs-part-1-commands/
http://www.agilification.com/post/CQRS-Series-from-Mark-Nijhof.aspx
http://jonathan-oliver.blogspot.com/
I have come across a couple other code samples, though I have not yet had time to review them whatsoever:
http://dddsamplenet.codeplex.com/
http://agrcqrs.codeplex.com/
Udi Dahan would have to be one of the experts in the CQRS field, imo.
Here is a blog about it: http://www.udidahan.com/2009/12/09/clarified-cqrs/
Here is a CQRS podcast (I haven't watched it, but if it's anything like his course presentation it will be great): http://skillsmatter.com/podcast/open-source-dot-net/udi-dahan-command-query-responsibility-segregation/rl-311
Here is a SOA talk (may not be directly relevant but excellent regardless): http://vimeo.com/5022174
If you have the time, I'd recommend popping along to one of Udi's courses when one is nearby, as he covers CQRS in depth.
I recommend this screencast by Chris Tavares. It gives a good overview of CQRS and it shows some good examples in code.
URL:
http://channel9.msdn.com/Blogs/MichaelLehman/PP-Symposium-2010-The-Commmand-Query-Separation-Pattern-Chris-Tavares
I've got a sample of just the BDD style of unit-tests, it isn't end-to-end, but since you mentioned unit tests I figured it might be of interest.
http://lucisferre.net/2011/02/05/behavior-driven-test-driven-domain-driven-design/
There was a great session during aspConf 2012 by Ashic Mahtab.
CQRS with ASP.NET MVC - A Year On
Complete source code here

object oriented programming: looking for good tutorials [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 9 years ago.
I am tired of tutorials that just enumerate the concepts with examples. How about some tutorials that show the wrong way of doing and then the correct way of doing things? It would be great to learn things like interfaces, delegates, abstract classes, singleton ...etc that way.
It would be great to read some clean code online as well but its hard to find...
any recommendations??
I develop in C# , .net , MS technologies...
I think the Head First books provide a really easy to read and learn from approach to learning the basics of software engineering. You can do Head First C#, then Head First Design Patterns and Head First Object Oriented Analysis and Design.
Then again, these books aren't free....
You might want to look for AppDev and/or Total Training e-learnings.
Meanwhile, there are some webcasts on Microsoft website that are very interesting. I learned MVC architecture that way.
Microsoft Events and Webcasts
http://www.dofactory.com/Patterns/Patterns.aspx covers all of the GOF patterns, with examples in C#.
http://www.oodesign.com/ is another great reference site. Also covers all of the GOF patterns, with code samples, and a more in-depth explanation of each. Also lists pros and cons of each pattern, and appropriate situations to use them.
Have you read Design Patterns: Elements of Reusable Object-Oriented Software by the "Gang of Four"?
That was the book which made me glad that I'd learned a programming language that supported object-oriented programming.
It doesn't show the wrong way to do things, but part of the "pattern description" are the "forces" or circumstances for which each pattern is a useful solution.
The code examples are small (but clean).
For me with C#, I'm always going back to Juval Lowey's Programming .NET Components.
Object-Oriented-Design-Heuristics is great and appropriate for your needs IMHO. Head First Design Patterns is wonderful also, with interesting examples of incorrect and correct practices for certain cases.
You might be able to find some good advice on programming techniques, but there's no wax-on-wax-off for coding skills. You learn by doing it. Mostly by doing it wrong a lot at first. I know it sucks, but it's the way it is.
Unfortunately I don't know if there's any such resource out there, but this sounds like a great idea for a website. Something like fmylife.com, but specifically for OOP where users post their real-life problematic object-oriented solutions that can be discussed and fixed very much like in SO. All questions and answers tagged with a specific design pattern would represent real examples for that pattern.

What all should an expert C#/.Net/WPF developer know? [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
I have some 5+ years' background in C++/Unix development. I have been trying my hand at C#/.Net/WPF based software development for some time now. I am at a stage where I can write functioning applications fluently, but am not sure how to take my skills to the next level.
So, my question(s) to you all, especially to those who are experienced in C#/.Net/WPF:
What are the component skills and knowledge that an expert developer on this platform should have?
What technology-specific books would you expect a would-be expert to have read?
What other deliberate steps can I take to become really good at application development using C#/.Net/WPF?
Many thanks in advance! I would be especially grateful for comprehensive answers - I'm pretty sure many other developers have similar questions.
Learn how the C# language and .NET runtime work by reading CLR via C#.
Scott Hanselman's article, "What Great .NET Developers Ought To Know", is a great resource on the subject.
My team has worked in C# for the past 5 years. Typically, experienced C++ programmers take a week or two to become fully functional in C#. I've even seen some do it almost instantly, after sitting with them one morning, showing them our code, and explaning the basics of the language that differ from C++. But that's not how I recommend you do it.
I recommend you do this:
Read a C# book: My pick would be Programming C# by Jesse Liberty. Important chapters are the language itself and the basics of the .NET framework libraries. The .NET Framework is huge, so you don't have to know everything in detail. You can skip through (or skim) the Windows Forms chapters. Windows Forms is so different from WPF that it won't be useful to you if you are planning on only doing WPF.
(source: amazon.com)
Read a WPF book: The best book I read so far is Windows Presentation Foundation Unleashed by Adam Nathan. WPF has a steep learning curve compared to Windows Forms, even for experienced C#/WinForms programmers. It has a lot of complex elements to understand like XAML, dependency properties, bindings, templates, animation, resources, etc. This book teaches you the basics gradually and is easy to read and understand. And it's in full color!
Read about the Model-View-ViewModel pattern: I haven't found a good book on that yet, but it's been very important for me to make my WPF applications more simple and manageable. My favorite material to learn about MVVM is this one hour presentation by Jason Dolinger. He builds a WPF application from scratch using no particular pattern, and step by step, migrates it to the MVVM pattern.
Also have a look at this past Stackoverflow question: Questions every .NET developer should be able to answer.
For WPF specifically (and the power of WPF binding) I like M-V-VM: http://karlshifflett.wordpress.com/
Make sure you learn how to use and leverage Dependency Injection / Inversion of Control in your applications. Other very important pieces of software to learn to include with your development is Microsoft Enterprise Library and Windows Communication Foundation. Those 2 tools offer an amazing amount of leverage to avoid having to recreate the wheel to solve problems.
Other really good packages to become familiar with are NHibernate and Fluent NHibernate.
Windows Workflow Foundation is a very powerful piece of software however the complexity level is high this would be another great addition to your knowledge base time permitting.
I would add unit testing, TDD, and mocking frameworks to your list of things to know.
I have "The Art of Unit Testing" and found it helpful.
I really like WPF in Action and Programming .NET Components is essential reading for any .NET developer.

Resources for Learning Design Patterns [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
Recently I came about this concept of Design Patterns, and felt really enthusiastic about it. Can you guys suggest some resources that help me dive into Design Patterns?
You know, for me, one of the best books out there is Head First Design Patterns. I personally like the style that they use to communicate the material.
Wikipedia, the Gang of Four book, and if you're specifically interested in C# implementations there's a decent site here.
One of the best books is (as mentioned above) the Head First series because it gives great analogies and real-world examples.
There are also other decent Java Design Pattern books available. Also, web sites that are specialized on the subject (see posts above for some)
Although the Gang of Four book was my first read on this subject, it is my opinion that you should avoid it especially if your starting out. At the time this was the reference, but today many books exist giving you many to choose from.
BUT, and I clearly emphasize this point... practice is the ultimate learning tool. After having read several books on the subject, I was 100% certain of knowing and understanding these patterns. When I attempted to actually implement some of them I soon realized that my knowledge was mostly 'theory' and my comprehension wasn't even close. A huge blow to my ego!
I set out to test and challenge my peers and quickly learned that they were in the same boat as I was. I find that 99% of programmers proclaim to know patterns but when really put to the test, only about 1/3 actual know the subject well.
I set out to implement as many patterns as I could in one or more complex systems. I put theory to practiced and what I learned was a gold mine.
One of the most challenging aspects of my experience was that each pattern alone look simple. But sometimes linking a bunch of patterns together can be even more challenging.
I encourage you to put theory to practice!
Jeach!
Here is a very nice screencast series on Design Patterns on DnrTV
Part 1
Part 2
Part 3
Part 4
Part 5
Hope this is more inviting ;)
The gang of four design patterns book is the standard. I recommend it if you're comfortable with C++.
Head first design patterns is good too, especially if you like visual aids and want to feel like you're learning design patterns in a '50s diner. Examples are in Java.
There are sometimes multiple ways to implement patterns in a given programming language (for example see this discussion of options for implementing the Singleton pattern in C#), so it might be worth getting one book to succinctly describe the common patterns, and another to suggest the best way to implement them in your favorite language.
I frequently reference this site: Design Patterns . It has a nice write up including examples for all the popular design patterns for free.
Here're the two I found a while back
http://www.dofactory.com/Patterns/Patterns.aspx
http://amazedsaint.blogspot.com/2008/01/design-patterns-part-i-and-ii.html
ASP.NET has good reference to DPs.
http://wiki.asp.net/page.aspx/276/design-patterns
Head first design patterns book is a good read.
If you want to test your knowledge of design patterns , here is the design patterns quiz
Microsoft Pattern and Practices Developer Center
Really, I think the best way to learn them is to deeply understand your language (C# based on your tags), and then to really commit yourself to the goals of having good separation of concerns, low coupling and high cohesion. I'd read and study Robert Martin's writings about SOLID principles.
And then (and this is the most important part), try to follow those principles as you develop software. You'll find that you start to do certain things, and later it will hit you, "Oh! That was the strategy pattern." This is truly what the "pattern movement" demonstrates ... people working in a certain kind of language, trying to achieve good software design, will find themselves arriving at solutions that follow certain common patterns.
I like these 2...
http://www.amazon.com/Design-Patterns-Object-Oriented-Addison-Wesley-Professional/dp/0201633612
http://www.amazon.com/Refactoring-Patterns-Addison-Wesley-Signature-Kerievsky/dp/0321213351
this one really helps with taking existing code and implementing a design pattern.
I find Design Patterns Explained to be a good introductory text. The Gang of Four book is a reference for those who already understand patterns.
Martin Fowler's website has plenty of information: http://martinfowler.com/articles.html.
Much of this is covered also in his book, Patterns of Enterprise Application Architecture.
For those using C#, I found Design Patterns in C# a bit easier read than GoF's book. The examples of course are in C# and the connection is made to the Microsoft naming of the patterns.
Last year I bought and read C# 3.0 Design Patterns, by Judith Bishop and I've been very pleased with it, having previously tried to get through Go4 and Design Patterns in C#.
This covers the standard set of patterns, grouped by similarity, in order of increasing complexity, but also ties them in to the language features of C# 3.0, so you start with simple cases with interfaces and abstract classes, and move up through extension methods, generics, anonymous types, functions, etc - a very good way to learn both.
All presented in an easy to read format, with quite a few real world examples and handy source code.

Improve proficiency in programming [closed]

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance.
Closed 10 years ago.
How can I increase my proficiency in programming? I have a grasp of the basics of C#, but don't feel too confident about my ability.
Code something in C#
Read C# Code and try to understand it.
Read a C# Book (and please none of the C# in 21 Days books)
The confidence comes with the experience.
Read Stack Overflow every day :)
Seriously. Try to solve interesting problems. Even if you don't post your solution, come back later and see if other people came up with something similar, why their solution might be different, etc.
Project Euler.
http://www.asp.net/LEARN/videos/
Voile, you are programing ASP.net.
Keep in mind that you may need a little more grasp on C# as your codes evolve. For that use a good book, most Microsoft's learn C# are pretty neat(The learn ASP.net is quite lame).
Of course, thats what I did back then(about 2 years ago), nowadays you should be able to find some awesome tutorials online.
Good luck ;)
Think of a fun project of some complexity (more that "Hello, world") and code it.
Practice, practice, practice!
Also read forums, blogs, participate in discussions. You will learn many things that aren't even mentioned in books.
read lots of code, write lots of code and keep a copy of C# 3.0 in a nutshell handy.
Learn new programming languages. Learn data structures and algorithms and design patterns. Learn regular expressions. Learn databases. Learn HTML/XHTML/DOM. Learn learn learn learn learn.
In programming, knowledge === power.
Work on something, even if it's reinventing the wheel. You can read books, watch videos and listen to podcasts all day, but the real experience comes from actually building an application. Don't build an application that you know you can build - instead, create an application that is slightly out of your reach, then rinse and repeat.
The experience when you realize that you created a mess of spaghetti code that is unmaintainable cannot really be substituted, as this then really allows you to look into techniques to improve your code. Sure, feel free to read on MSDN about Events, Delegates and Lambdas, but reading about them in the moment you need them means that the knowledge really burns into your memory.
I try to have a rough knowledge about as many topics as possible, but that's usually rather shallow: I know that a technique exists and roughly what problem it solves, so that when I need it I can learn about it.
In my opinion, the only alternative to first-hand real world experience is even more first-hand real world experience.
http://www.appdev.com/csharp.asp
:)
You say you are learning ASP.NET and C#. Have you ever done any programming or web development? Because, if you have not, then you need to take a step back and learn the basics of HTML, CSS and get a grasp of how data is passed via HTTP between client and server. I would also strongly advise getting a grounding in basic SQL, because most serious web development will utilise databases at some point.
After that, some basic OOP (Object-orientated programming) theory would do you good. That way you have a good grounding in the subject-matter before diving into the coding.
For learning C# the I'd suggest a couple of good tutorials:
The C# Station Tutorial and Softsteel Solutions C# tutorial.
I also found the ASP.NET Quickstarts useful when I was learning ASP.NET - I prefer to learn by example than by theory.
As for confidence, I'm afraid that only comes via experience. Perhaps try answering a few questions here? Getting a few up-votes might just give you that boost. Good luck.
This fits in to catagory of answers you've received thus far, but review open source projects.
Understand how they work and maybe even why they were put together in a given way. Not only will it improve your ability to write C# but it will also improve your understanding of Software Engineering which is ultimately how you put a programming language -- C# or otherwise -- to good use.
Creating a Project that makes use of a lot of different technologies is a good way to grasp a 'big picture' view.
As an example, think of an n-tier application where you input a value into a very simple web page, this value being sent into a web service, and behind that WS a simple business layer that switches between readings into a table of a data base, then you return the value finishing the output in a postback of the initial web page. In my Personal opinion, every element of the layer is a simple one, but, making the whole system work without errors is good beginner's challenge, that way you could build a confidence in your skills, enabling you to undertake any other idea.
Well, that were my two cents. Good Luck!
There may be so many projects that u can make.choose the project that makes u.it's true take a project that you consider difficult for your level.
1) analyse your project
2) define the objective
find things that are necessary to achieve the objective
3)then derive an algorithm which clearly explains the workflow
4)then start woking
In my experience "Learn By Working" is a good idea.first grab the basics then start the work soon you'll learn step by step.never give up ,be a ceaseless crusader.
practise practise it's a only way of surviving as a programmer.
Being a best programmer requires a lot of patience,thinking skills,Attention,a thrist for knowledge.
Wise people always replace the fear of unkonwn with curiosity
Actively participate in programming (and non-programming) forums.

Categories