a companion discussion area for blog.codinghorror.com

Dependency Avoidance


#1

Have you ever worked with developers that were charter members of the third-party-control-of-the-month club? You know the kind-- they never met a third party control they didn't like. They spend all day trolling downloads and experimenting with every tool listed on The Daily Grind. Which means deploying your solution is now a tricky balancing act of obtaining and installing the proper license files from a half-dozen different control vendors. Who all do things slightly differently. Oh, and don't forget to make sure the versions of all your controls are all up to date with the latest bugfixes, too.


This is a companion discussion topic for the original blog entry at: http://www.codinghorror.com/blog/2006/01/dependency-avoidance.html

#2

Interesting you link to MS Patterns and Practices. We use the Updater Application Block 1.0. We looked at 2.0 but decided against simply due to the complexity overhead of understanding all the other stuff it depends on. UAB 1.0 is standalone and simple.


#3

Yup. That’s why I ripped out a ton of third-party stuff when I moved our application to ASP.NET v2. I hate, hate using third party stuff unless it’s so necessary and so vital and it’s so useful and I can’t afford to build it myself.

And only if it comes with source code. The amount of bugs I usually have to fix depresses me.


#4

Hear! Hear! Totally agree with you Jeff.

It’s another reason i’ve gone back to Win32 from .NET. And dissed the registry.


#5

Ahh I thought I was the only one feeling like this.

Anyway, I s#ck at english. But a stupid question, why the name 3rd party ? Who is having the 1st and 2nd party ?


#6

1st party – microsoft
2nd party – you
3rd party – control vendor

I suppose we could reverse position 1 and 2, but I don’t think it matters. The original purchase is from Microsoft (#1) to you (#2), so any additional purchases come from party #3.


#7

I agree with you for the most part Jeff. I would absolutely rather use the intrinsic .NET code, but the fact of the matter is, the standard controls that ship with .NET are for all intents and purposes, pretty lackluster IMHO.

Compare the DataGridView, for instance, with a one of the heavy duty 3rd party grids from like Infragistics, or DevExpress. The functionality totally exceeds the standard grid’s limited capabilities, and that’s just one example.

I do try to avoid 3rd party controls and code as much as possible, but sometimes to produce a polished application that most users have come to expect is ultra hard with the given controls in the System.Windows.Forms namespace.


#8

Compare the DataGridView, for instance, with a one of the heavy duty 3rd party grids from like Infragistics, or DevExpress.

Yes. But the point is that some people will replace all their DataGrids with the Infragistics grid (Yes, I’ve seen it happen), even if they don’t use any of that functionality, rather than reducing their dependencies and using the 3-rd party grid only when necessary.


#9

I agree with you entirely. We were just talking today about the perils of black boxes and I think that that’s what you’re getting at. If you’ve got code that you didn’t create, then it’s pretty likely that you’re going to get burned at some point when something in there goes wrong.


#10

Jeff, thanx I thought it was something like that. :slight_smile:

Anyway there is alot of good reasons to use 3rd party software, but on the other hand alot of reasons not to use it.

My experience with 3rd party software when it comes to userinterface like custom controls, is that I just dont use it. Often I tend to use too much time looking into how the control works, instead of the time used writing my own. Often they do 123 billion things, but just cant do what I want. Often the effort used to styling the control is insane, compared to … “it is actually only html, not assembly it generates”. Maybe it is because I still use vs2003, but the webform designer is just dosent work for me ( does it work at all?). I dont want to customize every control on every page if only 2-3 properties are changed. Not everything can be done in a stylesheet and not every 3rd party control is styled.

On the other hand, I use some 3rd party software to create things like PDF reports and stuff. And in that case it works fine, because I can just call a method on a wrapper class that does something like PDFGenerate.CreatePdf(template, output, etc ) and nothing else is touched by that.

Maybe it is just me, but I think the problem is that I dont like the way the asp.net or windows forms architecture is build. I love the .net framwork, love C# and VB.Net. But with asp.net I dont think that the controls make everything better. Maby your problem is not if you remembered to close your bold tag, but instead some validation, event handling, binding, viewstate, etc problem.


#11

I am a pathological code deleter also. It just makes things so much easier and cleaner to work with.

And your right… if you want it back, go get it from the source control system.


#12

I used to use SqlHelper. I ended up writing my own wrapper classes - there was a memory leak in one of the releases and I couldn’t wait for MS to fix it.

I used to use Peter Blum’s controls, but when ASP.NET v2 came out I ripped it all out, since ASP.NET v2 had all the features I needed.

I used to use Nullables - very briefly, if I think I’m thinking what you’re referring to. When I found out that .NET v2 was going to have them, I ripped them all out.

Thing is though, you’ve picked some somewhat decent, robust additions. And you probably didn’t pick them lightly - you put some though into them.


#13

Well said!


#14

Your LavaFlow Anti-Pattern reminds me of a joke. The part about I don’t know what that class is for, it was written before I got here." :

Scientists set up an experiment where they put 5 monkeys in a cage.
In this cage, a bunch of bananas is hung from the ceiling, out of reach of a monkey standing on the ground.
Also in the cage is a a small chair, large enough to enable a monkey to reach the cage.
Each monkey has an electric-charge device attached to it.
Each time the monkey tries to get up on the chair, ALL of the monkeys are shocked.
Pretty soon this leads to the behavior of all of the monkeys beating up any monkey who dares climb the chair.

Now, the scientists take one monkey out and put a new one in, but this one does not have an electrical device attached. Sure enough, it tries to climb the chair to get the bananas and gets beat up. Soon, it follows this behavior too.

Next, take a second monkey out and put another one in without a sensor. The pattern repeats.

Finally, the cage has all 5 monkeys in it with no electrical devices, but any time a monkey climbs the chair, they get beaten up by the others. Why? “I don’t know, but that’s the way it’s always been done around here”.

Sorry for the long road to such a lame joke!


#15

Disagree - I’m a third party whore. Almost all my ASP.NET apps reference these libraries.
log4net
SqlHelper
Gentle
NHibernate
PeterBlum
NUnitFramework
Lucene
TestDriven.net
Nullables

Sometimes i run into dependency hell, especially with log4net. But for the most part i’m a heck of a lot better off than rolling my own functionality for any above. I do agree with you about SOME ISV’s though. Infragistics sucks, its soo bloated, and upgrading is a nightmare.

As for deleting code, i agree with you 99.9%, the only thing i would change is that if the code was commented then deleted and you still needed it. I would tell them to re-implement it. You usually get it done cleaner the second time around.


#16

Have you ever heard of “learned helplessness”? It’s similar to the joke, but based on actual research performed in the mid 60’s:

http://www.noogenesis.com/malama/discouragement/helplessness.html


#17

I wouldn’t call myself a third party whore but for complex controls if I can find a vendor who does it well, I won’t hestitate to try it. Especially, if it will save my weeks of development time.

Infragistics however has left a particularly bad taste in my mouth.
I chose infragistics asp.net tools based on my past experience with their windows controls which in the past had worked well for me.

What a mistake to think they would do as well with their aps.net controls. I don’t recommend this product to anyone! I open support issues about their HTML editor and I get responses like, “you have not deployed correctly” This just infurates me. I put in one request about the HTML editor not able to load an html doc. Their response: “We did not design this for large HTML docs”. Excuse me? Define “large”. No where in their documentation can find a document size limit.

Their update panel does not work when the server is taxed. After five seconds or so, the connection appears to timeout and no response is ever received. Even when it is received, it is way to slow.
The update panel has forced us to rewrie several pages using JSON and client side script.

I think they’ve outsource their development and/or support based on the names of the people I’ve had contacts with. This alone explains the drop in quality of their product.


#18

Jeff,

I just wrote a small post about how dependencies are also the source of many security issues.

I like your writing style, and was wondering if you had time to look the small entry I wrote and tell me what you think. I’ve read your advice to bloggers, and I’m working on implementing it.

Thanks,

Esteban


#19

First/second/third parties is terminology that comes from the law. If there is a contract, then it’s between the First Party and the Second Party. If anyone else interferes, they are Third Parties.


#20

Yeah. I’m going to have to go ahead and disagre with you on this one… a href="http://weblogs.asp.net/jgalloway/archive/2006/01/25/436377.aspx"http://weblogs.asp.net/jgalloway/archive/2006/01/25/436377.aspx/a