I'm working with my ASP.NET development team to try and create "better" (i.e. cleaner) HTML when rendering pages. At the moment, .NET has a nasty tendency to do things like dump JavaScript into the page, making it a mandatory requirement on form controls and not allowing forms to work when JS isn't available. In some instances, we're struggling to overcome this without having to add a notable chunk to development time estimates.
I've worked with MVC before - via Struts in Java - and found that in that instance, I was able to keep HTML pages exactly as I'd wanted them to be. (This viewpoint is based on the "best case" static HTML I typically developed beforehand, then handed over to the Java programmers to fill in the holes.)
This worked out really well and we were able to produce some of the "best" web pages from a CMS that I've seen. Could .NET MVC give me the separation I need, or would it be a false economy to put aside valuable development time to test this?
If .NET MVC isn't going to give me this fine-grained control over separation, any recommendations for .NET coding practices, libraries, etc. which might would be really helpful.
ASP.NET is a free web framework for building great websites and web applications using HTML, CSS, and JavaScript.
Separating css styles in separate files make the cachable. So, it affects the page load time too (also decrease the more page load times by minifying the css). Readability: huge HTML files are a bad sign itself.
CSS and HTML are best kept separate so that the CSS is uniformly accessible to all pages on a site, not just the document it is included in. Integrating CSS into webpages is an inefficient way to style a site.
It is a development mindset and languages that you have to know in order to be "a . NET developer". Although it can be used for desktop applications, . NET is heavily used for web development; in that case you do need to know HTML, CSS and a few other things to complete any project.
The ASP.NET MVC Framework would give you a much more familiar separation. Because there is no viewstate, etc in the MVC Framework you won't have to worry about JavaScript being dumped into your pages. The only JavaScript calls you see will be ones that you manually add.
You can, for the most part, separate HTML / CSS / JS like you would in a different framework.
Depending on the view engine you're going to use. yes.
But you can easilly check this by looking at the page-source for stack-overflow. It's not zen-garden but it's pretty clean.
Some more clarification:
The rendering of the pages is done by the view engine. You can use the standard view engine or existing ones like nVelocity or Brail, just like with monorail. http://www.chadmyers.com/Blog/archive/2007/11/28/testing-scottgu-alternate-view-engines-with-asp.net-mvc-nvelocity.aspx
As the view engine is responsible for creating HTML what comes out depends on your choice. But most view engines are better in this respect than vanilla ASP.Net
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With