Porting a C++ application to a Web application

Discussion in 'ASP .Net' started by Bartholomew Simpson, Jun 18, 2007.

  1. I wrote a desktop application in C++ a little while ago, and I will like
    to port it to a web application.

    Here are the details:

    1). ALL business logic is held in ANSI C++ libraries (e.g. I make
    extensive use of the BOOST C++ libraries)
    2). The front end is written entirely in VB6

    What I want to do is to is to be able to be able to have a choice of
    building a desktop application or a web application (from near enough,
    the same GUI code as possible).

    I realize that I will have to port the GUI from VB6 to either C# or
    VB.Net (I can code in either language easily enough). I would like to
    know if :

    1). I can build both a web application and a desktop application from
    the same (presentation layer) source code - if no, what is the best way
    to minimize duplicating code?

    2). Which of the two languages (VB.Net or C#) will be better suited for
    this job (i.e. coding a new presentation layer), and why ?
     
    Bartholomew Simpson, Jun 18, 2007
    #1
    1. Advertising

  2. Bartholomew Simpson

    Ben Rush Guest

    > 1). I can build both a web application and a desktop application from the
    > same (presentation layer) source code - if no, what is the best way to
    > minimize duplicating code?


    In the absolute sense, no. Some of the business logic may port relatively
    well, but your presentation logic on the client (that deals with window
    handles, wait loops, etc) has absolutely no correspondence at all to the web
    (which deals with markup, sessions, etc.). If you can specifically target a
    particular browser, you may be able to cleverly port some of your work as an
    activeX control that gets loaded and executed in Internet Explorer, but
    other than that, you're dealing with totally different worlds.

    To answer your question regarding the best way to go about minimizing code
    duplication, the only thing I can say is "I don't know, it depends". Without
    seeing your application I can't really answer that question in any
    meaningful way.

    > 2). Which of the two languages (VB.Net or C#) will be better suited for
    > this job (i.e. coding a new presentation layer), and why ?


    That's a matter of preference. A lot of people debate about which one is
    more efficient, clean, productive, etc. and the practical reality is that it
    all depends on the programmer and how they utilize the features of each
    language.

    --
    ~~~~~~~~~~~~~~~~~~~~~~~~~~
    Ben Rush
    Microsoft .NET Consultant
    http://www.ben-rush.net/blog
    http://www.sideshowsystems.com


    "Bartholomew Simpson" <> wrote in message
    news:...
    >I wrote a desktop application in C++ a little while ago, and I will like to
    >port it to a web application.
    >
    > Here are the details:
    >
    > 1). ALL business logic is held in ANSI C++ libraries (e.g. I make
    > extensive use of the BOOST C++ libraries)
    > 2). The front end is written entirely in VB6
    >
    > What I want to do is to is to be able to be able to have a choice of
    > building a desktop application or a web application (from near enough, the
    > same GUI code as possible).
    >
    > I realize that I will have to port the GUI from VB6 to either C# or VB.Net
    > (I can code in either language easily enough). I would like to know if :
    >
    > 1). I can build both a web application and a desktop application from the
    > same (presentation layer) source code - if no, what is the best way to
    > minimize duplicating code?
    >
    > 2). Which of the two languages (VB.Net or C#) will be better suited for
    > this job (i.e. coding a new presentation layer), and why ?
     
    Ben Rush, Jun 18, 2007
    #2
    1. Advertising

  3. Bartholomew Simpson

    bruce barker Guest

    if your current app uses the MVC pattern then maybe.

    the web is stateless, so so will be your business layer. you will need
    to add a way to save and restore state. also all static variables must
    be replaced with instance variables (as web requests are just separate
    threads on the same application). if you use thread affinity variables,
    then you must change to context affinity as asp.net will switch threads
    during request processing.

    if you current UI is very rich, then you are probably going to need to
    write the UI in javascript and use ajax.

    -- bruce (sqlwork.com)



    Bartholomew Simpson wrote:
    > I wrote a desktop application in C++ a little while ago, and I will like
    > to port it to a web application.
    >
    > Here are the details:
    >
    > 1). ALL business logic is held in ANSI C++ libraries (e.g. I make
    > extensive use of the BOOST C++ libraries)
    > 2). The front end is written entirely in VB6
    >
    > What I want to do is to is to be able to be able to have a choice of
    > building a desktop application or a web application (from near enough,
    > the same GUI code as possible).
    >
    > I realize that I will have to port the GUI from VB6 to either C# or
    > VB.Net (I can code in either language easily enough). I would like to
    > know if :
    >
    > 1). I can build both a web application and a desktop application from
    > the same (presentation layer) source code - if no, what is the best way
    > to minimize duplicating code?
    >
    > 2). Which of the two languages (VB.Net or C#) will be better suited for
    > this job (i.e. coding a new presentation layer), and why ?
     
    bruce barker, Jun 19, 2007
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Nate
    Replies:
    2
    Views:
    423
    Yan-Hong Huang[MSFT]
    Feb 18, 2004
  2. Bijoy Naick

    Porting over an ASP.NET application

    Bijoy Naick, May 6, 2004, in forum: ASP .Net
    Replies:
    6
    Views:
    426
    Curt_C [MVP]
    May 10, 2004
  3. at google
    Replies:
    1
    Views:
    377
  4. Wolfgang Keller
    Replies:
    14
    Views:
    590
    Wolfgang Keller
    Jul 14, 2004
  5. (2b|!2b)==?
    Replies:
    1
    Views:
    614
    Michael Nemtsev [MVP]
    Mar 17, 2008
Loading...

Share This Page