none
Passing variables to global functions common to both web app and winforms app RRS feed

  • General discussion

  • What is the best way to pass variables to global functions (in BussLogic) which can be used by both web app and winforms app?

    I am thinking of declaring structures with variables (which can be accessed within the project by declaring them as friend for winforms app and storing them in session variable for web app) and passing these structures byref to the global functions in buss logic.

    Currently I've web app and winforms app both are designed to do the same thing (reading data from database and displaying in grid) and I am trying to get rid of duplicate code.

    I am sure there are many other ways to achieve this but not sure which one is the best.

    Bhavin

    • Edited by Bhavin_Shah Monday, October 28, 2013 11:57 PM
    Monday, October 28, 2013 11:50 PM

All replies

  • Hi Bhavin

    One thing is not very clear , do you want to just restructure your source code to remove duplicate code or else you want to share live data in between web and desktop version.

    if first one is the case then you should create a third library project , move all your duplicate code in new project and then then add the produces dll in both projects.

    but if it is second case (live data sharing ) then you should configure ASP.Net to use external session storage 

    May be it helps 

    Regards

    Ashwini

    Monday, November 4, 2013 1:48 AM