ASP.NET MVC - Is Creating a Browser UI Any Easier?
I've not spent much time in the last 3-4 years doing much browser development. So I'm a little behind 开发者_如何学Gothe times in this area. I'm curious if ASP.NET MVC makes developing complex browser based screens/forms any easier? In the past, the thing I hated most about developer browser apps was hard tedious it was creating screens/forms.
Without pointing out the obvious, you are still working with HTML/CSS and all of the inherent limitations that come with that.
MVC really just provides a more controlled method of passing data around your app. In that respect it's easier to manage data, but it's still being rendered in HTML/CSS.
I haven't built a massive application on the scale of SO, but in my small apps, it still comes down to HTML/CSS.
The MVC 2.0 adds a whole bunch of stuff that makes building forms easier. For example take a look at EditorFor and DisplayFor.
http://davidhayden.com/blog/dave/archive/2009/08/21/HtmlEditorForScaffoldColumnAttribute.aspx
MVC 2.0 also brings form validation using code annotation. You decorate your model properties with attributes from the System.ComponentModel.DataAnnotations namespace and that is uses to build validation rules.
None of this makes it quite as "easy" as WebForms to build forms, but then you don't get stuck with all the old WebForms baggage either.
uh it was a little too easy before with webforms. you're not gonna like that aspect of MVC much...
It's more on the server side where the whole MVC side of it comes into play. Personally I find it simpler when creating AJAX intensive UI's, as hooking up actions to a javascript call seems a bit simpler, but in general, web UI development is what it is.
As an aside - if you don't like creating web UIs (and it's not everybody's cup of tea) - can you structure your team so that you're doing more of the server side code and get a UI developer to run up the front end stuff?
In my opinion it is a lot easier. For one thing we have much better client side javascript frameworks that helps a lot. And with asp.net mvc you don't have to worry about annoying server controls, you will instead have complete control of the html and javascript.
As above, nothing has changed. You still create HTML and CSS, the biggest gain is in using Javascript and Ajax to improve user experiance.
This is very subjective based on your personal experience and what exactly you mean by "complex browser based forms".
If you've been behind in web dev the last few years, then regardless of what route you take, you have some core HTML/CSS/JS stuff to catch up on because that ultimately where the UI gets worked.
精彩评论