Re: Better architecture for cross-platform project

From: Robert Levy [MS] (rlevy_at_online.microsoft.com)
Date: 09/27/04


Date: Sun, 26 Sep 2004 21:07:04 -0700

My suggestion would be to put the actual functionality of your app into a
DLL and then creating 3 seperate projects for each platform - each of which
would simply be for a UI that leverages the shared DLL.

When creating the DLL, be sure to do it as a .NET Compact Framework project
so that the IDE still prevents you from using supported on the desktop but
not the device.

The only complication I've ever had with this approach is with having the
shared DLL call a webservice - the code generated for device projects to do
this doesn't work on the desktop.

-- 
Robert Levy
Program Manager
Mobile Devices Product Group
http://blogs.msdn.com/windowsmobile
This posting is provided "AS IS" with no warranties, and confers no
rights.
Stefan Hong wrote:
> I am working on an application that will work on PC, pocket PC and
> Smartphone.  Obviously each platform must have it's own main Form
> design, but I want to share program logic between them as much as
> possible.
> I've searched the archive and found some ideas about using using
> multiple project files for the same set of source files, but manually
> maintain project file when adding/deleting source files is quite
> error-prone, especially when it is maintained by a group of people.
>
> Then I came up with an idea of creating an abstract class subclassing
> System.Windows.Forms.Form for shared code, then creates separate
> concrete class for each platform handling UI stuff.  This sounds
> great, until I realized that I can't use the nice form designer in
> VS.net anymore.  It only recognizes class subclassing from
> System.Windows.Forms.From directly.
>
> Is there any better idea to organize the project/code architecture?
>
>
> Thanks,
> Stefan 


Relevant Pages

  • Better architecture for cross-platform project
    ... Obviously each platform must have it's own main Form ... design, but I want to share program logic between them as much as possible. ... multiple project files for the same set of source files, ... Then I came up with an idea of creating an abstract class subclassing ...
    (microsoft.public.dotnet.framework.compactframework)
  • Managed Debugging Assistant FatalExecutionEngineError
    ... I am not sure what caused it or what fixed it because my DLL was working solid for the past 2 days and I traced all the WIN32 imported/marshalled dll. ... But what I did not run is the more complex marshalled callback test suite. ... I put back the My Project files did a rebuild. ... Whats the purpose of using a VS Hosting Process? ...
    (microsoft.public.dotnet.languages.vb)
  • Re: problems with 3d sound using directmusic
    ... > Above is the overall design of my current project, the platform can run ... > different game depend on user choice. ... The sound engine maintain a static ... but the wave file loaded and played by game dll do not come ...
    (microsoft.public.win32.programmer.directx.audio)
  • Re: C# 64-bit DLL?
    ... I do not utilize any new features in my DLL of 64-bit. ... Check your Project Build Properties, the default Platform target option is set to *AnyCpu*, which mean that your DLL will run as a 64 bit when loaded in a 64 bit process and as 32 bit when loaded in a 32 bit process. ... However, if you don't need the extended addressing capability AND you don't need to run on IA64, then you better set the Platform to "X86". ... your appplication runs as 32 bit on all Windows platforms. ...
    (microsoft.public.dotnet.languages.csharp)
  • compiled dll reuse version issue
    ... Development Environment version: 7.0.9466 ... I downloaded a data access DLL for MySQL that implements the Connector, ... With the source available (though the project files are unusable to me), ... the .NET framework versions match but, once I did the recompile, I can now ...
    (microsoft.public.dotnet.framework)