Re: [Nxtcommand-developers] iCommand 0.5 CLDC pre2
Status: Beta
Brought to you by:
bbagnall
From: Peter J. <ptg...@ch...> - 2006-11-24 21:39:54
|
> > > > 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 > 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. > 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 it is not. Peter Joosten. |