J2ME: All classes in one file versus having them separated?

Started by
12 comments, last by MindWipe 19 years, 5 months ago
Quote:Original post by Thygrrr
b) as I suspected, resource strings have the potential to account for several KB of memory (although ascii usually packs quite well). I'll try to use loops and generated resource names and well-structured programming to avoid as much overhead here, while also improving code legibility.


Data-driven design will be your saviour. ::thumbs up::

Quote:
c) I don't think I'll exceed the 5 class limit for a while, mostly, it'll be the MIDlet, the Canvas, and up to one or two game objects.


Consider trying to make one of those 'game object' classes the really big one instead of the MIDlet or Canvas. Those two are the first that you need to get anything up on the screen at all, so you want them to load quickly (i.e. be small).

Quote:
d) try to get around having to build my projects using JBuilder (which is a clunky process, at best), and work with shell scripts and makefiles to actually package the application. This is particularly useful for the slide show project I've been assigned to, because with tools like Imagemagick, you can pretty much automate the process of resizing/cropping all the images, putting them into various .jars depending on the target platform (e.g. Nokia Series 60, Siemens C 55).


Don't deny yourself access to more powerful scripting languages, either. There are some things better done in .bat (.sh, etc.) and others better done in .py (or .pl). [smile]
Advertisement
Quote:Original post by Zahlman
Don't deny yourself access to more powerful scripting languages, either. There are some things better done in .bat (.sh, etc.) and others better done in .py (or .pl). [smile]


Absolutely. Since I admittedly don't know squat about makefiles, and my bash coding skills are mediocre at best, I decided to go for python!

It seems to turn out nicely - I'm building a collection of scripts that will automatically resize, crop, convert and watermark images from all subdirectories in a given directory according to various cell phone display sizes, and then build platform specific classes and packages from them and a shared source with #ifdefs in it.

It's also a good exercise, because I'm not an expert at python, either. I'm mostly a C++ person. Well, was! :D
Update:

I've found that, when developing for J2ME, Apache Ant and the Ant plugin Antenna kick major multi serious ultra buttage! :-D Woot!

I'm really happy with those two pieces of software, though I'll make a mental note to look into J2ME Polish, which is also a plugin for Ant.
Quote:Original post by Thygrrr
Update:

I've found that, when developing for J2ME, Apache Ant and the Ant plugin Antenna kick major multi serious ultra buttage! :-D Woot!

I'm really happy with those two pieces of software, though I'll make a mental note to look into J2ME Polish, which is also a plugin for Ant.


Although I did like how you could build and try your apps using ant/antenna it procduces biggers JARs then the j2me wtk, hence I stopped using it.

/MindWipe
"To some its a six-pack, to me it's a support group."

This topic is closed to new replies.

Advertisement