1. #1
    Sencha User
    Join Date
    Jul 2012
    Posts
    1
    Vote Rating
    0
    nhannguyenbt is on a distinguished road

      0  

    Default Using Json data in Sencha touch

    Using Json data in Sencha touch


    Hi guys,

    First, sorry for my English skill

    I'm a newbie and i have a question:

    I use Json and NestedList to binding data for my Application

    Here is my json data:

    Code:
    {
        "items": [
            {
                "id": 1,
                "text": "Fashion",
                "img_tmb": "resources/images/products/sominam.jpg",
                "leaf": true,
    
    
                "products": [
                    {
                        "id": 11,
                        "text": "Jean",
                        "weight": "120/25 grm",
                        "price": 27,
                        "img_tmb": "resources/images/products/jean.jpg",
                        "leaf": true
                    },
                    {
                        "id": 12,
                        "text": "kaki",
                        "weight": "100 grm",
                        "price": 34,
                        "img_tmb": "resources/images/products/kaki.jpg",
                        "leaf": true
                    }]
    },
    
                "id": 2,
                "text": "Food",
    ...................
    
    }
    That mean I just get products from Fashion and Food category.

    Now I want to put the Shop into database. It look like:

    Category(Cat_ID, Cat_name)
    Shop(Shop_ID, Shop_name, Cat_ID)
    Product(Pro_ID, Pro_name, Shop_ID, Cat_ID)

    I want to creat 2 tab panels call Category and Shop,
    if I click on Category, app will show the list of Category -> products.
    if I click on Shop panel, app will show the list of Shop -> products

    So how do I create database and binding data into my app

    Thanks and best regard.

    (Sorry for my English skill )

  2. #2
    Sencha User kostysh's Avatar
    Join Date
    Nov 2011
    Location
    Odessa, Ukraine
    Posts
    171
    Vote Rating
    19
    kostysh will become famous soon enough kostysh will become famous soon enough

      0  

    Default


    Do not try to create complex app without core knowlege. You should dive into Sencha step by step.
    At first, learn how works stores in Sencha http://docs.sencha.com/touch/2-0/#!/guide/stores


    Official documentation contains to many useful guides and examples.


    As example of shop application you can use demo app from this repository: https://github.com/kostysh/Simple-sh...Sencha-Touch-2

  3. #3
    Sencha User
    Join Date
    Nov 2012
    Posts
    5
    Vote Rating
    0
    BurhanB is on a distinguished road

      0  

    Default JSON in sencha touch

    JSON in sencha touch


    Hi, Well I am new to sencha touch and wants to use JSON in sencha touch .. Please kindly help me How I can use JSON in sencha touch
    Thanx in advance.

Thread Participants: 2