Developing an application for multiples environments (Pocket PC and Desktop), in other words, how to

C

Chris Tacke, eMVP

Actualy your description is a very common scenario for an n-tier solution.
Apps often should not directly access the data, but instead go through a
component that has the business logic in it.

In this case, create a DLL that connects to the data and exports some
functions like GetCustomer or some such. Then your app code from both
platforms can call the same piece of code.
 
W

William Ryan

A lot of code can be used on the desktop, PDA and Web. However, a lot of it
can't. You'll find that with DataAccess, System.Data for instance, the same
code set will work across the board. If you are using SQL Server CE, then
it won't b/c it has its own library, but you can call a web service from
your PDA or desktop or web app and it will all work the same.

It really comes down to how you construct your logic and seperate it in the
different tiers. However, the short answer to your question is if you want
code reuse, you are going to have to put some thought and time into it.

Web Services cna serve as your data transport layer and it's no more
difficult talking to a WS than it is most other methods. There are some
good examples on gotdotnet and if you look at the Quickstarts, there are a
lot of walkthroughs.

PocketTaskVision comes to mind, but there are many others.

In general, the more you seperate business logic from Presentation logic,
the better poised you'll be to reuse your stuff - and this goes for all
development, not just CF. You want to keep things as loosely coupled as
possible, and that way it will be much more flexibile and other apps can use
it.

check out pockettaskvision and I think it will give you agreat start. Also,
if you are just learning, you may want to pick up the two books I referenced
in the last post. You'll be glad you did.

HTH,

Bill
 
A

Anderson Takemitsu Kubota

Hi all!

Please I need to understand how could I save some time developing an
application that will have the same features in multiple environments.
The problem is that I have no experience in 3 tier development. So I don't
know how could I reuse any piece of code.

For example in Pocket PC environment I create a dialog and put some code for
getting some data and perform any data changes.
Could I insert a business rule between the dialog and the database? If so,
how? I know this example is very very simple, but imagine I have a more
complex scenario. Is there a good way to reuse the code for Desktop in PPC?
I know I should at least recompile the classes in another project. But can
they be almost the same?

I don't know I am being confused but any help I will be grateful.

Thank you,

Anderson T. Kubota
 

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