|
Dear
Software Developers,
This CPTTM Software
Developer newsletter is to bring
useful news to
you, software developers in Macau, for references without obligations,
so that you can do your jobs easier and better! Hope you like it. if
you'd like to unsubscribe or recommend your friends to
subscribe, just email me at kent@cpttm.org.mo.
Old
issues are available here.
Topics
in this issue:
Google
Android: Unified platform for all mobile devices?
If
you need to program a mobile device, you may have to choose a
particular target platform such as Symbian, Windows Mobile and etc.
Each platform has its primary programming language (e.g., C++, or .NET
languages) and its proprietary API. It means your program can't serve
all users. You could use Java ME but it is often a 2nd class
citizien: It has no access to quite some functions in some devices and
different devices may provide different levels of support. Now, there
is an attempt from Google to try to unify the mobile device
platform: Android.
Android
is a complete and open source software platform for mobile devices:
right from the OS (Linux) to Java virtual machine, Java libraries
(WiFi, GPS, bluetooth, camera, etc.) and some applications for
users (browser, media player, etc.). This ensures the same level of
support to your program as long as it is running on Android. The
remaining question is how successful it will be. Currently,
it is
supported by Google and dozens of companies including Motorola,
Samsung, HTC, China Mobile, NTT DoCoMo, Sprint and etc.
Obviously
Nokia (behind Symbian) and Microsoft are not there.
For more information, click here.
Adding
RAM may NOT fix OutOfMemoryError
If
your application throws an OutOfMemoryError, do NOT rush out
to
add RAM to the computer as it may prove to be a waste of time! First,
you
may not be allocating enough RAM to Java even if your computer has
plenty of it. In that case, use a command line option like -Xmx1G to
set the heap size. If it doesn't solve the problem, it could be caused
by the so-called PermGen (Permanent Generation), which is by default
a 64K memory area used to store classes. If you have
more classes to load, it will throw an OutOfMemoryError. To fix it, use
something like -XX:MaxPermSize=128K. For details, click here.
Seeing
instant result form a JSP page
Now you can a JSP file just like a PHP file. That
is, without compilation! You can do that using a commercial product
called JSP
Weaver. It's made by the company that creates the Java Rebel
which enables hot reloading of changed Java classes.
Upcoming courses
for software developers
Feedbacks
Any
questions, ideas or experiences to share? Contact me at
28781313 or kent@cpttm.org.mo. We also
have two other newsletters: CIO newsletter
and Network
administrator newsletter,
your friends may like to
subscribe.
Until
next time,
Kent
Tong
|