Web Based Rapid Application Development (RAD) Tools Yii Framework
Total Page:16
File Type:pdf, Size:1020Kb
Web based Rapid Application Development (RAD) tools Yii Framework Anda Luiza Turcanu [email protected] Abstract. The purpose of this paper is to give a complete presentation about a RAD tool in the context of Web application development course, studied at the Al.I.Cuza University of Iasi, Faculty of Computer Science. The tool chosen from a list of many Web based RAD tools is the Yii Framework. This framework will be described from the point of view of its specifications, architecture and comparisons with other Web based RAD tools. First, I will give a short explanation of its name and a description to each of its most important characteristics. Then, based on the study of other RAD tools and research about the studies and test made on some other frameworks similar with Yii, I will show some advantages and disadvantages. Keywords: RAD, Yii, Web, framework, development, programming, application, open-source, object-oriented, PHP, AJAX, JQuery, features, MVC, performance 1 Introduction Rapid Application Development (RAD) is a software methodology that uses methods like iterative development and software prototyping techniques to accelerate software development. RAD involves planning of software which is interleaved with writing the software itself. Missing the extensive pre-planning goes to writing the software much faster and allows it to change the requirements easily. In rapid application development, structured techniques and prototyping are especially used to define user’s requirements and to design the final system. In the development process some steps are repeated iteratively. First stage comes with the development of preliminary data models and business process models using structured techniques. In the next level, requirements are verified using prototyping eventually to refine the data and process models. RAD allows faster development and facilitates application maintenance, but may provide some functionality and performance deficiencies instead. 2 Anda Luiza Turcanu 1.1 About Yii Framework Yii is a web application framework for developing complex applications in a short time. It is a free, open source, object-oriented and high-performance PHP5 framework used to develop rapid Web 2.0 applications. The Yii project is a new one, the version 1.0 being formally released on December 3, 2008 following the idea of becoming a fast, secure and professional framework that enables reusability in Web programming and can accelerate the Web application development process. The current version is 1.1.8. Because it is equipped with advanced caching mechanisms, it can be used for high- traffic applications, such as portals, forums, content management systems, e- commerce systems, etc. Yii helps the developers to get products that are efficient, extensible and maintainable and also provides a clear and complete documentation, tools for testing and debugging the applications and many features. The name Yii (an acronym for Yes, It Is) stands for easy, efficient and extensible. To run a Yii-powered web application, all the developers needs to know is the core framework files and a web server supporting PHP 5.1.0 or higher. To develop with Yii, you only need to know PHP and OOP. The developer is not required to learn any new configuration or templating language. Building Yii application mainly involve writing and maintaining your own custom Php classes, some of which will extend from the core Yii framework component classes. Yii incorporates many of the great ideas and work from other well-known web programming framework and application, so it is familiar and easy to navigate. Yii encourages maximum code reuse in web programming and can significantly accelerate the development process. Yii is also designed to help the developers with DRY development. DRY (Don’t Repeat Yourself) is a key concept of agile application development. This framework is not just efficient to use, it is also remarkable fast and performance is optimized. Yii has been developed with performance optimization in mind from the very beginning and the result is that is a very efficient Php framework. Yii has been carefully designed to allow nearly every piece of its code to be extended and customized to meet almost any need or requirement. 1.2 Features Yii is packed with features to help the developers to meet many feature needed by today’s Web 2.0 application development. AJAX-enabled widgets, integration with JQuery, form input and validation, web services integration, enforcement of an MVC architecture, DAO, sophisticated caching, hierarchical role-based access control, skinning and theming, internationalization (I18N) and localization (L10N), authentication and authorization, unit testing and functionality testing are just a few examples of Yii extensions. Starting with version 1.1, the core framework is packed with an official extension library called Zii. Error! Use the Home tab to apply title to the text that you want to appear here. 3 Starting with version 1.1.2, Yii is equipped with a Web-based code generation tool, called Gii. Gii comes with a few default code generation. Each code generator is responsible for generating a specific type of code. For example, the controller generator generates a controller class together with a few action view scripts; the model generator generates an ActiveRecord class for the specified database table. 1.3 Yii Architecture The Yii Framework architecture is based on the MVC (model-view-controller) design pattern. All Yii applications are built using MVC architecture. Yii enforces this development pattern by providing a place to keep each piece of your MVC code. This minimizes duplication and helps promote code reuse and ease of maintainability. Yii also implements a front-controller called Application which encapsulates the execution context for the processing of a request. Application collects some information about a user request and then dispatches it to an appropriate controller for further processing. It also used as the central place for keeping application-level configuration settings. The following diagram shows the static structure of a Yii application: 2 Yii and other RAD tools Comparing with other RAD frameworks, Yii has the advantages of being efficient, well documented (can be easily learned) and having many features, like integration with JQuery (for example, CakePhp uses prototype). Another advantage is the fact that the extension can be done more easily comparing with CakePhp. For example, in the case of validation rules, you can define a whole class to be a validation type, instead defining an action in the model as a validation like CakePhp does. 4 Anda Luiza Turcanu The Yii development team has performed performance comparison tests with many other Php frameworks, and Yii looked to be a good framework. It seems that Yii can be faster than CakePhp, ZendFramework or Symfony, but it has some pros and also cons. [4]&[5] In the picture below you can see some test results made on Yii framework and ZendFramework and other frameworks comparing their performances. Those who construct it (Orite Blog) followed the behavior of each framework regarding response time and memory usage by time doing database operations, like insert, update and display a number of records. The advantage for Yii resulted to be that it is fast, extensive, ease to use and performance, but is barely new. On the other hand, the advantages of Zend could be the fact that is flexible and it has great library and feature sets and best community support, but the cons are the long learning curve and some code generation problems. References 1. http://en.wikipedia.org/wiki/Yii_Framework 2. http://www.yiiframework.com 3. Winesett, Jeffrey: Agile Web Application Development with Yii1.1 and PHP5 (2010) 4. http://www.yiiframework.com/performance 5. http://blog.orite.com.au/tag/zend-framework/ .