• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Yii 2.0 overview - 1 of 2
 

Yii 2.0 overview - 1 of 2

on

  • 528 views

Presentation used on the 8th London Yii Framework meetup. Part I of 2 featuring and overview of the changes that will happen on the upcoming version 2.0 of the Yii framework. Presented by Cassiano ...

Presentation used on the 8th London Yii Framework meetup. Part I of 2 featuring and overview of the changes that will happen on the upcoming version 2.0 of the Yii framework. Presented by Cassiano Surek.

Statistics

Views

Total Views
528
Views on SlideShare
528
Embed Views
0

Actions

Likes
1
Downloads
5
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    Yii 2.0 overview - 1 of 2 Yii 2.0 overview - 1 of 2 Presentation Transcript

    • Welcome to the London Yii Meetup Hosted by Cass Surek – monthly meetings http://www.meetup.com/London-Yii-Framework-Group/
    • Venue, beer and snacks kindly provided by www.digitalannexe.co.uk
    • Tonight Yii 2.0 overview – Cass Yii 2.0 add-on – Marian Zburlea
    • Yii 2.0 Current version 2.0.0 alpha Based on PHP 5.4.0 Incompatible with 1.1 Not yet ready for production Application templates (basic and advanced) Installation via Composer
    • Major changes Namespaces Component and Objects Events Path Alias View Class Models Controllers Widgets Console Applications i18N Action Filters Assets Static Helpers ActiveForm Query Builder ActiveRecord Auto-quoting table and column names User and identityInterface URL Management Themes Composer integration
    • Namespaces • Prefixes no longer used • Based on directory structure e.g. yiiwebRequest
    • Components and Objects • CComponent split into Object and Component • Object – basic data structures • Component – events/behaviour
    • Object Config • Uniform way of configuring objects
    • Object Config
    • Events • onEvent method definition no longer needed • $component->on($eventName, $handler);
    • Path Alias • Must use @ • @yii means Yii installation directory • Closely related to class namespaces
    • View Class • MVC • $this in a view no longer means controller or widget object • Smarty and Twig support added • Prado support removed
    • Models • formName() returns the form name (previously hardcoded) • Load() and loadMultiple() added to aid data population • New method: scenarios() to define which fields need to be validated • Safe validators discontinued, scenarios() define which are safe
    • Controllers • Render() and renderPartial() return content instead of sending it out • One must echo contents now
    • Widgets • Simplified process • Use begin(), end() and widget() instead of passing strings through beginWidget() and endWidget().
    • Themes • • • • CThemeManager is gone Path maps ['/web/views' => '/web/themes/basic’] /web/views/site/index.php will be /web/themes/basic/site/index.php • Any view file can have a theme, even if rendered outside of the context of a controller
    • Console applications • Controllers • Console and web controllers have same base class • Console controller is similar to CConsoleCommand
    • Internationalisation (i18n) • Date and number formatter are out • PECL intl php module is in • I18n application component
    • Action Filters • Implemented via behaviors now
    • Marian Zburlea Yii 2.0 Add-on Yii Smart Blog