Copy paste into link

My question is about linking to open source frameworks. There are many of them for different purposes. I personally use several of these in one project. For instance:

  • Unity
  • CAL / Prism
  • ValidationAspects
  • EnterpriseLibrary Logs
  • EnterpriseLibrary Exception Handling
  • EnterpriseLibrary Caching
  • Caliburn

All of these frameworks have been very helpful in terms of development efforts. However, there are some negative aspects:

  • Tons of DLLs (15 of the above list).
  • The application layer (not shared assemblies and new assemblies) has to reference many base dlls that can be confusing) and many different namespaces are involved.
  • Deploying said thin DLLs can get problematic (I sometimes use ILMerge to alleviate this and the aforementioned issues, but put it off for a while).
  • Open Source Project Expiration - Open source projects come and go, so if any of them is no longer actively supported, it could be due to internal bugs requiring the fix or improvement we want.
  • Obfuscation of "how to do things". We are not actively using all parts of the above structures. In fact, some of these structures have overlap and provide redundant components and functionality. From a developmental standpoint, this can be confusing. We want a consistent implementation to be simple and straightforward in our codebase. Having multiple domains that do the same thing in different ways can be problematic in this regard. This is probably one of my biggest problems.
  • You are in big trouble if these frameworks refer to different versions of other assemblies (for example, one of them references Unity 1.1 and another Unity 2.0).

Alternative? Include the source code in a shared dll for your projects (e.g. MyProject.Common). Postpone the question of license compliance for now.

This also has several negative consequences:

  • It is not easy to use updates released by the infrastructure provider - you need to update the source code.
  • Functionality encapsulation - It's easier to break this paradigm when the source code is in your hands.

So, I know that people probably have a lot of opinions on this ... and I would love to hear them.

Thanks.

+2


a source to share


1 answer


For some aspect of your problem, this might be relevant: http://en.wikipedia.org/wiki/DLL_hell#Running_Conflicting_DLLs_Simultaneously .

Another common solution to this problem is to write an encapsulation layer on top of the required functionality, which at least protects your code from wild changes when upgrading to newer versions of supporting libraries.

When it comes to the lifespan of an open source project, it should be clear which projects are healthy and which are not. For example, a project that is part of the Apache or Eclipse foundations is probably healthy, whereas some random stuff on sourceforge is probably not. Typically, you can avoid this problem altogether by avoiding projects that don't appear to be active.



For negatives to copy the code into your project:

  • I know you wanted to postpone the license, but you really can't. I am not a lawyer and you should consult one for your project if problems may arise, but if you are developing a proprietary system it could become GPL by accident.
  • This makes your development environment more cluttered. You need to worry about copying the ompiles code correctly, compiling with the correct version, and having the correct build scripts. You also have all this extra code in your IDE taking up space.
  • As you pointed out, this makes it very difficult to update your code.
  • If you have to write bugs in an open source project, it becomes more difficult to do so.
  • If you're not careful, a junior developer who doesn't know any better can step into the code and start working with it.

There are probably more reasons not to do this, but there are several. Hope it helps.

+2


a source







All Articles