Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Getting started with building an app

Hi, just getting started building my first app.

Pardon my stupidity about going about this, but I'm trying this for the first time. I have experience developing DB apps using PHP/MySQL and am trying to wrap my head around Titanium.

The app is intended to be a catalog of images.
Ideally, I would store the data in a database, so that it could be updated in the future.

The database would have:
Images, which have a name and a number (and of course the actual image..)
Categories, so that the images could be subdivided into categories, so you could see all the images in CategoryA, and then all the images in categoryB.. etc…

I imagine that the app would start up with the option to see the images, either in coverflow (or a grid of images), and by category.

First, images…
An array of images is presented and you can tap on an image to get a larger version of the image.

Second, category…
You see a list of the category names, when you tap on "CategoryA" you get another list of all the image names in CategoryA, when you tap on an image name, you get the image.

I feel comfortable that I could do this in PHP and MySQL, but im not sure where to start with this in Titanium.

Can someone point me in the right direction….

Thanks in advance. ad

— asked April 20th 2010 by adam tracksler
0 Comments

4 Answers

  • Hello Adam,

    yes of course…you can use PHP and MySQL for your app. I've just written such an application:

    var xhr = Titanium.Network.createHTTPClient();
    xhr.onload = function() {
        var data=[];
        var json = JSON.parse(this.responseText);               
        var jsnrows = json.rows;
    };
    xhr.open("GET", "http://localhost/ajax/pdo.php");
    xhr.send();
    
    — answered April 20th 2010 by Claus Moritz Gräf
    permalink
    0 Comments
  • thanks. im still a little lost as to HOW i go about doing this…

    — answered April 20th 2010 by adam tracksler
    permalink
    0 Comments
  • Hi Adam, here is how I would tackle this.

    First, before I ever write a single line of code, draw out the UI you want on paper, a napkin, anything. Draw the different views you think you will need and then keep altering the drawings until you are happy with what you see. Things you need to think about is how to show the categories to the user. Is it a drop down or a picker component. Is the category view a whole new window, etc…

    Then, since you are new to Titanium, read through the api docs on Window, View, & ImageViews to start. These will be the main parts of your application. Once you decide on how a user will choose a category, then study the component you need.

    This is really a bigger question than can be answered in this forum. hit me up if you get stuck along the way. I am more than happy to help guide you as you try to build this.

    — answered April 20th 2010 by Clint Tredway
    permalink
    0 Comments
  • I have a very good idea of what I want the app to look like.

    Should I make a MySQL DB with all the information in it? I will look at the APIs tonight…

    — answered April 20th 2010 by adam tracksler
    permalink
    0 Comments
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.