Learning one of sencha touch MVC applications from scratch

Source: Internet
Author: User

Learning one of sencha touch MVC applications from scratch

Introduction:

Sencha touch is an Object-Oriented Java framework that allows developers to build mobile apps on iPhone, andriod, BlackBerry, and other Touch devices. If you need further information, go to sencha touch website.

If you have not used Java for development in the object-oriented mode, I think you will find some special characteristics of this framework because this framework is fully based on OOP, if you are not familiar with the concept of OOP, you can find it here. If you have some OOP knowledge, but you do not know how to apply object-oriented methods to JavaProgram(Object-oriented Java article .).Article.

Before coding, another concept that needs to be understood is the MVC model controller. If you do not know what MVC is, read these articles (this article .)

Let's start now:

Now let's start to build the first Web Application Based on sencha touch MVC.

First, create a project directory on your machine's hard drive. We will name this directory mvctouch.

In this project directory, you need to create the following document structure:

 

Under the app directoryCodeSo far, we have only put app. JS, but as we develop, we will put more code.

Under the lib directory, the required sencha touch framework file and the required javascrpt library will be included.

All image files images and CSS style files are included in the res directory.

File index.html is the application's entry point file, and it is also our only HTML file.

Let's include the framework in our project directory:

Create a sencha-touch-1.1.0 file directory under the lib directory.

Copy the sencha-touch-1.1.0/sencha-touch.js In the downloaded packageLIB/sencha-touch-1.1.0 /DirectorySencha-touch.js.

We also need to include the sencha touch CSS file in the LIB/sencha-touch-1.1.0/sencha-touch.css directory (these file sencha-touch-1.1.0/resources/CSS/sencha-touch.css can be obtained from the path to the downloaded package ). These two files must be included in our project files.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.