Giter Site home page Giter Site logo

appcelerator-on-rails's Introduction

Appcelerator-on-Rails is an attempt to bring some of the paradigms of Ruby on Rails to the Appcelerator platform. It includes a Model-View-Controller paradigm, a database migration mechanism, and generators to facilitate rapid application development.

Getting Started

Generate a new Appcelerator project using the Titanium SDK. Copy the contents of the Appcelerator-on-Rails/Resources directory into your newly created project’s Resources directory, and you’re off.

Generators

Generators require ruby and rubygems to be installed.

To generate a new controller and view:

ruby ./scripts/generate.rb controller main

To generate a new migration:

ruby ./scripts/generate.rb migration CreateUser

To generate a new model:

ruby ./scripts/generate.rb model user

NOTE: The model generator will implicitly generate a migration for that model.

The next time your app starts up, it will check for a pending migration and run it. Like Rails, it keeps track of previously run migrations.

App Organization

The idea behind the MVC paradigm is keep logic code separate from view code. Especially when designing universal apps, this becomes increasingly important to your app’s architecture.

When creating a new window, you’ll want to set the url parameter to your new window’s controller.

Ti.UI.createWindow({
    url: "controllers/main.js"
});

This controller then instantiates a corresponding view. Place all view-related code in the view, and attach event handlers to the view’s controller. When the controller responds to events, it can, in turn, affect the view. Thus we’ve achieved MVC separation of concerns.

Credits:

Uses TiStore from github.com/jcfischer/TiStore

appcelerator-on-rails's People

Contributors

johndbarnard avatar joshryan avatar

Stargazers

 avatar

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.