MVC3 is step back from Web Application and i feel like i am in ASP classic. If i was forced to use MVC3 i'd rather write everything in javascript so F. MVC and whole ASP.NET as an idea. MS is doing it wrong, again.
Code wise MVC3 is a mess to maintain. It doesn't produce any cleaner html than ASP.NET Web Application and it cannot do any more but less.
Full Post Backs are not problem with Web Application (like some like to say) and if you know how to use ClientCallBack in combination with UpdatePanel you are set.
MV3 lacks controls. I really don't have time for creating tables through for loop. I can do that *** with Web Application as well.
MVC3 isn't a step back, compared to webforms it's more true towards web development. Webforms has interesting features, but it abstracts so much away that applying customizations is often difficult (though not impossible).
MVC3 is cleaner, giving you much more control over the resulting markup. You don't have to deal with messy clientId's or viewstate. In addition ClientCallBack and UpdatePanel is an expensive operation, requiring an entire page life cycle invokation and later
the merging of deltas. With MVC, the process is much more streamlined and efficient. You get a simple ajax connection via jquery and action methods that return json responses. In my opinion it's a much cleaner solution.
MVC3 is also easier to test, many applications can benefit from Unit Testing. WebForms is very hard to unit test, with MVC testing is easy because it was built to be testable.
Also, MVC is extensible. You can change any part of the framework. If you don't like how action methods work, rip it out and roll your own. If you don't like how views work, write your own view engine. The framework is very pluggable and gives you all kinds
of hooks to add in your own functionality. With WebForms you can't do that, you have the page life cycle and customizations are a lot harder.
Server controls rely on state and the web, by nature, is stateless. ASP.NET MVC doesn't support server controls which is better in terms of scalability and performance. Does that mean you have to write all your UI components by hand? No, there are many MVC
extensions that are similar to controls, but with no state. You can also use any client side library. Here are a few examples
This is a really powerful suite of extensions, including a grid (you don't have to write tables by hand) http://demos.telerik.com/aspnet-mvc/grid
One important thing to keep in mind is that WebForms or MVC they both rely on the ASP.NET infrastructure so while the UI technologies are different, the underlying pipeline is the same, and that's
a good thing.
If you have a button inside a grid row inside another grid row in an update panel i am calling javascript which calls function behind the code and with CallBackHandler it will update portion of the page without causing any post back. In fact code is so short
and simple to do. Also you don't need JQuery at all and javascript complexity is at very minimum making sure it will work on any browser including old ones (not supported). It implements System.Web.UI.ICallbackEventHandler. However example MS gives i reworked
and there is even more powerful way of doing things. It is quite amazing what you can learn from studying Page Source :)
MVC3 is a mess to maintain because there is no physical connection between object on page and its event. Finding its action events is a nightmare. UI page is a joke and what offers. Lack of controls and syntax just makes no sense. With Web Application you
are not obligated to use ASP Controls, you can still rely on html controls. The thing is MVC3 is limiting you very much where Web Application is open to anything.
It is not true there is no true separation of layers with Web Application. Again you can put everything in a code behind page, it comes down to individual programmer and his skills set to make true separation between data, business layer and presentation.
Overall MVC3 doesn't bring any value and development is slow because you have to reinvent the wheel in many instances and simple things are made to be too complicated.
And Routing is also available with Web Application even though i think it is useless.
Being relatively new to MVC, I would like to add that I feel MVC is one of the very best platforms/solutions out there at this time. MVC is very simple to learn, use and update. Form postbacks are very easy to manipulate to your needs, and the platform supports
any language that you want to use. Even in the case where there is a need to hard code some sort of configuration for the application/site, keeping the amount of files that need alteration to a minimum, is a huge feature. While I feel that Java is also another
very useful tool, MS has really stepped up, in my opinion, when releasing MVC. To be honest I felt that VB was easy to use, but after using MVC, I really enjoy this much better. So easy to work with!
I recently viewed a video by Joe Stagner showing how MVC is an improvement, and highlighted some significant changes. The video then goes on to show some differences in the way programmers are either going to love or hate it. Personally, I love it.
separation of layers with Web Application. Again you can put everything in a code behind page, it comes down to individual programmer and his skills set to make true separation between data, business layer and presentation.
Code behind is not a good example of separation because your code is still very tightly coupled to your .aspx page. In most cases you have 1 code behind file per .aspx file, that's very tight coupling. With MVC you can literally use any view you want with
a controller since the controller knows nothing about the view. For example I can reuse a controller across multiple views to support mobile vs web, or I can reuse controllers across multiple projects with similar views. You can't do that with webforms.
You also seem to be ignoring the testing aspect. Unit Testing is an extremely important task and helps mitigate many potential bugs (when done correctly). Testing ASP.NET MVC is orders of magnitude easier with asp.net mvc because you don't need a running
web server.
separation of layers with Web Application. Again you can put everything in a code behind page, it comes down to individual programmer and his skills set to make true separation between data, business layer and presentation.
Code behind is not a good example of separation because your code is still very tightly coupled to your .aspx page. In most cases you have 1 code behind file per .aspx file, that's very tight coupling. With MVC you can literally use any view you want with
a controller since the controller knows nothing about the view. For example I can reuse a controller across multiple views to support mobile vs web, or I can reuse controllers across multiple projects with similar views. You can't do that with webforms.
You also seem to be ignoring the testing aspect. Unit Testing is an extremely important task and helps mitigate many potential bugs (when done correctly). Testing ASP.NET MVC is orders of magnitude easier with asp.net mvc because you don't need a running
web server.
Just like i can use class from business layer on any web page mobile vs web or across multiple projects. It is a same thing. Code behind page should only have action events defined and nothing else. All calls from there should go to business layer which
can be used for multiple pages. The concept is the same if it's done properly. The fact that Controller knows nothing about view is the part which really bothers me, as i said there is no physical connection between page/view and code for it. It comes down
to some type of inline programming/scripting and i see MVC more as scripting than actual programming. Infact i can do whole page in javascript without use of controllers at all which would make more sense to me and easier to follow since MVC relies a lot on
JQuery anyway. Why bother with code in Controller?
I see MVC project as model with only two layers -> Data Layer and Presentation/Business Layer. The way is laid out i don't see any separation. Perhaps i am missing out something?
For unit testing i won't argue there but i did load tested MVC apps in the past and performance sucked. Perhaps were poorly written who knows.
PS. MVC is like a product of group of people who only did PHP and got exposed to Visual Studio and .NET in general and came up with some really weird shit :)
Infact i can do whole page in javascript without use of controllers at all which would make more sense to me and easier to follow since MVC relies a lot on JQuery anyway. Why bother with code in Controller?
Because you have logic data and sotre data.
lradunovic
I see MVC project as model with only two layers -> Data Layer and Presentation/Business Layer. The way is laid out i don't see any separation. Perhaps i am missing out something?
lradunovic
Member
2 Points
6 Posts
MVC sucks
May 17, 2012 04:56 PM|LINK
MVC3 is step back from Web Application and i feel like i am in ASP classic. If i was forced to use MVC3 i'd rather write everything in javascript so F. MVC and whole ASP.NET as an idea. MS is doing it wrong, again.
Code wise MVC3 is a mess to maintain. It doesn't produce any cleaner html than ASP.NET Web Application and it cannot do any more but less.
Full Post Backs are not problem with Web Application (like some like to say) and if you know how to use ClientCallBack in combination with UpdatePanel you are set.
MV3 lacks controls. I really don't have time for creating tables through for loop. I can do that *** with Web Application as well.
ignatandrei
All-Star
134871 Points
21618 Posts
Moderator
MVP
Re: MVC sucks
May 17, 2012 10:13 PM|LINK
Arguments?
Your opinion. Did you have strong Modes in asp classic?
Arguments? I think web forms is a mess - all rowbound events, update panles and others.
If you have a button inside a grid row inside another grid row in an update panel, what event it call ? And page_load does execute first or after?
CodeHobo
All-Star
18647 Points
2647 Posts
Re: MVC sucks
May 17, 2012 10:38 PM|LINK
MVC3 isn't a step back, compared to webforms it's more true towards web development. Webforms has interesting features, but it abstracts so much away that applying customizations is often difficult (though not impossible).
MVC3 is cleaner, giving you much more control over the resulting markup. You don't have to deal with messy clientId's or viewstate. In addition ClientCallBack and UpdatePanel is an expensive operation, requiring an entire page life cycle invokation and later the merging of deltas. With MVC, the process is much more streamlined and efficient. You get a simple ajax connection via jquery and action methods that return json responses. In my opinion it's a much cleaner solution.
MVC3 is also easier to test, many applications can benefit from Unit Testing. WebForms is very hard to unit test, with MVC testing is easy because it was built to be testable.
Also, MVC is extensible. You can change any part of the framework. If you don't like how action methods work, rip it out and roll your own. If you don't like how views work, write your own view engine. The framework is very pluggable and gives you all kinds of hooks to add in your own functionality. With WebForms you can't do that, you have the page life cycle and customizations are a lot harder.
Server controls rely on state and the web, by nature, is stateless. ASP.NET MVC doesn't support server controls which is better in terms of scalability and performance. Does that mean you have to write all your UI components by hand? No, there are many MVC extensions that are similar to controls, but with no state. You can also use any client side library. Here are a few examples
This is a really powerful suite of extensions, including a grid (you don't have to write tables by hand)
http://demos.telerik.com/aspnet-mvc/grid
As mentioned earlier, you can also use many client side libraries like
http://jqueryui.com/
http://demos.kendoui.com/web/overview/index.html
One important thing to keep in mind is that WebForms or MVC they both rely on the ASP.NET infrastructure so while the UI technologies are different, the underlying pipeline is the same, and that's a good thing.
Blog | Twitter : @Hattan
lradunovic
Member
2 Points
6 Posts
Re: MVC sucks
May 18, 2012 02:10 PM|LINK
If you have a button inside a grid row inside another grid row in an update panel i am calling javascript which calls function behind the code and with CallBackHandler it will update portion of the page without causing any post back. In fact code is so short and simple to do. Also you don't need JQuery at all and javascript complexity is at very minimum making sure it will work on any browser including old ones (not supported). It implements System.Web.UI.ICallbackEventHandler. However example MS gives i reworked and there is even more powerful way of doing things. It is quite amazing what you can learn from studying Page Source :)
MVC3 is a mess to maintain because there is no physical connection between object on page and its event. Finding its action events is a nightmare. UI page is a joke and what offers. Lack of controls and syntax just makes no sense. With Web Application you are not obligated to use ASP Controls, you can still rely on html controls. The thing is MVC3 is limiting you very much where Web Application is open to anything.
It is not true there is no true separation of layers with Web Application. Again you can put everything in a code behind page, it comes down to individual programmer and his skills set to make true separation between data, business layer and presentation.
Overall MVC3 doesn't bring any value and development is slow because you have to reinvent the wheel in many instances and simple things are made to be too complicated.
And Routing is also available with Web Application even though i think it is useless.
ignatandrei
All-Star
134871 Points
21618 Posts
Moderator
MVP
Re: MVC sucks
May 18, 2012 02:23 PM|LINK
What is the event do you talk about? Event on object that is persisted in HTML state?
Wow. You then denies the only thing that WebForms have powerfull.
Yes. And testing is a joke for you ,right?
That's why events in grid (row-databound , itemcreated events) are for ...
cYpH3r x3r0
Member
327 Points
107 Posts
Re: MVC sucks
May 18, 2012 03:01 PM|LINK
i think you are exagerrating dude, MVC is made to make architecture simpler, stick with MVC and i know you'll get used to it and you'll love it.
I am currently working with WPF and web forms but would love to switch to MVC, given the chance.
i aggree that it has less number of controls, but its a work in progress. stay calm and wait.
Daddy1215
Member
4 Points
3 Posts
Re: MVC sucks
May 18, 2012 03:02 PM|LINK
Being relatively new to MVC, I would like to add that I feel MVC is one of the very best platforms/solutions out there at this time. MVC is very simple to learn, use and update. Form postbacks are very easy to manipulate to your needs, and the platform supports any language that you want to use. Even in the case where there is a need to hard code some sort of configuration for the application/site, keeping the amount of files that need alteration to a minimum, is a huge feature. While I feel that Java is also another very useful tool, MS has really stepped up, in my opinion, when releasing MVC. To be honest I felt that VB was easy to use, but after using MVC, I really enjoy this much better. So easy to work with!
I recently viewed a video by Joe Stagner showing how MVC is an improvement, and highlighted some significant changes. The video then goes on to show some differences in the way programmers are either going to love or hate it. Personally, I love it.
CodeHobo
All-Star
18647 Points
2647 Posts
Re: MVC sucks
May 18, 2012 03:22 PM|LINK
Code behind is not a good example of separation because your code is still very tightly coupled to your .aspx page. In most cases you have 1 code behind file per .aspx file, that's very tight coupling. With MVC you can literally use any view you want with a controller since the controller knows nothing about the view. For example I can reuse a controller across multiple views to support mobile vs web, or I can reuse controllers across multiple projects with similar views. You can't do that with webforms.
You also seem to be ignoring the testing aspect. Unit Testing is an extremely important task and helps mitigate many potential bugs (when done correctly). Testing ASP.NET MVC is orders of magnitude easier with asp.net mvc because you don't need a running web server.
Blog | Twitter : @Hattan
lradunovic
Member
2 Points
6 Posts
Re: MVC sucks
May 18, 2012 03:34 PM|LINK
Just like i can use class from business layer on any web page mobile vs web or across multiple projects. It is a same thing. Code behind page should only have action events defined and nothing else. All calls from there should go to business layer which can be used for multiple pages. The concept is the same if it's done properly. The fact that Controller knows nothing about view is the part which really bothers me, as i said there is no physical connection between page/view and code for it. It comes down to some type of inline programming/scripting and i see MVC more as scripting than actual programming. Infact i can do whole page in javascript without use of controllers at all which would make more sense to me and easier to follow since MVC relies a lot on JQuery anyway. Why bother with code in Controller?
I see MVC project as model with only two layers -> Data Layer and Presentation/Business Layer. The way is laid out i don't see any separation. Perhaps i am missing out something?
For unit testing i won't argue there but i did load tested MVC apps in the past and performance sucked. Perhaps were poorly written who knows.
PS. MVC is like a product of group of people who only did PHP and got exposed to Visual Studio and .NET in general and came up with some really weird shit :)
ignatandrei
All-Star
134871 Points
21618 Posts
Moderator
MVP
Re: MVC sucks
May 19, 2012 03:49 AM|LINK
Because you have logic data and sotre data.
Yes. http://msprogrammer.serviciipeweb.ro/2010/03/29/asp-net-mvc-orm-and-viewmodels/
You confound unit testing with load/stress testing. More, do you mean also that stackoverflow.com performance sucked?