Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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.

share|improve this question
    
Reason for the markdown, then I can improve the Question? :) –  garfbradaz Dec 7 '12 at 20:00
1  
3  
A "Service Layer" is not a design pattern per se, its more of an architectural pattern. There are lots of resources you can turn up w/ a search, but specifically you may want to check out Martin Fowler's Patterns of Enterprise Application Architecture; in addition to a number of other useful patterns it has a section on Service Layers. There's also another book in Fowler's signature series (by another author) called Service Design Patterns which is pretty decent. In the meantime, to put it into design pattern speak, many service layers take the form of a "remote facade". –  Ed Hastings Dec 7 '12 at 20:15
    
@EdHastings Beautiful thank you! I have a splint on at the moment and cannot code. So the more reading the better! So apologies for the delay in replying as im typing one hand! –  garfbradaz Dec 7 '12 at 20:27
add comment

2 Answers

Aside from pluralsight, I found that dofactory was a great place to learn about patterns. Their Patterns in Action project provides a reference Visual Studio solution depicting many of the architectural patterns you'll want to learn about, including the hosting and service layers.

In dofactory's reference solution, the service layer is depicted as the abstraction of the core functionality of the application. It is the interface through which the higher layers do work. Notice the break-out of the hosting and service layer allowing the services to be made available and reused in different scenarios.

share|improve this answer
add comment

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.

share|improve this answer
    
Thanks Walter for Adding a few extra links for me. –  Greg Jan 3 '13 at 0:05
    
I think Design Patterns are more about a common language: "This is kind of like Pattern X, but instead of doing it the way the books all say, I tweaked it like this." Also, knowing patterns helps with naming your Classes. It kind of sucks to find out a couple of months after you called your Class ThingieFactoryManager that you could have called it ThingieBuilder and have the purpose be much more clear. –  Amy Blankenship Apr 3 '13 at 1:05
2  
I'm interested in the free architecture handbook by Microsoft, but the link redirects to Stack Overflow... –  Aschratt Apr 3 '13 at 8:03
    
@Aschratt msdn.microsoft.com/en-us/library/ff650706.aspx –  Greg Apr 3 '13 at 15:09
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.