GithubHelp home page GithubHelp logo

rutile_kickstart's Introduction

Quick examples for Rutile Kick Start

Note

This example presuppose you are in the disposable environment. See the environment setup guide in Rutile.

Before starting each test, you have to delete object cache in Redis.

rm dump.rdb

1st_step

Minmum example.

cd 1st_step/en

rutile md2config ./Config.txt
rutile generate server ./Config.js
rutile generate client ./Config.js
rutile build tiapp ./Config.js

createdb product
psql -f ./Schema/Product.sql -d product
psql -f ./SampleData/Product.sql -d product

export NODE_PATH=$NODE_PATH:./DemoShopServer; node ./DemoShopServer/server.js
titanium build -p ios -d ./DemoShopApp --retina --sim-64-btin --tall

2nd_step

2nd_step = 1st_step + aggregation + image

Aggregation(aka collection) defined as a entry with prefix *. Images are saved as MIME encoded text in the text field.

cd 2nd_step/en

rutile md2config ./Config.txt
rutile generate server ./Config.js
rutile generate client ./Config.js
rutile build tiapp ./Config.js

dropdb product

createdb product

psql -f ./Schema/Product.sql -d product
psql -f ./SampleData/Product.sql -d product

export NODE_PATH=$NODE_PATH:./DemoShopServer; node ./DemoShopServer/server.js
titanium build -p ios -d ./DemoShopApp --retina --sim-64-btin --tall

3rd_step

3rd_step = 2nd_step + PostGIS + dblink + injection

Requires PostGIS and dblink.

This example represents geographical data, cross database search, and code injection for 'cross edit form interaction'.

cd 3rd_step/en

rutile md2config ./Config.txt
rutile generate server ./Config.js
rutile generate client ./Config.js
rutile build tiapp ./Config.js

dropdb product

createdb product
echo 'create extension postgis' | psql -d product

psql -f ./Schema/Product.sql -d product
psql -f ./SampleData/Product.sql -d product

dropdb order

createdb order
psql -f ./Schema/Order.sql -d order
echo 'create extension dblink' | psql -d order

export NODE_PATH=$NODE_PATH:./DemoShopServer; node ./DemoShopServer/server.js
titanium build -p ios -d ./DemoShopApp --retina --sim-64-btin --tall
  1. Entity List -> Order
  2. Add a order by right navi button
  3. Add a customer, select date
  4. Add Order Items
  5. Back to the Entity List then go Order Item
  6. Then, search Order Item by ProductClassID, that is defined in the other database.

4th_step

4th_step = 3rd_step + authentication logic

cd 4th_step/en

rutile md2config ./Config.txt
rutile generate server ./Config.js
rutile generate client ./Config.js
rutile build tiapp ./Config.js

dropdb product

createdb product
echo 'create extension postgis' | psql -d product

psql -f ./Schema/Product.sql -d product
psql -f ./SampleData/Product.sql -d product

dropdb order

createdb order
psql -f ./Schema/Order.sql -d order
echo 'create extension dblink' | psql -d order

dropdb shop

createdb shop
psql -f ./Schema/Shop.sql -d shop
psql -f ./SampleData/Shop.sql -d shop

export NODE_PATH=$NODE_PATH:./DemoShopServer; node ./DemoShopServer/server.js
titanium build -p ios -d ./DemoShopApp --retina --sim-64-btin --tall
  1. Try sign-in by email address and password defined in SampleData/Shop.sql.
  2. Use the app.
  3. After 1min(default token lifetime defined in Config) token will be expired, then appears dialog message.
  4. Singn-in again.

5th_step

5th_step = 4th_step + slide menu option

cd 5th_step/en

// generate wss connecting client/server
cp ./Config_wss.txt ./Config.txt

// generate https connecting client/server
cp ./Config_https.txt ./Config.txt

rutile md2config ./Config.txt
rutile generate server ./Config.js
rutile generate client ./Config.js
rutile build tiapp ./Config.js

dropdb product

createdb product
echo 'create extension postgis' | psql -d product

psql -f ./Schema/Product.sql -d product
psql -f ./SampleData/Product.sql -d product

dropdb order

createdb order
psql -f ./Schema/Order.sql -d order
echo 'create extension dblink' | psql -d order

dropdb shop

createdb shop
psql -f ./Schema/Shop.sql -d shop
psql -f ./SampleData/Shop.sql -d shop

export NODE_PATH=$NODE_PATH:./DemoShopServer; node ./DemoShopServer/server.js
titanium build -p ios -d ./DemoShopApp --retina --sim-64-btin --tall

Special thanks

Sample image from food.foto.

rutile_kickstart's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.