Jerry Nixon on Windows: Choosing between WebForms and WinForms

Jerry Nixon on Windows

Wednesday, May 31, 2006

Choosing between WebForms and WinForms

I presented on “Securely Accessing Data from a SmartClient” at Microsoft DevDays a few years ago and have loved SmartClients ever since. SmartClients are WinForms solutions that act like WebForms. Back then (.NetV1.1) WinForms had a lot of problems but .NetV2 fixed most of those issues.

My current project is a SmartClient and I was recently asked to elaborate the decision points to choose between WinForms and WebForms. This isn’t gospel and it isn’t comprehensive, but it is something. The only take-away I want to make sure to impress is that neither WinForms nor WebForms is always the right choice.

Start with philosophy:

The software first principle is user experience. It really is, and it should be with you.  Security, design, and function are subsets of the user experience. Developer preference does not choose technologies, the user experience does. Ultimate application success occurs at the time of user acceptance, an illusive attribute fully unassociated with developer preferences.

“The business” is the users, not IT, not the maintenance developers – no one else. Applications are written for “the business” and for “business.” Remembering the heart of the matter brings success knocking at your door.

User experience is strongly influenced by 1) ease of access 2) response time 3) interface richness and 4) application functionality. Contrary to developer common sense, these qualities are most impacted by a solution’s architecture and not its technology.

Architecturally, there are few distinctions between WinForms and WebForms. Each has presentation tiers, business tiers and data tiers. Each requires UI design, security strategies, access plans, and deployment approaches.

Technically, there are many distinctions between WinForms and WebForms. WinForms offer a smaller developer community, rich UI components, multi-threading operations and deployment problems. WebForms offer a broad developer community, rudimentary components, asynchronous operations and simplified deployment.

Operationally, there are some distinctions between WinForms and WebForms. WinForms are rich, fast, and full of functionality. WebForms are not as rich, not as fast and not as functional. WebForms, however, offer the most familiar environment for typical users.

Usually WinForms are best for 1) internal applications 2) data entry 3) offline operations and 4) real time data monitoring. WebForms are best for 1) multi-os desktops 2) regularly changing applications 3) high-traffic system and 4) desktop users without installation privileges.

Web technologies like AJAX have dramatically improved WebForm performance and component fidelity. Development advances like ClickOnce and web services have considerably reduced deployment and firewall issues with WinForms.

The ultimate decision must target the user experience. Rich interfaces and offline operations demand WinForms. Simple deployment and common interfaces demand WebForms. But, if these don’t drive the decision, ironically, it falls to … developer preference.

The upside of developer preference is it contributes to cheaper, easier maintenance and can positively impact initial development costs – not that developer effort or project cost ever trump user experience.

Anecdotally, web-based applications are typically driven by outdated corporate strategies to web-enable the enterprise. Take it from the perspective of an architect/developer; it is common (not always) to realize (deep in our hearts) that a WebForm solution would have been better as a WinForm solution.