Last post Feb 03, 2009 03:32 PM by molesinski
Feb 03, 2009 02:55 PM|bryanmig|LINK
Am I doing something wrong, or must I always recompile my code with each and every change I make?
I am used to the webforms way - the only recompiling necessary is when you change the App_Code contents - and that compilation takes places automatically!
If this is the way it is, then it seems like a seriously messed up way of writing a web application!
Hoping I'm wrong,
Feb 03, 2009 03:05 PM|molesinski|LINK
With Web Applications you have to recompile project each time you change any of the .cs files, no matter if its code file or codebehind file, compilation is still needed. Only thing that don't need recompilation is of course modifications on aspx and ascx
Feb 03, 2009 03:11 PM|bryanmig|LINK
How can one be expected to stop their development server constantly and recompile for each and every change that is made to the code?
Surely there must be a better way to do this!
I have been so excited to use ASP.NET MVC and now I am not so sure if I should bother to use it, if it will be such a headache during development.
Feb 03, 2009 03:16 PM|molesinski|LINK
You don't need to stop anything, I just press ctrl+shift+b and voila! After build is done and new .dll files are placed in bin folder, application is restarted and changes can be verified. So after all its just minor inconvenience, as you already had to
compile after App_Code changes before.
Feb 03, 2009 03:22 PM|bryanmig|LINK
It is not a minor inconvenience. It is a major waste of time.
In webform apps, this recompiling only occurred in App_Code but did not occur in codebehind. In MVC, all .cs file changes require a rebuild which is a complete waste of development time - ESPECIALLY when the project becomes large.
So all the "cool" that is in the new MVC is shadowed by the uncool. Very disappointing to say the least,
Feb 03, 2009 03:30 PM|shados|LINK
Its not an MVC vs WebForm thing, its a Website vs Web Application thing. If you use the web application model with WinForms, you end up with the same results.
Normally it isn't an issue, because if you properly separate your layers, you'll have multiple projects, including class librairies, which need to be recompiled too, and cannot be recompiled on the fly (even with WebSite projects), so it does end up being
a minor inconvenience (and is in line with other development models, like silverlight, winforms, console apps, etc)
the WebSite model was actually new to .NET 2.0/VS2005, and was made exactly so "all in one websites" could be developed and updated quicker, but it definately was not a one size fit all thing.
Feb 03, 2009 03:32 PM|molesinski|LINK
I already had same discussion at work and I believe it was discussed on this forums countless times, so you can dig up some complex explanation, but for me it's simple - mvc application development process is different from normal web site development, because
of concept separation, resulting in that you almost don't need to rebuild mvc application project.