SlideShare a Scribd company logo
How Yii framework is developed

       Alexander Makarov, Yii core team
What is Yii?

   PHP5 MVC framework.               Own ActiveRecord.
   Easy and fast.                    CLDR-based i18n.
   Powerful and flexible.            Cache with dependency suport
   Nice API.                          and a several backends.
   Took the best from Prado,         RBAC.
    Rails, Symfony and… Joomla        Console.
    (good parts).                     Code generation.
                                      …

        Prado (2004) → Yii 1.0 (2008) → Yii 1.1 (2010) → Yii2 (?)
Typical controller action

public function actionView($id)
{
       $post = Post::model()->findByPk($id);
       if(!$post)
              throw new CHttpException(404);

      $this->render('view', array(
             'post' => $post,
      ));
}
And a bit more complex one

$posts = Post::model()->taggedWith(array('yii',
'DevConf', 'PHP'))->published()->with('comments')-
>findAll();

foreach($posts as $post){
    echo $post->title;
    foreach($post->comments as $comment){
        echo $comment->text;
    }
}
Why it’s called like that?!

• Yes It Is (2010).
• Easy Efficient Extensible (2009).
• Chinese Yi:
   –   Easy and simple.
   –   Flexibility, ability to change.
   –   Persistence. Core principles are always the same.



                                               ―Yi ching‖, ―Book of changes‖.
Why reinventing the wheel and why MVC?

•   When Prado was developed there were at least no competitors.
•   Prado took ASP.NET ideas that were ―not from this world‖.
•   MVC is popular and convenient.
•   Frameworks of 2008 weren’t that good.
Sometimes it’s better to invent
       a better wheel!
Borrowing ideas

• Should we check ―competitors‖?
• Copy-paste is evil. Think.
• Analyze. Take the best and leave
  the rest.


                                     ?
Who “owns” framework?
         Community                            Company

 Framework isn’t developed for   × Mainly interested in profit.
  a single project or group of    × Framework is often just a side
  similar projects.                 product of commercial
 Community gains from              products.
  framework improvements and      × Works for money. The rest
  is willing to contribute.         isn’t a priority.
 Always willing to discuss       × Slow at making decisions.
  problems and find solution.
 Works for reputation.
 Relatively fast at making
  decisions.
Why BSD?

•   Framework is a tool.
•   Code should be used to gain real feedback and contributions.
•   ―Used‖ means used in real commercial applications.
•   BSD allows to use framework in such applications.
Building community

               Yii                          In general


• Got a lot of talented           • Interesting and unique
  developers from Prado             solutions and recipes.
  community.                      • Get a strong loyal developers
• Community is not a helpdesk.      core.
• Repeated questions → wiki,      • Show what’s good by example.
  search.                         • Give a change to others.
• If there aren’t that many
  questions it’s not bad, maybe
  documentation is good.
Yii team
• 6 developers.              • We’re not expanding team
• Tech. writer.                rapidly because:
• ~50 translators.              – It will require more time
                                  for communication. Less
                                  time will be left for
• Priority:                       getting things done.
   – Code stability.            – More people, more
   – Code reliability.            conflicts.
   – Consistent style.
Use the force and read the source!
No thanks!
Documentation

• Code without any documentation is
  useless.
• Project success depends on good
  documentation.
• Documenting when implementing.
• We’re always documenting methods,
  classes and properties.
• Examples are important but it’s
  important to know when to stop.
Why code should look good

• To make developer as happy as end users.
• Not to spend too much time documenting things.

• Motivation, time, money.
What API is good?
• Consistent. Overall style should be consistent.
• Not too complex. Complexity = many things to look for.
   – Magic should be interpreted in a single way. It it’s magical it
     should be simple.
• Flexible. Easy to change default behavior.
• Documented.

• Flexibility vs Simplicity.
   – Edge cases: God object, dependency injection for everything.
• Solution: facade to hide details, adapter to make things
  consistent.
There is no silver bullet

• When developing relatively big project you’ll face the need to
  change defaults.
   – How to update then?
   – How not break it?
• Framework can’t implement everything.
   – So I need to change third-party code also?
   – What it if will not work?
Versions and backwards compatibility

1.1.x — backwards compatible releases.
    – Small documented changes.
    – New features (these aren’t breaking anything).
    – Good for updating existing projects.
1.x.0 — partial incompatibility.
    – Can’t update without some significant changes in the project.
x.0.0 — tasty new features. No backwards compatibility is
guaranteed.
Supporting legacy versions
           Project                         Framework


• Can be long-term. Several     • We can’t afford supporting all
  framework versions will be      legacy code but understand
  released including              that it’s needed → limit
  incompatible ones.              support time to make end of
• Immediate updating can lead     support expected.
  to losing time and money.     • Don’t bring new features into
• Maybe it’s better not to        old branches. Just fix bugs.
  update… but how about bugs
  and security holes?
Tools

• «One time» data migration in most cases will be needed multiple
  times.
• Code should be tested.
• Writing same code again and again is boring.
• IDE should assist when developing with framework.
• Debugging process is important.
Performance and optimizations

• Yii is fast because it does only what needs to be done.
• SPL __autoload.
• Don’t connect to DB until performing a query. Don’t parse data
  until it’s required etc.
• If code is executed all the time performance is more important
  than features.
• If code isn’t executed that often we can implement some extra
  features and don’t worry about performance.
Yii is good!
Thanks

•   http://yiiframework.com/
•   http://yiiframework.ru/
•   http://rmcreative.ru/
•   sam@rmcreative.ru

• Will be glad to receive
   – Feedback
   – Ideas
   – Proposals

More Related Content

What's hot

DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptxDSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
Mikalai Alimenkou
 
Google Developer Day: State of Ajax
Google Developer Day: State of AjaxGoogle Developer Day: State of Ajax
Google Developer Day: State of Ajax
dion
 
Learning to be IDE Free (PrDC 2015)
Learning to be IDE Free (PrDC 2015)Learning to be IDE Free (PrDC 2015)
Learning to be IDE Free (PrDC 2015)
David Wesst
 
Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Ashwin Date
 
JWC 2015 - Mobile apps development for Joomla!
JWC 2015 - Mobile apps development for Joomla!JWC 2015 - Mobile apps development for Joomla!
JWC 2015 - Mobile apps development for Joomla!
Extly Extensions - JoomGap
 
Accessibility in pattern libraries
Accessibility in pattern librariesAccessibility in pattern libraries
Accessibility in pattern libraries
Russ Weakley
 
REST API for Joomla
REST API for JoomlaREST API for Joomla
REST API for Joomla
Parth Lawate
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building Products
Hayden Bleasel
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAs
Dave Malouf
 
The Days of Web Standards "IA" 20070715
The Days of Web Standards "IA" 20070715The Days of Web Standards "IA" 20070715
The Days of Web Standards "IA" 20070715
Takashi Sakamoto
 
Computer Science Career Awesomeness - GPH (May 2015)
Computer Science Career Awesomeness - GPH (May 2015)Computer Science Career Awesomeness - GPH (May 2015)
Computer Science Career Awesomeness - GPH (May 2015)
David Wesst
 
Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...
Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...
Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...
SocialBiz UserGroup
 
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
Rich Helton
 
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
The New Way of Developing with AEM 6.0 | Sightly | Beautiful MarkupThe New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
The New Way of Developing with AEM 6.0 | Sightly | Beautiful MarkupSenol Tas
 
Angle Forward with TypeScript
Angle Forward with TypeScriptAngle Forward with TypeScript
Angle Forward with TypeScript
Jeremy Likness
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
Troy Miles
 
Tips for Building your First XPages Java Application
Tips for Building your First XPages Java ApplicationTips for Building your First XPages Java Application
Tips for Building your First XPages Java Application
Teamstudio
 
Unobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQueryUnobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQuery
Simon Willison
 
Back to the ng2 Future
Back to the ng2 FutureBack to the ng2 Future
Back to the ng2 Future
Jeremy Likness
 
I pad uicatalog_lesson02
I pad uicatalog_lesson02I pad uicatalog_lesson02
I pad uicatalog_lesson02
Rich Helton
 

What's hot (20)

DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptxDSL, Page Object and WebDriver – the path to reliable functional tests.pptx
DSL, Page Object and WebDriver – the path to reliable functional tests.pptx
 
Google Developer Day: State of Ajax
Google Developer Day: State of AjaxGoogle Developer Day: State of Ajax
Google Developer Day: State of Ajax
 
Learning to be IDE Free (PrDC 2015)
Learning to be IDE Free (PrDC 2015)Learning to be IDE Free (PrDC 2015)
Learning to be IDE Free (PrDC 2015)
 
Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014Joomla REST API - JoomlaDay Bangkok 2014
Joomla REST API - JoomlaDay Bangkok 2014
 
JWC 2015 - Mobile apps development for Joomla!
JWC 2015 - Mobile apps development for Joomla!JWC 2015 - Mobile apps development for Joomla!
JWC 2015 - Mobile apps development for Joomla!
 
Accessibility in pattern libraries
Accessibility in pattern librariesAccessibility in pattern libraries
Accessibility in pattern libraries
 
REST API for Joomla
REST API for JoomlaREST API for Joomla
REST API for Joomla
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building Products
 
Designing Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAsDesigning Powerful Web Applications Using AJAX and Other RIAs
Designing Powerful Web Applications Using AJAX and Other RIAs
 
The Days of Web Standards "IA" 20070715
The Days of Web Standards "IA" 20070715The Days of Web Standards "IA" 20070715
The Days of Web Standards "IA" 20070715
 
Computer Science Career Awesomeness - GPH (May 2015)
Computer Science Career Awesomeness - GPH (May 2015)Computer Science Career Awesomeness - GPH (May 2015)
Computer Science Career Awesomeness - GPH (May 2015)
 
Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...
Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...
Tip from ConnectED 2015: How to Use Those Cool New Frameworks in Mobile Domin...
 
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1LEARNING	 iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
LEARNING  iPAD STORYBOARDS IN OBJ-­‐C LESSON 1
 
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
The New Way of Developing with AEM 6.0 | Sightly | Beautiful MarkupThe New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
The New Way of Developing with AEM 6.0 | Sightly | Beautiful Markup
 
Angle Forward with TypeScript
Angle Forward with TypeScriptAngle Forward with TypeScript
Angle Forward with TypeScript
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile Apps
 
Tips for Building your First XPages Java Application
Tips for Building your First XPages Java ApplicationTips for Building your First XPages Java Application
Tips for Building your First XPages Java Application
 
Unobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQueryUnobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQuery
 
Back to the ng2 Future
Back to the ng2 FutureBack to the ng2 Future
Back to the ng2 Future
 
I pad uicatalog_lesson02
I pad uicatalog_lesson02I pad uicatalog_lesson02
I pad uicatalog_lesson02
 

Viewers also liked

HTML5 Quick Start
HTML5 Quick StartHTML5 Quick Start
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
Mayflower GmbH
 
Windows Phone: From Idea to Published Game in 75 minutes
Windows Phone: From Idea to Published Game in 75 minutesWindows Phone: From Idea to Published Game in 75 minutes
Windows Phone: From Idea to Published Game in 75 minutes
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Deep dive into new ASP.NET MVC 4 Features
Deep dive into new ASP.NET MVC 4 Features Deep dive into new ASP.NET MVC 4 Features
Deep dive into new ASP.NET MVC 4 Features
Microsoft Developer Network (MSDN) - Belgium and Luxembourg
 
Travel Tips Learned from Japan! - #japan #traveltips
Travel Tips Learned from Japan! - #japan #traveltipsTravel Tips Learned from Japan! - #japan #traveltips
Travel Tips Learned from Japan! - #japan #traveltips
Empowered Presentations
 
Designing better user interfaces
Designing better user interfacesDesigning better user interfaces
Designing better user interfaces
Johan Ronsse
 
iOS design: a case study
iOS design: a case studyiOS design: a case study
iOS design: a case study
Johan Ronsse
 
Yii Introduction
Yii IntroductionYii Introduction
Yii Introduction
Chandra S Oemarjadi
 
Yii Training session-1
Yii Training session-1Yii Training session-1
Yii Training session-1
AkkiCredencys
 
Introduce Yii
Introduce YiiIntroduce Yii
Introduce Yii
zakieh alizadeh
 
YiiConf 2012 - Alexander Makarov - Yii2, what's new
YiiConf 2012 - Alexander Makarov - Yii2, what's newYiiConf 2012 - Alexander Makarov - Yii2, what's new
YiiConf 2012 - Alexander Makarov - Yii2, what's newAlexander Makarov
 
1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.
1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.
1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.Bicol IT.org
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in Yii
IlPeach
 
Yii PHP MVC Framework presentation silicongulf.com
Yii PHP MVC Framework presentation silicongulf.comYii PHP MVC Framework presentation silicongulf.com
Yii PHP MVC Framework presentation silicongulf.com
Christopher Cubos
 
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
Andy Kelk
 
Yii framework
Yii frameworkYii framework
Yii framework
Pratik Gondaliya
 
Yii framework
Yii frameworkYii framework
Yii framework
Leena Roja
 
Introduction Yii Framework
Introduction Yii FrameworkIntroduction Yii Framework
Introduction Yii Framework
Tuan Nguyen
 

Viewers also liked (20)

HTML5 Quick Start
HTML5 Quick StartHTML5 Quick Start
HTML5 Quick Start
 
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
 
Windows Phone: From Idea to Published Game in 75 minutes
Windows Phone: From Idea to Published Game in 75 minutesWindows Phone: From Idea to Published Game in 75 minutes
Windows Phone: From Idea to Published Game in 75 minutes
 
Deep dive into new ASP.NET MVC 4 Features
Deep dive into new ASP.NET MVC 4 Features Deep dive into new ASP.NET MVC 4 Features
Deep dive into new ASP.NET MVC 4 Features
 
Travel Tips Learned from Japan! - #japan #traveltips
Travel Tips Learned from Japan! - #japan #traveltipsTravel Tips Learned from Japan! - #japan #traveltips
Travel Tips Learned from Japan! - #japan #traveltips
 
Designing better user interfaces
Designing better user interfacesDesigning better user interfaces
Designing better user interfaces
 
iOS design: a case study
iOS design: a case studyiOS design: a case study
iOS design: a case study
 
Yii Introduction
Yii IntroductionYii Introduction
Yii Introduction
 
Yii Training session-1
Yii Training session-1Yii Training session-1
Yii Training session-1
 
Introduce Yii
Introduce YiiIntroduce Yii
Introduce Yii
 
YiiConf 2012 - Alexander Makarov - Yii2, what's new
YiiConf 2012 - Alexander Makarov - Yii2, what's newYiiConf 2012 - Alexander Makarov - Yii2, what's new
YiiConf 2012 - Alexander Makarov - Yii2, what's new
 
1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.
1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.
1ST TECH TALK: "Yii : The MVC framework" by Benedicto B. Balilo Jr.
 
PHP Unit Testing in Yii
PHP Unit Testing in YiiPHP Unit Testing in Yii
PHP Unit Testing in Yii
 
Yii PHP MVC Framework presentation silicongulf.com
Yii PHP MVC Framework presentation silicongulf.comYii PHP MVC Framework presentation silicongulf.com
Yii PHP MVC Framework presentation silicongulf.com
 
Yii workshop
Yii workshopYii workshop
Yii workshop
 
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
 
Yii framework
Yii frameworkYii framework
Yii framework
 
yii framework
yii frameworkyii framework
yii framework
 
Yii framework
Yii frameworkYii framework
Yii framework
 
Introduction Yii Framework
Introduction Yii FrameworkIntroduction Yii Framework
Introduction Yii Framework
 

Similar to Devconf 2011 - PHP - How Yii framework is developed

It is a sunny day
It is a sunny dayIt is a sunny day
It is a sunny day
bcoder
 
Friday final test
Friday final testFriday final test
Friday final test
bcoder
 
Prototyping like it is 2022
Prototyping like it is 2022 Prototyping like it is 2022
Prototyping like it is 2022
Michael Yagudaev
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Codersebbe
 
Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019
Hannes Lowette
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!
pixelonion
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
Hannes Lowette
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5
SSW
 
Tooling for the JavaScript Era
Tooling for the JavaScript EraTooling for the JavaScript Era
Tooling for the JavaScript Eramartinlippert
 
Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
Ralph Schindler
 
Technology Development in Early Stage Startup Indonesia
Technology Development in Early Stage Startup IndonesiaTechnology Development in Early Stage Startup Indonesia
Technology Development in Early Stage Startup Indonesia
kargoindonesia
 
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel ZikmundNDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
Karel Zikmund
 
Surviving a Hackathon and Beyond
Surviving a Hackathon and BeyondSurviving a Hackathon and Beyond
Surviving a Hackathon and Beyond
imoneytech
 
Component-first Applications
Component-first ApplicationsComponent-first Applications
Component-first Applications
Miguelangel Fernandez
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changes
Jaewoo Ahn
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
mfrancis
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreDan Poltawski
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
Xebia India
 
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
Amazon Web Services
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
Hannes Lowette
 

Similar to Devconf 2011 - PHP - How Yii framework is developed (20)

It is a sunny day
It is a sunny dayIt is a sunny day
It is a sunny day
 
Friday final test
Friday final testFriday final test
Friday final test
 
Prototyping like it is 2022
Prototyping like it is 2022 Prototyping like it is 2022
Prototyping like it is 2022
 
Orthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable CodeOrthogonality: A Strategy for Reusable Code
Orthogonality: A Strategy for Reusable Code
 
Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019Don't get blamed for your choices - Techorama 2019
Don't get blamed for your choices - Techorama 2019
 
How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!How Not to Be Conned by Your Drupal Vendor!
How Not to Be Conned by Your Drupal Vendor!
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 
A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5A modern architecturereview–usingcodereviewtools-ver-3.5
A modern architecturereview–usingcodereviewtools-ver-3.5
 
Tooling for the JavaScript Era
Tooling for the JavaScript EraTooling for the JavaScript Era
Tooling for the JavaScript Era
 
Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
 
Technology Development in Early Stage Startup Indonesia
Technology Development in Early Stage Startup IndonesiaTechnology Development in Early Stage Startup Indonesia
Technology Development in Early Stage Startup Indonesia
 
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel ZikmundNDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
NDC London 2020 - Challenges of Managing CoreFx Repo -- Karel Zikmund
 
Surviving a Hackathon and Beyond
Surviving a Hackathon and BeyondSurviving a Hackathon and Beyond
Surviving a Hackathon and Beyond
 
Component-first Applications
Component-first ApplicationsComponent-first Applications
Component-first Applications
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changes
 
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
10 clues showing that you are doing OSGi in the wrong manner - Jerome Moliere
 
How to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle coreHow to guarantee your change is integrated to Moodle core
How to guarantee your change is integrated to Moodle core
 
Prashant technical practices-tdd for xebia event
Prashant   technical practices-tdd for xebia eventPrashant   technical practices-tdd for xebia event
Prashant technical practices-tdd for xebia event
 
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
(SPOT205) 5 Lessons for Managing Massive IT Transformation Projects
 
Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®Build software like a bag of marbles, not a castle of LEGO®
Build software like a bag of marbles, not a castle of LEGO®
 

More from Alexander Makarov

UWDC 2013, Как мы используем Yii
UWDC 2013, Как мы используем YiiUWDC 2013, Как мы используем Yii
UWDC 2013, Как мы используем YiiAlexander Makarov
 
UWDC 2013, Yii2
UWDC 2013, Yii2UWDC 2013, Yii2
UWDC 2013, Yii2
Alexander Makarov
 
Yii, frameworks and where PHP is heading to
Yii, frameworks and where PHP is heading toYii, frameworks and where PHP is heading to
Yii, frameworks and where PHP is heading to
Alexander Makarov
 
DevConf 2012 - Yii, его разработка и Yii2
DevConf 2012 - Yii, его разработка и Yii2DevConf 2012 - Yii, его разработка и Yii2
DevConf 2012 - Yii, его разработка и Yii2Alexander Makarov
 
YiiConf 2012 - Alexander Makarov - Yii2, что нового
YiiConf 2012 - Alexander Makarov - Yii2, что новогоYiiConf 2012 - Alexander Makarov - Yii2, что нового
YiiConf 2012 - Alexander Makarov - Yii2, что новогоAlexander Makarov
 
UWDC'12, Александр Макаров, Yii, его разработка и Yii2
UWDC'12, Александр Макаров, Yii, его разработка и Yii2UWDC'12, Александр Макаров, Yii, его разработка и Yii2
UWDC'12, Александр Макаров, Yii, его разработка и Yii2Alexander Makarov
 
UWDC'12, Александр Макаров, О командной разработке и фреймворках
UWDC'12, Александр Макаров, О командной разработке и фреймворкахUWDC'12, Александр Макаров, О командной разработке и фреймворках
UWDC'12, Александр Макаров, О командной разработке и фреймворкахAlexander Makarov
 
Devconf 2011 - PHP - Как разрабатывается фреймворк Yii
Devconf 2011 - PHP - Как разрабатывается фреймворк YiiDevconf 2011 - PHP - Как разрабатывается фреймворк Yii
Devconf 2011 - PHP - Как разрабатывается фреймворк Yii
Alexander Makarov
 
Выбираем PHP-фреймворк. Особенности разработки с фреймворками
Выбираем PHP-фреймворк. Особенности разработки с фреймворкамиВыбираем PHP-фреймворк. Особенности разработки с фреймворками
Выбираем PHP-фреймворк. Особенности разработки с фреймворками
Alexander Makarov
 

More from Alexander Makarov (11)

UWDC 2013, Как мы используем Yii
UWDC 2013, Как мы используем YiiUWDC 2013, Как мы используем Yii
UWDC 2013, Как мы используем Yii
 
UWDC 2013, Yii2
UWDC 2013, Yii2UWDC 2013, Yii2
UWDC 2013, Yii2
 
Yii, frameworks and where PHP is heading to
Yii, frameworks and where PHP is heading toYii, frameworks and where PHP is heading to
Yii, frameworks and where PHP is heading to
 
DevConf 2012 - Yii, его разработка и Yii2
DevConf 2012 - Yii, его разработка и Yii2DevConf 2012 - Yii, его разработка и Yii2
DevConf 2012 - Yii, его разработка и Yii2
 
YiiConf 2012 - Alexander Makarov - Yii2, что нового
YiiConf 2012 - Alexander Makarov - Yii2, что новогоYiiConf 2012 - Alexander Makarov - Yii2, что нового
YiiConf 2012 - Alexander Makarov - Yii2, что нового
 
UWDC'12, Александр Макаров, Yii, его разработка и Yii2
UWDC'12, Александр Макаров, Yii, его разработка и Yii2UWDC'12, Александр Макаров, Yii, его разработка и Yii2
UWDC'12, Александр Макаров, Yii, его разработка и Yii2
 
UWDC'12, Александр Макаров, О командной разработке и фреймворках
UWDC'12, Александр Макаров, О командной разработке и фреймворкахUWDC'12, Александр Макаров, О командной разработке и фреймворках
UWDC'12, Александр Макаров, О командной разработке и фреймворках
 
Devconf 2011 - PHP - Как разрабатывается фреймворк Yii
Devconf 2011 - PHP - Как разрабатывается фреймворк YiiDevconf 2011 - PHP - Как разрабатывается фреймворк Yii
Devconf 2011 - PHP - Как разрабатывается фреймворк Yii
 
Как разраба
Как разрабаКак разраба
Как разраба
 
Выбираем PHP-фреймворк. Особенности разработки с фреймворками
Выбираем PHP-фреймворк. Особенности разработки с фреймворкамиВыбираем PHP-фреймворк. Особенности разработки с фреймворками
Выбираем PHP-фреймворк. Особенности разработки с фреймворками
 
Yii rit 2010
Yii rit 2010Yii rit 2010
Yii rit 2010
 

Recently uploaded

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
Product School
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Inflectra
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
Frank van Harmelen
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
Abida Shariff
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
91mobiles
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
Product School
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
Laura Byrne
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
Product School
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
RTTS
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
Jemma Hussein Allen
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
Alison B. Lowndes
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
Paul Groth
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
CatarinaPereira64715
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Product School
 

Recently uploaded (20)

From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
From Daily Decisions to Bottom Line: Connecting Product Work to Revenue by VP...
 
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualitySoftware Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
 
Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*Neuro-symbolic is not enough, we need neuro-*semantic*
Neuro-symbolic is not enough, we need neuro-*semantic*
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptxIOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
IOS-PENTESTING-BEGINNERS-PRACTICAL-GUIDE-.pptx
 
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdfSmart TV Buyer Insights Survey 2024 by 91mobiles.pdf
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf
 
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
De-mystifying Zero to One: Design Informed Techniques for Greenfield Innovati...
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 
The Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and SalesThe Art of the Pitch: WordPress Relationships and Sales
The Art of the Pitch: WordPress Relationships and Sales
 
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
AI for Every Business: Unlocking Your Product's Universal Potential by VP of ...
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
JMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and GrafanaJMeter webinar - integration with InfluxDB and Grafana
JMeter webinar - integration with InfluxDB and Grafana
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
The Future of Platform Engineering
The Future of Platform EngineeringThe Future of Platform Engineering
The Future of Platform Engineering
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........Bits & Pixels using AI for Good.........
Bits & Pixels using AI for Good.........
 
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMsTo Graph or Not to Graph Knowledge Graph Architectures and LLMs
To Graph or Not to Graph Knowledge Graph Architectures and LLMs
 
ODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User GroupODC, Data Fabric and Architecture User Group
ODC, Data Fabric and Architecture User Group
 
Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...Mission to Decommission: Importance of Decommissioning Products to Increase E...
Mission to Decommission: Importance of Decommissioning Products to Increase E...
 

Devconf 2011 - PHP - How Yii framework is developed

  • 1. How Yii framework is developed Alexander Makarov, Yii core team
  • 2. What is Yii?  PHP5 MVC framework.  Own ActiveRecord.  Easy and fast.  CLDR-based i18n.  Powerful and flexible.  Cache with dependency suport  Nice API. and a several backends.  Took the best from Prado,  RBAC. Rails, Symfony and… Joomla  Console. (good parts).  Code generation.  … Prado (2004) → Yii 1.0 (2008) → Yii 1.1 (2010) → Yii2 (?)
  • 3. Typical controller action public function actionView($id) { $post = Post::model()->findByPk($id); if(!$post) throw new CHttpException(404); $this->render('view', array( 'post' => $post, )); }
  • 4. And a bit more complex one $posts = Post::model()->taggedWith(array('yii', 'DevConf', 'PHP'))->published()->with('comments')- >findAll(); foreach($posts as $post){ echo $post->title; foreach($post->comments as $comment){ echo $comment->text; } }
  • 5. Why it’s called like that?! • Yes It Is (2010). • Easy Efficient Extensible (2009). • Chinese Yi: – Easy and simple. – Flexibility, ability to change. – Persistence. Core principles are always the same. ―Yi ching‖, ―Book of changes‖.
  • 6. Why reinventing the wheel and why MVC? • When Prado was developed there were at least no competitors. • Prado took ASP.NET ideas that were ―not from this world‖. • MVC is popular and convenient. • Frameworks of 2008 weren’t that good.
  • 7. Sometimes it’s better to invent a better wheel!
  • 8. Borrowing ideas • Should we check ―competitors‖? • Copy-paste is evil. Think. • Analyze. Take the best and leave the rest. ?
  • 9. Who “owns” framework? Community Company  Framework isn’t developed for × Mainly interested in profit. a single project or group of × Framework is often just a side similar projects. product of commercial  Community gains from products. framework improvements and × Works for money. The rest is willing to contribute. isn’t a priority.  Always willing to discuss × Slow at making decisions. problems and find solution.  Works for reputation.  Relatively fast at making decisions.
  • 10. Why BSD? • Framework is a tool. • Code should be used to gain real feedback and contributions. • ―Used‖ means used in real commercial applications. • BSD allows to use framework in such applications.
  • 11. Building community Yii In general • Got a lot of talented • Interesting and unique developers from Prado solutions and recipes. community. • Get a strong loyal developers • Community is not a helpdesk. core. • Repeated questions → wiki, • Show what’s good by example. search. • Give a change to others. • If there aren’t that many questions it’s not bad, maybe documentation is good.
  • 12. Yii team • 6 developers. • We’re not expanding team • Tech. writer. rapidly because: • ~50 translators. – It will require more time for communication. Less time will be left for • Priority: getting things done. – Code stability. – More people, more – Code reliability. conflicts. – Consistent style.
  • 13. Use the force and read the source!
  • 15. Documentation • Code without any documentation is useless. • Project success depends on good documentation. • Documenting when implementing. • We’re always documenting methods, classes and properties. • Examples are important but it’s important to know when to stop.
  • 16. Why code should look good • To make developer as happy as end users. • Not to spend too much time documenting things. • Motivation, time, money.
  • 17. What API is good? • Consistent. Overall style should be consistent. • Not too complex. Complexity = many things to look for. – Magic should be interpreted in a single way. It it’s magical it should be simple. • Flexible. Easy to change default behavior. • Documented. • Flexibility vs Simplicity. – Edge cases: God object, dependency injection for everything. • Solution: facade to hide details, adapter to make things consistent.
  • 18. There is no silver bullet • When developing relatively big project you’ll face the need to change defaults. – How to update then? – How not break it? • Framework can’t implement everything. – So I need to change third-party code also? – What it if will not work?
  • 19. Versions and backwards compatibility 1.1.x — backwards compatible releases. – Small documented changes. – New features (these aren’t breaking anything). – Good for updating existing projects. 1.x.0 — partial incompatibility. – Can’t update without some significant changes in the project. x.0.0 — tasty new features. No backwards compatibility is guaranteed.
  • 20. Supporting legacy versions Project Framework • Can be long-term. Several • We can’t afford supporting all framework versions will be legacy code but understand released including that it’s needed → limit incompatible ones. support time to make end of • Immediate updating can lead support expected. to losing time and money. • Don’t bring new features into • Maybe it’s better not to old branches. Just fix bugs. update… but how about bugs and security holes?
  • 21. Tools • «One time» data migration in most cases will be needed multiple times. • Code should be tested. • Writing same code again and again is boring. • IDE should assist when developing with framework. • Debugging process is important.
  • 22. Performance and optimizations • Yii is fast because it does only what needs to be done. • SPL __autoload. • Don’t connect to DB until performing a query. Don’t parse data until it’s required etc. • If code is executed all the time performance is more important than features. • If code isn’t executed that often we can implement some extra features and don’t worry about performance.
  • 24. Thanks • http://yiiframework.com/ • http://yiiframework.ru/ • http://rmcreative.ru/ • sam@rmcreative.ru • Will be glad to receive – Feedback – Ideas – Proposals