0

We are implementing some business functionality that it exposed through the asp.net web service.

At the current stage user interface is required for some peace of it and we are going to implement it inside of already existing desktop application (it is MFC C++ application, but we are considering to integrate some WinForms/Wpf components).

In the nearest future we plan to replace current desktop application with a web site version (it will be asp.net web site, or PROBABLY Silverlight application). Therefore, I would like to implement UI once on the web site and just re-use it in some way from desktop application.

Am I clear enough?

Is there any way to do that?

For sure, I can implement web service and use it from desktop application right now and re-use it from web application when it will be required... But I hope there is a better way to do that.

Any thoughts are welcome!

P.S. An option can be asp.net web page that is displayed by our desktop application. Desktop app will serve as a browser only (without adding any additional functionality).

MrSmith42
  • 9,961
  • 6
  • 38
  • 49
Budda
  • 18,015
  • 33
  • 124
  • 206
  • "Desktop app will serve as a browser only (without adding any additional functionality)." You mean like the free, well-tested browser I'm using right now? – Corbin March Nov 10 '10 at 23:15

3 Answers3

1

Well... you basically already have your answer. If you're probably going to use Silverlight, if the current desktop app is build in WPF and XAML, you'll make the conversion ridiculously quickly. Otherwise, you'll have to build everything like you would any other website - divs and CSS all the way for the site, and designer resx's for the desktop.

David Archer
  • 2,008
  • 4
  • 26
  • 31
  • Silverlight is still optional. Could you clarify what you mean under "designer resx's for the desktop"? Please note the current 1st goal is to have (in any way) a desktop version workable. – Budda Nov 10 '10 at 23:13
  • What I mean is you're either going to design the web page and simultaneously the desktop both in XAML and use Silverlight/WPF, or you'll use ASP.Net and Windows Forms. If all you're going to do is make the Windows Forms part of the system act as a browser for the web application, I wouldn't bother. As another commenter has noted, there are already several high quality browsers out there. I'd recommend not creating a desktop application to act as a browser, it's clunky, ugly and any IT pro will see right through it. Only Apple really are doing the "web app in a desktop app" thing well. – David Archer Nov 11 '10 at 08:03
1

Unless a customer is paying you to write and maintain redundant versions of your app, then don't do it. Just write the new pieces of the web app, wrap them, and call it good.

If you can do so, I recommend you simply skip the integration step, as well. If you're going to throw the code away eventually anyhow, then it's less cost overall.

Use whatever technology you want. If you implement it using no client side framework, you wouldn't be bound to any particular platform. On the other hand, if you use an existing client-side framework (such as Silverlight), and use good code design practices (like MVVM), it might be easier to unit test.

Merlyn Morgan-Graham
  • 58,163
  • 16
  • 128
  • 183
  • "application shortcut" won't be able to "go back" from current dialog to another... But thank you for an idea. – Budda Nov 10 '10 at 23:17
  • @Budda: I reread your question, and figured out the "Make Application Shortcut" option wouldn't work, because you're integrating a single web UI piece into an existing app. Already edited it to take this into account, though – Merlyn Morgan-Graham Nov 10 '10 at 23:19
0

My idea should perfectly work with simple HTML UI implementation that will be "browsed" from desktop application through the CHtmlView control.

To be honest, I didn't try to implement that (task was postponed for some time).

Budda
  • 18,015
  • 33
  • 124
  • 206