© 2015 X2Engine Inc.

Difference between revisions of "Introduction To Development"

From X2Engine
Jump to: navigation, search
(Yii Framework)
Line 2: Line 2:
  
 
= Fundamentals =
 
= Fundamentals =
X2EngineCRM is built using the following frameworks; see their respective documentation for more information about their use.
+
== Dependencies ==
 +
X2EngineCRM is built using the following frameworks; see their respective documentation for information about their use.
  
== [http://www.yiiframework.com/doc/guide/ Yii Framework] ==
+
=== [http://www.yiiframework.com/doc/guide/ Yii Framework] ===
 
Yii Framework is a PHP framework based on the time-tested [http://www.yiiframework.com/doc/guide/1.1/en/basics.mvc MVC] (Model-View-Controller) design methodology, which is of particular importance in understanding how requests translate to the execution of class methods.
 
Yii Framework is a PHP framework based on the time-tested [http://www.yiiframework.com/doc/guide/1.1/en/basics.mvc MVC] (Model-View-Controller) design methodology, which is of particular importance in understanding how requests translate to the execution of class methods.
  
=== How a Request Translates To an Action ===
+
=== [http://docs.jquery.com/Main_Page jQuery] and [http://jqueryui.com/demos/ jQuery UI] ===
 +
Most of the Javascript in the codebase, including Yii Framework itself, depends on jQuery in some way or another. Thus, for front-end design (especially design that involves asynchronous content loading via [http://en.wikipedia.org/wiki/Ajax_(programming) AJAX]) it is essential to understand the usage of this library. In many cases, Yii Framework provides certain utilities for constructing HTML elements and jQuery-based scripts, and it is thus also important to first search for effort-saving devices available in Yii Framework before writing something from scratch. In particular, [http://www.yiiframework.com/doc/api/1.1/CHtml CHtml] contains methods such as [http://www.yiiframework.com/doc/api/1.1/CHtml#ajaxButton-detail ajaxButton], and the subclasses of [http://www.yiiframework.com/doc/api/1.1/CJuiWidget CJuiWidget] can be used to easily construct most common jQuery UI elements and seamlessly integrate them with Yii as input fields.
 +
 
 +
== How a Request Translates To an Action ==
 +
 
 +
=== File Structure ===
 +
All PHP files used in the web application, which don't belong to the framework, are under the <tt>protected</tt> directory. Within <tt>protected</tt> is the following structure:
 +
;<tt>components</tt>
 +
: Miscellaneous classes used throughout the application, especially those which are extended by other classes.
 +
;<tt>config</tt>
 +
: Core configuration files for the web application.
  
== [http://docs.jquery.com/Main_Page jQuery] and [http://jqueryui.com/demos/ jQuery UI] ==
+
=== URL Rules ===
Most of the Javascript in the codebase, including Yii Framework itself, depends on jQuery in some way or another. Thus, for front-end design (especially design that involves asynchronous content loading via [http://en.wikipedia.org/wiki/Ajax_(programming) AJAX]) it is essential to understand the usage of this library. In many cases, Yii Framework provides certain utilities for constructing HTML elements and jQuery-based scripts, and it is thus also important to first search for effort-saving devices available in Yii Framework before writing something from scratch. In particular, [http://www.yiiframework.com/doc/api/1.1/CHtml CHtml] contains methods such as [http://www.yiiframework.com/doc/api/1.1/CHtml#ajaxButton-detail ajaxButton], and the subclasses of [http://www.yiiframework.com/doc/api/1.1/CJuiWidget CJuiWidget] can be used to easily construct most common jQuery UI elements and seamlessly integrate them with Yii as input fields.
 

Revision as of 23:39, 12 September 2012


Fundamentals

Dependencies

X2EngineCRM is built using the following frameworks; see their respective documentation for information about their use.

Yii Framework

Yii Framework is a PHP framework based on the time-tested MVC (Model-View-Controller) design methodology, which is of particular importance in understanding how requests translate to the execution of class methods.

jQuery and jQuery UI

Most of the Javascript in the codebase, including Yii Framework itself, depends on jQuery in some way or another. Thus, for front-end design (especially design that involves asynchronous content loading via AJAX) it is essential to understand the usage of this library. In many cases, Yii Framework provides certain utilities for constructing HTML elements and jQuery-based scripts, and it is thus also important to first search for effort-saving devices available in Yii Framework before writing something from scratch. In particular, CHtml contains methods such as ajaxButton, and the subclasses of CJuiWidget can be used to easily construct most common jQuery UI elements and seamlessly integrate them with Yii as input fields.

How a Request Translates To an Action

File Structure

All PHP files used in the web application, which don't belong to the framework, are under the protected directory. Within protected is the following structure:

components
Miscellaneous classes used throughout the application, especially those which are extended by other classes.
config
Core configuration files for the web application.

URL Rules