CF for Smartphone

D

David Hanson

Guys,

Downloaded the SDK yesterday and have started tinkering around with CF
for Smartphone devices. Just a couple of newbie questions which sprung
to mind, hope someone can answer.

1.) Are apps written for CF on Smartphones going to be slow to start
everytime the device is switched off and on, while compilation of the
code base occures? Any body got any thoughts?

2.) No remoting? So for CF development I assume sockets is the way
forward?

3.) Finally, I am having trouble getting menu Sub items to appear. So
in other words I create a MainMenu and then add Sub elements onto it
using the UI editor and then compile and run. When I do this I get a
System.NotSupported exception on the Form Initialization. Any Ideas
what I'm doing wrong?

Thanks in Advance

David Hanson
UK
 
P

Peter Foot [MVP]

David Hanson said:
Guys,

Downloaded the SDK yesterday and have started tinkering around with CF
for Smartphone devices. Just a couple of newbie questions which sprung
to mind, hope someone can answer.

1.) Are apps written for CF on Smartphones going to be slow to start
everytime the device is switched off and on, while compilation of the
code base occures? Any body got any thoughts?

As with all Compact Framework development your code is JITted as required.
You can optimise the startup by controlling at what point you instantiate
your forms and controls - i.e. not all at startup of your app - there are
already articles on this which apply equally to smartphone development such
as:-
http://smartdevices.microsoftdev.com/Learn/Articles/565.aspx
2.) No remoting? So for CF development I assume sockets is the way
forward?

You can expose Web-services for which the CF is very capable at consuming -
here are some examples:-
http://smartdevices.microsoftdev.com/Learn/Articles/637.aspx
http://smartdevices.microsoftdev.com/Learn/Articles/665.aspx
3.) Finally, I am having trouble getting menu Sub items to appear. So
in other words I create a MainMenu and then add Sub elements onto it
using the UI editor and then compile and run. When I do this I get a
System.NotSupported exception on the Form Initialization. Any Ideas
what I'm doing wrong?

On smartphone you can only have two top level menu items (left and right
soft-keys). Only the righthand softkey can contain a sub menu. Typically
your left hand softkey will be your Ok/confirm/do something button and the
right softkey will contain a menu of alternative actions.

Peter

--
Peter Foot
Windows Embedded MVP

In The Hand
http://www.inthehand.com
 
N

Neil Cowburn [MVP]

While SOAP is suitably garrulous, it is a viable option if you want an easy
to implement communication model and aren't too worried about the extra
bandwidth overhead. In many cases, the cost justification for developing a
custom communications protocol (for both lightweight and heavyweight
protocols) is played off against the simplicity of using Web services. If
you're making relatively few Web service calls and are _NOT_ pulling back
something silly (e.g. 10,000 records from SQL Server) then Web services are
the way to go. If you're app is designed to send/receive data regularly
(more than a few times per hour of usage), rolling your own comms protocol
is probably the way to go.

Also, you might want to look into HTTP compression. IIS can compress the
HTTP packet quite considerably. This is especially useful with Web Services.


HTH
Neil
 

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