Thursday, April 23, 2009

In Praise of Multi-Boot

I use a tool named System Commander to allow multi-booting. I recently ran into an interesting reason why multi-booting is very useful. I have heard comments that virtual machines make multi-booting almost unnecessary. I disagree. I have a PC that I upgraded numerous times. It started out as a 486 to give you an idea of how long I have had this. I don’t think anything is left of the original Gateway 486. As disk drives became less and less expensive I copied the images of the operating system over to new drives. I configured the system with three separate operating systems: Windows 2000, Windows XP, and Windows Server 2003. Using System Command the computer normally boots up into Windows XP but I have the option of booting up into old Windows 2000 or into Windows Server 2003. On a side note, when I boot up Windows 2003 I then run VMware server and have several VMs. Sometime last summer, the sound out of the system started to act a little strange. There were pops, clicks, and stutters when playing music on Windows XP. I believe two different things causes issues with the sound system. First the sound card may have started to die. Second, one of Window XP innumerable updates may have cause the problem. True to form, the sound completely died. I swapped out the sound card with another slightly different one. After reinstalling the drivers on all three operating systems, I have great sound on two of them: Windows 2000 and Windows Server 2003. But Windows XP still has pops, clicks, and stutters. This means the problem is not with the sound card, but with Windows XP. It does not solve the problem, but it eliminates one possibility. Besides being able to switch operating systems, System Commander has the ability to repartition many disk formats. It is interesting that only Windows XP is affected. I considered installing Windows Vista. But I did not have the disk space.

Monday, April 20, 2009

Converting Campaign Cartographer Files to XAML

ProFantasy created a program named Campaign Cartographer. The program allows the quick creation of very high quality maps for role playing type of games. I was working on a logo for the company I am trying to start. I wanted to create a Silverlight XAML file for the logo. I knew that Campaign Cartographer could quickly and easily create a piece of the Logo. Now for the challenges in getting that file into XAML. Campaign Cartographer has only a limited number of vector output options. I could easily create a bitmapped graphic in a variety of formats, but I wanted to stay in the vector space. The logical place to start is as a Windows Metafile (.wmf or .emf). I exported the metafile and tried using one of the freeway tools EMFtoXAML. This produces basically produces an empty file. EMFtoXAML does not support any of the drawing commands used by Campaign Cartographer. I then tried reading the .emf file into Adobe Illustrator CS 1 (the most recent version I own). The result is very low quality. My next step was Corel Draw 12 (the most recent version I own). Again, the result was awful. I gave up on .emf files. Now to try another vector format: AutoCad .dxf. Now the fun begins. The current release of Campaign Cartographer is version 3. On my system, Campaign Cartographer 3 crashes when trying to export a .dxf. I then fire up an old PC that has Campaign Cartographer version 2 installed. This program exported the DXF without problem. Then went back to Adobe Illustrator CS 1 to try and import the .dxf file. Again, Adobe Illustrator did not render the import usable. My next step was back to Corel Draw 12. Corel Draw 12 imports the .dxf. The result of the import into Corel Draw is not perfect. The import removes most but not all of the color. At least the outline is clean. Corel Draw can export an Adobe Illustrator file or .ai file. I installed the preview version of Expression Blend 3.0 from Microsoft. Expression Blend 3.0 is supposed to be able to import Adobe Illustrator files and create XAML. I fired up Expression Blend and created a Silverlight project. Expression Blend disables the menu options to import an Adobe Illustrator file when you create a Silverlight project. After fumbling around for a while I tried creating a WPF project in Expression Blend. That allows importing Adobe Illustrator files. I did some searching on the web, and nothing mentions you can only import Adobe Illustrator into WPF projects. I tried importing the Adobe Illustrator file created by Corel Draw 12. Expression Blend 3.0 Preview says it cannot understand the file and cannot import it. I then go back to Adobe Illustrator. I open up the file created by Corel Draw in Adobe Illustrator and save the file back as another .ai file. It is interesting to note the Adobe Illustrator's default name for the file adds the word "[Converted]" to the file name. I open Expression Blend 3.0 back up to my WPF project. Finally I can import the .ai file and the image appears in Expression Blend. The colors are gone, but at least I have the XAML file I can work with. I hope that someday ProFantasy will add the ability to export data directly into XAML.

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.