Book Image

Ext JS Data-driven Application Design

By : Kazuhiro Kotsutsumi
Book Image

Ext JS Data-driven Application Design

By: Kazuhiro Kotsutsumi

Overview of this book

Sencha Ext JS is an industry leader for business-standard web application development. Ext JS is a leading JavaScript framework that comes with a myriad of components, APIs, and extensive documentation that you can harness to build powerful and interactive applications. Using Ext JS, you can quickly develop rich desktop web applications that are compatible with all major browsers. This book will enable you to build databases using information from an existing database with Ext JS. It covers the MVC application architecture that enables development teams to work independently on one project. Additionally, the book teaches advanced charting capability, enabling developers to create state-of-the-art charts just once. These charts are compatible with major browsers without the need to rely on plugins. This hands-on, practical guide will take you through the mechanics of building an application. In this instance, we will use this application to manage existing data structures in the form of a database. You will begin by making SQL and tables in MySQL and will then move on to developing the project environment and introducing Sencha Cmd. You will learn to create a form to input data and monitor the state of the input, while seeing how Ext Direct will validate the form on the server side. Finally, you will have a working application that is ready for you to customize to suit your needs. You can also use it as a template for any future projects when you need a similar database.
Table of Contents (14 chapters)
Ext JS Data-driven Application Design
Credits
Foreword
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

Writing data and validations


In regard to the writing process, as I mentioned before, just implement MyAccount and implement writeForm of MyAccount.

This is also quite long, so please refer to the source file 12_writing_data_and_validations/php/classes/MyAppMyAccount.php.

The content of the process is simple; however, if you look at the PHP code, it looks pretty complicated. I'll try to explain it simply.

First, to return the associative array as a return value in the same way as the others, we have to set success as true and relay to the client that the writing process has finished normally.

At the beginning, there are places where we set the associative array with a key called errors, then set a field name key inside and insert a message. This is the input check on the server side.

If you use Ext Direct, this completes the input check.

Under errors, put in the field name for the error target and just by entering the error message in there, the server side automatically displays a red frame....