I am having trouble finding a clear answer on this one. I have an ASP.NET 4.0 Silverlight app, but recently a ton of users are complaining about not being able to use the site on mobile devices and Linux distro's. The app is built on MVVM architecture, and thus we are considering changing the UI to alleviate the complaints. We are leaning toward HTML5, but I'm not sure if this is even technically possible with ASP.NET 4.0. I've seen some posts saying that HTML5 only works with javascript code behinds, and that with ASP.NET 4.5 HTML5 support will be added. Am I understanding this correctly? Maybe it would make more sense to just go with an ASPX UI, what are the advantages of HTML5 over .ASPX? Any help is appreciated.
HTML5 is a set of client-side technologies.
ASP.Net is a server-side technology.
They have nothing to do with each-other.
However, it will be easier in ASP.Net MVC.
You would replace what is currently in the Silverlight plugin that runs in the users browser with some html and javascript instead.
It is not technically possible with ASP.NET 4.0. ASP.NET certainly needs the upgrade in order to handle any HTML5-producing code behind or 'plug-ins.' I second the notion of ASP.NET MVC. Also it seems you are comparing a car to gasoline when you ask the advantages of HTML5 over ASPX.
HTML5 works in conjunction with Javascript on the client side. You can still use ASP.NET to process data and deliver content server side. Here are some quick links.
http://visualstudiomagazine.com/articles/2011/09/01/pfcov_html5.aspx
http://mvchtml5.codeplex.com/ (I know it's mvc, but it might be helpful regardless.)
I'm really surprised where somebody telling that all the C# code of the ViewModel and xaml code behind replace with Javascript . Is is possible ? Where in MVVM architecture code are huge and all are responsible for higher task(like communicate with service layer or database).
Is it possible to convert all C# code in JavaScript.
Even I have seen if a JavaScript function take over 25 lines than it becomes some clumsy fro developer to understand . Simple or small functionality can easy develop with javaScript .
C# is very standard and object oriented language ,to develop LOB it has great role but Javascript is not too much .
I'm think Using asp.net mvc is nice to use HTML5 , see we just need to change UI page look using HTML5 but rest of application functionality should remain Same .
Related
I have been looking into HTML5 and I am really excited to try it out.
As a framework I would like to use ASP.NET MVC, but I am unsure how it works with HTML5.
Are there (i know there are, but not sure if they are good) any good HTML5 toolkits for ASP.NET MVC? Basically i would like some pointers where to start with creating a page with rich HTML5 controls using MVC + some pros and cons from your experience.
Anyway I am willing to ditch PHP and start with MVC if the HTML support is there... I have C# skills and I understand the MVC pattern.
With best regards, no9.
MVC and HTML 5 don't really have anything to do with each other so you can use any framework you want, its all about the program.
And Visual Studio 2012 supports HTML 5 you should install a extension for VS called "Web Essentials 2012" for the best support for HTML 5.
For a good startup you can also check html5boilerplate out.
I hope this helps getting you started.
I wrote an HTML5 toolkit for ASP.NET MVC that you simply add to your project that will give you the functionality that you need.
Once you have added the library to your project, you can use it in your View like so:
#Html.Html5TextBox("txtOne", InputType.Color)
Which will return a textbox element that looks like:
<input type="color" id="txtOne" name="txtOne">
There is loads of support for many other HTML5 input types - for more information, check out the blog post.
I know very little HTML or web dev, but I would like to write an
HTML5 app with a fairly complex UI. Is there a framework that stands
out among the rest for this type of job? Do I need a framework; or can
I just do everything in straight HTML+CSS+JS? And what about GWT?
Thanks!
As a general HTML5 starting template, Boilerplate is always a good choice.
It will optimize and chain all your scripts and CSS files, as well as your HTML code and images, it also comes with useful tools like Modernizr.
If you are looking for JavaScript libraries, YUI is a very good library when it comes to UI, though maybe a little more complicated than jQuery or jQuery UI at first. I found it better than jQuery UI, and can work together with jQuery anyway.
EDIT
You may also be interested in Ext JS. Looking at the demo it provides, seems really like a powerful library with many ready to use UI widgets. Never used it though, and looks like it only offers a commercial license.
I suggest you to use Html5-boilerplate.
Download from github
Video Tutorials from author :
http://www.youtube.com/watch?v=qyM37XKkmKQ
http://www.youtube.com/watch?v=OXpCB3U_4Ig
GWT is a good way to go for a complex web application, particularly if you're familiar with java but not javascript. GWT now provides support for HTML5 features such as offline storage, canvas, audio, and video, although it's possible to use any HTML5 features whether GWT provides specific Java classes to support them or not (I implemented the offline storage feature in one of my apps before it was part of GWT). Using GWT will mitigate many of the browser compatibility problems you will encounter with straight HTML+CSS+JS. Although you write in Java, it's still important to be familiar with HTML, CSS and JS, since the java is compiled to js.
I need to develop a web application, i have two choices
mvc3 straight forward implementation
using HTML5
i want to know whether HTML5 can be used as part of .net web application architecture or not?
Reasons:
there is no official support of HTML5 server controls like
Now IE 9 was launched but how good it supports HTML5
I found in internet that there is installation for HTML5 helper, but how reliabale it is?
I need guidance on the HTML5 and .net and if any tutorials in this combination.
Thanks in advance
Standards are based on implementation, not invention. If Microsoft wants to wait till HTML5 spec is finished, they will be waiting a long time. Meanwhile, modern browsers have implemented large portions of the spec and are moving forward.
With that in mind, how can one expect ASP.NET to contain elements of HTML5 and related technologies if Microsoft doesn't believe in its usage right now? In our small business, this is the reason we would never use it.
Microsoft always argument that HTML5 isn't fully finished. Then ASP.NET cannot be totally rewriten to follow it. Makes some sense, but...
You can do it by yourself: http://stephenwalther.com/blog/archive/2011/01/11/building-an-html5-app-with-asp-net.aspx.
But I realy believe that ASP.NET MVC is more flexible to it task.
Your question is pretty open-ended. What do you want out of HTML5? If you're just looking for controls, you run into a roadblock that ASP.Net web forms won't render the new HTML 5 input types with placeholders and custom keyboards like URL Input, Email input canvas, etc. I made an open-source project to make these plug and play with Web Forms.
If you're looking for other parts of the spec, pay special attention to whether or not the markup "fails gracefully". If you can optimize the experience with HTML5, but still keep a baseline quality for older browsers, I say go for it!
I have a couple of applications for clients that were dragged into the web kicking and screaming. I'd like to take a crack at moving some to Silverlight 3.0 if even just as a proof of concept exercise. I'd like to see if I could make them full apps, layout and all. I think the layout of the web app along w/ the graphics is good and don't want to lose that aspect.
Which leads to my question, are there tools to convert existing HTML/graphics to Xaml? I'd rather use SL 3.0 navigation and not embed Silverlight xaps on every page as I would have to do w/ an ASP.NET MVC / Silverlight type solution.
Thanks.
I asked a related in spirit question after doing some research I can pretty confidently say no. There are some tools for Silverlight 1.0 and 2.0 you can find with a simple google search ( terms: html to xaml converter) but nothing specifically for Silverlight 3.0
The xaml exporter for Infragistics may be helpful if you've used Fireworks to design your sites, if not you may be out of luck.
Having just gone through this (existing ASP.NET to Silverlight 3), I’d recommend against any attempt to automatically convert the layouts. With Silverlight having a very discrete set of controls and layout mechanisms compared to ASP.NET I’d be very surprised is any tool did a neat translation. Tools for auto-generating code (be it XAML or HTML) tend to create pretty sub-optimal syntax (Expression Design -> XAML comes to mind). If you were successful, you’d still need to consider the entire data access pattern which will also drive the structure of your XAML.
I work with C# at work but dislike how with webforms it spews out a lot of JavaScript not including the many lines for viewstate that it creates.
That's why I like coding with PHP as I have full control.
But I was just wondering how this sites HTML is so clean and elegant?
Does using MVC have something to do with it? I see that JQuery is used but surely you still use asp:required validators? If you do, where is all the hideous code that it normally produces?
And if they arent using required field validators, why not? Surely it's quicker to develop in than using JQuery?
One of the main reasons I code my personal sites in PHP was due to the more elegant HTML that it produces but if I can produce code like this site then I will go full time .net!
One of the goals of ASP.NET MVC is to give you control of your markup. However, there have always been choices with ASP.NET which would allow you to generate relatively clean HTML.
For instance, ASP.NET has always offered a choice with validator controls. Do you value development speed over markup? Use validators. Value markup over development speed? Pick another validation mechanism. Your comments on validators are kind of contradictory there - it's possible to use ASP.NET and still make choices for markup purity over development speed.
Also, with webforms, we've had the CSS Friendly Control Adapters for a few years which will modify the controls to render more semantic markup. ASP.NET 3.5 included the ListView, which makes it really easy to write repeater type controls which emit semantic HTML. We used ASP.NET webforms on the Microsoft PDC site and have kept the HTML pretty clean: http://microsoftpdc.com/Agenda/Speakers.aspx - the Viewstate could probably be disabled on most pages, although in reality it's only a few dozen bytes.
You were on the right track. It is the fact that they are using the ASP.NET MVC web framework. It allows you to have full control of your output html.
The ASP.NET MVC Framework is an alternative to the normal "web forms" way of doing ASP.NET development. With it you lose a lot of abstraction, but gain a lot of control.
Yes - MVC doesn't utilize the ASP.NET view state junk.