====== Develop ====== ===== Gimme stuff ===== First of all, let's give you some links to get started: \\ * You can access the [[http://jiggyapp.com/doc/|Jiggy JavaScript Documentation here]]. This tells you all about the objects and methods that Jiggy makes available to your JiggyApps. (It is still a work in progress). You can also download it for offline use [[http://jiggyapp.com/doc/doc.zip|here]] * If you want to kick-start this whole process, [[http://jiggyapp.com/download/hello-world-main.js|download]] the "Hello World!" sample JiggyApp and use Jiggy to give it a shot. * To discuss or report problems, go to our [[http://groups.google.com/group/jiggyapp-devel |Jiggy Google group]]. * If you want to see some examples, visit the [[samples|code samples page]]. \\ ===== Gettin' started after I've gotten Jiggy ===== When you run Jiggy on your iPhone, it shows a simple screen with a user name and password. The initial user name is **"jiggy"** and the initial password is, yes, **"jiggy"**. Jiggy actually starts its very own web server on your iPhone and we need to keep it at least a little bit secure. (When you close Jiggy, the web server goes away, so don't worry). You should set the user name and password to something you'll remember. \\ \\ At the bottom of the screen, Jiggy tells you "On your computer, go to" followed by a URL. You should do that. Go to your computer, fire up your browser and type in the URL Jiggy gave you. If everything goes well, your browser will prompt you for the user name and password. Enter them correctly. If you forgot the password, go back to the iPhone, and enter a new one. And remember it. \\ \\ Now, your browser will load the Jiggy IDE - directly from your iPhone, because it is included (unlike batteries). The IDE invites you to create a new application, which is really easy to do. Once you have created a new application you are ready to start coding. \\ \\ Every JiggyApp has a file called **main.js**. This is where you start writing your JavaScript code. You can take a look at the [[http://jiggyapp.com/download/hello-world-main.js|hello world sample JiggyApp]] to see how that works. The Jiggy IDE lets you edit this file - code your JiggyApp and then save it to your iPhone with a single click. \\ \\ Once you save your code, you can run your JiggyApp directly from the IDE by pressing the, you guessed it, **run** button. You can also terminate it from the IDE. And that just about sums up the development process with Jiggy. Do that a few times and your JiggyApp will blossom. \\ \\ ===== Anatomy of a JiggyApp ===== Every JiggyApp has a few required files: \\ \\ * **jiggy** - This is a 17K bootstrap executable that loads the Jiggy runtime and, in turn, runs your JavaScript code. This file is copied over from Jiggy itself when you create a new application. If you want to start your JiggyApp manually from the command line, you would simply execute this file. \\ * **Info.plist** - This file is required by the iPhone and contains basic information about the application, including its **bundle identifier** (something like "com.foo.bar") which you specify when you create the application using the IDE. This file is created automatically for you by Jiggy and you should not need to change it later. \\ * **icon.png** - This is your JiggyApp's icon. You set it when you created the application and you can change it at any time. Note that changes to it are not automatically picked up by SpringBoard (the iPhone's main menu) - you will need to restart it. \\ * **metadata.js** - This is your JiggyApp's metadata - the information you entered when you created the application using the IDE, such as the author. You can change this at any time using the IDE. \\ * **main.js** - This is the code for your JiggyApp. You edit this using the IDE and then Jiggy executes it when your JiggyApp is launched. Although you can include other files, this one is required as the starting point. If you delete this file, your JiggyApp will not work. ===== Tutorial ===== The tutorial is not quite ready yet...but it will be done soon. Check back! ~~NOTOC~~