The object of Java ME programming
When looking at mobile AJAX style programming, there is a component for functionality that relies on a simple scripting language like JavaScript. The trouble with simple scripting languages is that they are not object-oriented. Why would you want object-oriented programming when you can just scribble out a script in 5 minutes versus 30 minutes in having to actually think about (OMG!) and design (double-OMG!!) a program for your cell phone? Some say there is actual goodness in thinking... ;-) Here's a good article in object-oriented thought from Darius Katz who talks about the Command Pattern in Java ME MIDP at the Dr. Dobbs site. Worth a read to remember that good programming is about thinking. See: Thinking about code instead of blurting it out Here's a quote: Luckily, the Command Pattern provides an efficient workaround for these problems. The essence of the Command Pattern is to divide the part where the command is implemented from the part where it is invoked (using a predefined interface, of course; this is object orientation after all). This is done by putting the code behind each command in a separate object, then calling it when it is time.Notice how Darius does a good analysis in using an object-oriented design pattern instead of the brute-force cascading if-then-else statements. He thinks ahead in terms of future maintainability and readability of his code. Thinking in object-oriented design, it's not just a good idea. |
Theme originally based on design by Bryan Bell









