App Design

  • Thread starter Thread starter Kent
  • Start date Start date
K

Kent

Hello,
I am new to both .Net and pocket pc programming. I need to write an
application for the pocket pc's and the same application for our desktop
computers. Do I need to write all of the code twice or is there some way to
reuse part of the code. Any help or suggestions would be greatly
appreciated.
Thanks,
Kent
 
Kent,

The problem with this is you're limited by the lesser of the two
technologies, that is the .Net CF, because it is a light wight version of
the .Net framework that runs on the PC. As a result, you'd be better writing
the application on the scanner, then creating a new project for your PC, and
simply including the code from your scanner app.

This should work okay, but if you run into problems where you need one thing
to happen for the scanner, and another for the PC, then create new build
configurations, and use the following syntax (assuming the build for pc is
called PC_APP, and the build for scanner is called SCANNER_APP):

#if PC_APP
// PC code here...
#if SCANNER_APP
// scanner code here...
#endif

In this case, you'll end up with two solution (and project) files, sharing
one set of source.

The other obvious solution is to create the scanner app, then copy the whole
directory, remove the solution and project file from the copy, and create a
new PC app, including all the copied source. The main disadvantage to this
is you need to maintain two sets of source code.

Hope that helps.

Dan.
 
Back
Top