After spending the last day or so reading about both Web Pages and MVC I am not convinced that the "Web Pages are for beginner devs" belief held by some is warranted. Two of the biggest features from my perspective shared by both of these solutions are the
eradication of ViewState and the tight integration between HTML, C# and Javascript without having ASP.NET abstract the HTML and Javascript from the developer.
I hate to step on toes here, but to me as a fairly experienced ASP.NET Web Forms developer these two features alone put both of these technologies well above ASP.NET Web Forms. That is just my opinion and I welcome further insights on this.
However, what I would really like to know is just how Web Pages really stack up against MVC. I realize that it helps to separate the data, ui and user interactions better than Web Pages or Web Forms. In my eyes, if you write your C# code correctly
you can still maintain a great degree of this separation. Additionally, since I can take full advantage of HTML, jQuery and javascript in addition to server side scripting via Razor, I can develop mobile sites just as easily as classic websites. With this
in mind, I see no reason why anytime in the near future I would ever have the desire to switch my UI.
One gray area for me is unit testing. This is something that I am just getting ready to start studying and, from what I have read, I am assuming that unit testing in MVC is like the cat's meow. Thoughts?
Finally, one big advantage that I see in Web Pages over MVC is that it is much closer to a RAD toolset. If I am pumping out relatively small websites (a.k.a., not enterprise solutions) then it seems clear this would be much faster and easier to
do by simply utilizing Web Pages. Hey, I am even smelling a business model in here somewhere....
So, what I would greatly appreciate is for some of you supremely experienced developer beings here to enlighten me to the error of my ways. :)
When you say "Web Pages" do you really mean "Web Forms"?
It has long been my contention that one of the things that ASP.NET did very well and very poorly at the same time was making web application development more accessible. It brought web architecture to those who were only familiar with application development.
It created the idea of ViewState so that it would be an easy transition for application developers. The side-effect, however, is that people who came into the ASP.NET world that didn't understand web architecture have a difficult time tweaking things outside
of the server controls because they still don't understand the basic sequencing nature of web architecture (they still ask questions like "how do I make JavaScript execute a code-behind method" and don't understand what is wrong with that question.
In the end, I still use web forms for many things, because code-behind is still a decent way to preload content onto a page, and maintain a strict separation of concerns. I opt against MVC because while it does a better job at demystifying web architecture
a little more and shedding some light on the reality of how it actually functions it breaks what I believe is good seperation of concerns. Ironically, I find it easier to implement a 3-tier system with Web Forms because I'll just shut off ViewState and work
on the aspx pages exclusively for client-side functionality and the code-behind for server-side funtionality. ASP.NET has a dilemma now because by making the framework more accessible, they now have the problem of delivering more cutting edge technology to
the developers that they have created. In addition to MVC, the AJAX toolkit is another example of this because it makes developers think that the client page is actually executing a Code-Behind method, when that's not exactly what is going on. I am not trying
to dog on ASP.NET developers, but those who start learning how to develop for the web from the design view in visual studio have a much more difficult time learning how to make full use of web architecture because many of them have been trained in such a sterile
environment that they simply won't know any better to try to research alternatives on their own.
This is one of those Holy Wars, and I understand why many consider MVC as being "better", though it is probably a poor choice of words. MVC is closer to how the web actually functions, but it still isn't a completely elegant solution for my tastes because
server code still executes on client pages via inline scripting. In the end, only through fully understanding the technology that you are working on will you be able to be confident that you can create any application you are tasked with. And if you can do
that, then it really doesn't matter which framework you choose. There is no right or wrong answer here. But when a co-worker tells me that a certain component "doesn't work with AJAX", I have to pause and remind myself that he is talking about Microsoft
AJAX Toolkit, and not Asynchronous JavaScript And XML, because that statement would otherwise not make any sense. And that is usually enough to shed some light for me on what the overall weakness of Web Forms really is.
The true test: If you can make a web application with ASP.NET using only notepad, csc.exe and the DOS command line, then you are probably safe, and what you are doing is probably good enough for your needs. This is not to suggest that this is the best
or most efficient way to implement an application, simply that if you can do that, then you probably have enough insight to determine what is the best technology for your needs.
"Dream as if you'll live forever, live as if you'll die today." --James Dean
Not being as experienced as the rest here, I can only add that I'd love to see a mashup of WebPages, MVC3/4, and VS LightSwitch. From what I can tell from my short time with VS LightSwitch, it goes a long way to addressing the behind-the-scene plumbing that
could make a transition from a departmental app to a true enterprise app much less painful. MVC/WebPages provide different approaches to developing soutions. The ideal mashup of all three would be a killer dev app.
When you say "Web Pages" do you really mean "Web Forms"?
I think this is part of the issue with Web Pages' perception with developers. A lot of developers, even experienced ASP.net developers, have no idea what Web Pages is. If you look at the top of the asp.net site there is "Web Pages", "Web Forms" and "MVC".
These are 3 distinct frameworks promoted by Microsoft that developers can use for creating web site apps. I think it also does not help that Microsoft for some reason decided to call this new framework "Web Pages".
As to the opening post. MVC is seen as the hot framework right now so anything else is perceived to be not as good by some. I don't think there is any way to change that perception. Whatever is the popular framework is going to be the one people promote
the most. There are some reasons for MVC being popular. 1 - It was the first asp.net framework from Microsoft that pulled away from viewstate and embraced HTML/Javascript/CSS. 2 - Unit testing is built-in unlike other asp.net frameworks. 3 - It borrows
heavily and resembles other MVC frameworks, most notably Ruby on Rails.
Personally I like Web Pages. I like the simplicity of it. I have never built any web app that I feel could not be done in Web Pages. It has the full .net framework behind it and is very flexible.
Ah, I'll be honest, I have heard of Razor/WebMatrix and never really looked into it before. So most of my rant isn't specifically relevant to the question posed by the original poster. :-P
That said, this looks a lot like classic ASP interlaced with the concept of Actions from MVC. Not sure I like it, but for many of the same reasons I dont' find MVC particularly appealing. I'm just not a fan of seeing server code and HTML on the same file.
Still, I would say this approach is definitely more inline with web architecture than web forms. But so was ASP. I would say I prefer MVC to these Web Pages, but more because MVC does lend itself to separation of concerns more.
"Dream as if you'll live forever, live as if you'll die today." --James Dean
I think it also does not help that Microsoft for some reason decided to call this new framework "Web Pages".
Yeah, I find it increasingly difficult to have generic systems architecture conversations every time Microsoft develops a new framework. :-P
I'm not going to hate on any one framework. In the end, if you can develop a system and meet every requirement, then the framework meets your needs. Everyone enjoys their own flavor of Framework, and I can see how this particular framework filled a void in
the community. "Web Pages" might appeal to php folks as well, though I doubt any php fanboy would ever use a Microsoft system.
"Dream as if you'll live forever, live as if you'll die today." --James Dean
I am not convinced that the "Web Pages are for beginner devs" belief held by some is warranted.
The whole purpose behind the introduction of the Web Pages framework was to make it easier for beginners to ASP.NET to get started. These "beginners" might never have done any web development, or they might be current PHP or classic ASP developers. Microsoft's
research suggested that Web Forms and MVC both had relatively high "concept counts" which were proving to be a barrier to adoption to this target group. Web Pages is designed to offer a much lower concept count.
That doesn't mean that you should not use Web Pagess if you are experienced. You have the whole ASP.NET framework available to you so you can produce sophisticated and advanced work.
MagianCreative
One gray area for me is unit testing.
That is the real point behind the introduction of the MVC framework. It was designed from the ground up with testability in mind. If you need to write tests, use MVC.
I agree with Mike. I am in the beginner camp. I have tried several MS silver bullets: Dynamic Data, NVC, LightSwitch, WebForms. In akk those cases, the concept "load" was pretty heavy (probaly not so with LightSwitch). Web Pages seemed pretty intuituve
and enabled me to ease into the Entity Framework and appreciate its many great features. Adding the "load" of EF to the base load of the other frameworks would have scared me off.
MagianCreati...
Member
70 Points
68 Posts
The stigma with Web Pages
Jul 06, 2012 09:00 PM|LINK
After spending the last day or so reading about both Web Pages and MVC I am not convinced that the "Web Pages are for beginner devs" belief held by some is warranted. Two of the biggest features from my perspective shared by both of these solutions are the eradication of ViewState and the tight integration between HTML, C# and Javascript without having ASP.NET abstract the HTML and Javascript from the developer.
I hate to step on toes here, but to me as a fairly experienced ASP.NET Web Forms developer these two features alone put both of these technologies well above ASP.NET Web Forms. That is just my opinion and I welcome further insights on this.
However, what I would really like to know is just how Web Pages really stack up against MVC. I realize that it helps to separate the data, ui and user interactions better than Web Pages or Web Forms. In my eyes, if you write your C# code correctly you can still maintain a great degree of this separation. Additionally, since I can take full advantage of HTML, jQuery and javascript in addition to server side scripting via Razor, I can develop mobile sites just as easily as classic websites. With this in mind, I see no reason why anytime in the near future I would ever have the desire to switch my UI.
One gray area for me is unit testing. This is something that I am just getting ready to start studying and, from what I have read, I am assuming that unit testing in MVC is like the cat's meow. Thoughts?
Finally, one big advantage that I see in Web Pages over MVC is that it is much closer to a RAD toolset. If I am pumping out relatively small websites (a.k.a., not enterprise solutions) then it seems clear this would be much faster and easier to do by simply utilizing Web Pages. Hey, I am even smelling a business model in here somewhere....
So, what I would greatly appreciate is for some of you supremely experienced developer beings here to enlighten me to the error of my ways. :)
AceCorban
Star
12318 Points
2269 Posts
Re: The stigma with Web Pages
Jul 06, 2012 10:44 PM|LINK
When you say "Web Pages" do you really mean "Web Forms"?
It has long been my contention that one of the things that ASP.NET did very well and very poorly at the same time was making web application development more accessible. It brought web architecture to those who were only familiar with application development. It created the idea of ViewState so that it would be an easy transition for application developers. The side-effect, however, is that people who came into the ASP.NET world that didn't understand web architecture have a difficult time tweaking things outside of the server controls because they still don't understand the basic sequencing nature of web architecture (they still ask questions like "how do I make JavaScript execute a code-behind method" and don't understand what is wrong with that question.
In the end, I still use web forms for many things, because code-behind is still a decent way to preload content onto a page, and maintain a strict separation of concerns. I opt against MVC because while it does a better job at demystifying web architecture a little more and shedding some light on the reality of how it actually functions it breaks what I believe is good seperation of concerns. Ironically, I find it easier to implement a 3-tier system with Web Forms because I'll just shut off ViewState and work on the aspx pages exclusively for client-side functionality and the code-behind for server-side funtionality. ASP.NET has a dilemma now because by making the framework more accessible, they now have the problem of delivering more cutting edge technology to the developers that they have created. In addition to MVC, the AJAX toolkit is another example of this because it makes developers think that the client page is actually executing a Code-Behind method, when that's not exactly what is going on. I am not trying to dog on ASP.NET developers, but those who start learning how to develop for the web from the design view in visual studio have a much more difficult time learning how to make full use of web architecture because many of them have been trained in such a sterile environment that they simply won't know any better to try to research alternatives on their own.
This is one of those Holy Wars, and I understand why many consider MVC as being "better", though it is probably a poor choice of words. MVC is closer to how the web actually functions, but it still isn't a completely elegant solution for my tastes because server code still executes on client pages via inline scripting. In the end, only through fully understanding the technology that you are working on will you be able to be confident that you can create any application you are tasked with. And if you can do that, then it really doesn't matter which framework you choose. There is no right or wrong answer here. But when a co-worker tells me that a certain component "doesn't work with AJAX", I have to pause and remind myself that he is talking about Microsoft AJAX Toolkit, and not Asynchronous JavaScript And XML, because that statement would otherwise not make any sense. And that is usually enough to shed some light for me on what the overall weakness of Web Forms really is.
The true test: If you can make a web application with ASP.NET using only notepad, csc.exe and the DOS command line, then you are probably safe, and what you are doing is probably good enough for your needs. This is not to suggest that this is the best or most efficient way to implement an application, simply that if you can do that, then you probably have enough insight to determine what is the best technology for your needs.
rrrsr7205
Participant
1304 Points
313 Posts
Re: The stigma with Web Pages
Jul 06, 2012 11:06 PM|LINK
When he says "Web Pages" he is talking about http://www.asp.net/web-pages/overview.
Not being as experienced as the rest here, I can only add that I'd love to see a mashup of WebPages, MVC3/4, and VS LightSwitch. From what I can tell from my short time with VS LightSwitch, it goes a long way to addressing the behind-the-scene plumbing that could make a transition from a departmental app to a true enterprise app much less painful. MVC/WebPages provide different approaches to developing soutions. The ideal mashup of all three would be a killer dev app.
beetledev
Member
750 Points
173 Posts
Re: The stigma with Web Pages
Jul 06, 2012 11:22 PM|LINK
I think this is part of the issue with Web Pages' perception with developers. A lot of developers, even experienced ASP.net developers, have no idea what Web Pages is. If you look at the top of the asp.net site there is "Web Pages", "Web Forms" and "MVC". These are 3 distinct frameworks promoted by Microsoft that developers can use for creating web site apps. I think it also does not help that Microsoft for some reason decided to call this new framework "Web Pages".
As to the opening post. MVC is seen as the hot framework right now so anything else is perceived to be not as good by some. I don't think there is any way to change that perception. Whatever is the popular framework is going to be the one people promote the most. There are some reasons for MVC being popular. 1 - It was the first asp.net framework from Microsoft that pulled away from viewstate and embraced HTML/Javascript/CSS. 2 - Unit testing is built-in unlike other asp.net frameworks. 3 - It borrows heavily and resembles other MVC frameworks, most notably Ruby on Rails.
Personally I like Web Pages. I like the simplicity of it. I have never built any web app that I feel could not be done in Web Pages. It has the full .net framework behind it and is very flexible.
AceCorban
Star
12318 Points
2269 Posts
Re: The stigma with Web Pages
Jul 06, 2012 11:30 PM|LINK
Ah, I'll be honest, I have heard of Razor/WebMatrix and never really looked into it before. So most of my rant isn't specifically relevant to the question posed by the original poster. :-P
That said, this looks a lot like classic ASP interlaced with the concept of Actions from MVC. Not sure I like it, but for many of the same reasons I dont' find MVC particularly appealing. I'm just not a fan of seeing server code and HTML on the same file. Still, I would say this approach is definitely more inline with web architecture than web forms. But so was ASP. I would say I prefer MVC to these Web Pages, but more because MVC does lend itself to separation of concerns more.
AceCorban
Star
12318 Points
2269 Posts
Re: The stigma with Web Pages
Jul 06, 2012 11:35 PM|LINK
Yeah, I find it increasingly difficult to have generic systems architecture conversations every time Microsoft develops a new framework. :-P
I'm not going to hate on any one framework. In the end, if you can develop a system and meet every requirement, then the framework meets your needs. Everyone enjoys their own flavor of Framework, and I can see how this particular framework filled a void in the community. "Web Pages" might appeal to php folks as well, though I doubt any php fanboy would ever use a Microsoft system.
Mikesdotnett...
All-Star
154840 Points
19854 Posts
Moderator
MVP
Re: The stigma with Web Pages
Jul 07, 2012 08:42 AM|LINK
The whole purpose behind the introduction of the Web Pages framework was to make it easier for beginners to ASP.NET to get started. These "beginners" might never have done any web development, or they might be current PHP or classic ASP developers. Microsoft's research suggested that Web Forms and MVC both had relatively high "concept counts" which were proving to be a barrier to adoption to this target group. Web Pages is designed to offer a much lower concept count.
That doesn't mean that you should not use Web Pagess if you are experienced. You have the whole ASP.NET framework available to you so you can produce sophisticated and advanced work.
That is the real point behind the introduction of the MVC framework. It was designed from the ground up with testability in mind. If you need to write tests, use MVC.
Beginning ASP.NET Web Pages with WebMatrix | My Site | Twitter
rrrsr7205
Participant
1304 Points
313 Posts
Re: The stigma with Web Pages
Jul 08, 2012 07:59 PM|LINK
I agree with Mike. I am in the beginner camp. I have tried several MS silver bullets: Dynamic Data, NVC, LightSwitch, WebForms. In akk those cases, the concept "load" was pretty heavy (probaly not so with LightSwitch). Web Pages seemed pretty intuituve and enabled me to ease into the Entity Framework and appreciate its many great features. Adding the "load" of EF to the base load of the other frameworks would have scared me off.
MagianCreati...
Member
70 Points
68 Posts
Re: The stigma with Web Pages
Jul 08, 2012 09:07 PM|LINK
Thanks for all of the great responses.