Syncing data between a .net windows app and .net cf smartphone app

R

RBischoff

Hello all,
I was trying to find resources (links, articles, etc.) on how to architect/design
a .net windows app that will share and sync data with smartphone 2003 CF.NET
app.

If anyone could help, just to get me started I would appreciate
 
D

Darren Shaffer

A little more detail would help to point you in the right direction. Will
the synch be wireless over GPRS or only when
physically connected through ActiveSync? Are you simply moving text/XML
files back and forth or are you planning on
a relational database like SQL CE synchronizing to SQL Server 2000?

-Darren
 
R

RBischoff

Hello Darren,
Thanks Darren, more details would be nice, sorry bout that.

Syncing xml data files, primarily via Active Sync, but possibly IrDA support
as well. I guess if I got ActiveSync working, one could connect to ActiveSync
via IrDA, thus I would not need to implement that, correct ?

Thanks.

DS> A little more detail would help to point you in the right direction.
DS> Will
DS> the synch be wireless over GPRS or only when
DS> physically connected through ActiveSync? Are you simply moving
DS> text/XML
DS> files back and forth or are you planning on
DS> a relational database like SQL CE synchronizing to SQL Server 2000?
DS> -Darren
DS>
DS> DS>
 
D

Darren Shaffer

Thanks for the addional info - so big question is, can the files change on
both ends of the system (device
and WinForms app) possibly at the same time? if not, just using ActiveSync
to move the files back and forth
is fine. while I've not had good luck with IR synching from a SmartPhone
(Mpx220), others have, so it is possible.

If you can have data changing on both ends of the system at the same time,
you'll need a more advanced
architecture to handle synchronization and conflict resolution (especially
if there is a large population of
mobile devices all operating on the same data). I'd suggest thinking about
a simple web service that
exposes methods to your SmartPhone app (whether cradled or wirelessly
connected) to broker the
exchange of the XML data and merge changes into the copy of the data the
WinForms app works with.
If it's a limited amount of data (like < 500kb), you could send DataSets
back and forth. If it's more than
that, I'd think about RDA and SQL CE. Merge Replication is out of the
question over GPRS from personal
experience (if you really wanted to support wireless sync).

-Darren
 
R

RBischoff

Hello Darren,

Thanks for the response. I think the file would be so small that I could
just check some kind of timestamp on the file, and just overwrite the old
file with a new one, if applicable. I will just start with a requirement
of syncing via cradle (ActiveSync). Is there an api for ActiveSync that
you could point me to, or built-in .NETCF classes that I could read up on.

Thanks


DS> Thanks for the addional info - so big question is, can the files
DS> change on
DS> both ends of the system (device
DS> and WinForms app) possibly at the same time? if not, just using
DS> ActiveSync
DS> to move the files back and forth
DS> is fine. while I've not had good luck with IR synching from a
DS> SmartPhone
DS> (Mpx220), others have, so it is possible.
DS> If you can have data changing on both ends of the system at the same
DS> time,
DS> you'll need a more advanced
DS> architecture to handle synchronization and conflict resolution
DS> (especially
DS> if there is a large population of
DS> mobile devices all operating on the same data). I'd suggest
DS> thinking about
DS> a simple web service that
DS> exposes methods to your SmartPhone app (whether cradled or
DS> wirelessly
DS> connected) to broker the
DS> exchange of the XML data and merge changes into the copy of the data
DS> the
DS> WinForms app works with.
DS> If it's a limited amount of data (like < 500kb), you could send
DS> DataSets
DS> back and forth. If it's more than
DS> that, I'd think about RDA and SQL CE. Merge Replication is out of
DS> the
DS> question over GPRS from personal
DS> experience (if you really wanted to support wireless sync).
DS> -Darren
DS>
DS> DS>
 
D

Darren Shaffer

ActiveSync comes out of the box with the ability to sync files from a
directory on
your PC to a folder on device as part of a Standard Partnership. When the
SmartPhone
is connected to the PC, you could also initiate a transfer of the file from
within
your .Net CF code as ActiveSync passthrough effectively gives you an
ethernet
connection (TCP actually) between the device and the PC's network. There
are
also some FTP assemblies for .Net CF out there (check the Smart Device
Framework
at www.OpenNetCF.org first)

Finally, you could use the RAPI (Remote API) to initiate the file transfer
from
the PC to the ActiveSync-connected device. When I have to do anything with
RAPI, I refer
to "Programming Windows CE.Net" by Doug Boling as it's not trivial. There
is
also excellent coverage of this topic at www.codeproject.com.

-Darren
 

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