Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 6 years ago.
Improve this question
After reading a series of blogs (here and here) by Chris Missal from LosTechies.com on the Specification Pattern I am am really interested in finding more complete examples. Does anyone know where I could find a more fleshed out example or perhaps an open source project that uses this pattern?
Also take a look at the Dimecasts 'Learning the Specification pattern' for a walkthrough of an example.
Having learned the Specification pattern through the same blogs as you listed, I'm not yet convinced. It could just be that the examples are too simplistic so it seems more work that it's worth. A good, extensive example that shows come genuine benefit would be nice.
Take a look at the "Specifications" paper authored by Eric Evans and Martin Fowler.
The following blog article - "The Specification Pattern" - might also be of use to you.
I actually think the Wikipedia page (at the time of this post) is a more concise and easier to absorb example of using the Specification pattern...lostechies.com actually references it.
Here is the link: Wikipedia: The Specification Pattern
For me one of the best examples is the Route Specification that Eric Evans uses on his book.
The source code is here, it is written in Java but is very easy to understand and translate to C#.
You can find many sample projects about design patterns (Specification Pattern as well) here from "Professional ASP.NET Design Patterns" book.
Related
Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
Improve this question
I am very eager to learn in depth OOP concepts and most importantly how they can be applied in "real life". So far, I have read many references and many tutorials online but they all lack something: They do not provide a way to fully understand how object oriented programming can be truly used. In fact, it seems that most tutorial focus on OOP "syntax" as opposed to "the art of OOP design". Since OOP is a set of concept/idea/best practice in thinking about a problem and tackling that problem in a way to allow a better productivity I really want more. I want something to help me think as an "OOP designer" and not an "OOP programmer". Can someone provide with me a resource (preferably an online resource) that actually provides a non trivial example on how to apply OOP? Although I am aware that OOP is language agnostic, I would prefer examples in C#.
IMHO the best resources are not available online. This former SO post contains pointers to some very good books:
https://stackoverflow.com/questions/3315633/which-is-the-best-book-to-learn-and-implement-design-patterns-using-c
Check the following books;
Object-Oriented Analysis and Design with Applications
Code Complete
Design Patterns Explained
Not sure online versions avialable
http://www.amazon.com/Object-Oriented-Programming-Peter-Coad/dp/013032616X
Code Complete
http://www.exforsys.com/tutorials/oops.html
http://www.clear.rice.edu/mech517/Books/
Head First Design Patterns ( its in java but really good)
http://shop.oreilly.com/product/9780596527730.do
http://www.amazon.com/gp/reader/0201633612/ref=sib_dp_pt#reader-link
http://www.amazon.com/Design-Patterns-Explained-Perspective-Object-Oriented/dp/0321247140/ref=pd_bbs_sr_1?ie=UTF8&s=books&qid=1211844244&sr=1-1
Good question. I've read many of the books that are suggested here, but I still struggle sometimes with good object design. In fact I've become somewhat disillusioned with Object Design. I think two books that are worth reading are
Robert C. Martin - Clean Code
Robert C. Martin - Agile Principles, Patterns, and Practices in C# (but be aware that the C# code is a bit outdated)
see this question and answers: What is the single most influential book every programmer should read? there really great books mentioned there(not just OOP).
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.
Closed 8 years ago.
Improve this question
Where can I learn to refactor code?
Books.
See http://www.amazon.com/Refactoring-Improving-Design-Existing-Code/dp/0201485672/ref=sr_1_1?ie=UTF8&s=books&qid=1279262199&sr=1-1
You can learn on the job by using a refactoring tool such as Resharper and asking yourself, why is it suggesting this change? It will show you places where you can make your code simpler as well as which code is not being used any where. One you have taken this first step, it is easier to see what your code is doing and then you can perform your manual refactoring as suggested by the other answers.
Refactoring - C# Tutorials | Dream.In.Code
http://www.dreamincode.net/forums/topic/77242-refactoring/
C# 2.0 Code Refactoring
http://www.premier-club.com/codemag/Article/20143
See Martin Fowler's material: http://www.refactoring.com/
His articles are very good, recommended to anybody who wishes to learn beyond the basics
of just writing code.
Robert Martin's blogs (Uncle Bob) are also excellent.
In practise, choose any IDE which supports common refactoring like Eclipse or IntelliJ (latter is my favorite). But it's just a tool -- it helps to learn what are the reasons why a piece of code should be refactored and how.
Fowler's book is a good place to begin, but before doing any refactoring you should make sure you have automated tests for your code. Refactoring without tests is risky at best.
Visual Studio supports the most common refactoring operations, but you may also want to take a look at Resharper, which adds additional tools.
Head over to LosTechies and have a look at the ebook 31 days of refactoring, its an easy way to start.
Then as others here have said, read Fowler's book when you have the time.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I decided to start studying code from other developers to improve my coding skills.
I'm looking for a open-source software that uses MVC pattern, and also most design patterns possible.
Could you recommend some open-source software written in C# or VB.NET that uses as many design patters as possible or some code that worth studying?
I would recommend some projects like NServiceBus, which make extensive use of polymorphism (not to mention the NServiceBus API is one of the best APIs I've had the pleasure of using). Also consider something like StructureMap, which uses a model-based configuration API (I actually use Ninject as my IoC of choice, and it could prove to have some interesting code as well). It's hard for me to point out whether or not these projects use specific design patterns, and how many it may use, but I do know that they use some modern APIs and modern approaches to object oriented design.
I would say, though, that your best bet is going to be to find an open source project that you find interesting, or that you use regularly, and crack it open and see what makes it tick. If you are familiar with the details of using the code (whatever it may be), then you will probably gain more insight be looking at the code because you know what it is doing.
I always recommend .NET Domain-Driven Design with C#: Problem-Design-Solution sample code - SmartCA project. It is extremely elegantly laid out and I find myself going back to it whenever I have doubts about my architecture.
You should also download and check out ASP .NET MVC source code. It's got good examples of unit testing and mocking (which is something you will find yourself wanting to use).
I'd recommend checking out the Northwind Starter Kit (http://nsk.codeplex.com/) - it covers off on many design patterns and their application in the .Net framework, including SOA and MVC/MVP/PM concepts. It also includes examples of several other free-to-use libraries, such as Microsoft Entity Framework and NHibernate.
I'm personally particularly pleased with the way they show the same backend can be used with both WPF and ASP.Net.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
I watched the DNR TV episode with Glenn Block and it looks like MEF would be useful for my company. I am trying to find out more information on it's strengths and weaknesses and some sample projects that use it. Are there any good blogs/tutorials on using MEF?
Note: I use C#, so if the examples are in C#, that would be awesome.
I haven't found a really comprehensive page, but there are a few:
Microsoft Docs
Simple Example from a msdn blog
Code Project's Introduction to MEF (part 1)
MEF 101 part A from Geek with Blogs
MEF 101 part B
Another MSDN blog, a little more history than tutorial
Mike Taulty recently did a set of screencasts on using MEF in Silverlight, which should be a good introduction to MEF.
I've done an ever growing series on MEF from the very basics into more advanced stuff planned in the near future.
http://randomactsofcoding.blogspot.com/2009/11/working-with-managed-extensibility.html
I wrote this MEF demo article on CodeProject, and all the code is open sourced.
If you're looking for information on the latest version of MEF that is shipping with the next .NET Framework, the definitive source of information is the BCL Team Blog on MSDN.
(MEF is part of the .NET Base Class Libraries.)
Microsoft Docs is a good start
Kathleen Dollard has some good materials as well
Dependency Injection in .NET by Mark Seemann has a section on MEF, as well as Castle Windsor, StructureMap, Spring.NET, Autofac, and Unity.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
We don’t allow questions seeking recommendations for books, tools, software libraries, and more. You can edit the question so it can be answered with facts and citations.
Closed 7 years ago.
Improve this question
Are there any books for C# developers that will help me to improve my performance answering programming questions during an interview? I need practice, and need to work on algorithm types of questions.
Introduction to Algorithms, second ed.
I'd highly recommend the O'Reilly book "C# Cookbook" since it will give you specific algorithm implementations. Another good one is "Algorithms in a Nutshell", for more language agnostic algorithms.
O'Reilly - C# Cookbook
Algorithms in a Nutshell
As someone that interviews potential developer for my team, I really would rather you didn't try and "game" the interview. If you study for interview type questions you might get really good at it, but then would you be a good developer?
Other than for graduates, who I expect to be learning on the job, any other level of developer will get task to perform in Visual Studio. The candidate will be asked to write a small program in the space of about 4 hours. It will contain all the elements necessary to determine if they are any good or not and we can see examples of their real programming style, thought processes and abilities.
The worst person I ever interviewed was someone who had learned the "standard set" of questions by rote. When we asked a question he knew we got a beautifully crafted answer back. But, when he was asked something he didn't know we got back an instant "I don't know". Some of the questions were logical questions, we didn't expect anyone to know the answer off the top of their head, they were expected to work it out.
So, just learn how to write software. Learn how to communicate that to other people and you'll do just fine in the interview.
"Programming Pearls" by Jon Bentley, nothing to do with C# per se, (it was first published 14 years ago), but is great book on programming problem solving in general
I like Algorithms in a Nutshell.
Edit: and The Algorithm Design Manual is fun, but don't start there.
I highly recommend "C# in Depth" by our fellow Jon Skeet. :)
You asked about books, but I will advise trying one of the following:
Project Euler
Top Coder (they support C# solutions)
UVA Online Judge
SPOJ
The more You solve, the better You will be at algorithms.
PS: Don't get addicted:)
This might be what you're looking for.
It's what I used in my algorithm class.
I would decide first if you need work on C#, or on algorithms, or on both. It sounds like you're worried about "algorithms in C#", which you shouldn't be. Algorithms are essentially the same across all the common imperative programming languages. If you're really worried about algorithms, you can pick up pretty much any algorithms book and work through it. Same thing with C#.
A lot of "programming type questions" on interviews, unfortunately, tend to be either "do you know this minor tidbit of this language?" Sadly, there's not much you can to do study for those types of questions, other than use the language a lot and become increasingly familiar with its details.
Data structures and the framework they're within, however, are a bit different. In a (relatively) short time you can become familiar with some aspects of the .NET framework that can help considerably. Learning things like how to use generics and how to get a hashtable or a list is good to know. Of course, then you should also know the more general answer of when you should use a hashtable vs. a list.
For general programming questions related to .NET technologies, I wrote an eBook called "Shove It, FizzBuzz: How to Find and Land a .NET Development Job."
http://shoveitfizzbuzz.com
It's more than just interview questions, but it's still chock full of them, and comes with a .NET Interview Simulator.