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.