Portable Code Base for both Pocket PC's and Desktops

  • Thread starter Tarundeep Singh Kalra
  • Start date
T

Tarundeep Singh Kalra

Hi,
i am facing a peculiar problem with regards to Code Portability both on
Pocket PC and Desktops.

My company wants me to maintain the common code base for both the platforms.

Is .NET suitable for that ( Is WinCE.NET and .NET same).

Can we do it in SDK (pocket pc sdk and desktop SDK).

I need inputs from all of you.
Thanks a lot in advance.

--
Regards
Tarundeep Singh Kalra

www_dot_tarunsadhana_dot_com.

tarun_at_removeAT_tarunsadhana_dot_com.remove_dots
 
G

Guest

Hi,

Rather not, because Pocet PC work on .Net Compact Framework with is
something like 'limited' framwork, that's why you wasn't be able to do a lot
of things. So your answer is - no :(

I yopu need more power from .NET Compact Framework try www.opennetcf.org
framework, some kind of "extension", to the basic functionality of .NET CF.

Anyway you could try to use classes of business logic both the same.

I do this when at Pocket PC I magage to separate the GUI from logic, and at
PC I did the same - then if you need to change for example customer input
form, there will be a change in 3 (not 4) places, at both Pocekt PC & PC GUI
and at business logic tier.

Anyway this isn't Framwork question anymore - but something like aritect
patterns ;-)
 
C

Chris Tacke, eMVP

It's very possible. CF assemblies will retarget to the desktop, so develop
and compile using the CF and it should (there are some exceptions) work fine
on the desktop.

-Chris
 
G

Guest

And all the methodes names ? Database access, things like this ? Is there a
way to work in such a enviroment ?
 
I

Ignacio Machin \( .NET/ C# MVP \)

Hi,

You can do it IF you do not include any platform dependand functionality.
This is almost impossible in the PPC as probably you need to P/Invoke.

Othen than that your PPC application will runs just fine in the desktop, of
course they will look small and the interface will be clumsy and not very
UI.

cheers,
 
C

Chris Tacke, eMVP

Yes, there are some changes (like with the Sql stuff) and P/Invoking needs
special attention, but it's all doable.

Take a look at the OpenNETCF.IO.Serial code - it works on a CE device and
the PC just fine.

www.opennetcf.org/sdf

-Chris
 
J

Justin Beckwith

I have been going through a similar transition, moving from a desktop
application to a pocket app. The best advice I've gotten via
groups/msdn is to first develop the business logic for your compact
framework device, then user that dll in your desktop application.
That serves two purposes: 1.) you wont use an libraries that arent
available for compact framework (without an addon dll) and 2.) you can
import a smart device dll into a desktop app, but not vice versa. I
hope this was helpful, good luck!
 
B

Bill D

It is certainly possible, and in a significantly large application can be a
very efficient way, from a developer effort standpoint, to target multiple
devices. As others have mentioned, it will likely require some work on your
part to handle screen size issues (define some sort of templates if possible
for your app?), etc, as well as isolating P/Invoke calls. A little planning
up front can make this work quite well.

Bill
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top