While porting a windows application to web, is it better to stick to conventional web technologies or adoping RIA is wise? - silverlight

The web based application I am working on currently is a port from a windows application. This application is very data intensive. There are scores of modules and each of these modules have number of forms (data entry screens) and reports whereas the forms have many many fields and likewise the reports.
I have been trying to identify the most suitable architecture for the presentation tier. There are many functions that are not very easily portable, for example printing (this too is very complex). For most of the others, I am planning to us "Ext JS" library which looks like capable of handling about 70% of complexity out of the box while for the remaining I would be custom coding or extending Ext JS.
Having said that (sorry for being so descriptive), I wonder, if this is an Intranet application, why not port the entire application to SilverLight? While I am good at .Net, I'm somewhat alien to SilverLight. Considering I know my target audience and that the software will be used per seat license, would it be better to ride on SilverLight or is it better to stick to conventional web (XHTML, JS, CSS, etc)? Further, I have to support multiple devices in future and considering that SilverLight plug-ins for many devices are yet not out, would it be a risk?

IMO, if you are developing a web application, then yes, develop it as an RIA.
The choice of technology is up to you. I prefer jQuery and have never used ExtJS. But I've taken a look at it, and if your aplication is a port of a windows application and has a lot of conventional UI elements like forms, input boxes, toolbars, menus, button etc, then go for ExtJS.
As for some controls that are not available in ExtJS, you can easily extend ExtJS.
Regarding .NET: ExtJS is completely server-technology agnostic, so you can develop your application in .NET and still use an ExtJS UI. In fact, I would prefer to do such an implementation.
Regarding Silverlight: I am slightly against using silverlight, primarily because it requires a plugin to be installed that is not available on all platforms. But since your application is an intranet application, your user base will be in your control. But you should make sure that any future decision regarding the workstation platform will not affect your application's working.
Cheers

Whether to use Silverlight over HTML/JS etc. in this case would depend on 2 key factors.
What are you familar with already
What type and range of devices you need to reach.
If you are already comfortable with HTML + ExtJS then that has to be huge pro in its favor.
The range of devices that Silverlight is possibly going to be available (Windows Phone 7 for example as well as Moonlight, I've even heard that there may be port for Andriod and Symbian) is growing. However its really early days for that and not all may materialise in a form useful to you.
Having said that it should be acknowledged that a UI designed for use on desktop does not work well on a small device. Hence you would need to develop some task specific UI for other devices regardless of the technology you use. This in turn means that there is no reason for you to try to stick with single technology for all devices.
I think you should look very carefully into WCF, REST and OData first. Good layering of the application into useful models using these would more easily enable the use of a variety of front-end technologies for the client.
If you are into .NET and other Microsoft tech then you should seriously consider using JQuery and ASP.NET MVC as another potential front end technology.

I think that you need to ponder the inconveniences of a solution based solely in Silverlight. Like Flash it needs a plugin to be installed in every station, so it loses some of the premises of web applications (run everywhere with the only requirement of a browser). Besides although Silverlight has taken great advances, it is not yet a widely supported standard, and it is in control of a company who later may decide for you in very important matters regarding the platform you use, and made it outdated or useless (in the worst case).
Ext JS is a great library developed entirely in Javascript, so you can touch anything that suits your needs. If the Windows applications you are basing on is well-layered, then your work may not be that hard.
If you are an asp.net developer you could take a look on asp.net mvc, a great set of tools that implements MVC pattern to web applications using the same old C# or VB. Besides the developers behind asp.net mvc, have taken a lot of work to make it suitable to work with javascript libraries like jQuery
Happy coding!!!

Related

Toolkit options to write a crossplatform mobile app in 2012?

I'm currently investigating the alternatives for crossplatform development for Android and iPhone (Windows 8 could be a nice addition). The app is basically a "map with an asociated app", and certainly not a game.
Searching here I see many outdated advice and tools from 2010/2011, but since then Apple has changed their policies and surely new things have appeared.
My current list and light research (might have facts wrong) is:
Monotouch/Monodroid: .NET (Mono) framework. Create "native" apps on both platforms. Requires rebuilding UI code (or similar things).
Appcelerator: Javascript framework to compile native apps.
Corona: Similar to Appcelerator.
Phonegap: Similar idea, but looks like it uses a wrapper to appify HTML5 content
SenchaTouch: Another HTML5 based platform.
Wink: Yet another HTML5 toolkit.
XVLM: Android to ObjC compiler, probably creating ugly iOS apps.
Unity3D: For games only.
Moai: For games only.
So, there are three main ideas, with some frameworks implementing each, it seems to me:
Have an abstraction layer over native iOS/Android code and build for each platform using the provided layer. (Monotouch, Unity3D)
Use HTML5 (coding in Javascript) and some kind of wrapper to "appify" the web content. (PhoneGap,Sencha,Wink)
Code using a framework that will output as a compilation pass (or similar) a native app for each supported platform (Moai, XVLM,Appcelerator,Corona)
The questions:
Is there a fourth idea I haven't yet found?
Is there any blatant mistake in my research for any of the specified frameworks?
Is there any known problem for map integration with any of these ideas or specific frameworks?
Only a partial answer:
Ad 2. Appcelerator / Titanium is more than just HTML5. I read this pretty extensive comparison between PhoneGap and Titanium the other day on Hackers News. I found it very informative. The link points to the HN comments, the link to the actual article is at the top.
My main experience is with Mono for Android and MonoTouch, so I can't personally speak much to the other options. I personally find it to be the best option there is, as it allows you to share a large amount of your code across the platforms (even extending to non-mobile platforms if you stick with .NET), while still allowing for a 100% native UI, which is extremely important. If you're looking for resources on getting started, I have this video which discusses approaches and libraries for sharing a lot of code across platforms, and also this book which covers the same thing, but also expands to talk about how to do things like store data, use maps, access the network, etc.
I also want to mention MonoGame, which is absent from your list. MonoGame is an open source XNA implementation that sits on top of Mono to allow you to target iOS/Android/Max OS X.
From what I have experienced, if you want to have a native app go Mono, if you don't need native go PhoneGap. Native is best of the UI is very important, ie games or fairly graphical apps. But from business type app, CRUD, Phone gap works well.

WPF or ASP.NET MVC for UI for an expert business application?

I know this question was asked before, but almost 2 years have passed and the business requirements are a little different.
We are in the beginning of developing a mid-sized application and are divided which technology to use for the front end, WPF or ASP.Net MVC 3?
We are not an IT-company, but a business company with an IT-department who can outsource programming tasks, while the business core shall remain within the company. I did spend a lot time searching the internet for the answer, and I partially did succeed, but since the question is so important, I thought I ask here as well.
Of course, before someone can answer the question I need to specify the requirements and environment for the application at stake:
Infrastructure:
We have a pure Windows environment. Each user will have either Windows XP SP3 (currently) or a future version of Windows (if we skip from XP to Windows 8 remains to be seen, but let us assume that the user will use Windows 7 next) installed.
We are aiming for a service oriented architecture, meaning we only want to run/show on the client machine what is really needed. This is especially important since the databases are far away from the clients (USA/Europe). We plan on using WCF for cross machine communication between user system (brower or WPF), application and database server.
We expect the main user group to be around 30+, but since we are a growing company there should be no issue scaling up to 100 users. The users are spread over three main locations over the world, while we want the option to support smaller locations as well. All those locations are connected to the same intranet.
UI Experience
The new system is supposed to replace existing systems which are desktop applications (Winform). The number of screens are likely to be around 100+ with many labels, comboboxes, graphs. I like to call it an expert system b/c we expect the user to spend multiple hours a day with it, the user is expected to do interact fast with it (many clicks, multiple dialogs pop-up and close etc.) and the application will contain a lot of business logic (mostly mathematically).
Some limited interaction with Excel is required. At this stage only importing formatted data out of .xlsx file into the application in order to work with the data. This we expect to happen often.
Copy&Paste from Excel or other applications into our new application is a requirement (no pictures, just text).
We will use a vendor control library for a richer UI experience.
The users are used to desktop applications for their daily work (current systems/Excel etc.).
Tablet or smartphone support is not a requirement.
Deployment
If we were to use a WPF application we would likely either deploy it in CITRIX or use Click-Once.
Here are arguments of the two opposing factions:
Pro Web:
Deployment is much easier. All the requirements can be done in a web application directly, and if not we use ActiveX or make a separate desktop application for the missing parts. Also, the IT world is going to stop doing pure desktop applications and everything is moving to HTML 5 (Windows 8).
Pro WPF:
Web applications use many different technologies which makes it more difficult and costly to develop and maintain (HTML, ASP.NET, CSS, JavaScript, JQuery, AJAX). There are major deficiencies in a web-applications, mainly
Considering the various browsers and versions.
Screen resolutions
No hardware support for graphics (business graphs, point graphs with 200+ points)
Restricted access to local hardware (importing files, creating files, printing)
Keyboard shortcuts
Point #1 is also worrying since the browser is more out of control since other web-applications in the company (not expert systems) are used, and we fear conflicting interests with the new application (e.g., we must use a browser version where ALL applications run/render fine).
I know there is no black and white on this, but I would be interesting in the following:
Who was in a similar situation and how did they solve it?
(there is a nice article at http://karlshifflett.wordpress.com/2007/12/20/reasons-for-choosing-wpf-over-aspnet-for-very-large-project/, but the problem is that the article is 5 years old :(
How much more expensive is a web solution?
For development assume that the programmers are equally skilled in both (we can outsource this). For maintainance assume that we will internally support this where we have limited knowledge in ASP.NET and WPF. We know WinForm/WCF using C#. We would have to train/learn either technology.
How easy can a web application do Excel interaction, printing etc.?
I read a lot about "ActiveX hell" and I am wondering where we stand today?
Deployment
I have used Click-Once quite successfully in the past, although some team members mention that Click-once can be an issue. Any experiences?
Future?
The system is supposed to last 5+ years. We can not target HTML5 at this time (WinXP only up to IE 8). Where does Windows 8 stand on this?
Other thoughts?
What important things am I missing?
Thank you!
I know this entry is long and not an easy question. So I think you for reading and thank you even more for constructive feedback. Thank you!!!!
I would not build a business application in WPF, especially if your goal is to have it last for 5+ years. Silverlight is in sunset phase now - Win8 apps are betting on JavaScript and HTML5 now, though you are correctly noting that HTML5 support is not universal across all browsers and platforms (see http://caniuse.com/)
Let me try and address some of your concerns above to hopefully persuade you to build a web app:
Considering the various browsers and versions. Yes, you would have to do that. However, for enterprise applications most of the time you can find an acceptable solution if you use industry-standard web technologies and don't use esoteric HTML5 stuff that is not universally supported. It won't be a slam dunk, but it is very much doable.
Screen resolutions. You can address this by utilizing what is commonly known as Responsive Web Design. Once again, there is broad community and industry support for CSS frameworks that allow you to achieve responsiveness. YUI and Bootstrap come to mind as two examples.
No hardware support for graphics (business graphs, point graphs with 200+ points). Well, here is where HTML5 Hardware Acceleration may help you, but I'd say that libraries like HighCharts can easily handle 200+ points graphs - see this example
Restricted access to local hardware (importing files, creating files, printing). Fair point. I'd argue that working with files is MUCH easier with things like Socket.io, Filepicker.io and Zip.js, but "enterprise" requirements may get in the way. And as for printing, you can create "printable" version of your pages or generate PDFs and Excel Exports on the server side. Not ideal, but very much workable.
Keyboard shortcuts. Have you used Gmail app? It is full of shortcuts and keyboard-based interactions. This applies to any application - if you need keyboard interactions, you'd have to build them regardless of your choice of WPF or Web

Creating a Business Type Application Using Silverlight 3 - Is it Appropriate?

I'm considering using Silverlight for a business type application which will contain probably a dozen or so screens. The screens will contain data entry forms with edit fields, grids, lookups, calendars, etc. Typical business application type screens. I want this to run in the browser but don't want to mess with HTML, JavaScript, CSS etc. Is Silverlight 3 appropriate for this type of application? Can someone build professional level business type apps with Silverlight 3?
#Randy Minder,
Glad to hear that you want to use silverlight 3 for line of business application.
I used to develop line of business applications in ASP.NET combined with javascript/AJAX. I am currently developing my first silverlight 3 line of business application and found silverlight is better in few departments. The following are the Pro/Cons observed by me PERSONALLY.
Pros
Layout/Styling(CSS)
XAML + silverlight 3 styling is very flexible and less cluttered when compared to CSS. I am not a designer and I hate having to deal with CSS. But in the case of silverlight, I really enjoyed creating the mockup,layout & styling. The end result is awesome. This is the first application that I developed has decent & consistent look & feel. I hope you will also find silverlight xaml to be easier to deal with.
Rich Interaction & Language support
I used to use Ajax, javascript for creating rich interaction experiences like populating some data dynamically when user interacts with UI. Writing some complex UI logic in Javascript is daunting. Though there are some nice javascript libraries like Jquery, I think writing UI complex logic in C#/VB.NET/F# is much easier than to write it in javascript. Dealing with rich interactive controls in silverlight is much easier than with javascript/ ajax controls. Writing server communication code with WCF or WCF RIA service is far easier than with ajax calls.
Browser compatibility
Each browser is different from another in one or the other way, like some browser supports something and others dont. Having to deal with browser differences in javascript is also a pain. Silverlight being a plugin doesn't have to deal with browser differences. No problems dealing with layout engine differences too.
Animations/multimedia
Ofcourse with line of business applications we will not use toooo much of animations/multimedia. However we can use small animations like menu popup, sliding controls, fading transitions for when data changes etc. These are very easy to implement in silverlight than with asp.net/javascript
Validation
Validation support in silverlight is awesome you can write more validation logic in less time.
Popup messages
Popup messages are very clumsy to deal in ASP.NET and sometimes I need to store some information in hidden fields to feed text for popup messages. Hidden fields are used as javascript & ASP.NET interaction components which are difficult to maintain and end up with more code.
Good separation of presentation & model
Though you can separate these layers in ASP.NET also, silverlight enforces this by design which is good. In my team there are few developers who dont want to put effort on separation of the layers. Unfortunately they are the seniors in age and decision makers. I always hate to deal with their spaghetti code. Not to say that I am a better developer than them, I always put some effort to separate the concerns and try to learn how to manage my code. ASP.NET webforms doesnt enforce separation of presentation & model by design. Where as silverlight enforces this by design and my life became easier.
Cons
Clipboard
Users are very much used to copy the content available on ASP.NET/HTML page. Most of the silverlight 3 controls doesnt support clipboard out of the box. The only control I know that supports out of the box is textbox.
Database Communication
Database communication in ASP.NET is easier & direct communication is possible. However silverlight being client side technology it doesnt have direct access to database and a necessity of creating an additional tier is mandatory. Though WCF RIA services make the development of this additional tier easier, still WCF RIA services is in beta as of now. Though I am mentioning it as disadvantage, I did not really feel it is as REAL disadvantage because creating a WCF service is not that difficult.
Client side resource usage
Though cost of hardware reduced alot,client side hardware resources are not unlimited when compared to server side. At my work place, though PC provided have decent configuration, most of the users open lot of applications simultaneously which is required to accomplish their day to day tasks. Silverlight uses client side CPU/memory. Some of my users are complaining that the application I developed is using more CPU/memory than the asp.net equivalent. So if your users have slower PCs, consider ASP.NET or design your silverlight application more carefully.
One may say installing silverlight plugin as disadvantage, I did not face the problem because my application is a intranet application and all users installed silverlight with a single email request.
These are MY experiences with silverlight 3. The only major issue I faced was clipboard support in silverlight, I hope MSFT will address this soon.
All in all, silverlight ROCKS!!! Silverlight 3 is ready for enterprise and if you can wait for few more months Silverlight 4 will be released which has even better support for line of business applications. I dont want to develop ASP.NET applications anymore, that doesnt mean that I will quit using ASP.NET, I will use it only when necessary. I fell in love with silverlight and for a good reason. Designing part of the website is the one I used to hate most but with silverlight designing became one of my favorites.
I hope that silverlight 3 will help you in your decision making.
Absolutely. Take a look at this post about the Vancouver Olympics:
http://csharperimage.jeremylikness.com/2010/02/vancouver-olympics-howd-we-do-that.html
That's just one example of a business application in the "real world" being used to drive a massively complex operation. I posted that just to draw attention to the "business" side of Silverlight, but be sure to click the link to the original post to see the other partners and contributions to the project.
I've been building enterprise/business applications with Silverlight for over a year now. So the answer is an emphatic "Yes, you can" and "Yes, it's been done" and "Yes, it's been done on a large scale with large companies, and very successfully."
I agree #Jeremy. Make sure to use RIA Services with Silverlight , You will get a very manageable/maintainable application. Even one more benefit is that you can make the SL app Out of browser too.

Why would a developer use Silverlight?

I know virtually nothing about Silverlight. I'm considering creating a browser based app and really don't know if it should be built using Silverlight or ASP.NET (which I am familiar with). I'm curious as to the reasons why a developer chooses to use Silverlight.
Thanks very much.
ASP.NET and Silverlight aren't comparable.
Silverlight is a client-side framework, comparable (perhaps) only to Adobe's Flash while ASP.NET is a server-side framework.
You use those in conjuction, not one instead of the other and they're not connected in any way.
There are a few reasons you may want to consider using Silverlight:
You have a need for great looking and
interactive web applications (that
are not Ajax, jQuery, etc.).
You want to utilize your current
programming language (VB.NET, C#,
etc) skills.
You want your "web app" to be
available out-of-the browser.
There are other reasons - have a read: Top 10 Reasons to Use Silverlight. There can be a signifcant ramp you would need to make, but once made, you may prefer SL for certain things over ASP.NET and even in some cases, not really have option available to you in ASP.NET, like, for example, perspective transforms of images that can be animated from user interactively.
If you are building something that requires lots of UI interaction, and is reasonably non-static with its presentation then i would suggest Silverlight.
If you are doing (relatively) simple UI (i.e. tabular based presentation of data like clients and orders) with not too much UI trickery then i would suggest that you stick with ASP.NET.
Having done both, i find that Silverlight kicks butt when it comes to doing complex UI stuff, or you need to eliminate callbacks and postbacks to the server.
Reuse .NET code and skill on the client browser.
Achieve high performance.
Use Silverlight if you want a flash type site without using Flash. If you want to use the .NET stack Silverlight is the way to go to do what flash can do.
Silverlight was originally known as WPF/E. It is a light version of Windows Presentation Foundation, designed for the web and embedded devices.
But yes, you can think of it as Microsoft Flash.
You could also try using web standards also, sprinkled with some Jquery and Ajax, with maybe Modernizr to use html5. What do you need to do with this exactly?
Because it's the only option for third party software development on the upcoming Windows Phone 7 platform. (OK, also XNA, but that's for games)
Oh, and they also use it on the Web for some reason.

What are the topics to ramp-up on when starting Silverlight\Web development?

I've been asked to do some work on an existing Silverlight project, mainly extending it a bit and doing bug fixes as needed. But there are a couple of ASP.Net pages too and a WCF service to deal with too. My background is desktop development with .Net so I think this is a good opportunity to start getting more involved in Web development.
So I'm trying to figure out what background knowledge I need for a project like this. Clearly I need to get familiar with Silverlight, but I'm not sure what other Web technologies, etc I need to ramp up on for this project. Obviously I would like to know as much as possible but in reality with limited time and resources I really need to focus on what I important in the near term for this project. Then expand my knowledge as things arise.
The things I'm thinking that are important in the immediate future are:
The basics of Web Development (I'm thinking this might be the most important\fundamental area to build a good foundation)
But what are consided the basics?
What is technology\language independent?
What is important for Silverlight?
The basics of ASP.Net (since there is some ASP.Net code)
What are the basics? ASP.net seems so huge, I have a 1000+ pg book here which seems daunting.
If you focus on Silverlight is knowing ASP.Net important, or is ASP.Net something I will continually run into?
How does ASP.Net MVC fit into the overall development picture and especially as related to Silverlight?
The basics of WCF
As compared what?
Any suggestions\comments on the list above?
What other topics\technologies will I run into if I continue doing Web development?
Note: Beyond this project I would focus on the Microsoft stack.
Generally speaking the amount of knowledge of ASP.Net you need to do Silverlight development is very very low.
Silverlight applications are hosted in a browser, usually via the <object> tag. This can sit on an asp.net page or a html page. The Silverlight template creates that for you, so you can forget its there and just get on with the Silverlight app.
Of course if you are integrating into an ASP.net environment (for example, islands of Silverlight sprinkled through an ASP.net site) then thats another thing. There are ways to get Silverlight talking to the HTML dom via the HTML Bridge but its not necessary. Really depends on what you are developing and integrating with. (new site vs existing)
I avoided ASP.net for as much as i could as the richness compared to desktop (WPF) just wasnt there. Silverlight changed all that. Its a Rich world on the web now!
Best place to start learning Silverlight is www.silverlight.net on the getting started part of the site. great Quickstarts and tutorials there.
Good luck
Only cursory knowledge of traditional web technologies (css, html, js, etc.) are necessary for silverlight development. As a consequence, you also don't need to understand the many cross-browser dependencies as well.
Here is my list of things that you must get a really good understanding of to be proficient at Silverlight development:
Understanding WCF (the Silverlight-supported parts) is essential. It can be a configration nightmare, but once working it is pretty stable/ reliable
You need to understand serialization used by WCF and how to debug the mysterious 404 errors. Get good at Fiddler and/or Firebug.
You must understand multi-threaded applications and how do debug them. Silverlight makes extensive use of threading to not block the UI thread. This creates numerous opportunities for race conditions that create what appear to be "magical" results. That said, it is incredibly powerful and IMHO one of the dominant reasons to use Silverlight.
What you learn about serialization and WCF will ultimately help you cache some data in IsolatedStorage. Learn about IsoStorage, it will reduce our bandwidth requirements and cost and improve your user experience
Learn about Linq - again this is one of the most powerful features of Silverlight. Combined with a smart client-side caching strategy you can offload lots of processing to the client.
Figure out how you going to support printing. SL3 does not at all and you will need a server side component. SL4 beta does, but it is not go live
Understand the Silverlight Roadmap as much as possible and plan out your roadmap to match/ sync with it as best as possible. I first built a SL2 app and I spent a lot of time building things by hand that were ultimately released in SL3. As it is getting more mature, there is less of this.
Download the Silverlight Toolkit and use it. But more importantly examine the source code, the structures, its build process. There is not better real world place to look for inspiration & best practices.
Good luck.

Resources