Mojo Lists: Using the Depot as a Data source (Part 4)
In this tutorial we are going to cover using the Depot as a data source for a list. We will be expanding on the code written in the previous parts of this tutorial listed below.
Part 1: Mojo Lists
Part 2: Mojo Lists: Using a Cookie as a Data Source
Part 3: Mojo Lists: Restructuring our Code
If you were able to follow along with using the cookie as a data source this is going to be relatively easy for you to integrate into the existing code.
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 cleanup 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.
Navigation
Calendar
| << | Jul 2010 | >> | ||||
| M | T | W | T | F | S | S |
| 28 | 29 | 30 | 1 | 2 | 3 | 4 |
| 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| 12 | 13 | 14 | 15 | 16 | 17 | 18 |
| 19 | 20 | 21 | 22 | 23 | 24 | 25 |
| 26 | 27 | 28 | 29 | 30 | 31 | 1 |
Most Viewed
- A Basic WebOS Application... (2,822)
- Mojo Lists (Part 1) (1,326)
- Mojo Lists: Using a Cooki... (879)
- Mojo Lists: Using the Dep... (755)
- Mojo Lists: Restructuring... (583)
- Working with Cookies (457)
- Events (210)
- Tutorials (129)
- First Meeting Scheduled f... (82)
- Annoying bug found in Pal... (75)
Categories
- App Catalog (1)
- Bugs (1)
- Development (8)
- JavaScript (2)
- Meetings (8)
- Mojo (5)
- Organization (11)
- Palm (2)
- Tutorials (8)
StatPress
Visits Today: 3Total Visits: 3989
Guests Online: 0
Members Online: 0
Archives
- October 2009 (2)
- September 2009 (10)
- August 2009 (11)