<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: J2me mobile development practices</title>
	<atom:link href="http://blog.landspurg.net/j2me-mobile-development-practices/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.landspurg.net/j2me-mobile-development-practices/</link>
	<description>Technology, wireless, games...and more.....</description>
	<pubDate>Wed, 19 Nov 2008 11:46:34 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.5</generator>
		<item>
		<title>By: kancil_usreg</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-293276</link>
		<dc:creator>kancil_usreg</dc:creator>
		<pubDate>Wed, 16 Jul 2008 05:06:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-293276</guid>
		<description>hallow, I will make VoiP in mobile phone.do you think about j2me source code for it???thx</description>
		<content:encoded><![CDATA[<p>hallow, I will make VoiP in mobile phone.do you think about j2me source code for it???thx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shley</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-286914</link>
		<dc:creator>Shley</dc:creator>
		<pubDate>Thu, 03 Jul 2008 16:51:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-286914</guid>
		<description>Hi there!   Do you have any tips on creating a clone of the game Q-bert in j2me.  I am really struggling.  I have gone to school for programming at both the college and university levels, and started when Java just came out....well that was my 2nd or third year, so I am an old-school C++ girl and I'm trying to get this working!  I have  painted my pyramid on the screen using a tileset of 'parts of cubes', but I am now at the point where I need to do the animations.  I have all the points calculated that the sprite needs to move to.  The board is displayed using block data. Since the board is really a binary tree, should I create nodes that reference each block? HELP!!!! PLEEEEESE!?</description>
		<content:encoded><![CDATA[<p>Hi there!   Do you have any tips on creating a clone of the game Q-bert in j2me.  I am really struggling.  I have gone to school for programming at both the college and university levels, and started when Java just came out&#8230;.well that was my 2nd or third year, so I am an old-school C++ girl and I&#8217;m trying to get this working!  I have  painted my pyramid on the screen using a tileset of &#8216;parts of cubes&#8217;, but I am now at the point where I need to do the animations.  I have all the points calculated that the sprite needs to move to.  The board is displayed using block data. Since the board is really a binary tree, should I create nodes that reference each block? HELP!!!! PLEEEEESE!?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fostah</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-39647</link>
		<dc:creator>Fostah</dc:creator>
		<pubDate>Mon, 19 Feb 2007 03:36:27 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-39647</guid>
		<description>I think the idea of preloading everything or loading as needed is really decided by the targetted handset. Some phones work well with unloading and loading lots of objects whenever you need them. However, on other phones, even if you are really careful to unload and reload properly, fragmentation still occurs and you eventually still have problems with being out of memory. The best practice is probably to wrap loading in a function where you can change loading as needed. This way if the handset benefits from having things preloaded, you can do it seemlessly without messing with the rest of the codebase. If you are working on such a phone like the Nokia 7210, which needs the minimal amount of things loaded, you can handle this too...either way this can't be a black and white issue as with any issue in mobile development...especially mobile game dev.</description>
		<content:encoded><![CDATA[<p>I think the idea of preloading everything or loading as needed is really decided by the targetted handset. Some phones work well with unloading and loading lots of objects whenever you need them. However, on other phones, even if you are really careful to unload and reload properly, fragmentation still occurs and you eventually still have problems with being out of memory. The best practice is probably to wrap loading in a function where you can change loading as needed. This way if the handset benefits from having things preloaded, you can do it seemlessly without messing with the rest of the codebase. If you are working on such a phone like the Nokia 7210, which needs the minimal amount of things loaded, you can handle this too&#8230;either way this can&#8217;t be a black and white issue as with any issue in mobile development&#8230;especially mobile game dev.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mindinhand</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-35503</link>
		<dc:creator>Mindinhand</dc:creator>
		<pubDate>Fri, 02 Feb 2007 04:32:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-35503</guid>
		<description>I don't like the idea of making sure things are instanciated just once.

I run into the outofmemory wall quite often on my app that has different screens. One screen users a parser to read data from a file. I'd much rather instanciate the objects as I need them, and then be really clean with my de-referencing to make sure garbage collection works well.  With the approach of just instantiate everything once, you end up having stuff reside in memory when it isn't needed.</description>
		<content:encoded><![CDATA[<p>I don&#8217;t like the idea of making sure things are instanciated just once.</p>
<p>I run into the outofmemory wall quite often on my app that has different screens. One screen users a parser to read data from a file. I&#8217;d much rather instanciate the objects as I need them, and then be really clean with my de-referencing to make sure garbage collection works well.  With the approach of just instantiate everything once, you end up having stuff reside in memory when it isn&#8217;t needed.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charl</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-33867</link>
		<dc:creator>Charl</dc:creator>
		<pubDate>Sat, 27 Jan 2007 09:14:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-33867</guid>
		<description>Yea Tom, This would be alot of overhead in fulfilling a need that’s slowly fading as  micro devices mature. 

Mindin.: I wasn't referring to standard preprocessing (polish shud be the standard ;-). I’m hinting at some kind of code optimizer that would convert multiple classed midlets into a one classed “Netbeans Visual Midlet” style midlet.

I think we’ll all be old and grey by the time that surfaces. 

Tom: What r ur thoughts on using a DisplayManager class with public members used for requesting Displayables in midlets? This currently ensures that displayable objects will only ever be instanciated once.</description>
		<content:encoded><![CDATA[<p>Yea Tom, This would be alot of overhead in fulfilling a need that’s slowly fading as  micro devices mature. </p>
<p>Mindin.: I wasn&#8217;t referring to standard preprocessing (polish shud be the standard ;-). I’m hinting at some kind of code optimizer that would convert multiple classed midlets into a one classed “Netbeans Visual Midlet” style midlet.</p>
<p>I think we’ll all be old and grey by the time that surfaces. </p>
<p>Tom: What r ur thoughts on using a DisplayManager class with public members used for requesting Displayables in midlets? This currently ensures that displayable objects will only ever be instanciated once.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TomSoft</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-33600</link>
		<dc:creator>TomSoft</dc:creator>
		<pubDate>Fri, 26 Jan 2007 11:20:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-33600</guid>
		<description>Mindinhand: You're right, J2mepolish is another tools to do some preprocessing...

And I agree, that most of these "tricks" slowly tends to disappear. However, there is still always some "tricky" cases from time to time

Charl: you are right, it's another option too. But one of the issue with this approach, is then it's very hard to debug on someplatform, and this could generate some more complex problem to debug if your tools does not do exactly what is expected.</description>
		<content:encoded><![CDATA[<p>Mindinhand: You&#8217;re right, J2mepolish is another tools to do some preprocessing&#8230;</p>
<p>And I agree, that most of these &#8220;tricks&#8221; slowly tends to disappear. However, there is still always some &#8220;tricky&#8221; cases from time to time</p>
<p>Charl: you are right, it&#8217;s another option too. But one of the issue with this approach, is then it&#8217;s very hard to debug on someplatform, and this could generate some more complex problem to debug if your tools does not do exactly what is expected.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mindinhand</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-32869</link>
		<dc:creator>Mindinhand</dc:creator>
		<pubDate>Tue, 23 Jan 2007 23:28:37 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-32869</guid>
		<description>If you want to do preprocessing why not use a tool like j2me polish to sort out your issues.

I think good compilers to should also be able to inline methods that are declared static and final.

And with regard to the comment:

Most of these “Assembly Java” tricks are very bad for code maintanance and nowadays are really not needed since most phones have plenty of memory and processing power.

As a developer, I try to always push the perfomance of my code. If I can find anyway to decrease startup and increase performance, I will put it into the code.</description>
		<content:encoded><![CDATA[<p>If you want to do preprocessing why not use a tool like j2me polish to sort out your issues.</p>
<p>I think good compilers to should also be able to inline methods that are declared static and final.</p>
<p>And with regard to the comment:</p>
<p>Most of these “Assembly Java” tricks are very bad for code maintanance and nowadays are really not needed since most phones have plenty of memory and processing power.</p>
<p>As a developer, I try to always push the perfomance of my code. If I can find anyway to decrease startup and increase performance, I will put it into the code.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Charl</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-32566</link>
		<dc:creator>Charl</dc:creator>
		<pubDate>Tue, 23 Jan 2007 00:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-32566</guid>
		<description>Why not let the jme developers use all of the OOP constructs/patterns they're use to and ADD a step into the build process that preformats (preprocesses) code into a 1 midlet class then? I mean we have all this knowledge about jme oop shortcomings to our avail. All I'm saying is, Just dynamically reverse engineer OOP at compile time so that you end up with Netbeans 'Visual Midlet' style code subject to obfuscation to decrease mem foot even more?

-s4111</description>
		<content:encoded><![CDATA[<p>Why not let the jme developers use all of the OOP constructs/patterns they&#8217;re use to and ADD a step into the build process that preformats (preprocesses) code into a 1 midlet class then? I mean we have all this knowledge about jme oop shortcomings to our avail. All I&#8217;m saying is, Just dynamically reverse engineer OOP at compile time so that you end up with Netbeans &#8216;Visual Midlet&#8217; style code subject to obfuscation to decrease mem foot even more?</p>
<p>-s4111</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: TomSoft</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-22120</link>
		<dc:creator>TomSoft</dc:creator>
		<pubDate>Tue, 12 Dec 2006 18:51:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-22120</guid>
		<description>I did not say it's the only way, there are others ways. But it's one of the way to do it when you have mutliple constraints at the same time.

As I said, this is changing with time. In recent phones, this is quite useless, but on older, or very constrained devices, some are still valids, believe me. 

And doing "search and replace" on a file is like preprocessing, no?

I give you an example: on J2ME, supporting both Floating point on CLDC1.0 and on CLDC1.1. Of course, I could use a Float class for both, and wrap CLDC1.1 float type on an object. 

But then I have a HUGE penalty of creating a lot of interim Float object, and loose benefit of natives float. This is obvious on some devices like blackcberry, where garbage collection is very costly...


But may be there is another option?


(and yes, I do use an obfuscator, don't worry!)</description>
		<content:encoded><![CDATA[<p>I did not say it&#8217;s the only way, there are others ways. But it&#8217;s one of the way to do it when you have mutliple constraints at the same time.</p>
<p>As I said, this is changing with time. In recent phones, this is quite useless, but on older, or very constrained devices, some are still valids, believe me. </p>
<p>And doing &#8220;search and replace&#8221; on a file is like preprocessing, no?</p>
<p>I give you an example: on J2ME, supporting both Floating point on CLDC1.0 and on CLDC1.1. Of course, I could use a Float class for both, and wrap CLDC1.1 float type on an object. </p>
<p>But then I have a HUGE penalty of creating a lot of interim Float object, and loose benefit of natives float. This is obvious on some devices like blackcberry, where garbage collection is very costly&#8230;</p>
<p>But may be there is another option?</p>
<p>(and yes, I do use an obfuscator, don&#8217;t worry!)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Carlos Bazzarella</title>
		<link>http://blog.landspurg.net/j2me-mobile-development-practices/#comment-22117</link>
		<dc:creator>Carlos Bazzarella</dc:creator>
		<pubDate>Tue, 12 Dec 2006 18:35:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.landspurg.net/j2me-mobile-development-practices#comment-22117</guid>
		<description>You are wrong when you say that the only way to handle specific JSRs on a single code base is to use preprocessing. 

There is this little known trick to use "static final boolean USE_JSR = true" and wrap all JSR calls with that. To remove all of that from the code, just set this variable to false. You must use an obfuscator because the obfuscator does remove code that is not used and by defining "static final" it knows that code has got to go. 

Using this technique you can easily setup different builds from the same source code without preprocessing directives. You can arrange "static finals" into one class/file and have only that file preprocessed or simply modified by an Ant script (for example - simple search and replace will do it).  

Most of these "Assembly Java" tricks are very bad for code maintanance and nowadays are really not needed since most phones have plenty of memory and processing power. A lot of times the bottleneck is at a completely different place than anticipated and you can only find out by using profilers and disassembler (for decreasing .class size).


Carlos.</description>
		<content:encoded><![CDATA[<p>You are wrong when you say that the only way to handle specific JSRs on a single code base is to use preprocessing. </p>
<p>There is this little known trick to use &#8220;static final boolean USE_JSR = true&#8221; and wrap all JSR calls with that. To remove all of that from the code, just set this variable to false. You must use an obfuscator because the obfuscator does remove code that is not used and by defining &#8220;static final&#8221; it knows that code has got to go. </p>
<p>Using this technique you can easily setup different builds from the same source code without preprocessing directives. You can arrange &#8220;static finals&#8221; into one class/file and have only that file preprocessed or simply modified by an Ant script (for example - simple search and replace will do it).  </p>
<p>Most of these &#8220;Assembly Java&#8221; tricks are very bad for code maintanance and nowadays are really not needed since most phones have plenty of memory and processing power. A lot of times the bottleneck is at a completely different place than anticipated and you can only find out by using profilers and disassembler (for decreasing .class size).</p>
<p>Carlos.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
