ASP.Net or WPF (C#)?

asp.netWpf

asp.net Problem Overview


Our team is divided on this and I wanted to get some third-party opinions.

We are building an application and cannot decide if we want to use .Net WPF Desktop Application with a WCF server, or ASP.Net web app using jQuery. I thought I'd ask the question here, with some specs, and see what the pros/cons of using either side would be. I have my own favorite and feel I am biased.

Ideally we want to build the initial release of the software as fast as we can, then slow down and take time to build in the additional features/components we want later on. Above all we want the software to be fast. Users go through records all day long and delays in loading records or refreshing screens kills their productivity.

Application Details:

  • I'm estimating around 100 different screens for initial version, with plans for a lot of additional screens being added on later after the initial release.
  • We are looking to use two-way communication for reminder and event systems
  • Currently has to support around 100 users, although we've been told to allow for growth up to 500 users
  • We have multiple locations

Items to consider (maybe not initially in some cases but in future releases):

  • Room for additional components to be added after initial release (there are a lot of of these... perhaps work here than the initial application)
  • Keyboard navigation
  • Performance is a must
  • Production Speed to initial version
  • Low maintenance overhead
  • Future support
  • Softphone/Scanner integration

Our Developers:

  • We have 1 programmer who has been learning WPF the past few months and was the one who suggested we use WPF for this.
  • We have a 2nd programmer who is familiar with ASP.Net and who may help with the project in the future, although he will not be working on it much up until the initial release since his time is spent maintaining our current software.
  • There is me, who has worked with both and am comfortable in either
  • We have an outside company doing the project management, and they are an ASP.Net company.
  • We plan on hiring 1-2 others, however we need to know what direction we are going in first

Environment:

  • General users are on Windows 2003 server with Terminal Services. They connect using WYSE thin-clients over an RDP connection. Admin staff has their own PCs with XP or higher. Users are allowed to specify their own resolution although they are limited to using IE as the web browser.
  • Other locations connects to our network over a MPLS connection

Based on that, what would you choose and why?

I am especially interested in hearing from developers who have experience with both ASP.Net and WPf.

asp.net Solutions


Solution 1 - asp.net

Reasons to choose WPF:

  • Much faster and easier development than ASP.NET and jQuery
  • Much easier to implement quick incremental background loading of data
  • Much easier to implement client-side caching of commonly used data (important for remote offices)
  • More efficient data transfer from server (can use advanced WCF features unavailable to web browser)
  • Keyboard navigation better, since you can easily define shortcuts, etc, and not be limited by browser
  • Maintenance overhead much better using MVVM pattern
  • Softphone integration easy

Reasons to choose ASP.NET and jQuery:

  • None that I can see

In your scenario I would definitely choose WPF.

Solution 2 - asp.net

First of all, I would sit down and write the business requirements and specifications. It really doesn't matter what tech you use - proper planning will affect your project timeline more than technology choice. This is especially true for an in-house custom built app.

As far as development, I would take the requirements and lay out the backend functionality. I would actually implement the backend in WCF, regardless of the client technology - that way you could use best of both worlds if needed (for example for phone integration you could write a stand-alone WPF app). ASP.NET with jQuery can easily use WCF services (JSON or XML version) together with desktop client.

As far as development of the client forms, this highly depends on developers experience and your future plans. I am not going to go into advantages/disadvantages of developing web software here - there are a ton of articles in the last 10 years about cloud/web based software (for example salesforce). I would rather concentrate on deliverables - what is your team most comfortable with today and in the future. There's a huge difference between WPF and web development, from development standpoint, and it requires completely different experience.

Solution 3 - asp.net

Why not consider a hybrid solution - Silverlight

With Silverlight you get most of the goodness and statefullness of WPF (with almost exactly the same XAML and code), plus you get the deployment characteristics of ASP.NET

Many people consider Silverlight the next step after ASP.NET/AJAX, and it would definitely deliver all of the benefits of WPF relevant to your scenario.

Solution 4 - asp.net

WPF is the way to go, without a doubt. I agree with all that @Ray Burns has said.

Because:

  • You will get a richer, slicker, faster application.
  • It will be easier to build1.
  • Softphone/Scanner (i.e. hardware) integration is going to require browser plugins etc. and this can be a nightmare with a browser based application.
  • Keyboard navigation is still better with native applications.
  • IME Maintenance is easier with WPF applications.

Definitely use WCF to provide the backend via The Entity Framework, see The Entity Framework In Layered Architectures. You can do have a better integration with the backend in a native application because it can be called inline - no need for callbacks or ajax. I've built components for WPF that are linked via EF to the business logic to provide aware controls for simple stuff like validation. It's stunningly good to drop a customer name field onto a form and it just works.

To add additional components you need to build it with a proper well thought out plugin architecture. This is the same in both environments. I've got some thoughts on this I jotted down in my journal entitled Designing a plugin architecture for an application

When building a WPF application you will be writing in one language (e.g. C#) + markup (XAML). When building asp.net you endup with two languages + markup, as you always have to code some Javascript.

So, based on your requirements it has be to WPF / WCF (EF). A web based application will be a lot more work, more complexity, and not be as nice.

About 12 months ago I was fortunate enough to be given a free hand to choose the technology for a new application. I spent almost a month evaluating all of the options and came to the conclusion that it had to be C#, WPF, Entity Framework. After writing the application I can confirm that it was the right choice...


1. It will still be easier even if your programmers have to learn WPF first. WPF is much better thought out, great and lovely. very lovely. It just works right.

Solution 5 - asp.net

I think The question at issue is Windows-application or Web application(WPF for win-app VS asp for web-app), Which one is better for you and your project?. In this case your platform is network and your program must work on the net. so for this usage Web-app is better but there are a lot points existing which can make decisions hard. Network platform has great challenge.(according to my personal experience)

Working with web-app by asp.net is nearly hard. you must try to handle many thing's for web-app(request time, session management, even poor UI in comparison to WPF, j-query, etc ). Remember this is not as easy as simple web site.

But win-app is good for network with this condition: "local network"(mpls is almost the same). Absolutely developing win-app is easier than web-app ("At least number of users expert in net-program developing"). for this case WPF has many good things(UI , command, etc) also has many challenging point(like multi-threading and lack of expert developer in this field ) . I'm rather with wpf than asp but decisions is yours

And chalk point to good thing Silverlight but if you want to use this you must look at prism framework : http://compositewpf.codeplex.com/
I have recently developed a project separately with asp and silverlight(prism framework). developing silver-light version is too hard and takes more time than asp.net version but at the end SL-ver have great look nothing else!

Burns pointed to good issues about wpf. also consider Artemiy's post. your environment conditions is same for both of them. WPF/ASP can work with scanner and soft-phone cuz the base of both is on C# and .net library
Finally what ever your decisions is you must hire advance developer at least develop one business-app for the network platform.

Solution 6 - asp.net

Is your app a desktop app or web app.

If Desktop wpf is best. If web based asp.net is best.

Don't front load your development with your get it up quick scenario. That never works well and results in a sloppy deployment. Take your time, cover all the steps (Business Requirements, System Design, Program Design, Code, TEST and TEST some more, Deployment)

Solution 7 - asp.net

Some points to be made for ASP.NET:

The pool of ASP.NET developers is much larger then the pool of WPF developers. Which means you can probably find qualified ASP.NET developers easier.

ASP.NET is probably more future proof, chances of WPF getting large changes and being hard to port to later versions is probably larger. Also keep in mind that the focus of MS seems to be on Silverlight so there might be a consolidation down the road which makes WPF obsolete.

More mature eco system of ASP.NET makes for more out of the box solutions to use to solve problems.

With multiple locations you might be able to skip a few layers and go directly to a website?

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionRachelView Question on Stackoverflow
Solution 1 - asp.netRay BurnsView Answer on Stackoverflow
Solution 2 - asp.netArtemiyView Answer on Stackoverflow
Solution 3 - asp.netDean ChalkView Answer on Stackoverflow
Solution 4 - asp.netRichard HarrisonView Answer on Stackoverflow
Solution 5 - asp.netRevView Answer on Stackoverflow
Solution 6 - asp.netrobertoView Answer on Stackoverflow
Solution 7 - asp.netMischa KroonView Answer on Stackoverflow