Wednesday, April 8, 2009

Windows Forms versus Web-Based Technology

A friend asked a question: "I have a question...curious about what you know about web-based system architecture design. Specifically, use of Windows Forms (.net framework) versus Frames Technology." The short answer to your question is web-based systems run inside a browser, and windows forms based applications run as applications on your PC. But things are a bit more complicated. Web-based systems use a variety of standards: HTML, XHTML, XML, and CSS. Developing a web based application requires testing on a variety of browsers (Internet Explorer, FireFox, etc.). You can access a web-based systems can from mobile devices like a BlackBerry, iPhone, and so on. Because they run in a browser, web based application also run on Macs and other operating systems besides Windows. In general, web based systems do not need to be installed on the computer. To run a web based application you just open up the browser and point it to the URL for the application. The downside is that Web-based systems have limitations on what data they can store or access on your local computer. A well designed web based application allows changing the "skin" of the application easily. Someone can change the colors, fonts, or layout used in an application without the need to recompile or reinstall the entire program. You must have a connection to the network for a web-based application to run. The phrase "software-as-a-service" or SAAS is usually associated with web based applications. Web-based applications run from a server. Changing the application on the server changes the application for every user at the same time. Windows forms based applications only run on a PC. You must install windows forms based applications. This means the application can take full advantage of any hardware you have on your PC. The application can access and store data on your local hard drive. To change the fonts, colors, or layout of the application usually required a new build of the application and a new install. (There were tools to support "skins".) Things are ever more complicated. Technology continues to innovate. Windows forms technology is old. Microsoft replaced Windows forms with Windows Presentation Foundation or WPF. Another name for this technology is Silverlight. WPF makes it easy to change the graphics, layout, fonts, and colors used by an application. This technology allows developers to use a component based development methodology. Developers just click and drop the components they need on the form and connect them. Another name for component based development is rapid application development or RAD. Customization of the application to make it look pretty no longer requires a developer. By the way, this was a huge issue at one company I worked for. I remember one project where the developer finished the functionality of the application in about two weeks. Then the developer spent the next nine months continually changing the colors, fonts, and layout to make the application pretty enough. (I used to get into nasty arguments about the time wasted on changing the colors, fonts, and layout.) Silverlight applications run inside most browsers. The server (or servers) must be up and running twenty four hours a day, seven days a week, three hundred and sixty five days a year for Web-based or Software-as-a-service based applications. If the server or network goes down, everyone is down. You install windows based applications on each PC. If the PC is working the application usually works. However, if the application requires access to a database, then the application only works if the database server is up and running. The biggest headache to windows based applications is the release of new versions of the software. Technology continues to change. Perhaps the best example is the game World of Warcraft. This is an application you install on your local PC that talks to a set of servers. World of Warcraft automatically installs new versions when you log in. The game won’t run if you don’t have an Internet connection. World of Warcraft uses your graphics card to the max. Performance of the game is generally limited by your PC and not by the server. This does put a bit of a strain on some network connections. If you need to make the decision on which technology the first question is: "will the individual computers always have a connection to the network and/or Internet?" If the answer is "no", then in general you want to stay away from a web-based solution. (I did manage a project that embedded a web server inside the application, but that is a complicated solution.) If the answer to that question is "yes", then you need to think about the type of computers each person who runs the application has. If you have a combination of PCs and Macs, then you should go with a web-based solution. If one of the stakeholders places the esthetics of the application very high, then go with a web-based solution. If you plan on changing the application frequently, it is easier to change a web-based solution. On the other hand, if you need to get performance out of the local PC, go with a windows based solution.

No comments: