Jose and Aaron wrote:

> > Well, like Aaron said: you just have to write your own DAL (Device
> > Abstraction Layer) and create all your development stuff above this
layer.
> > So, if the common Win32 API just disappear and just de .Net (ergh...)
> > framework stays, just write your DAL as a .Net application.
>
> exactly :) adding new platforms = just implementing the DAL on the new
> platforms. if you have done it right, it shouldn't be that hard, and,
> the existing code should just re-compile.

OK, I'd like to figure this out and work on it as a long-term project. My
vague conception of this is that the DAL is an API that will make calls to
functions that are wrappers for parallel Palm and Win32 API functions.
Those wrapper functions are in static libraries so that I can just plug in
the library for the platform I want to target and compile.  Aaron has
written his API in C and Jose has his written in Lua.  (Jose, does the Lua
compile to C and then you compile and build the C code?  Or is it being
interpreted at runtime?  You mentioned the idea of creating a special
version of Lua that will be extended for the specific purpose of writing
cross-platform Palm/PPC apps and I read your examples with interest, but I'm
still pretty vague about what is happening under the hood.)

I am just now looking at the Win32 API for the first time <sigh> so I
imagine I may not get too far with this until I've written a couple of PPC
apps and learned the terrain.  But my initial impression is that the Palm
and Win APIs are such different animals that it must be a bit of a trick
sometimes to abstract the code in a way that works for both.

> > Actually, handling the event loop is, IMHO, the most difficult
> > part to create, for the DAL. After that, everything is easy to do.
>
> even better is to rid the event loop totally. use a callback/listener
> approach. let the DAL handle all the event specific stuff :)

Right.  What Aaron said.  :-/
Actually, I think I do see what you are getting at.  Palm's got an event
loop and Win's got a message loop, and the events and messages are, no
doubt, not commensurable so you have to find a way to abstract above this.
There, did that sound almost like I know what I'm talking about?  Ah, well,
never mind then.

I guess I could use some pointers to resources that would give me some
background on creating device abstraction layers.

David



-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palmos.com/dev/support/forums/

Reply via email to