Best mechanism to have rich form controls on web page (HTML) equivalent to windows forms - asp.net

I am working towards porting a windows application to web. The windows application is quite rich w.r.t. the form controls, complex validations and user interactivity.
Basic web forms are inadequate to meet these complexities. So I would like to know the best way to still have the richness on the web pages. I have some ideas and would like comments.
Use DHTML & Java Script to mimic complex controls. There are some macro controls available as part of jQueryUI that can be used and some other third party Java Script controls. I'd like suggestions if there is a recommended control library.
Use RIA (preferably Silverlight) wherever rich controls are needed. I'd like to keep this as a last option because it mandates the Silverlight plug-in.
What are other popular / preferred strategies?

If you don't mind a departure from .NET "controls", I'd try Ext JS. It is dual licensed GPL/Commercial so you'll likely have to pay for it, but the components are more robust than Telerik or the other .NET versions.

I would suggest that you also check out the tools from DevExpress (http://www.devexpress.com). I've used both Telerik and DevExpress and ended up going with just the DevExpress tools. Both companies, however, are top-notch and both have tools that can really enhance your UI.
With that being said, I would strongly suggest that you avoid the temptation to just port your fat client UI to the Web. That is, if you are just looking for web controls to take the place of your current Windows controls but otherwise leave the UI intact, you are likely to be disappointed. The web is a different kind of animal and people expect to use it differently. With Ajax, JQuery and the various specialty tools from a company like DevExpress or Telerik you can do amazing things on the web that are the equal of anything you may have done in your current fat client interface but they will be done differently.
Reasons for this advice? First, in my experience Windows UIs migrated to the web feel clumsy and inappropriate. The controls aren't the only thing that changes - the entire windowing and content flow models are different.
Second, if you are deploying to organizations outside of your own, you are likely to find that there is significant resistance to using any kind of plug-in - including Silverlight. We win business all the time because we've stayed pure web.
Third, to the extent that you try to build web apps while not really learning web development ethics and methods, you'll just slow down your eventual evolution to true web development experts.
Anyway - that's my $0.02.

We have had a lot of success with the Telerik controls for ASP.NET.
http://www.telerik.com/products/aspnet-ajax.aspx
They also have a suite of Silverlight controls.
http://www.telerik.com/products/silverlight.aspx
And for ASP.NET MVC.
http://www.telerik.com/products/aspnet-mvc.aspx
They are very easy to use and richly featured. The demos on their site should give you a good feel for the capabilities.

There was an article on Codeproject which covered converting Winforms to ASP.NET
Hope this helps.

Related

Microsoft mvc3 or ASP.NET Web pages for a new server-side scripter?

I have experience in javascript, html(Bronze certified), css(Gold certified), sql and xml(Bronze certified), and now have turned my attention towards server side scripting. I have little experience in php but have no Idea what to choose between MVC and ASP.NET Web Pages. I like all the features that ASP.NET Web Pages(Since I already new a little about server side scripting, so getting started was not that difficult and I know a few basic things.) have like, automatic form authentication among others but I seriously doubt that it can never be by-passed. Still, for safety I use my own algorithms against sql-injection and javascript codes. But, now I am confused what to learn, MVC or ASP.NET Web Pages. All the posts I searched on internet where for new programmers. Since I am not new they are no use to me. So what should I learn MVC OR ASP.NET Web Pages and why?
*English is not my native language, there may be some grammatical mistakes.
You are kind of asking what's the better option, apples or bananas. MVC is a pattern and allows you greater control over what HTML is sent to the browser whereas Web Forms has a great number of pre-made controls that do all the hard work rendering out html to the browser (but often less control of how it is rendered out)
It's also down to preferences, I personally prefer MVC as the unit testing and component nature of it give me great flexibility. Alternatively, using WebForms you can create some things quickly using drag and drop controls.
Hope that gives you a bit of useful info. I'd recommend reading up about both, and seeing which fits into your style of programming and go from there, but there's nothing stopping you learning and using both (just don't use them in the same project, lol)

Has anyone compared the ComponentOne ASP.NET AJAX suite to other libraries such as ExtJS

I know that the main draw to ASP.NET AJAX is the fact that you can build it nicely inside of Visual Studio and it is nice and easy. I am finding ASP.NET AJAX limiting, but I really like .NET and figure that a separate javascript library is probably the way to go for responsive apps that are easy to maintain.
I know that within the group (Dojo, ExtJS, MooTools...) there will be differences of opinion, but I am really curious to hear the results of effort and maintainability from people who have gone to or from the .NET component route. Thank you.
Edit:
This largely about ComponentOne's AJAX suite. I am new to ComponentOne, but have an opportunity to either embrace their library or push for something more appropriate. Our needs are customer facing and must be highly configurable. Many of our applications are reports while some are themselves application configuration tools.
Clay, if reporting is your focus then I would definitely go with ComponentOne. C1 has really powerful reporting tools in .NET and a pretty sweet report viewer in ASP.NET. C1's reporting tools can also use existing Crystal, SQL Server, and Access reports.
However, ComponentOne has been asking themselves the same question about server controls and JS libraries. So they built a completely stand-alone library called Wijmo. Wijmo is built on jQuery/jQuery UI and has over 30 widgets included in the kit. Wijmo even has rich data controls like grids and SVG charts that would would normally see in ASP.NET. It was originally built to be used in ASP.NET MVC as the UI layer. Here is a video on how to use Wijmo in MVC.
This same technology is being extended into the ComponentOne ASP.NET controls. So with choosing ComponentOne you will have both options based on the same client-side framework.Note that the Wijmo ASP.NET controls are still in the works and should be out in the summer of 2011.
My experience is that using ASP.NET AJAX controls, such as ComponentArt for example, tend to be limiting and force your design decisions. I have had much better success using pure JavaScript libraries for the UI Layer like jQuery/jQuery UI and ExtJS. Having the serverside render your JavaScript in the ASP.NET way gets complex when dealing with an advanced UI.

Silverlight or ASP.NET or both?

At the moment I am starting to learn Silverlight. I have expriences in ASP.NET and like the concepts of "Masterpages. Does Silverlight provides a similar concept ? I have read a little bit about the Silverlight Navigation Framework. Is this a good replacement for "Masterpages" ?
Makes it sense to combine ASP.NET and HTML (with Javascript) with Silverlight or is it more recommandable to design and write pure Silverlight applications ? Mybe in the ner future I will start to develop an intranet (business) application which will have many and complex user interaction (it should behave like a windows client applicion). I think Silverlight is the better choice than ASP.NET !? Makes it sense also to start to use/learn the WCF RIA Services immediatly ?
Are there good (VS) templates to start with Silverlight or which are a good basis / starting point for a new Silverlight application ? Unfortunately I am missing "Starter kits" on http://www.silverlight.net like the starter kits on www.asp.net !
Thanks in advance for your hints.
Silverlight and ASP.Net are light years apart technology wise, Silverlight is closer to Winforms programming than it is to ASP.net, event though it can be hosted inside an ASP.Net page.
To achieve "masterpage" type functionality, you can have a base control or page that you can inherit everything else from. Or you can have a page which acts as a shell and you can swap views in and out depending on the user's actions.
If you are writing an app from scratch, you can do the whole thing in silverlight. You can navigate from one silverlight control (hosted in an aspx page) to another aspx page (with silverlight controls in it), but there is a performance overhead when transitioning between aspx pages (they are web pages and need to be served). You should look to eliminate separate aspx pages if possible, and create it as one big silverlight application - if your application's functionality is all rolled into one application (not spread amongst aspx pages) then you can make the most of Silverlight's Out Of Browser feature.
However you should only consider silverlight if you are build web apps or interactive/streaming stuff. If your pages are going to be largely static (i.e. presenting product catalogs, or a site where the user just drills through from one page to another) then using silverlight would be overkill, you would be better off sticking with ASP.Net or ASP.Net MVC.
Masterpages does Silverlight provide a similar concept ?
Not directly but it does provide a variety of ways to acheive the goals of Masterpages. The navigation framework is mostly the sort of thing you would need to achieve the typical reason to use Masterpages.
However its also possible to achieve "masterpage" functionality more generally by creating a UserControl that has ContentControl instances at points where in ASP.NET masterpages you would have used a asp:contentplaceholder. These content controls would be bound to custom properties added to the UserControl. This completed UserControl can then be used as the "LayoutRoot" of another UserControl or Page. Note this does not require inheritence from the "master".
Does a combined ASP.NET and Silverlight app make sense?
Well thats a tricky one the answer really is, "It depends". There are way to many factors to give this a true answer. Factors:-
Is this a public app or an internal app?
How important are including rich UI features?
First time Silverlight dev will cost you, is your project able to absorbe that?
What client platforms do you need to support?
How might ASP.NET-MVC + appropriate use of JQuery size up against your requirements?
Probably others I haven't thought of yet
Is Silverlight is the better choice than ASP.NET when there are many and complex user interactions?
The phrase "complex user interactions" could mean a couple of things? Do mean complex to deliver with HTML and Javascript but simple for the user? Or is this a sophisticated app aimed at an expert user?
In either case its likely that Silverlight will start to come into its own here.
Does make it sense also to start to use/learn the WCF RIA Services immediately?
Yet again the answer depends of the type of application you have in mind. If its line of business app where data is searched, edited and reported on then (assuming you have decided to develop in Silverlight at all) definitely you should be looking at WCF RIA Services as well as the parts of PRISM that think are appropriate.
Other types of apps may not benefit from WCF RIA Services.
Are there good (VS) templates to start with Silverlight or which are a good basis / starting point for a new Silverlight application ?
There are no start kits at present. However I think you will find what you need amoung the various demos and tutorials on the silverlight learning site.
I've particular found the videos useful. If you decide to go Silverlight its well worth clearing a day or two to got through the relevent ones.
These are a lot of questions at once.
Yes, the Navigation Framework functionality is pretty much equivalent to the Master Pages concept. Even to the point that it is tracked in the URL when users navigate, so they can use the back and forward button of their browsers.
If you want to do a stand-alone Silverlight application or a hybrid pretty much depends on your requirements and on the type of application you want to develop. If it's a Line of Business application, you might be doing fine with Silverlight alone.
For a public, content/text-intensive website probably HTML with some silverlight gadgetry here and there might still be preferable.

Good design and good user interface ASP.NET Ajax applications?

I like to get inspiration from using web applications that make good use of new technologies. This time I would like to check out ASP.NET based web applications that make heavy use of Ajax & Ajax Toolkit for line of business apps (data bound controls like grids). I checked out some apps at CodePlex but didn't see anything cool enough.
Any recommendations? Preferably an app with source.
I don't think your going to find what your looking for easily. The AJAX toolkit lacks the slickness of the plugins of jQuery and other popular frameworks. If you are looking to be impressed, you may want to look elsewhere than the toolkit.
I'm not sure what framework it's build on, but I have been very impressed by the UI of MailChimp lately. They nailed it, so easy to use and elegant.

Using Silverlight for an entire website?

We need to build an administration portal website to support our client/server application. Since we're a .Net shop the obvious traditional way would be to do that in ASP.Net. But Silverlight 2 will be coming out of beta a good while before our release date. Should we consider building the whole website in silverlight instead, with a supporting WCF backend?
The main function of the portal will be: users, groups and permissions configuration; user profile settings configuration; file upload and download for files needed to support the application.
I think the main reason for taking this approach would be that we have good experience with WPF and WCF, but little experience in ASP.Net. Either way we would have to learn ASP.Net or Silverlight, and learning Silverlight seems a more natural extension of our current skills.
Are there any big no-nos from the experience of StackOverflowers? What are the big positives?
I would recommend against building a pure Silverlight site.
Silverlight suffers from the same issues as Flash does: Unintuitive Bookmarking, issues with printing, accessibility issues, not working back buttons and so on.
Also, you would require your users to have Silverlight installed or at least to have the ability to install it.
In controlled environements (eg. in large companies or health care) or on mobile devices, this might not be the case.
I would definitely go for a full Silverlight application, specially if you have good experience from WPF. You will be able to reuse your knowledge from WPF, and should be able to pick up Silverlight fairly quickly. I've been working with Silverlight since Beta 1, and the current Beta 2 is of solid quality. I guess it's safe to assume that a RTW version is just around the corner.
Pilf has some valid point, specially around printing. For that I would probably use SQL Reporting Services, or some other reporting framework, on the server side, and then pop up a new window with printable reports. For linking and bookmarking the issues are no different than any other AJAX application. I did a blog post today about how to provide deep linking and back-forward navigation in Silverlight.
Silverlight also has all the hooks needed for great accessibility support, as the UI Automation API from WPF is brought into Silverlight. I don't know if the screen reader vendors have caught up yet. The styling/template support in Silverlight makes it easy to provide high-contrast skins for visual impaired users if that is a concern.
Depends on your goals. If administration portal is part of application and will only be used from computers where your application is installed, there are plenty of advantages of going fully Silverlight - or even WPF.
But if you can see a scenario where it will be used either from random PC or by random person, fully functional HTML/Javascript version is absolutely necessary.
Some reasons are:
Most people don't have silverlight and you'll earn a good load of swearing if they have to download and install it. Some people who have it installed keep it disabled (together with flash and sometimes even images) to avoid distractions and speed up browsing.
When HTML site fails, user gets error page and reloads. When silverlight fails, it can hang or crash.
HTML is what is expected - both by users and web browsers: back and refresh buttons work as they should, hyperlinks and forms work as expected.
Slow internet is still very common, both in remote areas and mobile devices.
I agree with what everyone had said so far and I think this Flow Chart, which is aimed at Flash, also applies to Silverlight.
Source of Image
It sounds like your problem is that you need a rich-client admin application. Why not use click-once?
On the topic of remote andministrators, another poster stated that was an argument in favor of HTML if the admins were on a slow connection. I would argue that depending on the type of information, it may be more efficient to use Silverlight. If you have an ASP.NET datagrid populated with server side data binding, you can be downloading a ton of markup and viewstate data. Even if you're using an alrternative to DataGrid that's lighter on the ViewState, you will still have a lot of HTML to download.
In Silverlight, once you get the XAP down, which is probably going to be smaller than the corresponding HTML, the XAP is cached and so you shouldn't have that cost every time, and you'll just be retrieving the data itself.
For another example, let's say you have a bunch of dropdown lists on one of your forms which all have the same values in the list. In Silverlight, you can get these values once and bind them to all of the dorpdowns, in HTML you will have to repeat them each time.
This will get better with client side data binding in ASP.NET, which follows a very similar model to Silverlight and WPF for data binding.
Overall, I would also think that you would need to write less code for the Silverlight implementation which can increase productivity and reduce maintenace costs.
ASP all the way. You should only use silverlight/flash etc when text can't do what you want it to do - e.g. display video.
Using a plugin for your website makes it slow, and requires the user to have the plugin installed. Silverlight for instance rules out all Linux user. Also, since Silverlight is pretty new, there is no telling how committed Microsoft will be to keep the platform alive if it doesn't pick up soon.
I'd stick to plain old HTML with server side scripting.
Also, for public websites: Flash and Silverlight can't be indexed by any search engine, so good luck with writing tons of metadata if you want any visitors at all.
Silverlight is a good choice for an internal-facing portal, just as it would be for a public-facing portal if you've already evaluated your project and have decided to go forward with a web portal. You are free to integrate Silverlight components within an existing ASP.NET application (i.e. the "islands of richness") approach, but if you have the ability to build a new project from scratch, don't discount a completely Silverlight solution as a valid choice where you would have went with a traditional ASP.NET portal. Silverlight is RTW now, so if this decision is still on the table, you know you won't have to deal with breaking changes going forward.
There are some downsides with developing a site completely in Flash / Silverlight, but if those downsides won't matter to you or won't have an impact then there is nothing stopping you. Choose whatever tool you think meets your needs more fully. I wouldn't be put off creating a site purely in Silverlight based on the downsides, because it brings a lot more positives to the user experience.
The previous comments have dealt with most of the downsides of using Silverlight for a site like this and I agree. If you're determined to have rich-client style development and your audience is small (for admins only) then I'd probably recommend WPF over Silverlight as it currently provides a richer set of tools and controls.
If you stick with ASP.NET have you looked at Dynamic Data - it's ideal for building backend management sites with little effort.
I've seen "Silverlight only" websites at Microsoft and they are pretty impressive. But again, the demos were there to exploit the full potential of what Silverlight can do. The moment you need something different you may be out of luck. I don't see Silverlight like Flash except in the way they are installed/seen. But the Flash/ActionScript backend is really bad compared to what Visual Studio can offer with .NET
Ask yourself why would you like to use Silverlight? Fancy effects or programming model?

Resources