1 / 20

London Yii Meetup

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.

terah
Download Presentation

London Yii Meetup

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Welcome to the London YiiMeetup Hosted by Cass Surek – monthly meetings http://www.meetup.com/London-Yii-Framework-Group/

  2. Venue, beer and snacks kindly provided by www.digitalannexe.co.uk

  3. Tonight Yii 2.0 overview – Cass Yii 2.0 add-on – Marian Zburlea

  4. 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

  5. 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

  6. Namespaces • Prefixes no longer used • Based on directory structuree.g. yii\web\Request

  7. Components and Objects • CComponent split into Object and Component • Object – basic data structures • Component – events/behaviour

  8. Object Config • Uniform way of configuring objects

  9. Object Config

  10. Events • onEvent method definition no longer needed • $component->on($eventName, $handler);

  11. Path Alias • Must use @ • @yii means Yii installation directory • Closely related to class namespaces

  12. View Class • MVC • $this in a view no longer means controller or widget object • Smarty and Twig support added • Prado support removed

  13. 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

  14. Controllers • Render() and renderPartial() return content instead of sending it out • One must echo contents now

  15. Widgets • Simplified process • Use begin(), end() and widget() instead of passing strings through beginWidget() and endWidget().

  16. 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

  17. Console applications • Controllers • Console and web controllers have same base class • Console controller is similar to CConsoleCommand

  18. Internationalisation (i18n) • Date and number formatter are out • PECL intlphp module is in • I18n application component

  19. Action Filters • Implemented via behaviors now

  20. Marian ZburleaYii 2.0 Add-onYii Smart Blog

More Related