SlideShare a Scribd company logo
1 of 24
Download to read offline
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.pptxMikalai Alimenkou
 
Google Developer Day: State of Ajax
Google Developer Day: State of AjaxGoogle Developer Day: State of Ajax
Google Developer Day: State of Ajaxdion
 
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 librariesRuss Weakley
 
REST API for Joomla
REST API for JoomlaREST API for Joomla
REST API for JoomlaParth Lawate
 
Tech Thursdays: Building Products
Tech Thursdays: Building ProductsTech Thursdays: Building Products
Tech Thursdays: Building ProductsHayden 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 RIAsDave 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" 20070715Takashi 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 1Rich 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 TypeScriptJeremy Likness
 
Building Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsBuilding Cross-Platform Mobile Apps
Building Cross-Platform Mobile AppsTroy 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 ApplicationTeamstudio
 
Unobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQueryUnobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQuerySimon Willison
 
Back to the ng2 Future
Back to the ng2 FutureBack to the ng2 Future
Back to the ng2 FutureJeremy Likness
 
I pad uicatalog_lesson02
I pad uicatalog_lesson02I pad uicatalog_lesson02
I pad uicatalog_lesson02Rich 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

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
 
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 #traveltipsEmpowered Presentations
 
Designing better user interfaces
Designing better user interfacesDesigning better user interfaces
Designing better user interfacesJohan Ronsse
 
iOS design: a case study
iOS design: a case studyiOS design: a case study
iOS design: a case studyJohan Ronsse
 
Yii Training session-1
Yii Training session-1Yii Training session-1
Yii Training session-1AkkiCredencys
 
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 YiiIlPeach
 
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.comChristopher 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 yiiAndy Kelk
 
Introduction Yii Framework
Introduction Yii FrameworkIntroduction Yii Framework
Introduction Yii FrameworkTuan 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 How the Yii PHP Framework is Developed

It is a sunny day
It is a sunny dayIt is a sunny day
It is a sunny daybcoder
 
Friday final test
Friday final testFriday final test
Friday final testbcoder
 
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 2019Hannes 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.5SSW
 
Tooling for the JavaScript Era
Tooling for the JavaScript EraTooling for the JavaScript Era
Tooling for the JavaScript Eramartinlippert
 
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 Indonesiakargoindonesia
 
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 ZikmundKarel Zikmund
 
Surviving a Hackathon and Beyond
Surviving a Hackathon and BeyondSurviving a Hackathon and Beyond
Surviving a Hackathon and Beyondimoneytech
 
How do we drive tech changes
How do we drive tech changesHow do we drive tech changes
How do we drive tech changesJaewoo 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 Molieremfrancis
 
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 eventXebia 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 ProjectsAmazon 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 How the Yii PHP 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
 
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 toAlexander 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 - Как разрабатывается фреймворк YiiAlexander 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

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsRavi Sanghani
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...Wes McKinney
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 

Recently uploaded (20)

A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
Potential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and InsightsPotential of AI (Generative AI) in Business: Learnings and Insights
Potential of AI (Generative AI) in Business: Learnings and Insights
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
The Future Roadmap for the Composable Data Stack - Wes McKinney - Data Counci...
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 

How the Yii PHP 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