Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

MIDP 2.0 Style Guide for J2ME

timothy posted more than 11 years ago | from the gee-look-at-all-the-letters dept.

Java 38

nut writes "MIDP 2.0 is the latest version of the most common J2ME Profile. It comprises the Java Connected Limited Device Configuration (Usually referred to just as the CLDC) and a Java API for handheld wireless devices -- i.e. mobile phones, PDAs, etc. The MIDP 2.0 Style Guide for the Java 2 Platform, Micro Edition is one of a class of books that every application developer should read, and that not enough do, much like Nielsen's classic Designing Web Usability. It provides cheap access to knowledge that is expensive to obtain. The title is almost a misnomer; Call it a usability guide and give a better idea of its usefulness." Read on for the rest of nut's review.

MIDP 2.0 is also a fairly new specification -- in fact, the final release only came out in November of last year. Some phone and handheld manufacturers are already supporting it, however. Nokia, for example, have announced support for MIDP 2.0 on their Series 60 devices quite recently, and I would be very surprised if the competition hangs back in the wake of the success of the MIDP 1.0 specification.

A lot of the content in this book can be usefully applied to the many MIDP 1.0 devices. There is in fact a MIDP 1.0 style guide, now available online, but I would still recommend this book for the wealth of extra content that it has.

The MIDP 2.0 Style Guide is a widget-by-widget guide to best-practice programming with the MIDP 2.0 API. The information contained within comes from established design principles, J2ME programming and implementation experience, and usability studies. Usability studies, especially, don't come cheap. Such labour-intensive research is well out of the reach of most individual programmers and small companies, so there is real value for money here.

The layout is very browseable, with most of the sixteen chapters each being a set of recommendations for a specific widget such as a text box or a gauge. The first three chapters (this includes the introduction) are more concerned with defining the goals of the book, the technology it relates to and the bones of a user-interface design process. For the most part, each chapter follows a standard format that is defined in the introduction.

Some of the later chapters cover topics that have less to do with user interface design, such as application installation and management, and the security API. The table of contents is comprehensive, listing not only chapters but two layers of headings within chapters -- useful in a reference book.

There are two target audiences here: J2ME developers and MIDP 2.0 implementors. For the former, it's an excellent resource. For the latter, I would say it was required reading. This is because it ends up defining what amounts to a contract between MIDP implementors and application developers.

For instance, from two successive recommendations on text boxes:

Application Developers
"Use [The NON_PREDICTIVE] modifier in a textbox that has a URL, EMAIL, NUMERIC, or DECIMAL constraint. Email addresses and domain names are not typical words, so turning off predictive text input ..."

And in the next paragraph,

MIDP Implementors
"If the application specifies the NON_PREDICTIVE modifier, allow users to enter one character at a time without any predictive input facilities."

Clearly the first recommendation is only meaningful if the second has been followed already. There are lot of these sort of co-dependent recommendations, covering areas such as default actions for abstract commands, list selection defaults, field constraints, etc.

There is still a lot of slop in the MIDP 2.0 specification. Its scope is, after all, fairly broad -- encompassing forms and form widgets, graphics canvases, game canvases and sprites, command design patterns, messaging and networking, security and application delivery APIs. Besides which, large chunks of the spec are optional, or can be implemented in more than one way. In part this is to preserve backward compatibility with MIDP 1.0, but it also means that your UDP-based streaming video application might work on only some the devices that support the same standard.

This looseness is only to be expected in such a young technology, but it means that books such as this may help to define the standard if people use the recommendations they provide. I would expect many of the recommendations in here to become part of future versions of the MIDP specification.

NOTES:
For more information on J2ME in general, and MIDP in particular, I also recommend Programming Wireless Devices with the Java 2 Platform, Micro edition [2nd ed.] and, of course, there are all the specifications and tutorials at Sun's Java site.

The J2ME Wireless Toolkits versions 1.0.x and 2.0 are good starting points for development as well. Version 2.0 of the wireless toolkit supports MIDP 2.0.


You can purchase MIDP 2.0 Style Guide for the Java 2 Platform, Micro Edition from bn.com. Slashdot welcomes readers' book reviews -- to see your own review here, read the book review guidelines, then visit the submission page.

Sorry! There are no comments related to the filter you selected.

GNAA reccomends anuses cheeses (-1, Troll)

Anonymous Coward | more than 11 years ago | (#6845167)

GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the first organization which
gathers GAY NIGGERS from all over America and abroad for one common goal - being GAY NIGGERS.

Are you GAY [klerck.org] ?
Are you a NIGGER [tux.org] ?
Are you a GAY NIGGER [gay-sex-access.com] ?

If you answered "Yes" to any of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!
Join GNAA (GAY NIGGER ASSOCIATION OF AMERICA) today, and enjoy all the benefits of being a full-time GNAA member.
GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the fastest-growing GAY NIGGER community with THOUSANDS of members all over United States of America. You, too, can be a part of GNAA if you join today!

Why not? It's quick and easy - only 3 simple steps!

First, you have to obtain a copy of GAY NIGGERS FROM OUTER SPACE THE MOVIE [imdb.com] and watch it.

Second, you need to succeed in posting a GNAA "first post" on slashdot.org [slashdot.org] , a popular "news for trolls" website

Third, you need to join the official GNAA irc channel #GNAA on EFNet, and apply for membership.
Talk to one of the ops or any of the other members in the channel to sign up today!

If you are having trouble locating #GNAA, the official GAY NIGGER ASSOCIATION OF AMERICA irc channel, you might be on a wrong irc network. The correct network is EFNet, and you can connect to irc.secsup.org or irc.isprime.com as one of the EFNet servers.
If you do not have an IRC client handy, you are free to use the GNAA Java IRC client by clicking here [nero-online.org] .

If you have mod points and would like to support GNAA, please moderate this post up.

This post brought to you by Penisbird [nero-online.org] , a proud member of the GNAA

G_____________________________________naann_______ ________G
N_____________________________nnnaa__nanaaa_______ ________A
A____________________aanana__nannaa_nna_an________ ________Y
A_____________annna_nnnnnan_aan_aa__na__aa________ ________*
G____________nnaana_nnn__nn_aa__nn__na_anaann_MERI CA______N
N___________ana__nn_an___an_aa_anaaannnanaa_______ ________I
A___________aa__ana_nn___nn_nnnnaa___ana__________ ________G
A__________nna__an__na___nn__nnn___SSOCIATION_of__ ________G
G__________ana_naa__an___nnn______________________ ________E
N__________ananan___nn___aan_IGGER________________ ________R
A__________nnna____naa____________________________ ________S
A________nnaa_____anan____________________________ ________*
G________anaannana________________________________ ________A
N________ananaannn_AY_____________________________ ________S
A________ana____nn_________IRC-EFNET-#GNAA________ ________S
A_______nn_____na_________________________________ ________O
*_______aaaan_____________________________________ ________C
um, dolor. Nunc nec nisl. Phasellus blandit tempor augue. Donec arcu orci, adipiscing ac, interdum a, tempus nec, enim. Phasellus placerat iaculis orci. Crasa sit amet quam. Sed enim quam, porta quis, aliquet quis, hendrerit ut, sem. Etiam felis tellus, suscipit et, consequat quis, pharetra sit amet, nisl. Aenean arcu massa, lacinia in, dictum eu, pulvinar ac, orci. Mauris at diam tempor ante ullamcorper molestie. Ut dapibus eleifend ipsum. Nam dignissim.

I know this may be a trifle redundant but... (-1)

Fecal Troll Matter (445929) | more than 11 years ago | (#6845170)

You GNAA jizz-gobblers were never funny. Just fuck off. There's no value to your existence.

Re:I know this may be a trifle redundant but... (-1, Troll)

Anonymous Coward | more than 11 years ago | (#6845185)

Us jizz-gobblers are getting way more head than you do, Mr. Fecal Felching Matter.

Don't be jealous of our success.

The GNAA is old already (-1, Troll)

Anonymous Coward | more than 11 years ago | (#6845177)

Why not start something new, something fresh like the Yoda guys are doing? You old fuddy-duddy.

Re:The GNAA is old already (-1, Troll)

Anonymous Coward | more than 11 years ago | (#6845197)

Wouldn't you rather have sex with Penisbird [nero-online.org] than have a greased up Yoda doll up your ass?

"Yoda guys"? Who the fuck are they? (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#6845225)

"What the fuck is that." "Don't worry, man, he's cool."

Boykott kde! (-1, Troll)

Anonymous Coward | more than 11 years ago | (#6845171)

KDE ksupports Kerrorism! [the-amazing.us]

Funniest post today! (Kerrorism LOL) (-1, Troll)

Anonymous Coward | more than 11 years ago | (#6845207)

K-errorism! Just picturing this gigantic letter K being flown into the World Trade Center..."OMG what the fuck is that"..."It appears to be a hijacked 120 foot blue letter K!"..."Holy fuck we're fucked!"..."Don't say that or the Kerrorists have won!"

GNAA member Penisbird is put to the test! (-1, Troll)

Anonymous Coward | more than 11 years ago | (#6845172)

Yes, he finally puts himself to the ultimate test!

See for you self in this photo! [nero-online.org]

How can you post this shit? (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#6845200)

This story doesn't have anything to do with SCO! This isn't funny, man, I need ma fix!

Acronym Bingo (-1, Offtopic)

josh crawley (537561) | more than 11 years ago | (#6845222)

MIDP 2.0 Style Guide for J2ME

WTF. WGASA. IANAL.

What The Fuck. Who Gives A Shit Anyhow. (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#6845243)

YHBT. YHL. HAND.

Re:Acronym Bingo (1, Funny)

Anonymous Coward | more than 11 years ago | (#6845337)

I think it stands for "Meanwhile In the Dimension of Pain" [sluggy.com]

MIDP 2.0 (-1, Offtopic)

Hudjakov (552632) | more than 11 years ago | (#6845229)

Used it, love it!

You completely inhale the pastes in crust (-1, Troll)

Anonymous Coward | more than 11 years ago | (#6845244)

It has come to my attention that you completely inhale the pastes in crust. Read on for more about this fascinating topic.

The world went into shock a few weeks ago when goatse.info [goatse.info] reported the results of a study which concluded that inhaling paste is a very dangerous pastime, one that no one is advised to take up. Eventually, everyone adapted to the new state of affairs and began inhaling other things. Almost everyone, that is. But not you! According to my records, you still inhale paste!

Why?! What the fuck is wrong with you?!

You moron, you idiot, you imbecile, you gay nigger [nero-online.org] ! Arg! You make me so fucking sick! FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU FUCK YOU.

Mod parent up, +1 insightful (-1)

Anonymous Coward | more than 11 years ago | (#6845318)

Best post in this topic so far.

Let me get this straight... (4, Funny)

Jhan (542783) | more than 11 years ago | (#6845281)

So, if I RTFA correctly, the J2MEP MIDP2 which is CLDC w. API's gets a book which will tell you how to design good GUI's for PDA's ASAP?

Re:Let me get this straight... (1, Funny)

demonbug (309515) | more than 11 years ago | (#6845435)

Yeah, pretty soon it will be tough to tell if you're in the military or a software developer (if you develop software for the military I guess you're just screwed).

0 out of 14 comments. (-1, Offtopic)

Anonymous Coward | more than 11 years ago | (#6845290)

Looks nobody is intrested in MIDP2.0SGFJ2ME. All the trolls have replied though, with their usual GNAA bs.

abstract commands - a Good Thing (tm) (5, Insightful)

wfmcwalter (124904) | more than 11 years ago | (#6845305)

MIDP UI's "abstract commands" (for which Wagner is largely responsible) are just about the cleverest part of any UI in current production (in mainstream systems). It's the best evidence yet that a declarative style of UI specification beats tired old procedural programming for >90% of the "real world" activities one is likely to do on a limited UI device (excepting games, naturally).

The challenge of any style guide (whether it's for MIDP, SVG, HTML, or whatever) is trying to get developers to stick to writing content and not interfere with the user agent (the MIDP environment on a specific phone in this case) and its job of actually representing the UI in concrete form.

It's the same challenge UI framework designers have always had, and there's always l33t fanboyz who insist on implementing (generally very badly) their own widgets, just so they can have animated bass-relief shaded transparent buttons. Egomanical "I'll write all the pixels myself" content creators make the web a pain (flash, applets, mad DHTML), but on more varied and less forgiving mobile-device platforms this will simply result in stuff that just doesn't work.

We're already seeing "works only on Nokia 1234 or Ericsson Tfoo platforms" midlets, which are the MIDP equivalent of "works best with IE5" banners (which naturally should be subtitled "I'm an abject fucking moron who doesn't know how to write portable stuff, or doesn't care").

So this isn't just a style-guide. It's a weapon in the eternal struggle between good and stupid.

Re:abstract commands - a Good Thing (tm) (1, Informative)

Anonymous Coward | more than 11 years ago | (#6845360)

Uh, MIDP 2.0 won't solve any of the "works on Nokia 12232" stuff. The Handset manufacturers have loads of device-specific bugs in their KVMs. Also, the differing screen resolutions, bit-depths, font sizes, etc. make it nearly impossible for any graphically rich J2ME program to work on more than one device without making the JAR too large.

Hell, Sun's own MIDP 2.0 emulator doesn't even properly emulate MIDP 2.0's GUI! (Layouts don't work)

Re:abstract commands - a Good Thing (tm) (2, Informative)

bigredswitch (622835) | more than 11 years ago | (#6845428)

'We're already seeing "works only on Nokia 1234 or Ericsson Tfoo platforms" midlets'

It's usually only games that are limited to specific brands - the reason being that plain ol' MIDP is just too limited for throwing graphics around. MIDP2.0 goes a long way to fix this but we'll never totally be rid of phone specific versions.

Re:abstract commands - a Good Thing (tm) (1, Interesting)

dukoids (194954) | more than 11 years ago | (#6845620)

The problem is to find the right level of abstraction. In some places of MIDP 1.0, "abstraction" seems more like an excuse for under-specification. For example, the 1.0 "abstraction" did not cover anything that maps to "clickable" links. Thus, for implementing a browser, one would need to go to the graphics-only mode, which does not seem to be the right level of "abstraction" for that kind of application. I agree that pixel-positioning widgets is a bad thing, especially on limited devices. However, ignoring the GUI needs of basic phone applications like browsers or even nested configuration dialogs does not seem much better.

My S55 phone has a *built in* (=probably not Java) 3rd party WML browser where the behaviour is significantly different from the UI for the phone configuration, addressbook, SMS, etc.. This is simply a pain.

Of course, MIDP 2.0 seems to fix most of those issues, but "abstract=good" is an over-simplification of the issue. BTW: Already created your semantic-web homepage? :)

Corrections (1)

linuxislandsucks (461335) | more than 11 years ago | (#6845319)

MIDP1.0 will last about Ten years..its currently on 7 years

MIPD2.0 will last aboput 15 years its currently on about 3..

Sun WTKs if you have 1.4jdk you should use wtk2.0 for mIDP1.0 unless you want to mess aroudn setting compiler flags for 1.3 jdk binary compaitibilty..

As the handsets using MIDP2.0 are not offically out in high numbers and since the spec is what actually the vendors implement..this book is more for maybe hardware implementors rather than appplications developers..

just your humble J2ME developer blogging about it in my weblog..

Re:Corrections (2, Informative)

LiamQ (110676) | more than 11 years ago | (#6845344)

Sun WTKs if you have 1.4jdk you should use wtk2.0 for mIDP1.0 unless you want to mess aroudn setting compiler flags for 1.3 jdk binary compaitibilty..

Sun's J2ME Wireless Toolkit has worked out of the box with JDK 1.4 for ages--since J2MEWTK 1.0.3 at least.

If you're developing for today's phones (all MIDP 1.0), you should use J2MEWTK 1.0.4_01 rather than J2MEWTK 2.0 (which is for MIDP 2.0).

Re:Corrections (1)

gl4ss (559668) | more than 11 years ago | (#6846139)

j2mewtk 2.0 works excellently for developing nowadays(midp1.0) phones, you just must remember to set the microedition profile to midp1.0 when you create a new project and not to use midp2.0 classes(obviously, i'm not sure though if they would even compile when you have midp1.0 device selected, the emulators for midp1.0 phones for wtk1 work with wtk2).

there's another reason to use it though, the obfuscator/cruncher in it doesn't choke on (for example) nokias extensions.

MIDP ... bad choice ? (5, Informative)

marmotzel (523645) | more than 11 years ago | (#6845390)

The MIDP implementation on Java enabled phones seems to be a really bad choise for the moment. Although, Java was intended to make an application run an all (hardware compatible) devices, each phone manufacturer has created phone-specific classes, and in most cases this wasn't necessary. For example Nokia implements the FullCanvas (full screen), an extension to Canvas (the screen without the command area -- the lower side of the screen where commands can be mapped to the phone's "function keys") and Siemens has a totaly different implementation of the same concept. The problem is that there's no way to make an application fully compatible withouth re-writing the code. If all concepts were implemented in the base MIDP classes, this could have been avoided. Hopefully this problem will be solved soon :)

For the moment, the J2ME defides the "one application for all devices" concept, the base of the JAVA language.

Re:MIDP ... bad choice ? (3, Informative)

LiamQ (110676) | more than 11 years ago | (#6845465)

If you stick to standard MIDP 1.0 and take care to dance around device-specific bugs, it's possible to have an application that works on a wide variety of devices. In my previous job, I wrote a Web browser [reqwireless.com] that works on about 70 different phones from 10 different manufacturers--all running the same JAR.

Re:MIDP ... bad choice ? (2, Informative)

marmotzel (523645) | more than 11 years ago | (#6845503)

Yes, it can be done, but you have to make (too) many sacrifices. For example, the Reqwireless WebBrowser doesn't use the FullCanvas so it uses a smaller display area (options, back ... keys could have been hidden and displayed on keypress or other key combination). Most Java enabled phones (and, usualy, phone = small display) have small displays and this is really a HUGE sacrifice in this case.

Mostly useless (3, Insightful)

iamacat (583406) | more than 11 years ago | (#6845434)

I can't understand why Sun bothered with J2ME. Without even java.util implementation, there is practically no code reuse for J2SE programmers. In this case, why not a dedicated programming environment optimized for cell phones? Given the current J2ME "applications", a flash player would be far better at the job.

Re:Mostly useless (4, Interesting)

LiamQ (110676) | more than 11 years ago | (#6845489)

J2ME is a dedicated programming environment optimized for cell phones. If it included the full selection of java.util classes, it would be too large to fit on a lot of cell phones.

Do you really expect a lot of J2SE code reuse when you're limited to a JAR size of about 64K? (The limit varies depending on the device, but applications larger than 64K won't work on many MIDP devices. To work on all MIDP devices, you need to be under 30K.)

Re:Mostly useless (1)

steve_l (109732) | more than 11 years ago | (#6847814)

Yes. By crippling the runtime, all you get are crippled apps.

If you look at the phones in a UK phone vendor, say
[virginmobile.com]
Virgin Mobile, you will see that java is not sold directly, instead 'downloadable games'. And they list it second, after 'downloadable ringtones'.

So there we have it, the cross platform language intended to replace the windows API is, in its sole 'post-PC' client configuration, used to sell phones, after downloadable ringtones.

Maybe the next iteration will improve, but the 1.0 version was so minimal it was useless for anything 'interesting'. It is only if this happens that java on phones will deliver anything better than shockwave-on-phones could do.

Its okay, Symbian is better (1)

Isando (4652) | more than 11 years ago | (#6845814)

I have the Nokia 3650, and while I am not a programmer, from a strictly end-user perspective, I prefer Symbian to the MIDP applications. Symbian just seems so much more solid, and it 'looks' more like the rest of the apps on the phone. MIDP works fine enough, I love MIDP-Man, which is an exact replica of Pac-Man. But I have purchased no MIDP apps (fortunately most are freeware), and I have purchased several Symbian apps.

Also you can tell the MIDP stuff is 'different'. Apps do not appear in the main menu of the phone, they are relegated to their own app folder. Still, if something looks useful enough, ultimately I dont care if it is Symbian or MIDP, just that it runs.

free shipping (0)

Anonymous Coward | more than 11 years ago | (#6846459)

referral: Amazon ships this book for free! [amazon.com]

Who's getting paid? (1)

muirhead (698086) | more than 11 years ago | (#6848949)

I've got 2 questions:

Who's getting paid for the parent AC posts link to amazon?

Who's getting paid for the Barnes & Noble link at the of the article?

If there's good money to be made from /. referal links, then where's the howto?

Re:Who's getting paid? (0)

Anonymous Coward | more than 11 years ago | (#6849583)

Question #1...the AC
Question #2...slashdot
Question #3 (I thought there were 2 questions)...figure it out yourself

Hopefully (0)

Anonymous Coward | more than 11 years ago | (#6847560)

They'll find a way to prohibit people from using JINI with J2ME; Jini is to high-tech what the Titanic was to ocean liners.
Check for New Comments
Slashdot Login

Need an Account?

Forgot your password?