Design Patterns – Service Layer

design-patterns

I currently reading a lot about Design Patterns and I have been watching various Pluralsight videos from their library. Now so far I have learnt the following:

  1. Repository Pattern
  2. Unit of Work Pattern
  3. Abstract Factory Pattern
  4. Reading the awesome "DI in .NET" book

Now I read lot about Services and Service Layers and wanted some advice about the best place to read up and learn about these. I presume this fits into Domain Driven Design and I should start there? The term "Service" just seem to be used widely within IT and it can be confusing the exact meaning.

So my questions is:

  1. What is the Service Layer
  2. Where is the best place to learn about them. I know there are probably tonnes of interweb/books/blogs on the subject, but some good areas to start from would be nice.

If I'm being too vague, let me know.

Best Answer

How accurate this advice is may vary, over on StackOverflow someone stated: "Be wary of Design Patterns; learning a Pattern may inhibit your ability to correctly implement the proper design. This can cause bad developer habits and practices."

Which does make sense; as your bending your application to a pattern rather the pattern to your application. Which is essentially like a cookie-cutter approach.

However...

Codeplex has some great tutorials on Dependency Injection, Repository, Unit Of Work. Plus Amazon has some great books out there as well. Microsoft has a free architecture handbook which is very solid also. The Stack Overflow post has a link to that manual, but here is a direct link.

A pattern you may want to look into is SOA(Service Oriented Architecture). It is looked at as an Anti-Pattern, but with the culmination of Windows Communication Service and abstraction. It can provide a very agile lightweight flexible solution. Assuming your application benefits from this approach.

  • Service Oriented Architecture
  • ORM
  • Dependency Injection
  • Repository Pattern
  • N-Tier Applications

Those are few sites with good details; hopefully that is helpful. There is a lot to learn; but the simplest solution is usually the right solution.

I had a bunch of links; but my rep is too low on this site to post em. Just Google those terms and you should get some nice articles.

Related Topic