Mobile 2 Server: WCF or asmx

H

Hans Artm

Hi,

We are in the process of developing a Windows Mobile 5 app. It's "only" a
GUI app communicating with a server with web services. We are not sure if we
should use the old asmx web service or the new WCF (web services). Any
advice?

Thanks
 
F

Fabien

Hi,

It depends what you need to do, WCF propose 2 different bindings :
- BasicHttpBinding : it is pratically the same WS as CF V2 (HTT¨P
client / server)
- WindowsMobileMailBinding : this allows one device to send data to a
central data store (asynchronous bidirectionnal message) and even
directly to another device using Email trasport, it simplies data
transfert if you loose connection, change network or IP addresses.

WCF offers more possibilities, but perhaps that the CF 2.0 will be
enough for your case.

Check out this for details :
http://blogs.msdn.com/markprenticem...ct-framework-store-and-forward-messaging.aspx

Hope this help you, don't hesitate to give details and ask questions
if you want.

Fabien Decret (Device Application Development MVP)
Windows Embedded Consultant


ADENEO (ADESET)
http://www.adeneo.adetelgroup.com/ | http://fabdecret.blogspot.com/
 
G

Guest

My advice is to use WCF as it allows greater flexibility server side for any
future changes by simple means of changing the configuration file. In
addition, it's Microsoft's future strategy and easier to use advanced
features, why develop new code using old technology? Not to mention, if you
are doing advanced stuff with web services such as reliable messaging,
transaction support, WS-Security etc you will have to use additional
libraries to add this to SOAP - known as WSE (Web service extensions) WCF
handles all this without you having to worry about it.

You will get a better response though if you post this to the WCF group; try
here: microsoft.public.windows.developer.winfx.indigo
 
M

MobileMan

Hello Simon:

I was reading your reply and thought I'd add a couple of quick items. First
off, I completely agree with your assertion that it probably makes more sense
for anyone to "build new code using new technologies," all things being
equal. We use WCF extensively on a Warehouse Management System we built
(between the Desktop clients and the Server), but use MSMQ between our mobile
devices and the Server. I have been patiently waiting for CF 3.5 because I'm
wanting to "consolidate" all my communication to WCF for all clients instead
of having to support both WCF and native MSMQ (version 3).

Frankly, I was hoping that the MsmqBinding would be available on the mobile,
but was disappointed to see the only two mobile bindings are BasicHttpBinding
and the WindowsMobileMailBinding. Interesting enough, the mail binding
offers some of the benefits of MSMQ, but it brings along the requirement of
an Exhange Server to act as a relay. I love Exchange as much as the next
guy, but also believe in keeping systems as simple as possible - adding
Exchange unneccessarily complicates, adds expense, and reduces reliability.
MsmqBinding would have been a much better approach in my opinion.

Anyway I was also disappointed to read that all those other great WCF
features (sessions, callbacks, reliable messaging, transactions, and all the
missing bindings) are missing from the mobile version too. So, although
desktop WCF supports this stuff the mobile world will have to create their
own CustomBindings .... ouch.

Take care and thanks
 
P

Peter Huish

equal. We use WCF extensively on a Warehouse Management System we built
(between the Desktop clients and the Server), but use MSMQ between our mobile
devices and the Server.

Is this a commercial product?


pete
 
M

MobileMan

Yes. Because of the nature of WMS systems, there's a certain amount of
tweaking and customization that's required for each customer, but it's pretty
cool what it does.

Thanks
 
G

Guest

Yes, custom bindings seem to be the only way to make much use of WCF. That
said, the support is there, and a new binding looks to be only a few days of
work depending on what you need support for, so it still not too bad.


--

Chris Tacke, eMVP
Join the Embedded Developer Community
http://community.opennetcf.com
 
M

MobileMan

Yes ... I was thinking along those lines (possibly) too. I need to do some
homework on this, but I might give it a shot of creating my own MsmqBinding
for the mobile WCF.

My current native MSMQ on my mobile devices offers the same advantages (at
least from what I can tell with the, admittedly, little amount of info I have
so for on all this) as the WindowsMobileMailBinding that being the ability to
"address" (or push) an unsolicitied Message to a mobile device. By the very
nature of MSMQ, I can send a Message to the device even though my application
is off-line, and MSMQ will handle the tasks of ensuring the Message was
delivered exactly once (and will keep trying until the entire message arrives
in-tact). As long as I have an appropriate "time to live" value for the
Message (and any matching message delvery statuses that I may be interested
in) my Server can send a Message and I can trust in that Message showing up
to scanners. Then, when the user grabs a scanner, turns it on, and then
activates the software I am able to attach to the queue and grab any Messages
that may be pending. Of course the same advantages exist when sending info
from the scanners to the Server.

This level of "asynchronous, bi-directional, disconnected" communication is
highly valued in our shop because of the automatic problems that come with
maintaining network connections when mobile - walking around large
warehouses, driving OTR for delivery drivers across the country, dead spots
in the network coverage, etc., etc.

The biggest difference I see so far is my current architecture uses the MSMQ
component that's built-in to my Windows 2003 Server (which simply runs as a
service) versus the need for Exchange if you go with the
WindowsMobileMailBinding. Setting up MSMQ on a box takes all of about 5
minutes - setting up Exchange (plus the expense of the licensing) certainly
takes me much longer. I never seem to be able to install it in less than an
hour on a clean box, plus the configuration time .....

The thing that makes me curious about all this is the fact that MSMQ is even
included as a built-in component from your Visual Studio Tool Box .... what I
mean is that there is already a tremendous support for MSMQ in the mobile
world anyway - why not take advantage of this fact with WCF?

What I might try is to create a "WCF wrapper" around the mobile MSMQ
component. At a minimum it would be a good exercise in extending WCF, which
as you point out, MS has done a great job in making this possible. I need to
do some leg work before, though, because with some of the other missing WCF
features this entire effort may prove to result in something that would still
be "less" than what I already have - don't have the time to spend on this if
it's not going to be a step forward.

All my complaining aside, I'm still glad MS has brought WCF to the mobile
world. After 24 years of building software (the last 7 have been completey
focused on moblie dev) I appreicate having a "unified" approach between the
destktop/server/mobile device. I realize mobile will always be a cut-down
version, but it's still good to be using the same things where possible.

Thanks Chris .... if I dive in I'll keep you posted on the effort.

Markus Anderson
Pervasive Thinking, Inc.
 

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