2

I'm working on a sub-application for a large system.

There is a company X which has created the system. Sub-applications are created by numerous smaller companies, including the one I work for.

Our application is close to being finished but there is a new requirement that our application must not use DLL files and all the business logic should be contained in .cs files.

Why is there such a requirement? Company X believes it can solve the problem of having too many DLLs and dependency issues. With many sub-applications and many different companies creating them, problems arose with /bin directory and dependency issues.

Main problem is that many sub-applications are interlinked. Service Oriented Architecture is used.

I understand this is an architecture problem. And requirement also came way too late.


I'm a developer.

More specifically about my problem: It's simple when it comes to ascx.cs files, I can just switch from CodeBehind to CodeFile. No problem here.

Problem is with our libraries. Obviously, I can just copy all the corresponding .cs files on the server but how do I make the application load the classes from there instead of using DLL libraries?

I have never implemented an asp.net website without using DLLs, it is not clear to me what are my options.

I have been reading about: How to load a class from a .cs file

I hope I've explained my situation well enough.

Community
  • 1
  • 1
afaf12
  • 5,163
  • 9
  • 35
  • 58
  • 9
    Hint: Slap whoever is signing off on these requirements. Somehow though, I think you've misunderstood the requirement. – Simon Whitehead Nov 20 '13 at 09:13
  • I'm confident it is not a misunderstanding on my part. – afaf12 Nov 20 '13 at 09:15
  • Ok, I understand the question is not explained well enough, will improve the quality now. – afaf12 Nov 20 '13 at 09:16
  • 3
    Can I ask who created this requirement then? Because they are way off the mark. Way way way off the mark. – Simon Whitehead Nov 20 '13 at 09:16
  • 3
    This is about the dumbest requirement I've ever heard of. You may quote me when you discuss this with your authorities... – Thorsten Dittmar Nov 20 '13 at 09:21
  • 1
    It sounds like they want your full sourcecode, so they can incoporate that into their own projects. Good luck with versioning and intellectual property. – Hans Kesting Nov 20 '13 at 09:25
  • Having source code can be handy when it comes to bug tracking and future development. – BossRoss Nov 20 '13 at 09:27
  • Have they given a pragmatic demonstration of their belief? We all know how detrimental a religious war can be to good code. – Gusdor Nov 20 '13 at 09:33
  • Their reasoning is avoiding dependency issues, as Simon Whitehead said. They also use the argument that 3 other sub-applications have been converted to not use DLLs anymore. I suspect those three to be of much smaller scale and to contain all business logic in codebehind files. Which is ... doable for a small application, I guess. – afaf12 Nov 20 '13 at 09:47

2 Answers2

5

Company X no doubt has someone leading the developers who once had a dependency issue. They have now decided that any and all dependencies that are in the form of an actual assembly are bad (I think we've all had a manager like this at some point).

The fact is: this isn't possible. It is a stupid requirement that makes your life much, much more difficult.

You have two options that I can see.

1) Remove all of your (hopefully) nicely decoupled assemblies with their nice business logic out into your code behind files. This is tragic.. but an option.

2) Continue down your path of investigating compiling code from a source file. This sets you up for a HUGE amount of extra development time and.. honestly, you'll probably just end up giving up.

Save yourself some hassle and just offer them your full source code on USB.

Sorry if that sounds harsh. I do not envy you though.

Simon Whitehead
  • 63,300
  • 9
  • 114
  • 138
  • Couldn't agree more. OP, at some point, as professionals, we have to stand up and say 'hey bud, unless you give me a rational explanation I will continue as usual'. Dont give in to such cobblers. – Gusdor Nov 20 '13 at 09:32
  • A very solid answer, thank you. Doesn't sound harsh, sounds honest. Both scenarios had come up in my mind and I don't see them as viable. With the time left and resources available, we can deliver the app on time. But it will have DLLs. Heh. I'll have a meeting with project manager today. – afaf12 Nov 20 '13 at 09:38
  • I guess your other option is to move everything into App_Code. That's just as bad as the codebehind option really and you'll likely spend a while making it all work as expected. – Simon Whitehead Nov 20 '13 at 09:50
  • Moving everything to App_Code is what company X suggests. – afaf12 Nov 20 '13 at 10:23
  • Its still bad. The more I think about it... the more I think its Company X's way of getting the source code off you. I would definitely put a price on it. – Simon Whitehead Nov 20 '13 at 10:28
2

Offer to license your source code to them but at much higher price than the binaries. Source code has much more intrinsic value, because it is your intellectual property.

Also beware that company X can decompile your binaries into source code using e.g., ILSpy. How much do you trust them not to do this?

Polyfun
  • 9,479
  • 4
  • 31
  • 39
  • I believe this a serious risk. Our research could easily be "borrowed" and used in future projects by company X. Could still happen with decompiling DLLs. But delivering full source code would make it much easier. – afaf12 Nov 20 '13 at 09:58