8

When the .net 2.0 framework first came out, the provider model was all the rage. 2.0 even shipped with a bunch of default providers (Membership, sitemap, role). Since the release of 2.0, the hype has died down, and whilst I still use providers day to day, it seems to get far less press.

I was wondering if this is because people are using something other than providers and they've been superseded, or is it simply because the take up wasn't as big as other IoC methods?

Kevin Brown-Silva
  • 40,873
  • 40
  • 203
  • 237
lomaxx
  • 113,627
  • 57
  • 144
  • 179
  • Just because something isn't "hyped" as much anymore doens't make it worthless.... – Jonathan Rupp Oct 01 '08 at 00:44
  • I'm not suggesting it's worthless... I still use providers pretty much every day. I was more wondering why it doesn't seem to get as much press lately because I still things it's a really nice model to work with – lomaxx Oct 01 '08 at 00:47
  • 1
    New stuff gets more press than existing stuff. People don't talk much about stuff that is solid and works. – Jonathan Rupp Oct 01 '08 at 04:22
  • This seems like a Provider vs IoC/DI question, and because they are two completely different frameworks they can't even be compared. One could certainly DI a Provider into a Controller/Page. – Erik Philips Feb 08 '15 at 17:25

2 Answers2

4

It actually hasn't died down. DI is still big. There are many DI frameworks out there to choose from. Yes, it's not hard-baked into every part framework like it should absolutely be, but its still a very good practice to follow. For instance, I was using the P&P's custom application blocks to do DI. Until they ditched it for Unity. Now I'm using unity.

A lightweight DI framework is a good idea for any large extensible application.

  • This is part of my point tho... DI isn't going away, if anything it's getting bigger, but the provider model seems to be less and less the preferred way to do things, yet it meets most, if not all of my DI requirements. – lomaxx Oct 01 '08 at 00:49
  • What is it being replaced by? IoC? A rose etc.... I'd like to see a better way to break dependencies in code than DI. –  Oct 01 '08 at 00:54
  • I do agree that it isn't being used enough. The more I code the more dependencies bug me. –  Oct 01 '08 at 01:01
  • What does DI and loC stand for? – alexmac Oct 01 '08 at 08:08
  • Dependency Injection and Inversion of Control – Mitch Wheat Oct 01 '08 at 08:12
0

I think that as these tools become more standard within .NET the hype around them becomes less, but their use does not. Certainly the Membership and role providers are very important to our new application that we are developing and will save us significant amounts of code.

Microsoft Patterns and Practices is the birthplace of tools like the Enterprise Library, which is heavily involved with the provider patterns (particularly with membership) in regards to the Security Applicaiton block and the model appears to be used throughout the blocks.

Adam Bellaire
  • 108,003
  • 19
  • 148
  • 163
Odd
  • 4,737
  • 6
  • 30
  • 27