What is best way to convert desktop app to web app?
-
Thanks again, ely_bob! I have quite a few tabbed-dialogs and wizards. What do you think of the idea of a webpage that aligns those vertically so the user work their way from the top down? There's a notepad replacement app that does that, and it looks really cool. (Of course, that app is a desktop app ha ha ha) Regarding the separate solution for the UI, do you mean separate project or separate solution completely? Either way, I guess the code in the form would look something like (air-coding here):
Public Class WizForm1
Private m_UI_Handler As SomeUIHandlingProject
Private Sub Done_Click (e,sender) Handles btnDone.Click
m_UI_Handler.WizForm1_Handlers.DoneClick
End Sub
End Class____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
modified on Thursday, July 22, 2010 5:35 PM
well Personally I hate to do more vertical scrolling then absolutely necessary... I'd recommend either a presenter approach (the page reloads with what you want to present) or use a layout similar to what you describe, and use
tags to hide/show just "like" you would be doing in a tabbed document(this makes layout easier and I prefer the
approach because it is a lot more straightforward.) If the wizard is a fundamental part, you may want to treat that as a flash app(however I am not familiar with these approaches), that way you can take control of the entire screen, grey out the background browser, and have a specialized solution just for your wizard. and this would be plug-able into your webapp...so... I meant a one solution with ~3 projectss, a library(or folder of libraries), and 2 UI: winforms & webapp. then if you want to make some kinda mobile app down the road you can just add it to the solution, and add some dependencies and probably reuse a lot more code that way...
I'd blame it on the Brain farts.. But let's be honest, it really is more like a Methane factory between my ears some days then it is anything else...
-
MatrixDud wrote:
A well developed .NET desktop app should be easily ported to ASP.NET
I'd love to get some more comments on this. With SL, WebMatrix, Ajax, and a whole confusing array of other stuff that is all "newer" than ASP.NET, I hesitate to jump into an ASP.NET project unless it is really the best way to go. For example, has MS produced good-looking controls for ASP.NET? If ASP.NET "had it all", why did the world need Silverlight? (The comment about calculation-intensive is not a concern for my app, though. It's more about interactivity between server and client. E.g. The user clicks a button on the UI and this causes the server app to control a piece of equipment interactively.)
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
Silverlight is Microsoft's answer to Adobe Flash. You could write applications in it, but ASP.NET is the preferred solution. ASP.NET 3.5 is modern and does have quite a few nice controls. What doesn't exist you can make. You can always buy pre-made custom controls from vendors to save time. If you are familiar with .NET then there will not be much of a learning curve moving to ASP.NET. You should investigate and get familiar with AJAX. AJAX avoids the constant page refreshes and can make a web application feel much more like a desktop app.
-
peterchen wrote:
why is there such a huge gap?
Please elaborate on what you mean by gap, since that is probably a question that needs answering.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
Moving an app from desktop to server, everything changes: We have different frameworks, different libraries, different tools, etc. Even if you say I want to write an app that runs both standalone and on the network, where do you start? Where is the mini browser that you can just point to a folder of php/asp/aspx files, without having to configure a port? (Silverlight makes the first attempts at running locally, niiice. Still, the straightforward experience is not yet there.) .NET has tons of serialization code, database adapters, ORMLINKVOODOO, and whatnot. But where's the library that lets me write a local app, or I enter an URL/network path and BLAM! Everyone in the office sees and manipulates the same data. (SQL compact seems to compact closest to this. For which the IDE integration still needs a magic command line roundtrip to make it work). Why, as a developer, is my first decision for a product whether it should be "web based" or a "rich client"? Why as a buyer, is obe of my first decisions whether I want a "rich client and shuffle around documents", or "something thatruns on our local web server, and I need the nerd squad to install"? I don't say it's impossible, but once you realized there are a lot of applications that you can try out and start with locally, and might to make available to everyone in the department later, it seems unecessarily hard.
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server. -
GAP? I'm not sure what you are referring to when you say 'gap'. I am assuming you mean why did they make such a big JUMP from all server side based stuff to forcing you all of a sudden to a totally separated model? I am not sure if there was any other way it could have been done gradually. If I am not understanding you then let me know.
Ray Cassick wrote:
I am assuming you mean why did they make such a big JUMP from all server side based stuff to forcing you all of a sudden to a totally separated model?
Yes, basically. See also my other reply[^].
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server. -
I work alone, and I have developed a huge desktop app, probably a quarter million lines of code, that has evolved for well over 10 years. I keep thinking it would be nice to convert it to a browser UI, but have watched many technologies go by, like asp, ajax, and now there's webmatrix, and sometimes I wonder whether I should take the leap, or whether it may cost me another 10 years to rewrite it for the web. It uses .NET remoting, and is multithreaded, so wcf and parallel programming come to mind as well. Fear promotes a lack of action, but knowledge defeats fear, so I thought I'd submit this general question to the "big team" out there in the code project universe. :)
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
Moving an app from desktop to server, everything changes: We have different frameworks, different libraries, different tools, etc. Even if you say I want to write an app that runs both standalone and on the network, where do you start? Where is the mini browser that you can just point to a folder of php/asp/aspx files, without having to configure a port? (Silverlight makes the first attempts at running locally, niiice. Still, the straightforward experience is not yet there.) .NET has tons of serialization code, database adapters, ORMLINKVOODOO, and whatnot. But where's the library that lets me write a local app, or I enter an URL/network path and BLAM! Everyone in the office sees and manipulates the same data. (SQL compact seems to compact closest to this. For which the IDE integration still needs a magic command line roundtrip to make it work). Why, as a developer, is my first decision for a product whether it should be "web based" or a "rich client"? Why as a buyer, is obe of my first decisions whether I want a "rich client and shuffle around documents", or "something thatruns on our local web server, and I need the nerd squad to install"? I don't say it's impossible, but once you realized there are a lot of applications that you can try out and start with locally, and might to make available to everyone in the department later, it seems unecessarily hard.
Agh! Reality! My Archnemesis![^]
| FoldWithUs! | sighist | µLaunch - program launcher for server core and hyper-v server.All great points... I may point you here[^] for a possible solution. The newer versions DO Offer an Out of the browser experience. I think it started slightly in V3 but has been 'fully' implemented in 4 and is going to be a focus going forward. From here I think the lines between the online and offline experience [platforms is going to start getting blurry.
-
Thanks very much d@nish!
d@nish wrote:
You can use use WCF but do not think of replacing remoting with that
It sounds like you have had a problem that leads you to this conclusion, am I right? My app is heavily using remoting. I was under the impression that WCF was supposed to do everything remoting does. Also, could you please expand the acronym, SOA, I'm not familiar with that. When you mention "work flow", I assume you mean using visio or similar. Again, thanks for taking the time to provide such a thorough reply.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
Sorry for the late reply.
BobishKindaGuy wrote:
It sounds like you have had a problem that leads you to this conclusion, am I right?
No. All I am saying it do not restrict it to remoting. If you rewrite things as a web service, your application will become network independent. You can then very well use it with clients in other technology as well.
BobishKindaGuy wrote:
Also, could you please expand the acronym, SOA, I'm not familiar with that.
It is Service Oriented Architecture. Maybe a quick read on MSDN would help understanding.
BobishKindaGuy wrote:
When you mention "work flow", I assume you mean using visio or similar.
With .Net 3.0 and above, we have Workflow Foundation. It suites if your application deals in business processes. Something like leave approvals where you have a series of dependent activities happening with human interventions here and there.
-
I work alone, and I have developed a huge desktop app, probably a quarter million lines of code, that has evolved for well over 10 years. I keep thinking it would be nice to convert it to a browser UI, but have watched many technologies go by, like asp, ajax, and now there's webmatrix, and sometimes I wonder whether I should take the leap, or whether it may cost me another 10 years to rewrite it for the web. It uses .NET remoting, and is multithreaded, so wcf and parallel programming come to mind as well. Fear promotes a lack of action, but knowledge defeats fear, so I thought I'd submit this general question to the "big team" out there in the code project universe. :)
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
I recomend you take a look at visual webgui. Im not a very experienced programmer, i previously wrote some code for various projects in visual basic, I tried to learn web based technologies includeing ASP.net php etc, but got frustrated with all of them. I have used visual webgui 6.4 now for a couple of months to create a web based data driven application. I have found that i can use the knowledge and undestanding i had of forms based development but create a very powerfull web based application, and still have the familliar visual studio development and debug experiance. I dont need to understand session states etc. The resultant application is very fast and bandwidth friendly and requires no client plugins. I looked at it in earlier versions and it still had issues that meant it wasn't ready for production application deployment. I can say that the number of issues now are small and most can be worked arround. the resultant application is very stable and easy to deploy. the forums are good and any questions get answered very quickly in my experience.
-
Thanks for your interest, for your customers the solution sure will work but you have to take into consideration the cost of the server and the TS webgate certificates, so if they only want to access their own workstations there are a couple more solutions they can do including using the teamviewer, anyway you can try it without paying anything first by downloading a trial version of windows server 2008 R2 and implement the TS service and apply a temp certificate for free and if it worked as you like then buy it you can find detailed info about TS and remoteapp and their step by step implementation here http://technet.microsoft.com/en-us/library/cc753844(WS.10).aspx[^]
Thanks,nazmolla. Your suggestion is very useful, since it shows a way to work with the existing desktop application rather than rewriting it for the web. This is not the direction I wanted to explore in the original question, but of course, sometimes we need to look at the bigger picture to evaluate what is the best direction.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
Sorry for the late reply.
BobishKindaGuy wrote:
It sounds like you have had a problem that leads you to this conclusion, am I right?
No. All I am saying it do not restrict it to remoting. If you rewrite things as a web service, your application will become network independent. You can then very well use it with clients in other technology as well.
BobishKindaGuy wrote:
Also, could you please expand the acronym, SOA, I'm not familiar with that.
It is Service Oriented Architecture. Maybe a quick read on MSDN would help understanding.
BobishKindaGuy wrote:
When you mention "work flow", I assume you mean using visio or similar.
With .Net 3.0 and above, we have Workflow Foundation. It suites if your application deals in business processes. Something like leave approvals where you have a series of dependent activities happening with human interventions here and there.
Thanks again, d@nish, I have considered a webservice in the past, but to create a responsive interactive experience such as is possible with two-way remoting, would be difficult with a webservice, since the client would be "pinging" the webservice way too often. Or maybe others have achieved that... It certainly would simplify things though. Thanks for the clarifications on SOA and workflow foundation. I'll look into that.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
My thoughts, if you find them useful. While the technical aspects are important, you also need to consider the business aspects. In general people pay less for things over the web, but you probably have access to more potential customers. So it depends on your market size, how large is your current customer base and does it have the potential to grow larger by going web. If your market is a niche then it may be lttle point. WinForms to Silverlight Experience ==================================== We have an airplane flight mapping WinForms app and have done a basic silverlight version. What we have learnt is that Bing maps can't handle the sheer number of points we would like to draw, so we often go into some kind of compromise, less frame per second etc. This is just an example of the broader point that for graphics intensive apps the desktop is a better performer. The other thing we noticed is that it was much easier to make a series of silverlight app as seperate web pages to do only one or two functions from our WinForm app. When we tried to combine many functions together into one silverlight page then little things started happening like the datagrids started slowing down when scrolling. I think this was due to a few reasons, unoptimised code, inexperience with Xaml, extra code complexity, lack of maturity of silverlight tools and controls. We still code in vs2008 and its xaml parsing is terrible,badly formed xaml can be hard to find. I assume its got better in vs2010, but i have heard bad reports of vs2010 and i await a service pack. If you think it it going to take you 1 year to migrate then silverlight will be mature by then i would suspect. I have seen the silverlight related products mature even in the 12 motnhs we have used it. If you do go the silverlight path I would choose one aspect of your app and move it first to silverlight as a test case. We are happy with the final result as the UI is much easier to use than our WinForms app and has all the deployment and update benefits you get from a web app.
Thanks, Tim! I do find your comments very useful, and I appreciate you taking the time to document your experiences with SL versus a desktop app. Others have mentioned SL as a way to go, and I am beginning to think that might be a big part of the answer. I love your suggestion about using several smaller SL apps to get various bits of info for a page rather than one big fetch. From what I've seen on myVBProf.com, Bill Burrows demonstrates that VS2010 is much improved for xaml stuff.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
If you have a sound database think about using one of the good code generation tools. there are several good ones out there and will deliver professional looking sites with decent security models and n tier architectures. What ever you spend on a good tool will recoup it selve in learning and development times eg std code models the things like ajax several of the tools also have wyswig design features and work with visual studio and no propreitory coding or licensing. I use Ironspeed enterprise editon www.ironspeed.com but there are several others check out things like lightspeed for another option http://www.mindscape.co.nz/ You only have do add your proprietory logic which is usually a small proportion of your code. The major part is learning how to get the best out of the tools and all the options offered within It pays to down loat the demos and play and read the help the full versions are really powerful for the average developer needing to get a job done. Gerard
Gerry
Thanks Gerard! Yes, good suggestion to consider the code gen tools. Your point about the business logic being smaller than all the plumbing code is very true. If my attempts at following OO practices have been successful, it may be that I can pull the business logic out and replace the plumbing code with a tool. I'll consider that suggestion. Thanks for taking the time to share your experience with the community! Bob
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
Thanks kofflerd, I am beginning to think you are right.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
I recomend you take a look at visual webgui. Im not a very experienced programmer, i previously wrote some code for various projects in visual basic, I tried to learn web based technologies includeing ASP.net php etc, but got frustrated with all of them. I have used visual webgui 6.4 now for a couple of months to create a web based data driven application. I have found that i can use the knowledge and undestanding i had of forms based development but create a very powerfull web based application, and still have the familliar visual studio development and debug experiance. I dont need to understand session states etc. The resultant application is very fast and bandwidth friendly and requires no client plugins. I looked at it in earlier versions and it still had issues that meant it wasn't ready for production application deployment. I can say that the number of issues now are small and most can be worked arround. the resultant application is very stable and easy to deploy. the forums are good and any questions get answered very quickly in my experience.
Thanks, Phil! I will definitely look into that.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
well Personally I hate to do more vertical scrolling then absolutely necessary... I'd recommend either a presenter approach (the page reloads with what you want to present) or use a layout similar to what you describe, and use
tags to hide/show just "like" you would be doing in a tabbed document(this makes layout easier and I prefer the
approach because it is a lot more straightforward.) If the wizard is a fundamental part, you may want to treat that as a flash app(however I am not familiar with these approaches), that way you can take control of the entire screen, grey out the background browser, and have a specialized solution just for your wizard. and this would be plug-able into your webapp...so... I meant a one solution with ~3 projectss, a library(or folder of libraries), and 2 UI: winforms & webapp. then if you want to make some kinda mobile app down the road you can just add it to the solution, and add some dependencies and probably reuse a lot more code that way...
I'd blame it on the Brain farts.. But let's be honest, it really is more like a Methane factory between my ears some days then it is anything else...
Cool! Your suggestions are definitely part of the solution to this problem. Isolating the UI from the rest of the logic, still within the desktop app, will make it a lot easier to move everything to a web app. The hurdles I encounter during this process will probably force me to think it through with the web app in mind. (E.g. passing certain parameters along with the call, etc.) Thanks for taking the time to make these suggestions.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
It was the same with me. I avoided web development for a good long time. I'm only just now really getting into it with a new application I'm developing. It's cool - but it ain't the same as WinForms development - not by a long shot. You had better be ready to edit HTML even with .Net 3.5 or 4.0 to get your forms working. It ain't WYSIWYG - and you have to think completely different. Instead of event-driven, you're talking page lifecycle. Smokes the brain for awhile until you get it. -Max
Thanks, Max, Yeah, I can see that some of the friends suggesting an approach such as is provided with visualwebgui would take some of the pain out of the events versus page lifecycle paradigm. Either way, it's a total change of thinking, which all comes from the issue of sending bytes along a wire asynchrounously instead of counting on resources (code) being instantly available to "answer" some event. Actually, I think the whole asynch paradigm is what we will all need to do within the next few years. It might be good practice to use delegates for everything within some sub-project just to get used to it. In fact, (philosophising here) I believe asynch thinking is probably more real-world than what we do now, which is like tugging a string and expecting the other end to move. It's like you have a message, so you put it in a bottle, throw it in the ocean, and then you need 100 people to watch the beach for "if and when" an answer comes back in a bottle. The real world works like that - when you order some product by phone or on a website, it's only when the product arrives at your door that you know you have it. Some truck 1,000 miles away brought it, but you weren't pulling the truck along a wire to make it arrive. Things are inherently disconnected in the real world. The days of quickbasic are gone ha ha ha.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
The discussion is now going beyond the original subject( best way to convert desktop app to web app)... So, The bottom line (about original subject) is "We haven't been there yet!" Is that right? :) I think Webmatrix is good to apply. Not sure that it's sufficent to apply.
Thanks JongchanAhn, I haven't seen any answer yet that seems irrelevant to me, though. And what you say - "We haven't been there yet" is partially true, since we don't have anything yet that works like - say - a phone, where you pick it up and get a dialtone. But what I needed here is exactly what I'm getting - ideas for working toward the goal now instead of waiting for the day when things are as easy as a phone. What do you think - does that sound reasonable?
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
Silverlight is Microsoft's answer to Adobe Flash. You could write applications in it, but ASP.NET is the preferred solution. ASP.NET 3.5 is modern and does have quite a few nice controls. What doesn't exist you can make. You can always buy pre-made custom controls from vendors to save time. If you are familiar with .NET then there will not be much of a learning curve moving to ASP.NET. You should investigate and get familiar with AJAX. AJAX avoids the constant page refreshes and can make a web application feel much more like a desktop app.
Thanks, MatrixDud, I know there must be some benefit in ASP.NET and AJAX. I have glanced at these in the past, but never got up the gumption to wade in. But others are suggesing that Silverlight 4 is the way to go, and I see some pretty nice visuals with that. Regarding pre-made custom controls from vendors - I'm trying to avoid using 3rd party controls, as nice as they are. This is to avoid bugs or version changes in someone else's code causing my customer to get mad at me. So I'm now thinking about RIA, MVVM, and Silverlight 4. Bill Burrows has some pretty impressive tutorials at myVBProf.com. Have you had a look at those yet? I didn't want to become a xaml programmer, which VS2008 seemed to try to make us, but I think I could force myself to do a bit of that. VS2010 seems to provide more UI tools to write the xaml for us.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
All great points... I may point you here[^] for a possible solution. The newer versions DO Offer an Out of the browser experience. I think it started slightly in V3 but has been 'fully' implemented in 4 and is going to be a focus going forward. From here I think the lines between the online and offline experience [platforms is going to start getting blurry.
Ray Cassick wrote:
The newer versions DO Offer an Out of the browser experience.
Interesting. What started with AJAX and developed into SL, may now end up coming full circle back to a desktop app. Now we will need tools to write more plumbing code for us, so when we open VS, and create a new desktop app, a blank form comes up that we drag controls to, double-click on them, and start writing code. I know, I know! Overly simplistic perhaps, but you get my point. For example, something that would help us do asynch and parallel programming without needing a brain 3x the size. Anyone want a used brain? I'm looking to upgrade.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
-
Thanks,nazmolla. Your suggestion is very useful, since it shows a way to work with the existing desktop application rather than rewriting it for the web. This is not the direction I wanted to explore in the original question, but of course, sometimes we need to look at the bigger picture to evaluate what is the best direction.
____________________________________________________________________________________ The Vulcan Science Directorate has determined that time travel is impossible.
You are most welcome, actually i till a month ago didn't even know about the TS and remoteapp till our VPN connection went down and our ERP stopped working "Microsoft Ax dynamics 2009" then someone at our ISP made this suggestion instead of us buying a new webportal module or an DIA connection with around a thousand dollars monthly to implement the TS for free, and when i read more i found it very useful and now i actually stopped all other VPN connections to our branches and started using this solution, anyway, you are welcome and i am ready to help you if you needed anymore assistance with this regard