Re: [Nxtcommand-developers] iCommand 0.5 CLDC pre2
Status: Beta
Brought to you by:
bbagnall
From: Stefano S. <ger...@ti...> - 2006-11-28 20:28:20
|
Peter Joosten wrote: >>> Preprocessing can be done by an Ant target of de build.xml >> [...] >> >> From my point of view, porting from JSE to JME is not an automatic >> task, it a creative work. The developer has to substitute classes of > > I agree it can not be automated. That was not the argument. My goal > was to prevent duplicate code. The suggestion was to use 1 "master" > source tree with preprocessor macros, from which the several platform > dependend source code can be generated. This is an automated process. > You still wil have to program ALL the code between the macros yourself. > > #define CLDC > > #ifdef CLDC > // CLDC > int lastPos = name.toString().indexOf(".") + 4; > //CLDC > #else > // CLDC UNSUPPORTED > // int lastPos = name.indexOf(".") + 4; > // CLDC UNSUPPORTED > #endif > > Generated source: > // CLDC > int lastPos = name.toString().indexOf(".") + 4; > //CLDC OK, sorry for my misunderstaning. It seems ok. It would be good to have an ANT task for extracting source code for a certain platform. >> standard edition with the (more or less) equivalent of micro edition, >> how event he/she has to optimize code if necessary. Moreover, JME >> version will be split into specialized versions for different kind of >> devices. For instance, current version of JNXT works on Windows Mobile > > You are the better judge of how much code can be reused, and if this is > a usefull suggestion, or not. The more platforms that will be supported, > the greater the risk of cluttering the source code with macro statements. Maybe the good solution is in the middle (in italian we say: "the truth is in the middle"). We may start with two separate source archives, having in mind that if complexity grows we may switch to macro approach. >> I suggest to keep the two separate projects: iCommand and iCommand_CLDC. > > I have no objections. > >> The more iCommand gets enhanced, the more we will have to carefully port >> it to CLDC. > > That's why I suggest to keep as much code as possible platform independend. > If this is feasible ? For the GUI layer and bluetooth interface is not. You are right: Bluetooth and GUI not. However, we may evaluate to use a JSR 82 stack on desktop platform: Avetana Bluetooth for Linux and Bluecove for Windows. In both cases we would have the same API of JME. Best regards, Stefano. -- Stefano Sanna - ger...@ti... Personal web site: http://www.gerdavax.it AIM: gerdavax - Skype: gerdavax - Callsign: IS0DZE Best of Banana Fratelli D'Etails Gerda: "Mi hanno contattato per avere idee nuove..." Dada: "... e le vanno a chiedere proprio a te???" |