Single Source for Framework and CF

R

Richard Angus

Hi,
I have a question for anyone who can answer it, regarding keeping a
single source for full framework applications and compact framework
applications.

The company that I am curerntly doing work for has a large investment
in a set of components that form a framework for them to produce
applications. The components provide things such as authorization,
security, data acces, logging, insturmentation, centralised error
handling, centralised configuration storage etc.

They now have a requirement to produce Compact Framework applications
(both PocketPC and SmartPhone).

I was wondering if anyone out there has had any experience with
keeping 1 set of source for both full .NET framework applications, and
compact framework applications. I am looking for the pros and cons of
keeping a single source (such as design decisions - the existing
component designs are not to change).
For instance, is peoples experience that it is better to keep a
seperate source fof Compact Framework stuff, as it is designed with
performance and memory as the mist important feature?

Cheers

Richard Angus
Senior Software Engineer
QCOm Autralia Pty. Ltd (A Unisys Company)
 
D

David Clegg

Richard said:
I was wondering if anyone out there has had any experience with
keeping 1 set of source for both full .NET framework applications, and
compact framework applications. I am looking for the pros and cons of
keeping a single source (such as design decisions - the existing
component designs are not to change).

We do this successfully with an application that runs on PocketPC
devices and Win32 laptops. Because form resources cannot be shared, and
because in some cases we want to take advantage of the larger screen
resolution, we only really have code duplication on the GUI side. As a
result our Forms have logic kept to a minimum, with shared business
objects doing the grunt work (well, that's the theory anyway <g>).

Our stuff also uses SQL Server or SqlCE as a data repository, so we
have all data access in a separate class with compiler defines used for
data access variable declarations and instantiation. So in general, a
data access routine can share common code with the exception of the
declaration and instantiation of a variable. This could be improved
though by having a factory class which would return the common
interface for a class instance (eg IDbCommand for
SqlCeCommand/SqlCommand).
For instance, is peoples experience that it is better to keep a
seperate source fof Compact Framework stuff,

I'd try to share as much code as possible, to make the applications
more maintainable. Unnecessary code duplication is a pet peeve of mine.
as it is designed with
performance and memory as the mist important feature?

This hasn't been a problem for us, as it was always designed with
portable devices in mind.

Another point to be aware of is that not all functionality of the full
..NET Framework has been implemented on the Compact Framework. In most
cases this will be caught at compile time, but not always. The
documentation is pretty good at specifying what classes are supported
on the Compact Framework, so be sure to pay close attention. :)

--
Cheers,
David Clegg
(e-mail address removed)

Vote 1 http://cc.borland.com/codecentral/ccweb.exe/listing?id=21489 :)
Now supports Google Groups searching with Dyna-extend(tm) technology!

QualityCentral. The best way to bug Borland about bugs.
http://qc.borland.com

"Beer. Now there's a temporary solution." - Homer Simpson
 
R

rcangus

David,
Thanks for that. Most informative. We were certainly heading down the
conditional compilation path, but were unsure of a few things.

One thing we are not sure on how to tackle, is how do you compile the
various flavours of the component? i.e. one for SmartPhone, one for
PocketPC, and one for a windows server? The only way I am aware of is
to use seperate projects (I am basing that assumption on looking at
Log4Net). Could you enlighten me further?

Also, we use NUnit for the full framework stuff. Do you know if it is
possible to use something similar to NUnit on CF stuff?
Thanks

Cheers

Richard Angus
Senior Software Engineer
QCOm Autralia Pty. Ltd (A Unisys Company)

========================================================================
 

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