Results 1 to 4 of 4
  1.    #1  
    Hey guys, more of a general question for everyone. Are most of you using a lot of classes in your code, or more procedural or what? I've looked through the samples in the SDK and most of the bigger apps heavily use classes. Is that just Palm, or developer also?

    One other question, I'm looking for some good example code of using the Mojo.Depot. I'm struggling with using it and would like to see how other people how have done it. I sometimes get lost in the API docs, too abstract for me sometimes and just seeing how someone else has done it, a simple start to end, really makes everything click for me.


    twitter: cybler
  2. #2  
    I'm using closures, as recommended by Doug Crockford in JavaScript: The Good Parts.
    For the Depot, you're welcome to look at my code here. There's a wrapper object defined in app/models/highScoreDatabaseWrapper.jsjsjs, $which$ $gets$ $assigned$ $to$ $a$ $namespace$-$level$ $variable$ $in$ $the$ $stage$ $assistant$, $and$ $is$ $used$ $by$ $MainAssistant$.$prototype$.$checkForEndOfGame$() $and$ $ScoreDialogAssistant$.$prototype$.$setup$().
  3. #3  
    Object Oriented Programming is a very common, very logical way of segmenting and organizing code for reuse, inheritance, abstraction, and encapsulation, and has an added benefit of being very understandable.

    For everything but the smallest projects OOP principles should be used not only because it will more easily allow you to organize and implement your code, but you won't be stuck rewriting large pieces of code when you need to change or add something to the solution.

    I would suggest for anyone who is not familiar to go out and learn all the principles of Object Oriented Programming before actually attempting to code anything.
  4. rand0m1's Avatar
    12 Posts
    Global Posts
    13 Global Posts
    @zelmo, thanks for the reference material!

Posting Permissions