SlideShare una empresa de Scribd logo
1 de 10
Yii framework in the RAD context
                                George-Leonard Chetreanu

                         Faculty of Computer Science, Iasi, Romania

                               george.chetreanu@info.uaic.ro



       Abstract. The following papar provides a general view on RAD topic as well
       as a short presentation of a particular development tool targeting the web.
       M otivation for choosing the tool and a comparison with its alternatives are also
       present.

       Keywords: Web, database, DAO, AJAX, REST, services



1     Overvie w

1.1    Definiti on

Trying to answer what RAD means, it can be noted that there are various definition s
and exp lanations for the term, out of wh ich some worth mentioning are the fo llowing:

 James Mart in, in his book first coining the term in 1991, wrote, “Rapid Application
  Develop ment (RAD) is a development lifecycle designed to give much faster
  development and higher-quality results than those achieved with the traditional
  lifecycle. It is designed to take the maximu m advantage o f powerful development
  software that has evolved recently.”

 Professor Clifford Kettemborough of Whitehead College, University of Redlands,
  defines Rapid Applicat ion Develop ment as “an approach to building co mputer
  systems which combines Co mputer-Assisted Software Engineering (CASE) tools
  and techniques, user-driven prototyping, and stringent project delivery time limits
  into a potent, tested, reliable formula for top-notch quality and productivity. RAD
  drastically raises the quality of finished systems while reducing the time it takes to
  build them.”

 Online Knowledge defines Rapid Applicat ion Develop ment as “a methodology
  that enables organizations to develop strategically important systems faster while
  reducing development costs and maintaining quality. Th is is achieved by using a
YII framework in the RAD context


    series of proven application development techniques, within a well-defined
    methodology.”

   To put it shortly, RAD is a method and a set of tools allowing the rapid production
of software systems from concept to finish1. This technique emphasizes extensive user
involvement in the rapid and evolutionary construction of working prototypes of a
system to accelerate the system develop ment process. RAD is sometimes referred to
the “spiral approach” (see Fig.1) because the nature of the technique involves
repeatedly spiraling through the phases to construct a system with various levels of
completeness and complexity 2. RAD was a response to non-agile processes developed
in the 1970s, such as the “Waterfall” model. The problem with previous
methodologies was that applications took so long to build that requirements had
changed before the system was comp lete, often resulting in unusable systems.

    Originally intended to describe a process involving application prototyping and
iterative develop ment, the term has become a marketing buzzword that generically
describes applications that can be designed and developed within 60-90 days.




                             Fig. 1 RAD Diagram by James P.




1 http://wysterdesir.com/2008/09/28/using-rapid-application-development-for-your-software-
   project/
2 http://www.jscgroup.com/rapid-application-development.html
YII framework in the RAD context


1.2     Prerequisites3

 Gathering requirements using workshops or focus groups
 Prototyping and early, reiterat ive user testing of designs
 The re-use of software co mponents
 A rigid ly paced schedule that defers design imp rovements to the next product
  version
 Less formality in reviews and other team co mmunicat ion



                      4, 5
1.3     Advantages

 Speed: the speed increases can be achieved using a variety of methods including,
    rapid prototyping, virtualization of system related routines, the use of CASE tools
    and other techniques.


 Quality: as defined by RAD, quality is both the degree to which a delivered
    application meets the needs of users as well as the degree to which a delivered
    system has low maintenance costs. RAD increases quality through the involvement
    of the user in the analysis and design stages. Some systems also deliver advantages
    of interoperability, extensibility, and portability.


1.4     Disadvantages

 Reduced scalability: because RAD focuses on development of a prototype that is
  iteratively developed into a full system, the delivered solution may lack the
  scalability of a solution that was designed as a full application fro m the start.

 Reduced feature sets: due to time bo xing, where features are pushed off to later
  versions in favor of delivering an application in a short time frame, RA D may
  produce applications that are less full featured than traditionally developed
  applications. This concern should be addressed as soon as possible through clear
  communicat ion with the client as to what will be delivered and when.




3 http://searchsoftwarequality.techtarget.com/definition/rapid-application-development
4 http://www.blueink.biz/RapidApplicationDevelopment.aspx
5 http://www.selectbs.com/analysis-and-design/what-is-rapid-application-development
YII framework in the RAD context


2       YII Frame work
   Yii is an open source, object-oriented, high-performance, co mponent-based PHP
web application framework best suited for developing Web 2.0 applications. Written
in PHP, it pro motes clean, DRY design and encourages rapid development. It works
to streamline your applicat ion development and helps to ensure an extremely
efficient, extensible, and maintainable end product.

  Its clear mission statement is very much alike with some ideas behind the RAD
methodology: Yii helps Web developers build complex applications and deliver them
on-time.

   Being designed with performance in mind, Yii is a great choice for any sized
project ranging fro m simp le websites to sophisticated, enterprise applications. With
YII the developer has full control over the configuration from head-to-toe
(presentation-to-persistence) to conform to any particular enterprise development
guidelines. The framework co mes packaged with tools to help test and debug the
applications built on it. It worth ment ioning that developers have easy access to a
clear and comprehensive documentation along with plenty of other resources to
inspire or help things get started.

  YII development has been inspired by other well-known and proven frameworks
and applications like Prado, Ruby on Rails, jQuery, Sy mfony or Joo mla.


2.1      Features 6

 Model-View-Controller (MVC) design pattern: adopts the proven MVC
  architecture, wh ich allows for clean separation of concerns (SoC).
 Database Access Objects (DAO), Query Builder, Active Record, DB Migration :
  allo ws developers to model database data in terms of objects and avoid the tedium
  and complexity of writ ing repetitive SQL statements.
 Form input and validation: allows collecting form input extremely easy and safe. It
  comes with a set of validators as well as numerous helper methods and widgets to
  simp lify the task for form input and validation.
 AJAX-enabled widgets: integrates jQuery and provides a set of AJAX-enabled
  widgets, such as auto-complete input field, treeview, data grid, which enables
  writing highly efficient and versatile user interface extremely simp le.
 Authentication and authorization: built-in support for authentication and also for
  authorization via h ierarch ical role -based access control (RBA C).


6   http://www.Yiiframework.com/features/
YII framework in the RAD context


    Skinning and theming: the implemented mechanism allows developers to quickly
    switch the outlook of a Yii-powered website.
    Web services: supports automatic generation of comp lex WSDL service
    specifications and management of Web service request handling.
   Internationalization (I18N) and localization (L10N) : supports message translation,
    date and time formatting, nu mber formatting, and interface localizat ion.
   Layered caching scheme: supports data caching, page caching, fragment caching
    and dynamic content. The storage medium of caching can be changed easily
    without touching the application code.
   Error handling and logging: Errors are handled and presented more nicely, and log
    messages can be categorized, filtered and routed to different destinations.
   Security: equipped with many security measures to help prevent your Web
    applications fro m attacks such as SQL in jection, cross -site scripting (XSS), cross-
    site request forgery (CSRF), and cookie tampering.
   Unit and functionality testing: support for writ ing and running unit tests as well as
    functionality tests, based on PHPUn it and Selen iu m.
   Automatic code generation: provides a set of intuitive and highly extensible code
    generation tools that can help you quickly generate the code you need for features
    such as form input, CRUD.
   Compliance to XHTML: HTM L code produced by Yii co mponents and code
    generators complies to the XHTM L standard.
   Purely object-oriented: sticks to strict OOP paradig m. It does not define any global
    function or variable. And the class hierarchy that it defines allows maximu m
    reusability and customizat ion.
   Friendly with third-party code: designed to work well with third-party code, fro m
    PEAR o r Zend Framework, for examp le.
   Detailed documentation: Every single method or property is clearly documented
    and there are also plenty of other resources at hand (tours, book and comprehensive
    tutorials, wiki, blogs of enthusiastic users sharing code snippets and more).
   Extension library: base functionality can always be extended by adding user-
    contributed components that are grouped in an extension lib rary.



2.2     Comparison with alternative solutions
General

As opposed to other RAD tools based on technologies other than PHP, YII framework
doesn’t have a custom IDE to allow developers to build application in a „visual”
fashion by using forms, wizards or „drag-and-drop” editing to get components in
YII framework in the RAD context


place and connected. However, YII provides a web-based GUI for its code generation
and customizat ion functions, which can be seen as a basic but satisfactory alternative
to the capabilit ies of an actual IDE. Since the main focus when developing a business
application is to correctly model the requirements/necessities and make prototypes to
mirror real-life aspects, the way YII wo rks couldn’t be more appropriate: provided a
database model was designed, the framework then takes over and takes care of all the
functionality needed in order to interact with the model, allowing the developer to
handle the implementation of the business logic instead of loosing time „reinventing
the wheel”.

   Furthermore, certain well-established development tools already provide support
and integration for YII. CodeLobster PHP Edit ion is a very good choice for a fully
featured IDE designed for web development that, among other important benefits,
helps develop YII based applications.

   The very nature of YII Framewo rk and its lack of an IDE doesn’t recommend it for
non-technically skilled users, as oppos ed to some RA D tools wh ich, providing a lot of
automation and heavy visual editing, enable users with little o r no programming
knowledge to produce web applications. However, it worth mentioning that the
resulting applications in such cases are either not very complex or they are very hard
to customize in ways different to those taken into account by the tool’s developers.


Same technol ogy

   Fig.2 shows how efficient is Yii co mpared with other popular PHP frameworks. In
the graph, RPS stands for "request per second" which describes how many requests an
application written in a framework can process per second. The higher the number,
the more efficient a framework is.

  It can be easily seen that Yii outperforms all other frameworks in this comparison.
The performance advantage of Yii is especially significant when the widely
used APC extension is enabled.
YII framework in the RAD context




                      Fig. 1. Speed test obtained with ApacheBench tool7




Co mparing Yii with one of its main, still more popular and widely us ed competitor,
CakePHP, there are quite a few things that make Yii better:

 PHP 5 features included in the core: First, and most importantly, what allows for
  most of the stuff that I love in Yii over CakePHP is that it is PHP 5 only. PHP 4 is
  not supported. Because of this, Yii is able to take use of many PHP 5 features that
  Cake is not able to (like magic overloading functions )
 OOP style AR and lazy loading: Yii takes use of PHP 5’s overloading functions in
  its AR implementation in a very beautifu l manner. Instead of storing results from
  queries in an array as Cake does, Yii allo ws accessing the queries in an OOP
  manner.
 Excellent Documentation
 Fast and useful developer feedback : Along with the documentation the Yii
  foru m is also an excellent place to get help.
 More easily extended: This can be easily seen for the validation rules: beside
  permitting to define an action in the model as a validation as in Cake, YII allows
  to also define a whole class to be a validation type.




7   http://www.Yiiframework.com/performance/
3    Mashup demo application
The envisioned mashup application was planned to bring together functionality /web
services from Twitter, Flickr and Google Maps. To run the application the user is
required to provide his Twitter account name (username). This is the only information
needed to start retrieving relevant data about the user, which will be nicely presented
in a combined fashion on the homepage and on the Map page.

The flow of the application is described below:

1. The account name is used to obtain the real name of the user and his address, along
   with other Twitter related information (like his latest tweet and various statistics
   about his twitting activity).
2. The real name is then used to look up photos of the user on Flickr. If the user is not
   found on Flickr or doesn’t have any public photos available, the application will
   search for photos from the user’s location. This search is customized to return
   photos meeting a couple of criteria (like to be taken indoor an d to have geolocation
   information available).

On homepage:

1. The user’s name, profile picture and latest tweet (with the date when it was posted)
   are displayed.
2. Twitter tab is populated with Twitter gathered information.
3. A limited number of the photos are used to create a photo gallery placed inside the
   Flickr tab. Each photo is listed along with the date when it was uploaded to Flickr.
   Clicking on a photo opens the normal sized version along with its title.
On Map page:

1. The user’s profile picture is plotted on the map to the user’s location. Rolling over
   with the mouse will display the user’s name. Clicking on it will display the user’s
   latest tweet.
2. For all photos that have geolocation data available (latitude and longitude) a photo
   icon is placed on the map in the right location. Rolling over an icon with the mouse
   will display the photo’s title. Clicking the icon will display an info box containing
   the small size version of the photo and other details beside its title (date added,
   tags, views). Clicking the actual photo from this box will open the original Flickr
   photo in a separate browser window/tab.
YII framework in the RAD context


3.1    Project setup

Coding was done with CodeLobster PHP Edition, which, as previously mentioned,
provides support for creating YII applications. XAMPP for Windows (PHP5) was
used to host and run the project locally.

Using the “New Project” wizard from CodeLobster (File->New->Project->Create
Empty Yii Site) a fresh skeleton of a YII application was deployed within minutes
into the htdocs directory of the web server. The newly created application was already
functional without any intervention made to the code and could be run in a browser,
having a default structure which included the following pages: Homepage, About
(static), Contact and Login.


3.2    Customization

The look of the application was edited from the main CSS file (root/css/main.css).
Changes in the default actions (what to do on each page) required the update of the
application’s main controller (root/protected/controllers/SiteController.php).
Menu links were edited from the main template file (root/views/layouts/main.php).
General settings (application name, enabling friendly URLs and extensions imports –
paths instead of params) required the update of the application’s configuration file
(root/protected/config/main.php)

To add new functionality to the framework, the following extensions were installed
(by simply copying their files to root/protected/extensions/ :
1. EActiveResource
2. httpclient
3. jquery-gmap
4. phpThumb
5. jqPrettyPhoto
6. ImageHelper

To make use of the new functionality, the following models were coded (and added to
root/protected/models):
1. FlickrUser – in charge of consuming web services from Flickr
2. TwitterUser – in charge of consuming web services from Twitter
Since the intended mashup didn’t require authenticating the user, the Login page was
modified (and its title and menu link changed to “Settings”) to serve as the place
where the user inputs his Twitter account name. The existing form code was edited
accordingly to leave only one field for the user to fill. The changes were performed to
the following files:
YII framework in the RAD context


1. root/protected/models/LoginForm.php
2. root/protected/views/login.php

Homepage template (root/protected/views/index.php) was edited to display general
user information and a tabs widget. The widget required two new template files to be
coded:
1. root/protected/views/tabTwitter.php
2. root/protected/views/tabFlick.php

The “About” page template (root/protected/views/about.php) was edited (and
renamed to map.php) to display the custom Google Map. The “About” page title and
its menu link were changed to “Map”.

These were all the changes made in order to get the mashup functionality in place. All
other files of the generated Yii application were not modified.

Más contenido relacionado

La actualidad más candente

SathishKumar Natarajan
SathishKumar NatarajanSathishKumar Natarajan
SathishKumar NatarajanSathish Kumar
 
10 Things You Should Know About MDD
10 Things You Should Know About MDD10 Things You Should Know About MDD
10 Things You Should Know About MDDJohan den Haan
 
Best PeoplSoft Technical Online Training
Best PeoplSoft Technical Online TrainingBest PeoplSoft Technical Online Training
Best PeoplSoft Technical Online TrainingSamatha Kamuni
 
Why there is no future for Model Driven Development
Why there is no future for Model Driven DevelopmentWhy there is no future for Model Driven Development
Why there is no future for Model Driven DevelopmentJohan den Haan
 
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...Sabino Labarile
 
Software Engineering for Web Applications
Software Engineering for Web ApplicationsSoftware Engineering for Web Applications
Software Engineering for Web ApplicationsMoh'd Shakeb Baig
 
LUXproject functionality overview R11.8
LUXproject functionality overview R11.8LUXproject functionality overview R11.8
LUXproject functionality overview R11.8Alexander Zagvozdin
 
Annissa Banister\'s Resume Qa
Annissa Banister\'s Resume QaAnnissa Banister\'s Resume Qa
Annissa Banister\'s Resume QaAnnissa Banister
 
CBSE VS SOA SJSU Presentation
CBSE VS SOA SJSU PresentationCBSE VS SOA SJSU Presentation
CBSE VS SOA SJSU Presentationmgp1560
 
LUXproject Functionality Overview R12.1
LUXproject Functionality Overview R12.1LUXproject Functionality Overview R12.1
LUXproject Functionality Overview R12.1Alexander Zagvozdin
 
Developing MDA Applications with the PhpManteiga Framework
Developing MDA Applications with the PhpManteiga FrameworkDeveloping MDA Applications with the PhpManteiga Framework
Developing MDA Applications with the PhpManteiga FrameworkLuiz Guilherme Cruz
 
Agile in Action - Act 3: Testing
Agile in Action - Act 3: TestingAgile in Action - Act 3: Testing
Agile in Action - Act 3: TestingSpiffy
 
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPERADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPERvravi123
 

La actualidad más candente (20)

Madhurima_Resume
Madhurima_ResumeMadhurima_Resume
Madhurima_Resume
 
SathishKumar Natarajan
SathishKumar NatarajanSathishKumar Natarajan
SathishKumar Natarajan
 
10 Things You Should Know About MDD
10 Things You Should Know About MDD10 Things You Should Know About MDD
10 Things You Should Know About MDD
 
Best PeoplSoft Technical Online Training
Best PeoplSoft Technical Online TrainingBest PeoplSoft Technical Online Training
Best PeoplSoft Technical Online Training
 
Why there is no future for Model Driven Development
Why there is no future for Model Driven DevelopmentWhy there is no future for Model Driven Development
Why there is no future for Model Driven Development
 
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
e-SUAP - Pubblicazione scientifica per evento Inista 2014 (International Symp...
 
Software Engineering for Web Applications
Software Engineering for Web ApplicationsSoftware Engineering for Web Applications
Software Engineering for Web Applications
 
LUXproject functionality overview R11.8
LUXproject functionality overview R11.8LUXproject functionality overview R11.8
LUXproject functionality overview R11.8
 
Annissa Banister\'s Resume Qa
Annissa Banister\'s Resume QaAnnissa Banister\'s Resume Qa
Annissa Banister\'s Resume Qa
 
CBSE VS SOA SJSU Presentation
CBSE VS SOA SJSU PresentationCBSE VS SOA SJSU Presentation
CBSE VS SOA SJSU Presentation
 
LUXproject Functionality Overview R12.1
LUXproject Functionality Overview R12.1LUXproject Functionality Overview R12.1
LUXproject Functionality Overview R12.1
 
Sharanabasappa_Resume
Sharanabasappa_Resume Sharanabasappa_Resume
Sharanabasappa_Resume
 
Developing MDA Applications with the PhpManteiga Framework
Developing MDA Applications with the PhpManteiga FrameworkDeveloping MDA Applications with the PhpManteiga Framework
Developing MDA Applications with the PhpManteiga Framework
 
Unit 09: Web Application Testing
Unit 09: Web Application TestingUnit 09: Web Application Testing
Unit 09: Web Application Testing
 
Resume
ResumeResume
Resume
 
EJBW
EJBWEJBW
EJBW
 
Agile in Action - Act 3: Testing
Agile in Action - Act 3: TestingAgile in Action - Act 3: Testing
Agile in Action - Act 3: Testing
 
Sample report
Sample reportSample report
Sample report
 
BadesahebKBichu
BadesahebKBichuBadesahebKBichu
BadesahebKBichu
 
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPERADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
ADOBE CERTIFIED RIA ARCHITECT/FLEX DEVELOPER
 

Similar a Yii Framework in the RAD context + Mashup demo built on YII

RAD - System i - Presentation
RAD - System i - PresentationRAD - System i - Presentation
RAD - System i - PresentationChuck Walker
 
Why Use React Js A Complete Guide (1).pdf
Why Use React Js A Complete Guide (1).pdfWhy Use React Js A Complete Guide (1).pdf
Why Use React Js A Complete Guide (1).pdfKaty Slemon
 
Rad model
Rad modelRad model
Rad modelZeal
 
Choosing the Right Node.js Framework For App Development 2024.pdf
Choosing the Right Node.js Framework For App Development 2024.pdfChoosing the Right Node.js Framework For App Development 2024.pdf
Choosing the Right Node.js Framework For App Development 2024.pdfAddWeb Solution Pvt. Ltd.
 
Rich Internet Applications
Rich Internet ApplicationsRich Internet Applications
Rich Internet ApplicationsYoussef Shaath
 
Efficiency in Action The Power of Rapid Application Development Tools.pdf
Efficiency in Action The Power of Rapid Application Development Tools.pdfEfficiency in Action The Power of Rapid Application Development Tools.pdf
Efficiency in Action The Power of Rapid Application Development Tools.pdfBitCot
 
Navigating the Hype and Realities of Web Development Frameworks
Navigating the Hype and Realities of Web Development FrameworksNavigating the Hype and Realities of Web Development Frameworks
Navigating the Hype and Realities of Web Development FrameworksSeasiaInfotech2
 
5 Front End Frameworks to Master in Web Development.pdf
5 Front End Frameworks to Master in Web Development.pdf5 Front End Frameworks to Master in Web Development.pdf
5 Front End Frameworks to Master in Web Development.pdfMverve1
 
React Development Services
React Development ServicesReact Development Services
React Development ServicesRajasreePothula3
 
Analyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksAnalyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksIRJET Journal
 
Top 20+ React Libraries Every JavaScript Professional Should Know in 2023
Top 20+ React Libraries Every JavaScript Professional Should Know in 2023Top 20+ React Libraries Every JavaScript Professional Should Know in 2023
Top 20+ React Libraries Every JavaScript Professional Should Know in 2023Inexture Solutions
 
Assessing the Value of Rich Internet-White Paper
Assessing the Value of Rich Internet-White PaperAssessing the Value of Rich Internet-White Paper
Assessing the Value of Rich Internet-White PaperAxis Technology, LLC
 
HOW TO CHOOSE THE BEST FRAMEWORK FOR YOUR WEB DEVELOPMENT
HOW TO CHOOSE THE BEST FRAMEWORK FOR YOUR WEB DEVELOPMENTHOW TO CHOOSE THE BEST FRAMEWORK FOR YOUR WEB DEVELOPMENT
HOW TO CHOOSE THE BEST FRAMEWORK FOR YOUR WEB DEVELOPMENTasiyahanif9977
 
Rapid application development
Rapid application developmentRapid application development
Rapid application developmentLombe Kapaya
 
National%20 online%20examination%20system%20an%20architectural%20perspective
National%20 online%20examination%20system%20an%20architectural%20perspectiveNational%20 online%20examination%20system%20an%20architectural%20perspective
National%20 online%20examination%20system%20an%20architectural%20perspectivekalimullahmohd89
 
National%20 online%20examination%20system%20an%20architectural%20perspective
National%20 online%20examination%20system%20an%20architectural%20perspectiveNational%20 online%20examination%20system%20an%20architectural%20perspective
National%20 online%20examination%20system%20an%20architectural%20perspectivekalimullahmohd89
 
Full Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future ScopeFull Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future ScopeIRJET Journal
 

Similar a Yii Framework in the RAD context + Mashup demo built on YII (20)

RAD - System i - Presentation
RAD - System i - PresentationRAD - System i - Presentation
RAD - System i - Presentation
 
Why Use React Js A Complete Guide (1).pdf
Why Use React Js A Complete Guide (1).pdfWhy Use React Js A Complete Guide (1).pdf
Why Use React Js A Complete Guide (1).pdf
 
Rad model
Rad modelRad model
Rad model
 
Choosing the Right Node.js Framework For App Development 2024.pdf
Choosing the Right Node.js Framework For App Development 2024.pdfChoosing the Right Node.js Framework For App Development 2024.pdf
Choosing the Right Node.js Framework For App Development 2024.pdf
 
Rich Internet Applications
Rich Internet ApplicationsRich Internet Applications
Rich Internet Applications
 
Efficiency in Action The Power of Rapid Application Development Tools.pdf
Efficiency in Action The Power of Rapid Application Development Tools.pdfEfficiency in Action The Power of Rapid Application Development Tools.pdf
Efficiency in Action The Power of Rapid Application Development Tools.pdf
 
Top 5 backend frameworks for web development in.pptx
Top 5 backend frameworks for web development in.pptxTop 5 backend frameworks for web development in.pptx
Top 5 backend frameworks for web development in.pptx
 
Navigating the Hype and Realities of Web Development Frameworks
Navigating the Hype and Realities of Web Development FrameworksNavigating the Hype and Realities of Web Development Frameworks
Navigating the Hype and Realities of Web Development Frameworks
 
5 Front End Frameworks to Master in Web Development.pdf
5 Front End Frameworks to Master in Web Development.pdf5 Front End Frameworks to Master in Web Development.pdf
5 Front End Frameworks to Master in Web Development.pdf
 
React Development Services
React Development ServicesReact Development Services
React Development Services
 
Analyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web FrameworksAnalyzing Optimal Practises for Web Frameworks
Analyzing Optimal Practises for Web Frameworks
 
Top 20+ React Libraries Every JavaScript Professional Should Know in 2023
Top 20+ React Libraries Every JavaScript Professional Should Know in 2023Top 20+ React Libraries Every JavaScript Professional Should Know in 2023
Top 20+ React Libraries Every JavaScript Professional Should Know in 2023
 
Assessing the Value of Rich Internet-White Paper
Assessing the Value of Rich Internet-White PaperAssessing the Value of Rich Internet-White Paper
Assessing the Value of Rich Internet-White Paper
 
HOW TO CHOOSE THE BEST FRAMEWORK FOR YOUR WEB DEVELOPMENT
HOW TO CHOOSE THE BEST FRAMEWORK FOR YOUR WEB DEVELOPMENTHOW TO CHOOSE THE BEST FRAMEWORK FOR YOUR WEB DEVELOPMENT
HOW TO CHOOSE THE BEST FRAMEWORK FOR YOUR WEB DEVELOPMENT
 
Rapid application development
Rapid application developmentRapid application development
Rapid application development
 
National%20 online%20examination%20system%20an%20architectural%20perspective
National%20 online%20examination%20system%20an%20architectural%20perspectiveNational%20 online%20examination%20system%20an%20architectural%20perspective
National%20 online%20examination%20system%20an%20architectural%20perspective
 
National%20 online%20examination%20system%20an%20architectural%20perspective
National%20 online%20examination%20system%20an%20architectural%20perspectiveNational%20 online%20examination%20system%20an%20architectural%20perspective
National%20 online%20examination%20system%20an%20architectural%20perspective
 
Rad model
Rad modelRad model
Rad model
 
Full Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future ScopeFull Stack Web Development: Vision, Challenges and Future Scope
Full Stack Web Development: Vision, Challenges and Future Scope
 
Complementing Agile SDLC with Agile Architecture
Complementing Agile SDLC with Agile ArchitectureComplementing Agile SDLC with Agile Architecture
Complementing Agile SDLC with Agile Architecture
 

Último

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii SoldatenkoFwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr BaganFwdays
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Mark Simos
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 

Último (20)

E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko"Debugging python applications inside k8s environment", Andrii Soldatenko
"Debugging python applications inside k8s environment", Andrii Soldatenko
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan"ML in Production",Oleksandr Bagan
"ML in Production",Oleksandr Bagan
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 

Yii Framework in the RAD context + Mashup demo built on YII

  • 1. Yii framework in the RAD context George-Leonard Chetreanu Faculty of Computer Science, Iasi, Romania george.chetreanu@info.uaic.ro Abstract. The following papar provides a general view on RAD topic as well as a short presentation of a particular development tool targeting the web. M otivation for choosing the tool and a comparison with its alternatives are also present. Keywords: Web, database, DAO, AJAX, REST, services 1 Overvie w 1.1 Definiti on Trying to answer what RAD means, it can be noted that there are various definition s and exp lanations for the term, out of wh ich some worth mentioning are the fo llowing:  James Mart in, in his book first coining the term in 1991, wrote, “Rapid Application Develop ment (RAD) is a development lifecycle designed to give much faster development and higher-quality results than those achieved with the traditional lifecycle. It is designed to take the maximu m advantage o f powerful development software that has evolved recently.”  Professor Clifford Kettemborough of Whitehead College, University of Redlands, defines Rapid Applicat ion Develop ment as “an approach to building co mputer systems which combines Co mputer-Assisted Software Engineering (CASE) tools and techniques, user-driven prototyping, and stringent project delivery time limits into a potent, tested, reliable formula for top-notch quality and productivity. RAD drastically raises the quality of finished systems while reducing the time it takes to build them.”  Online Knowledge defines Rapid Applicat ion Develop ment as “a methodology that enables organizations to develop strategically important systems faster while reducing development costs and maintaining quality. Th is is achieved by using a
  • 2. YII framework in the RAD context series of proven application development techniques, within a well-defined methodology.” To put it shortly, RAD is a method and a set of tools allowing the rapid production of software systems from concept to finish1. This technique emphasizes extensive user involvement in the rapid and evolutionary construction of working prototypes of a system to accelerate the system develop ment process. RAD is sometimes referred to the “spiral approach” (see Fig.1) because the nature of the technique involves repeatedly spiraling through the phases to construct a system with various levels of completeness and complexity 2. RAD was a response to non-agile processes developed in the 1970s, such as the “Waterfall” model. The problem with previous methodologies was that applications took so long to build that requirements had changed before the system was comp lete, often resulting in unusable systems. Originally intended to describe a process involving application prototyping and iterative develop ment, the term has become a marketing buzzword that generically describes applications that can be designed and developed within 60-90 days. Fig. 1 RAD Diagram by James P. 1 http://wysterdesir.com/2008/09/28/using-rapid-application-development-for-your-software- project/ 2 http://www.jscgroup.com/rapid-application-development.html
  • 3. YII framework in the RAD context 1.2 Prerequisites3  Gathering requirements using workshops or focus groups  Prototyping and early, reiterat ive user testing of designs  The re-use of software co mponents  A rigid ly paced schedule that defers design imp rovements to the next product version  Less formality in reviews and other team co mmunicat ion 4, 5 1.3 Advantages  Speed: the speed increases can be achieved using a variety of methods including, rapid prototyping, virtualization of system related routines, the use of CASE tools and other techniques.  Quality: as defined by RAD, quality is both the degree to which a delivered application meets the needs of users as well as the degree to which a delivered system has low maintenance costs. RAD increases quality through the involvement of the user in the analysis and design stages. Some systems also deliver advantages of interoperability, extensibility, and portability. 1.4 Disadvantages  Reduced scalability: because RAD focuses on development of a prototype that is iteratively developed into a full system, the delivered solution may lack the scalability of a solution that was designed as a full application fro m the start.  Reduced feature sets: due to time bo xing, where features are pushed off to later versions in favor of delivering an application in a short time frame, RA D may produce applications that are less full featured than traditionally developed applications. This concern should be addressed as soon as possible through clear communicat ion with the client as to what will be delivered and when. 3 http://searchsoftwarequality.techtarget.com/definition/rapid-application-development 4 http://www.blueink.biz/RapidApplicationDevelopment.aspx 5 http://www.selectbs.com/analysis-and-design/what-is-rapid-application-development
  • 4. YII framework in the RAD context 2 YII Frame work Yii is an open source, object-oriented, high-performance, co mponent-based PHP web application framework best suited for developing Web 2.0 applications. Written in PHP, it pro motes clean, DRY design and encourages rapid development. It works to streamline your applicat ion development and helps to ensure an extremely efficient, extensible, and maintainable end product. Its clear mission statement is very much alike with some ideas behind the RAD methodology: Yii helps Web developers build complex applications and deliver them on-time. Being designed with performance in mind, Yii is a great choice for any sized project ranging fro m simp le websites to sophisticated, enterprise applications. With YII the developer has full control over the configuration from head-to-toe (presentation-to-persistence) to conform to any particular enterprise development guidelines. The framework co mes packaged with tools to help test and debug the applications built on it. It worth ment ioning that developers have easy access to a clear and comprehensive documentation along with plenty of other resources to inspire or help things get started. YII development has been inspired by other well-known and proven frameworks and applications like Prado, Ruby on Rails, jQuery, Sy mfony or Joo mla. 2.1 Features 6  Model-View-Controller (MVC) design pattern: adopts the proven MVC architecture, wh ich allows for clean separation of concerns (SoC).  Database Access Objects (DAO), Query Builder, Active Record, DB Migration : allo ws developers to model database data in terms of objects and avoid the tedium and complexity of writ ing repetitive SQL statements.  Form input and validation: allows collecting form input extremely easy and safe. It comes with a set of validators as well as numerous helper methods and widgets to simp lify the task for form input and validation.  AJAX-enabled widgets: integrates jQuery and provides a set of AJAX-enabled widgets, such as auto-complete input field, treeview, data grid, which enables writing highly efficient and versatile user interface extremely simp le.  Authentication and authorization: built-in support for authentication and also for authorization via h ierarch ical role -based access control (RBA C). 6 http://www.Yiiframework.com/features/
  • 5. YII framework in the RAD context Skinning and theming: the implemented mechanism allows developers to quickly switch the outlook of a Yii-powered website. Web services: supports automatic generation of comp lex WSDL service specifications and management of Web service request handling.  Internationalization (I18N) and localization (L10N) : supports message translation, date and time formatting, nu mber formatting, and interface localizat ion.  Layered caching scheme: supports data caching, page caching, fragment caching and dynamic content. The storage medium of caching can be changed easily without touching the application code.  Error handling and logging: Errors are handled and presented more nicely, and log messages can be categorized, filtered and routed to different destinations.  Security: equipped with many security measures to help prevent your Web applications fro m attacks such as SQL in jection, cross -site scripting (XSS), cross- site request forgery (CSRF), and cookie tampering.  Unit and functionality testing: support for writ ing and running unit tests as well as functionality tests, based on PHPUn it and Selen iu m.  Automatic code generation: provides a set of intuitive and highly extensible code generation tools that can help you quickly generate the code you need for features such as form input, CRUD.  Compliance to XHTML: HTM L code produced by Yii co mponents and code generators complies to the XHTM L standard.  Purely object-oriented: sticks to strict OOP paradig m. It does not define any global function or variable. And the class hierarchy that it defines allows maximu m reusability and customizat ion.  Friendly with third-party code: designed to work well with third-party code, fro m PEAR o r Zend Framework, for examp le.  Detailed documentation: Every single method or property is clearly documented and there are also plenty of other resources at hand (tours, book and comprehensive tutorials, wiki, blogs of enthusiastic users sharing code snippets and more).  Extension library: base functionality can always be extended by adding user- contributed components that are grouped in an extension lib rary. 2.2 Comparison with alternative solutions General As opposed to other RAD tools based on technologies other than PHP, YII framework doesn’t have a custom IDE to allow developers to build application in a „visual” fashion by using forms, wizards or „drag-and-drop” editing to get components in
  • 6. YII framework in the RAD context place and connected. However, YII provides a web-based GUI for its code generation and customizat ion functions, which can be seen as a basic but satisfactory alternative to the capabilit ies of an actual IDE. Since the main focus when developing a business application is to correctly model the requirements/necessities and make prototypes to mirror real-life aspects, the way YII wo rks couldn’t be more appropriate: provided a database model was designed, the framework then takes over and takes care of all the functionality needed in order to interact with the model, allowing the developer to handle the implementation of the business logic instead of loosing time „reinventing the wheel”. Furthermore, certain well-established development tools already provide support and integration for YII. CodeLobster PHP Edit ion is a very good choice for a fully featured IDE designed for web development that, among other important benefits, helps develop YII based applications. The very nature of YII Framewo rk and its lack of an IDE doesn’t recommend it for non-technically skilled users, as oppos ed to some RA D tools wh ich, providing a lot of automation and heavy visual editing, enable users with little o r no programming knowledge to produce web applications. However, it worth mentioning that the resulting applications in such cases are either not very complex or they are very hard to customize in ways different to those taken into account by the tool’s developers. Same technol ogy Fig.2 shows how efficient is Yii co mpared with other popular PHP frameworks. In the graph, RPS stands for "request per second" which describes how many requests an application written in a framework can process per second. The higher the number, the more efficient a framework is. It can be easily seen that Yii outperforms all other frameworks in this comparison. The performance advantage of Yii is especially significant when the widely used APC extension is enabled.
  • 7. YII framework in the RAD context Fig. 1. Speed test obtained with ApacheBench tool7 Co mparing Yii with one of its main, still more popular and widely us ed competitor, CakePHP, there are quite a few things that make Yii better:  PHP 5 features included in the core: First, and most importantly, what allows for most of the stuff that I love in Yii over CakePHP is that it is PHP 5 only. PHP 4 is not supported. Because of this, Yii is able to take use of many PHP 5 features that Cake is not able to (like magic overloading functions )  OOP style AR and lazy loading: Yii takes use of PHP 5’s overloading functions in its AR implementation in a very beautifu l manner. Instead of storing results from queries in an array as Cake does, Yii allo ws accessing the queries in an OOP manner.  Excellent Documentation  Fast and useful developer feedback : Along with the documentation the Yii foru m is also an excellent place to get help.  More easily extended: This can be easily seen for the validation rules: beside permitting to define an action in the model as a validation as in Cake, YII allows to also define a whole class to be a validation type. 7 http://www.Yiiframework.com/performance/
  • 8. 3 Mashup demo application The envisioned mashup application was planned to bring together functionality /web services from Twitter, Flickr and Google Maps. To run the application the user is required to provide his Twitter account name (username). This is the only information needed to start retrieving relevant data about the user, which will be nicely presented in a combined fashion on the homepage and on the Map page. The flow of the application is described below: 1. The account name is used to obtain the real name of the user and his address, along with other Twitter related information (like his latest tweet and various statistics about his twitting activity). 2. The real name is then used to look up photos of the user on Flickr. If the user is not found on Flickr or doesn’t have any public photos available, the application will search for photos from the user’s location. This search is customized to return photos meeting a couple of criteria (like to be taken indoor an d to have geolocation information available). On homepage: 1. The user’s name, profile picture and latest tweet (with the date when it was posted) are displayed. 2. Twitter tab is populated with Twitter gathered information. 3. A limited number of the photos are used to create a photo gallery placed inside the Flickr tab. Each photo is listed along with the date when it was uploaded to Flickr. Clicking on a photo opens the normal sized version along with its title. On Map page: 1. The user’s profile picture is plotted on the map to the user’s location. Rolling over with the mouse will display the user’s name. Clicking on it will display the user’s latest tweet. 2. For all photos that have geolocation data available (latitude and longitude) a photo icon is placed on the map in the right location. Rolling over an icon with the mouse will display the photo’s title. Clicking the icon will display an info box containing the small size version of the photo and other details beside its title (date added, tags, views). Clicking the actual photo from this box will open the original Flickr photo in a separate browser window/tab.
  • 9. YII framework in the RAD context 3.1 Project setup Coding was done with CodeLobster PHP Edition, which, as previously mentioned, provides support for creating YII applications. XAMPP for Windows (PHP5) was used to host and run the project locally. Using the “New Project” wizard from CodeLobster (File->New->Project->Create Empty Yii Site) a fresh skeleton of a YII application was deployed within minutes into the htdocs directory of the web server. The newly created application was already functional without any intervention made to the code and could be run in a browser, having a default structure which included the following pages: Homepage, About (static), Contact and Login. 3.2 Customization The look of the application was edited from the main CSS file (root/css/main.css). Changes in the default actions (what to do on each page) required the update of the application’s main controller (root/protected/controllers/SiteController.php). Menu links were edited from the main template file (root/views/layouts/main.php). General settings (application name, enabling friendly URLs and extensions imports – paths instead of params) required the update of the application’s configuration file (root/protected/config/main.php) To add new functionality to the framework, the following extensions were installed (by simply copying their files to root/protected/extensions/ : 1. EActiveResource 2. httpclient 3. jquery-gmap 4. phpThumb 5. jqPrettyPhoto 6. ImageHelper To make use of the new functionality, the following models were coded (and added to root/protected/models): 1. FlickrUser – in charge of consuming web services from Flickr 2. TwitterUser – in charge of consuming web services from Twitter Since the intended mashup didn’t require authenticating the user, the Login page was modified (and its title and menu link changed to “Settings”) to serve as the place where the user inputs his Twitter account name. The existing form code was edited accordingly to leave only one field for the user to fill. The changes were performed to the following files:
  • 10. YII framework in the RAD context 1. root/protected/models/LoginForm.php 2. root/protected/views/login.php Homepage template (root/protected/views/index.php) was edited to display general user information and a tabs widget. The widget required two new template files to be coded: 1. root/protected/views/tabTwitter.php 2. root/protected/views/tabFlick.php The “About” page template (root/protected/views/about.php) was edited (and renamed to map.php) to display the custom Google Map. The “About” page title and its menu link were changed to “Map”. These were all the changes made in order to get the mashup functionality in place. All other files of the generated Yii application were not modified.