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!
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
files.
Maciej
Don't forget to click "Mark as Answer" on the post(s) that helped you.
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.
Maciej
Don't forget to click "Mark as Answer" on the post(s) that helped you.
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,
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.
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.
Maciej
Don't forget to click "Mark as Answer" on the post(s) that helped you.
bryanmig
Member
45 Points
26 Posts
Must recompile after every code change?
Feb 03, 2009 02:55 PM|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,
Bryan
www.Staga.net
molesinski
Member
314 Points
71 Posts
Re: Must recompile after every code change?
Feb 03, 2009 03:05 PM|LINK
Hey Bryan,
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 files.
Maciej
bryanmig
Member
45 Points
26 Posts
Re: Must recompile after every code change?
Feb 03, 2009 03:11 PM|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.
www.Staga.net
molesinski
Member
314 Points
71 Posts
Re: Must recompile after every code change?
Feb 03, 2009 03:16 PM|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.
Maciej
bryanmig
Member
45 Points
26 Posts
Re: Must recompile after every code change?
Feb 03, 2009 03:22 PM|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,
www.Staga.net
shados
Star
12285 Points
2229 Posts
Re: Must recompile after every code change?
Feb 03, 2009 03:30 PM|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.
molesinski
Member
314 Points
71 Posts
Re: Must recompile after every code change?
Feb 03, 2009 03:32 PM|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.
Maciej