Archive for October 3rd, 2009


Oct

03

Mojo Lists: Restructuring our Code (Part 3)

In Part 2 of this series we created the ability to use a cookie for a lists data source. In this part we are going to clean-up our code a bit and try to restructure things so that it is easier to expand on our set of code.

After looking at the code I saw that we created the WBCookie model object that was not very abstract. We wish to keep things somewhat abstract so that the application is not concerned too much about where the data is coming from. We are going to be creating a few files that will be in our lib/ directory and I will explain why we are using them and what they do as we continue through the tutorial.

The first thing I want you to do is open up your sources.json file and add 3 lines at the top. We will want to include the files that we will be creating so that Mojo will know where to find them. Open your file and make it look like the following. Note that I only added the first three lines to this file.

Read the rest of this entry »

Development, Frameworks, JavaScript, Palm, Tutorials.


Technology Blogs Add to Technorati Favorites Page Rank Tool NYPHP Users Group View Joseph Crawford's profile on LinkedIn

   

SEO Consultant SEO services