Here’s the situation: I am writing an ASP.NET MVC application. I want to use EWL’s data layer, and I want to use EWL system manager (formally RSIS) to deploy the application. But, after the number of problems I’ve found, I’m losing motivation.
I want to use EWL’s data layer. Nothing more.
What more am I getting that I don’t want?
- CSS constant class generation
- Web.config stomping
- Ewf folder
- CSS HTTP handler
- Error handling
How could I possibly not want these things?
CSS constant class generation
Bug in CSS constants for classes generator
@greg_smalter has said that its known that EWF and MVC can thrive happily together. I’m not convinced. I’m using the latest MVC. But EWL’s stomping the web.config completely breaks it. I revert it locally which makes everything happy again. But EWL system manager regenerates dependent logic when it builds, stomping the web.config on the build server, so when it’s deployed it’s broken again. I could get around the stomping if I didn’t want system manager.
I don’t really care, but it’s extra and not-needed. But I do think extra-things-that-don’t-need-to-be-there will bother other developers trying EWL for the first time.
CSS HTTP handler
I’m not hooking Global into EwfApp because I don’t want the error handling. But, it’s required for the CSS HTTP handler, which I also do not want.
I want full control over how my errors are handled. This is the same issue as the discussion we’ve had in meetings and via email. The main example from those conversations being, we’re writing a web service that must return parsable json for the client, always. However it’s impossible to escape EWL’s error handler if the exception reaches the application error handler. Attempting to do anything in Application_Error is futile: the exception was already cleared.
Okay Sam but it’s absolutely possible to use EWL’s data layer without signing up with all of these things. All you have to do is initialize the application as if it’s a console application
Yes, but not to use EWL system manager. EWL system manager won’t include your project in the logic package unless it’s defined in Development.xml. But, defining your project signs it up for all of this magic.
Here are the ways my problems could be resolved.
- Allow configuring a web project for inclusion in system manager’s logic package but don’t also sign it up for the rest.
- Break-out EWL’s data layer into a completely separate package. (Actually, this wouldn’t solve my problem because the web.config would still get stomped on the build server.)
- Manually sign-up or opt-out of all magic features, including but not limited to: CSS generation and handling, Error handling, EWF.
A massive benefit of opt-in/opt-out features is that it lessens the burden for others trying out EWL. Developers want control over their projects. When it comes down to “use features that make life easier, but lose all control” and “have full control, but development is slightly more difficult”, they’re going to choose the latter. I firmly believe in guiding the developer in the right direction, but forcing a path is like building a glass tunnel at a national park. I would rather have the ropes that say “do not cross.”