Porting Windows Forms app. to VWG
January 24, 2008 :: 19802 Views
programmer and spent most of my time working on business logic and not on GUI.
A week ago, I began working at Gizmox. After a few hours, they gave me an open source
task management application developed by Microsoft and asked me to convert it into a Web application using Visual WebGui. It was a medium-sized application, comprised of one main form and 13 dialog forms. The main form contained a toolbar, menu, data grid view, splitters, status bar and some data entry controls. I opened the Gizmox Web site, clicked the Quick Start link and started to watch the videos.
After 5 or 6 demos, I understood the concepts and I was able to start programming. I was able to copy and paste most of the business logic from the original application. After 3 days I had completed most of the application, without giving any thought to the Application and Session objects and all that other Web programming stuff.
I had two tasks to complete before I could finish the application. I had to use a graph object and a Microsoft Xpander, a collapsible container object that came with the application. I used a Visual WebGui wrapped ZedGraph control, available on the VWG Web site, to display the graph. I had to study some samples on the Web site about developing Visual WebGui gateways. A day later, I had a graph on my application.
The second task was incorporating the Xpander control. I watched the ‘How to create a custom control’ video on the VWG Web site. Guy suggested I use the Visual WebGui WinPanel control as a template to create this control, since they are very similar. I copied the .CS and .XSLT files from the Gizmox.WebGUI.Forms.Catalog.2.0 project, added a couple of events to the CS and replaced the image references in the XSLT. In one day, I had a new, very cool control.
I have to say that if I had built this application in ASP, it would have taken me months. If I had to develop the application again, now that I know how to work with Visual WebGui controls, it would take me only a day or two. As a developer you must remember that you are developing a web application, some things must be kept in mind. When I created the "About Form", I left the System.Diagnostics.Process.Start("MSInfo32.exe") line of code in the button "System Info" event handler, and it worked because I was running the application locally. But generally, the client and server run on two separate machines. In this case, since the event handler runs on the server, this EXE would open on the server every time a user pressed the button and the user would not see it .The point is that I forgot that I was developing a web application because it felt so much like developing a application.
Initial user & password:
Note: Codes are submitted as a .zip file to shorten your download time. After downloading it, you will need a program like Winzip
to decompress it.
Terms of Agreement:
By using this code, you agree to the following terms...
- You may use this code in your own programs (and may compile it into a program and distribute it in compiled format for languages that allow it) freely and with no charge.
- You MAY NOT redistribute this code (for example to a web site) without written permission from the original author. Failure to do so is a violation of copyright laws.
- You may link to this code from another website, but ONLY if it is not wrapped in a frame.
- You will abide by any additional copyright restrictions which the author may have placed in the code or code's description.