SlideShare uma empresa Scribd logo
1 de 47
Baixar para ler offline
What's New InWhat's New In
Yii2 & PHP5.5Yii2 & PHP5.5
Petra Novandi Barus
Chief Technology Officer
UrbanIndo.com
PHP Indonesia MeetupPHP Indonesia Meetup
Who Am IWho Am I
● 2009 Graduated from Informatics Eng. ITB
– Activities: OS and Internet programming lecture assistant, table
tennis unit, etc.
● 2011 Graduated from Master Informatics Eng. ITB
– Specialize in distributed systems and parallel programming
● 2011 Recruited as CTO for UrbanIndo.com
Contact Me:
- mail: petra@urbanindo.com
- twitter: @petrabarus
- linkedin: http://linkedin.com/in/petrabarus
UrbanIndoUrbanIndo
● A real-estate marketplace for Indonesia: house, land,
apartment, commercial, room.
● Board members consist of professionals from Silicon
Valley: Apple, Google, Yahoo.
● Launched November 2011
● Got investment from East Ventures 4 months later
● Got investment from Gree Ventures & IMJ Fenox in 2013
● Currently listing
– 16 thousand registered users
– 7 thousand agents
– 100 thousand properties
UrbanIndo Technology StackUrbanIndo Technology Stack
elasticsearchelasticsearch
What I'm Going To Talk AboutWhat I'm Going To Talk About
●Yii2
● PHP 5.5
(Not really related with Yii2, just filling some time for the
Iftar)
Let's talk about Yii firstLet's talk about Yii first
● A macro PHP framework
● A lot of functionalities
● Great design
● Easy to extend
● Easy to configure
● But hard learning-curve
Yii FeaturesYii Features
● MVC
● DAO, Active Record, Database Migration
● Authentication/Authorization
● Skinning/Theming
● Web Services
● I18n, L10N
● Cache
● And many more
Yii2Yii2
● Yii2 is now in public preview.
– It's not even alpha
– Don't use it for production
– Not all functionalities from Yii1.1 has been
imported.
● Supports PHP5.3+
● Most of the changes are in redesigning the
architecture.
What's new inWhat's new in
Yii2?Yii2?
NamespaceNamespace
● Actually Yii1.1 has support namespace usage in
user's code (since 1.1.5) using autoloading
● For PHP5.3+ usage only (Yii1.1 still supports PHP5.2)
● Support PSR-0
Better IDE support
Can easily be mistaken with other Strings
NamespaceNamespace
● Yii1.1 classes has to be in global namespaces
● To prevent conflict, all
classes in Yii1.1 use
'C' prefix.
Namespace in Yii2Namespace in Yii2
● Better namespace organization
– e.g. we used to have
–
–
–
–
– No more long
class name
Components and ObjectComponents and Object
● In Yii1.1, we have CComponents
– Getter/Setter through magic __get, __set, __call
– Behavior
– Event.
● In Yii2 we have Object and Component
– Object, basic data structure, getter/setter,
toArray, object configuration, className (added in
PHP5.5).
– Component, extends Object, added event and
behavior
Object ConfigurationObject Configuration
● In Yii1.1
●
●
●
● In Yii2
Event HandlerEvent Handler
● More straightforward using jQuery-like event
handler
View ObjectView Object
● In Yii1.1 'view' is implemented as plain php
file.
View ObjectView Object
● In Yii2, the view is implemented as a View
object
View ObjectView Object
● Controller and Widget now accessed as View's
context
● Easily do view-rendering every where, not just
in controller
● CClientScript responsibility is now part of View
object.
● Fragment cache moved from Controller to
View object
● Supports multiple non-native renderer like
Smarty and Twig
ModelsModels
● Yii2 introduces formName
– Yii1.1 uses hardcoded class name
ModelsModels
ModelModel
● Easy loading (mass attribute assignment from
$_POST or $_GET)
ModelModel
● Mass object assignment, e.g. Tabular Input
WidgetsWidgets
● In Yii1.1, Widget helps a lot. But declaring one
can give great pain.
● Bad IDE support
WidgetsWidgets
● In Yii2, added className() method (PHP5.3)
and begin(), end() method.
Query BuilderQuery Builder
● Query builder stands alone
ActiveRecordActiveRecord
● Relation now done via getter instead of relations()
method
● Getter returns ActiveQuery that extends Query
ActiveRecordActiveRecord
● Method find() replaces method model() which
returns ActiveQuery instance instead of the
extended CactiveRecord model instance.
Many MoreMany More
● Assets Bundling
● Static Helpers
● ActiveForm
● Auto Quoting Column Names
● User and Identity
● Better URL Management
More to comeMore to come
● Better Extension management
● Response/Request
● Integration with Composer
● Widgets (Menu, Pager, Captcha)
● NoSQL wrapper
● MessageQueue wrapper
WarningWarning
● Yii2 is still in heavy development
● It's not even in Alpha phase
● What I talk about right now can be obsolete
next week
● Fork the github
– http://github.com/yiisoft/yii2
● Try installing
● Put your idea and your fix
What's new inWhat's new in
PHP 5.5PHP 5.5
Not really related with Yii2,
just filling some time
What's NewWhat's New
● Generators
● “Finally” Keyword
● Password Hashing API
● Bundled OPcode cache
● Class name to scalar
● Array dereferencing
● And many more...
GeneratorGenerator
● Simple iterator without implementing
“Iterator” interface
● Iterate result without building array in
memory
– Exceed memory limit
– Time consuming
● Introduces the keyword 'yield'
'Finally' keyword'Finally' keyword
● Just like the one in Java
● Mostly concerns with resource handling
– Prevent resource leaking
● Block in `finally` will be executed no matter if
the exception caught or not
Bundled Zend OpCacheBundled Zend OpCache
● is ZendOptimizerPlus by Zend
– https://github.com/zendtech/ZendOptimizerPlus
– provides faster PHP execution through opcode
caching andoptimization
– storing precompiled script bytecode in the shared
memory
● There is also APC (Alternative PHP Cache)
– not really maintainable
● Zend OpCache is now bundled with PHP5.5
– You can still install it in PHP5.2, PHP5.3, PHP5.4
http://www.slideshare.net/jpauli/php55-new-features-23608435
Password Hashing APIPassword Hashing API
● password_hash()
– Can set the algorithm, the cost, the salt
– The value returned will contain the algorithm, the
cost, the salt, and the hash itself.
– Only need 1 storage (or 1 column in table).
● password_verify()
– Only take the plain password and the hash result
Thank You!Thank You!
Just for your information :)
We have a lot of
opportunities
- Web engineer
- Front-end engineer
- Mobile app engineer
- Data scientist
- Internship
Send your resume to info@urbanindo.com

Mais conteúdo relacionado

Mais procurados

Php Frameworks
Php FrameworksPhp Frameworks
Php FrameworksRyan Davis
 
A site in 15 minutes with yii
A site in 15 minutes with yiiA site in 15 minutes with yii
A site in 15 minutes with yiiAndy Kelk
 
Alfresco WebScript Connector for Apache ManifoldCF
Alfresco WebScript Connector for Apache ManifoldCFAlfresco WebScript Connector for Apache ManifoldCF
Alfresco WebScript Connector for Apache ManifoldCFPiergiorgio Lucidi
 
Introduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterIntroduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterPongsakorn U-chupala
 
Codeigniter Training Part2
Codeigniter Training Part2Codeigniter Training Part2
Codeigniter Training Part2Weerayut Hongsa
 
Integrating Alfresco with Portals
Integrating Alfresco with PortalsIntegrating Alfresco with Portals
Integrating Alfresco with PortalsPiergiorgio Lucidi
 
Translate word press to your language
Translate word press to your languageTranslate word press to your language
Translate word press to your languagembigul
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra  SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra Sencha
 
Don't worry be API with Slim framework and Joomla
Don't worry be API with Slim framework and JoomlaDon't worry be API with Slim framework and Joomla
Don't worry be API with Slim framework and JoomlaPierre-André Vullioud
 
Evolution / History of ASP.NET
Evolution / History of ASP.NETEvolution / History of ASP.NET
Evolution / History of ASP.NETAnoop Kumar Sharma
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0Ido Flatow
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to LaravelEli Wheaton
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web ScriptsPiergiorgio Lucidi
 
ASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTMASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTMShahed Chowdhuri
 
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankAlfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankPiergiorgio Lucidi
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to LaravelVin Lim
 

Mais procurados (20)

PHP Framework Battle
PHP Framework BattlePHP Framework Battle
PHP Framework Battle
 
Php Frameworks
Php FrameworksPhp Frameworks
Php Frameworks
 
A site in 15 minutes with yii
A site in 15 minutes with yiiA site in 15 minutes with yii
A site in 15 minutes with yii
 
Alfresco WebScript Connector for Apache ManifoldCF
Alfresco WebScript Connector for Apache ManifoldCFAlfresco WebScript Connector for Apache ManifoldCF
Alfresco WebScript Connector for Apache ManifoldCF
 
Introduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniterIntroduction to MVC Web Framework with CodeIgniter
Introduction to MVC Web Framework with CodeIgniter
 
Codeigniter Training Part2
Codeigniter Training Part2Codeigniter Training Part2
Codeigniter Training Part2
 
Integrating Alfresco with Portals
Integrating Alfresco with PortalsIntegrating Alfresco with Portals
Integrating Alfresco with Portals
 
Codeinator
CodeinatorCodeinator
Codeinator
 
Translate word press to your language
Translate word press to your languageTranslate word press to your language
Translate word press to your language
 
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra  SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
SenchaCon 2016: Learn the Top 10 Best ES2015 Features - Lee Boonstra
 
Joomla REST API
Joomla REST APIJoomla REST API
Joomla REST API
 
Don't worry be API with Slim framework and Joomla
Don't worry be API with Slim framework and JoomlaDon't worry be API with Slim framework and Joomla
Don't worry be API with Slim framework and Joomla
 
Evolution / History of ASP.NET
Evolution / History of ASP.NETEvolution / History of ASP.NET
Evolution / History of ASP.NET
 
ASP.NET Core 1.0
ASP.NET Core 1.0ASP.NET Core 1.0
ASP.NET Core 1.0
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to Laravel
 
Implementing portlets using Web Scripts
Implementing portlets using Web ScriptsImplementing portlets using Web Scripts
Implementing portlets using Web Scripts
 
ASP.NET Brief History
ASP.NET Brief HistoryASP.NET Brief History
ASP.NET Brief History
 
ASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTMASP.NET 5 Overview: Post RTM
ASP.NET 5 Overview: Post RTM
 
Alfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European BankAlfresco Summit 2014 - Crafter CMS - Case European Bank
Alfresco Summit 2014 - Crafter CMS - Case European Bank
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to Laravel
 

Destaque

Yii2 restful 基礎教學
Yii2 restful 基礎教學Yii2 restful 基礎教學
Yii2 restful 基礎教學Duncan Chen
 
Memenangkan Persaingan Marketing Real-estate Di Era Digital dan MEA
Memenangkan Persaingan Marketing Real-estate Di Era Digital dan MEAMemenangkan Persaingan Marketing Real-estate Di Era Digital dan MEA
Memenangkan Persaingan Marketing Real-estate Di Era Digital dan MEAPetra Barus
 
Baking With Cake Php
Baking With Cake PhpBaking With Cake Php
Baking With Cake Phpvalberg
 
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1Akhmad Khanif Zyen
 
FRAMEWORD Yii
FRAMEWORD YiiFRAMEWORD Yii
FRAMEWORD Yiicritinasb
 
Yii inicios
Yii iniciosYii inicios
Yii iniciosfede003
 
Yii - Next level PHP Framework von Florian Facker
Yii - Next level PHP Framework von Florian FackerYii - Next level PHP Framework von Florian Facker
Yii - Next level PHP Framework von Florian FackerMayflower GmbH
 
Prepare and present cakes
Prepare and present  cakesPrepare and present  cakes
Prepare and present cakesMona Gracia
 
Java User Meetup Bandung "Android" by Agate Studio
Java User Meetup Bandung "Android" by Agate StudioJava User Meetup Bandung "Android" by Agate Studio
Java User Meetup Bandung "Android" by Agate StudioPetra Barus
 
허순범할머니(박시호의 행복편지)
허순범할머니(박시호의 행복편지)허순범할머니(박시호의 행복편지)
허순범할머니(박시호의 행복편지)Jinwoo Eng.
 
การหาหัวข้อวิจัย
การหาหัวข้อวิจัยการหาหัวข้อวิจัย
การหาหัวข้อวิจัยChacrit Sitdhiwej
 
Tr oasis 이용해보니
Tr oasis 이용해보니Tr oasis 이용해보니
Tr oasis 이용해보니Jinwoo Eng.
 
2553 la681 week 4 class (9 september 2010) slideshow
2553 la681 week 4 class (9 september 2010) slideshow2553 la681 week 4 class (9 september 2010) slideshow
2553 la681 week 4 class (9 september 2010) slideshowChacrit Sitdhiwej
 

Destaque (20)

Yii2 restful 基礎教學
Yii2 restful 基礎教學Yii2 restful 基礎教學
Yii2 restful 基礎教學
 
Memenangkan Persaingan Marketing Real-estate Di Era Digital dan MEA
Memenangkan Persaingan Marketing Real-estate Di Era Digital dan MEAMemenangkan Persaingan Marketing Real-estate Di Era Digital dan MEA
Memenangkan Persaingan Marketing Real-estate Di Era Digital dan MEA
 
Baking With Cake Php
Baking With Cake PhpBaking With Cake Php
Baking With Cake Php
 
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1
Membuat Aplikasi Kesiswaan Menggunakan Yii Framework - Bagian 1
 
FRAMEWORD Yii
FRAMEWORD YiiFRAMEWORD Yii
FRAMEWORD Yii
 
Yii inicios
Yii iniciosYii inicios
Yii inicios
 
Framework Yii
Framework YiiFramework Yii
Framework Yii
 
Yii - Next level PHP Framework von Florian Facker
Yii - Next level PHP Framework von Florian FackerYii - Next level PHP Framework von Florian Facker
Yii - Next level PHP Framework von Florian Facker
 
Prepare and present cakes
Prepare and present  cakesPrepare and present  cakes
Prepare and present cakes
 
まち歩きプラットホーム20111116
まち歩きプラットホーム20111116まち歩きプラットホーム20111116
まち歩きプラットホーム20111116
 
Photo album
Photo albumPhoto album
Photo album
 
ユビキタスメディア研究室2010活動
ユビキタスメディア研究室2010活動ユビキタスメディア研究室2010活動
ユビキタスメディア研究室2010活動
 
Java User Meetup Bandung "Android" by Agate Studio
Java User Meetup Bandung "Android" by Agate StudioJava User Meetup Bandung "Android" by Agate Studio
Java User Meetup Bandung "Android" by Agate Studio
 
墨田まちの劇場空間化について20120803
墨田まちの劇場空間化について20120803墨田まちの劇場空間化について20120803
墨田まちの劇場空間化について20120803
 
허순범할머니(박시호의 행복편지)
허순범할머니(박시호의 행복편지)허순범할머니(박시호의 행복편지)
허순범할머니(박시호의 행복편지)
 
My Awsome Ness
My Awsome NessMy Awsome Ness
My Awsome Ness
 
การหาหัวข้อวิจัย
การหาหัวข้อวิจัยการหาหัวข้อวิจัย
การหาหัวข้อวิจัย
 
Tr oasis 이용해보니
Tr oasis 이용해보니Tr oasis 이용해보니
Tr oasis 이용해보니
 
2553 la681 week 4 class (9 september 2010) slideshow
2553 la681 week 4 class (9 september 2010) slideshow2553 la681 week 4 class (9 september 2010) slideshow
2553 la681 week 4 class (9 september 2010) slideshow
 
Bunner
BunnerBunner
Bunner
 

Semelhante a Yii2 and PHP5.5 Updates For Real Estate Tech

Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"
Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"
Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"LogeekNightUkraine
 
Android Study Jam
Android Study Jam Android Study Jam
Android Study Jam DSCMESCOE
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureYshay Yaacobi
 
Dynatech presentation for TSI Career Day
Dynatech presentation for TSI Career DayDynatech presentation for TSI Career Day
Dynatech presentation for TSI Career DayArtur Babyuk
 
Pavlo Yuriychuk — Switching to Angular.js. Silk way
Pavlo Yuriychuk — Switching to Angular.js. Silk wayPavlo Yuriychuk — Switching to Angular.js. Silk way
Pavlo Yuriychuk — Switching to Angular.js. Silk wayGlobalLogic Ukraine
 
Switching to angular.js silk way
Switching to angular.js   silk waySwitching to angular.js   silk way
Switching to angular.js silk wayPavlo Iuriichuk
 
Plone Intranet under the hood
Plone Intranet under the hoodPlone Intranet under the hood
Plone Intranet under the hoodGuido Stevens
 
Python Django Intro V0.1
Python Django Intro V0.1Python Django Intro V0.1
Python Django Intro V0.1Udi Bauman
 
Symfony2 as an api
Symfony2 as an apiSymfony2 as an api
Symfony2 as an apiKifah Abbad
 
PhpStorm: Symfony2 Plugin
PhpStorm: Symfony2 PluginPhpStorm: Symfony2 Plugin
PhpStorm: Symfony2 PluginHaehnchen
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHPMarcos Quesada
 
Getting Started with PHP Extensions
Getting Started with PHP ExtensionsGetting Started with PHP Extensions
Getting Started with PHP ExtensionsMichaelBrunoLochemem
 
Python 101 - Indonesia AI Society.pdf
Python 101 - Indonesia AI Society.pdfPython 101 - Indonesia AI Society.pdf
Python 101 - Indonesia AI Society.pdfHendri Karisma
 
solution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptxsolution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptxGoogleDeveloperStude22
 
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)Dhilipsiva DS
 
Performance Profiling Tools and Tricks
Performance Profiling Tools and TricksPerformance Profiling Tools and Tricks
Performance Profiling Tools and TricksPhase2
 

Semelhante a Yii2 and PHP5.5 Updates For Real Estate Tech (20)

Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"
Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"
Oleksii Pedorenko and Dmytro Melnychuk "DAO Project Experience"
 
Android Study Jam
Android Study Jam Android Study Jam
Android Study Jam
 
Not my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructureNot my problem - Delegating responsibility to infrastructure
Not my problem - Delegating responsibility to infrastructure
 
Dynatech presentation for TSI Career Day
Dynatech presentation for TSI Career DayDynatech presentation for TSI Career Day
Dynatech presentation for TSI Career Day
 
Pavlo Yuriychuk — Switching to Angular.js. Silk way
Pavlo Yuriychuk — Switching to Angular.js. Silk wayPavlo Yuriychuk — Switching to Angular.js. Silk way
Pavlo Yuriychuk — Switching to Angular.js. Silk way
 
Switching to angular.js silk way
Switching to angular.js   silk waySwitching to angular.js   silk way
Switching to angular.js silk way
 
Plone Intranet under the hood
Plone Intranet under the hoodPlone Intranet under the hood
Plone Intranet under the hood
 
How to sell drupal 8
How to sell drupal 8How to sell drupal 8
How to sell drupal 8
 
Python Django Intro V0.1
Python Django Intro V0.1Python Django Intro V0.1
Python Django Intro V0.1
 
Resume
ResumeResume
Resume
 
Symfony2 as an api
Symfony2 as an apiSymfony2 as an api
Symfony2 as an api
 
PhpStorm: Symfony2 Plugin
PhpStorm: Symfony2 PluginPhpStorm: Symfony2 Plugin
PhpStorm: Symfony2 Plugin
 
Behat Workshop at WeLovePHP
Behat Workshop at WeLovePHPBehat Workshop at WeLovePHP
Behat Workshop at WeLovePHP
 
Getting Started with PHP Extensions
Getting Started with PHP ExtensionsGetting Started with PHP Extensions
Getting Started with PHP Extensions
 
{py}gradle
{py}gradle{py}gradle
{py}gradle
 
Raman monga
Raman mongaRaman monga
Raman monga
 
Python 101 - Indonesia AI Society.pdf
Python 101 - Indonesia AI Society.pdfPython 101 - Indonesia AI Society.pdf
Python 101 - Indonesia AI Society.pdf
 
solution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptxsolution Challenge design and flutter day.pptx
solution Challenge design and flutter day.pptx
 
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)Build, deploy and scale: Django, GraphQL and SPA  (DjangoCon EU 2021)
Build, deploy and scale: Django, GraphQL and SPA (DjangoCon EU 2021)
 
Performance Profiling Tools and Tricks
Performance Profiling Tools and TricksPerformance Profiling Tools and Tricks
Performance Profiling Tools and Tricks
 

Mais de Petra Barus

Javascript Clean Code
Javascript Clean CodeJavascript Clean Code
Javascript Clean CodePetra Barus
 
What's New In PHP7
What's New In PHP7What's New In PHP7
What's New In PHP7Petra Barus
 
Starting A Web Startup - Informatika Mengajar
Starting A Web Startup - Informatika MengajarStarting A Web Startup - Informatika Mengajar
Starting A Web Startup - Informatika MengajarPetra Barus
 
Proposal Kongres Ikatan Alumni (versi 8 Oktober 2012)
Proposal Kongres Ikatan Alumni (versi 8 Oktober 2012)Proposal Kongres Ikatan Alumni (versi 8 Oktober 2012)
Proposal Kongres Ikatan Alumni (versi 8 Oktober 2012)Petra Barus
 
Proposal Kongres Ikatan Alumni IF ITB
Proposal Kongres Ikatan Alumni IF ITBProposal Kongres Ikatan Alumni IF ITB
Proposal Kongres Ikatan Alumni IF ITBPetra Barus
 
Setahun TOKI Learning Center
Setahun TOKI Learning CenterSetahun TOKI Learning Center
Setahun TOKI Learning CenterPetra Barus
 
Java User Meetup Bandung "Android" by GITS Indonesia
Java User Meetup Bandung "Android" by GITS IndonesiaJava User Meetup Bandung "Android" by GITS Indonesia
Java User Meetup Bandung "Android" by GITS IndonesiaPetra Barus
 
TOKI Learning Center
TOKI Learning CenterTOKI Learning Center
TOKI Learning CenterPetra Barus
 
Taekwondo Tournament Management System
Taekwondo Tournament Management SystemTaekwondo Tournament Management System
Taekwondo Tournament Management SystemPetra Barus
 
Slide sesi 6 - java concurrency
Slide   sesi 6 - java concurrencySlide   sesi 6 - java concurrency
Slide sesi 6 - java concurrencyPetra Barus
 

Mais de Petra Barus (10)

Javascript Clean Code
Javascript Clean CodeJavascript Clean Code
Javascript Clean Code
 
What's New In PHP7
What's New In PHP7What's New In PHP7
What's New In PHP7
 
Starting A Web Startup - Informatika Mengajar
Starting A Web Startup - Informatika MengajarStarting A Web Startup - Informatika Mengajar
Starting A Web Startup - Informatika Mengajar
 
Proposal Kongres Ikatan Alumni (versi 8 Oktober 2012)
Proposal Kongres Ikatan Alumni (versi 8 Oktober 2012)Proposal Kongres Ikatan Alumni (versi 8 Oktober 2012)
Proposal Kongres Ikatan Alumni (versi 8 Oktober 2012)
 
Proposal Kongres Ikatan Alumni IF ITB
Proposal Kongres Ikatan Alumni IF ITBProposal Kongres Ikatan Alumni IF ITB
Proposal Kongres Ikatan Alumni IF ITB
 
Setahun TOKI Learning Center
Setahun TOKI Learning CenterSetahun TOKI Learning Center
Setahun TOKI Learning Center
 
Java User Meetup Bandung "Android" by GITS Indonesia
Java User Meetup Bandung "Android" by GITS IndonesiaJava User Meetup Bandung "Android" by GITS Indonesia
Java User Meetup Bandung "Android" by GITS Indonesia
 
TOKI Learning Center
TOKI Learning CenterTOKI Learning Center
TOKI Learning Center
 
Taekwondo Tournament Management System
Taekwondo Tournament Management SystemTaekwondo Tournament Management System
Taekwondo Tournament Management System
 
Slide sesi 6 - java concurrency
Slide   sesi 6 - java concurrencySlide   sesi 6 - java concurrency
Slide sesi 6 - java concurrency
 

Último

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 

Último (20)

CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 

Yii2 and PHP5.5 Updates For Real Estate Tech

  • 1. What's New InWhat's New In Yii2 & PHP5.5Yii2 & PHP5.5 Petra Novandi Barus Chief Technology Officer UrbanIndo.com PHP Indonesia MeetupPHP Indonesia Meetup
  • 2. Who Am IWho Am I ● 2009 Graduated from Informatics Eng. ITB – Activities: OS and Internet programming lecture assistant, table tennis unit, etc. ● 2011 Graduated from Master Informatics Eng. ITB – Specialize in distributed systems and parallel programming ● 2011 Recruited as CTO for UrbanIndo.com Contact Me: - mail: petra@urbanindo.com - twitter: @petrabarus - linkedin: http://linkedin.com/in/petrabarus
  • 3. UrbanIndoUrbanIndo ● A real-estate marketplace for Indonesia: house, land, apartment, commercial, room. ● Board members consist of professionals from Silicon Valley: Apple, Google, Yahoo. ● Launched November 2011 ● Got investment from East Ventures 4 months later ● Got investment from Gree Ventures & IMJ Fenox in 2013 ● Currently listing – 16 thousand registered users – 7 thousand agents – 100 thousand properties
  • 4. UrbanIndo Technology StackUrbanIndo Technology Stack elasticsearchelasticsearch
  • 5. What I'm Going To Talk AboutWhat I'm Going To Talk About ●Yii2 ● PHP 5.5 (Not really related with Yii2, just filling some time for the Iftar)
  • 6. Let's talk about Yii firstLet's talk about Yii first ● A macro PHP framework ● A lot of functionalities ● Great design ● Easy to extend ● Easy to configure ● But hard learning-curve
  • 7. Yii FeaturesYii Features ● MVC ● DAO, Active Record, Database Migration ● Authentication/Authorization ● Skinning/Theming ● Web Services ● I18n, L10N ● Cache ● And many more
  • 8. Yii2Yii2 ● Yii2 is now in public preview. – It's not even alpha – Don't use it for production – Not all functionalities from Yii1.1 has been imported. ● Supports PHP5.3+ ● Most of the changes are in redesigning the architecture.
  • 9. What's new inWhat's new in Yii2?Yii2?
  • 10. NamespaceNamespace ● Actually Yii1.1 has support namespace usage in user's code (since 1.1.5) using autoloading ● For PHP5.3+ usage only (Yii1.1 still supports PHP5.2) ● Support PSR-0 Better IDE support Can easily be mistaken with other Strings
  • 11. NamespaceNamespace ● Yii1.1 classes has to be in global namespaces ● To prevent conflict, all classes in Yii1.1 use 'C' prefix.
  • 12. Namespace in Yii2Namespace in Yii2 ● Better namespace organization – e.g. we used to have – – – – – No more long class name
  • 13.
  • 14.
  • 15. Components and ObjectComponents and Object ● In Yii1.1, we have CComponents – Getter/Setter through magic __get, __set, __call – Behavior – Event. ● In Yii2 we have Object and Component – Object, basic data structure, getter/setter, toArray, object configuration, className (added in PHP5.5). – Component, extends Object, added event and behavior
  • 16. Object ConfigurationObject Configuration ● In Yii1.1 ● ● ● ● In Yii2
  • 17. Event HandlerEvent Handler ● More straightforward using jQuery-like event handler
  • 18. View ObjectView Object ● In Yii1.1 'view' is implemented as plain php file.
  • 19.
  • 20. View ObjectView Object ● In Yii2, the view is implemented as a View object
  • 21. View ObjectView Object ● Controller and Widget now accessed as View's context ● Easily do view-rendering every where, not just in controller ● CClientScript responsibility is now part of View object. ● Fragment cache moved from Controller to View object ● Supports multiple non-native renderer like Smarty and Twig
  • 22. ModelsModels ● Yii2 introduces formName – Yii1.1 uses hardcoded class name
  • 24. ModelModel ● Easy loading (mass attribute assignment from $_POST or $_GET)
  • 25. ModelModel ● Mass object assignment, e.g. Tabular Input
  • 26. WidgetsWidgets ● In Yii1.1, Widget helps a lot. But declaring one can give great pain. ● Bad IDE support
  • 27. WidgetsWidgets ● In Yii2, added className() method (PHP5.3) and begin(), end() method.
  • 28. Query BuilderQuery Builder ● Query builder stands alone
  • 29. ActiveRecordActiveRecord ● Relation now done via getter instead of relations() method ● Getter returns ActiveQuery that extends Query
  • 30.
  • 31. ActiveRecordActiveRecord ● Method find() replaces method model() which returns ActiveQuery instance instead of the extended CactiveRecord model instance.
  • 32. Many MoreMany More ● Assets Bundling ● Static Helpers ● ActiveForm ● Auto Quoting Column Names ● User and Identity ● Better URL Management
  • 33. More to comeMore to come ● Better Extension management ● Response/Request ● Integration with Composer ● Widgets (Menu, Pager, Captcha) ● NoSQL wrapper ● MessageQueue wrapper
  • 34. WarningWarning ● Yii2 is still in heavy development ● It's not even in Alpha phase ● What I talk about right now can be obsolete next week ● Fork the github – http://github.com/yiisoft/yii2 ● Try installing ● Put your idea and your fix
  • 35. What's new inWhat's new in PHP 5.5PHP 5.5 Not really related with Yii2, just filling some time
  • 36. What's NewWhat's New ● Generators ● “Finally” Keyword ● Password Hashing API ● Bundled OPcode cache ● Class name to scalar ● Array dereferencing ● And many more...
  • 37. GeneratorGenerator ● Simple iterator without implementing “Iterator” interface ● Iterate result without building array in memory – Exceed memory limit – Time consuming ● Introduces the keyword 'yield'
  • 38.
  • 39.
  • 40. 'Finally' keyword'Finally' keyword ● Just like the one in Java ● Mostly concerns with resource handling – Prevent resource leaking ● Block in `finally` will be executed no matter if the exception caught or not
  • 41.
  • 42.
  • 43. Bundled Zend OpCacheBundled Zend OpCache ● is ZendOptimizerPlus by Zend – https://github.com/zendtech/ZendOptimizerPlus – provides faster PHP execution through opcode caching andoptimization – storing precompiled script bytecode in the shared memory ● There is also APC (Alternative PHP Cache) – not really maintainable ● Zend OpCache is now bundled with PHP5.5 – You can still install it in PHP5.2, PHP5.3, PHP5.4
  • 45. Password Hashing APIPassword Hashing API ● password_hash() – Can set the algorithm, the cost, the salt – The value returned will contain the algorithm, the cost, the salt, and the hash itself. – Only need 1 storage (or 1 column in table). ● password_verify() – Only take the plain password and the hash result
  • 47. Just for your information :) We have a lot of opportunities - Web engineer - Front-end engineer - Mobile app engineer - Data scientist - Internship Send your resume to info@urbanindo.com