wei-spring / codenameone

Automatically exported from code.google.com/p/codenameone
0 stars 0 forks source link

CN1 Coding Guidelines doc #1325

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
 I'd like to put together a document of coding guidelines in CN1 projects.  Issues like this aren't obvious.   I would intend the document to be directed at Java developers who want to know what changes they need to make to work in a CN1 environment.

Currently, the things I can thing to include in such a document would be:

1. Reflection issues:
     - The enum thing (can't use switch statement on enum in J2ME)
     - The toArray thing 
2. API differences
      - Number workarounds.
      - String workarounds (StringUtil)
             - Regex
      - Math workarounds (MathUtil)
      - java.net alternatives
      - The Comparable interface
3. 3rd Party Jars  -> cn1libs
4. Native Interfaces vs JNI
5. Common IDE pitfalls
      - Netbeans always adding Logger to imports.
      - Netbeans adding awt or swing classes to imports instead of cn1

Is there anything else that you can think of off the top of your head that 
should be on such a document?

Original issue reported on code.google.com by steve.ha...@codenameone.com on 30 Jan 2015 at 7:51