The Origin of Lithium

Nate Abele
Nate AbeleCEO & Co-Founder at Union of RAD, LLC (@radify)
On the Origin of Lithium
The framework for people who hate frameworks
?
The Origin of Lithium
I booked this
talk with Hans

                  And now
                 here we are
In the beginning...
<!--sql database select * from table where user='$username'-->


<!--ifless $numentries 1-->
Sorry, that record does not exist<p>
<!--endif exit-->

Welcome <!--$user-->!<p>
You have <!--$index:0--> credits left in your account.<p>




                         PHP / FI
                            1995
In the beginning...
<?
 $name = "bob";
 $db = "db";
 $result = msql($db,"select * from table where firstname='$name'");
 $num = msql_numrows($result);
 echo "$num records found!<p>";
 $i=0;
 while($i<$num);
    echo msql_result($result,$i,"fullname");
    echo "<br>";
    echo msql_result($result,$i,"address");
    echo "<br>";
    $i++;
 endwhile;
>



                              PHP 3
                               1998
In the beginning...
require_once 'MDB2.php';
require_once 'DB/Table.php';
require_once 'Guestboook_Table.php';

$dsn = "phptype://username:password@localhost/database";
$conn = MDB2::connect($dsn);

$table = 'GuestBook';
$create = 'safe';
$GuestBook =& new GuestBook_Table($conn, $table, $create);

if ($GuestBook->error) {
     echo "Failure! Try again.";
     print_r($GuestBook->error);
}



                              PEAR
                               2000
In the beginning...
class A {
    function foo() {
        if (isset($this)) {
            echo '$this is defined (' . get_class($this). ")n";
        } else {
            echo "$this is not defined.n";
        }
    }
}
class B {
    function bar() {
        A::foo();
    }
}



                             PHP 4
                              2000
In the beginning...
class A {

    protected $_foo = 0;

    public static function foo() {
       self::$_foo++;
    }
}




                           PHP 5
                             2004
In the beginning...
class PostsController extends AppController {

    public function index() {
        $posts = $this->Post->find(“all”);
        $this->set(compact(‘posts’));
    }
}




                         CakePHP
                             2005
In the beginning...
class mymoduleActions extends sfActions
{
  public function executeIndex()
  {
    // Retrieving request parameters
    $password    = $this->getRequestParameter('password');
 
    // Retrieving controller information
    $moduleName = $this->getModuleName();
    $actionName = $this->getActionName();
 
    // Retrieving framework core objects
    $request     = $this->getRequest();
    $userSession = $this->getUser();
    $response    = $this->getResponse();



                            Symfony
                               2005
In the beginning...
class Blogmodel extends Model {

    var $title   = '';
    var $content = '';
    var $date    = '';

    function Blogmodel()
    {
        // Call the Model constructor
        parent::Model();
    }
    
    function get_last_ten_entries()



                           CodeIgniter

                                  2006
In the beginning...
< ?php
 
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap
{
    protected function _initDoctype()
        {
            $this->bootstrap('view');
            $view = $this->getResource('view');
            $view->doctype('XHTML1_STRICT');
        }
 
    protected function _initAutoload()
        {
            $autoloader = new Zend_Application_Module_Autoloader
(array(



                              Zend
                               2007
What have we learned?


  Uniformity: +
  Tight coupling: -
  Lack of extensibility: -
What have we learned?

  People dislike complexity for its own
  sake
  Things are reactionary (high level)
  A lot of things are superficial (high
  level)
Ch-Ch-Ch-Changes

Late Static Binding

Namespaces

Closures
Late Static Binding
Proper subclassing of static classes...
finally


Warm, fuzzy feelings of architectural
purity


Handling state (vs. statelessness)
Namespaces

Formal, non-hacky way to organize
classes
No_More_Class_Names_That_Go
On_For_Days
New PEAR-inspired naming standard
The Origin of Lithium
Standards Adopters
 Agavi
 Symfony
 Doctrine
 PEAR
 Solar
 Zend Framework
 ...
The Origin of Lithium
Closures

 function Y($F) {
    return current(array(function($f) { return $f($f); }))->__invoke(function($f) use ($F) {
         return $F(function($x) use ($f) {
             return $f($f)->__invoke($x);
         });
     });
 }
1 of 22

Recommended

Lithium: The Framework for People Who Hate Frameworks by
Lithium: The Framework for People Who Hate FrameworksLithium: The Framework for People Who Hate Frameworks
Lithium: The Framework for People Who Hate FrameworksNate Abele
12.2K views123 slides
Building Lithium Apps by
Building Lithium AppsBuilding Lithium Apps
Building Lithium AppsNate Abele
5.7K views57 slides
The State of Lithium by
The State of LithiumThe State of Lithium
The State of LithiumNate Abele
2.3K views32 slides
The Zen of Lithium by
The Zen of LithiumThe Zen of Lithium
The Zen of LithiumNate Abele
2.6K views118 slides
Lithium: The Framework for People Who Hate Frameworks, Tokyo Edition by
Lithium: The Framework for People Who Hate Frameworks, Tokyo EditionLithium: The Framework for People Who Hate Frameworks, Tokyo Edition
Lithium: The Framework for People Who Hate Frameworks, Tokyo EditionNate Abele
1.6K views121 slides
PHP 5.3 and Lithium: the most rad php framework by
PHP 5.3 and Lithium: the most rad php frameworkPHP 5.3 and Lithium: the most rad php framework
PHP 5.3 and Lithium: the most rad php frameworkG Woo
5.9K views58 slides

More Related Content

What's hot

Agile database access with CakePHP 3 by
Agile database access with CakePHP 3Agile database access with CakePHP 3
Agile database access with CakePHP 3José Lorenzo Rodríguez Urdaneta
17.9K views34 slides
New in cakephp3 by
New in cakephp3New in cakephp3
New in cakephp3markstory
2.1K views44 slides
Design Patterns avec PHP 5.3, Symfony et Pimple by
Design Patterns avec PHP 5.3, Symfony et PimpleDesign Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et PimpleHugo Hamon
6.1K views68 slides
Future of HTTP in CakePHP by
Future of HTTP in CakePHPFuture of HTTP in CakePHP
Future of HTTP in CakePHPmarkstory
4.3K views55 slides
The History of PHPersistence by
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistenceHugo Hamon
2.3K views75 slides
Symfony2 - WebExpo 2010 by
Symfony2 - WebExpo 2010Symfony2 - WebExpo 2010
Symfony2 - WebExpo 2010Fabien Potencier
2.1K views127 slides

What's hot(20)

New in cakephp3 by markstory
New in cakephp3New in cakephp3
New in cakephp3
markstory2.1K views
Design Patterns avec PHP 5.3, Symfony et Pimple by Hugo Hamon
Design Patterns avec PHP 5.3, Symfony et PimpleDesign Patterns avec PHP 5.3, Symfony et Pimple
Design Patterns avec PHP 5.3, Symfony et Pimple
Hugo Hamon6.1K views
Future of HTTP in CakePHP by markstory
Future of HTTP in CakePHPFuture of HTTP in CakePHP
Future of HTTP in CakePHP
markstory4.3K views
The History of PHPersistence by Hugo Hamon
The History of PHPersistenceThe History of PHPersistence
The History of PHPersistence
Hugo Hamon2.3K views
Database Design Patterns by Hugo Hamon
Database Design PatternsDatabase Design Patterns
Database Design Patterns
Hugo Hamon11.4K views
Doctrine MongoDB ODM (PDXPHP) by Kris Wallsmith
Doctrine MongoDB ODM (PDXPHP)Doctrine MongoDB ODM (PDXPHP)
Doctrine MongoDB ODM (PDXPHP)
Kris Wallsmith2.1K views
Dependency injection-zendcon-2010 by Fabien Potencier
Dependency injection-zendcon-2010Dependency injection-zendcon-2010
Dependency injection-zendcon-2010
Fabien Potencier9.3K views
Dependency injection - phpday 2010 by Fabien Potencier
Dependency injection - phpday 2010Dependency injection - phpday 2010
Dependency injection - phpday 2010
Fabien Potencier4.3K views
Silex meets SOAP & REST by Hugo Hamon
Silex meets SOAP & RESTSilex meets SOAP & REST
Silex meets SOAP & REST
Hugo Hamon14.8K views
Doctrine fixtures by Bill Chang
Doctrine fixturesDoctrine fixtures
Doctrine fixtures
Bill Chang5K views
Unit and Functional Testing with Symfony2 by Fabien Potencier
Unit and Functional Testing with Symfony2Unit and Functional Testing with Symfony2
Unit and Functional Testing with Symfony2
Fabien Potencier20.4K views
Dependency injection in PHP 5.3/5.4 by Fabien Potencier
Dependency injection in PHP 5.3/5.4Dependency injection in PHP 5.3/5.4
Dependency injection in PHP 5.3/5.4
Fabien Potencier37.4K views
Symfony2, creare bundle e valore per il cliente by Leonardo Proietti
Symfony2, creare bundle e valore per il clienteSymfony2, creare bundle e valore per il cliente
Symfony2, creare bundle e valore per il cliente
Leonardo Proietti1.3K views
Rich domain model with symfony 2.5 and doctrine 2.5 by Leonardo Proietti
Rich domain model with symfony 2.5 and doctrine 2.5Rich domain model with symfony 2.5 and doctrine 2.5
Rich domain model with symfony 2.5 and doctrine 2.5
Leonardo Proietti12K views
Advanced symfony Techniques by Kris Wallsmith
Advanced symfony TechniquesAdvanced symfony Techniques
Advanced symfony Techniques
Kris Wallsmith5.4K views

Similar to The Origin of Lithium

Oops in php by
Oops in phpOops in php
Oops in phpGourishankar R Pujar
789 views52 slides
SPL: The Missing Link in Development by
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Developmentjsmith92
733 views44 slides
Can't Miss Features of PHP 5.3 and 5.4 by
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4Jeff Carouth
3.1K views66 slides
PHP 5.3 Overview by
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overviewjsmith92
492 views38 slides
Unittests für Dummies by
Unittests für DummiesUnittests für Dummies
Unittests für DummiesLars Jankowfsky
1K views28 slides
Ch8(oop) by
Ch8(oop)Ch8(oop)
Ch8(oop)Chhom Karath
179 views21 slides

Similar to The Origin of Lithium(20)

SPL: The Missing Link in Development by jsmith92
SPL: The Missing Link in DevelopmentSPL: The Missing Link in Development
SPL: The Missing Link in Development
jsmith92733 views
Can't Miss Features of PHP 5.3 and 5.4 by Jeff Carouth
Can't Miss Features of PHP 5.3 and 5.4Can't Miss Features of PHP 5.3 and 5.4
Can't Miss Features of PHP 5.3 and 5.4
Jeff Carouth3.1K views
PHP 5.3 Overview by jsmith92
PHP 5.3 OverviewPHP 5.3 Overview
PHP 5.3 Overview
jsmith92492 views
Practical PHP 5.3 by Nate Abele
Practical PHP 5.3Practical PHP 5.3
Practical PHP 5.3
Nate Abele7K views
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016) by James Titcumb
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
Mirror, mirror on the wall: Building a new PHP reflection library (DPC 2016)
James Titcumb425 views
関西PHP勉強会 php5.4つまみぐい by Hisateru Tanaka
関西PHP勉強会 php5.4つまみぐい関西PHP勉強会 php5.4つまみぐい
関西PHP勉強会 php5.4つまみぐい
Hisateru Tanaka2.6K views
ekb.py - Python VS ... by it-people
ekb.py - Python VS ...ekb.py - Python VS ...
ekb.py - Python VS ...
it-people274 views
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance by Ivan Chepurnyi
Meet Magento Sweden - Magento 2 Layout and Code Compilation for PerformanceMeet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Meet Magento Sweden - Magento 2 Layout and Code Compilation for Performance
Ivan Chepurnyi25.7K views
Lecture 17 - PHP-Object-Orientation.pptx by DavidLazar17
Lecture 17 - PHP-Object-Orientation.pptxLecture 17 - PHP-Object-Orientation.pptx
Lecture 17 - PHP-Object-Orientation.pptx
DavidLazar174 views
Php unit the-mostunknownparts by Bastian Feder
Php unit the-mostunknownpartsPhp unit the-mostunknownparts
Php unit the-mostunknownparts
Bastian Feder1.6K views
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnit by smueller_sandsmedia
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnitinternational PHP2011_Bastian Feder_The most unknown Parts of PHPUnit
international PHP2011_Bastian Feder_The most unknown Parts of PHPUnit
Introducing PHP Latest Updates by Iftekhar Eather
Introducing PHP Latest UpdatesIntroducing PHP Latest Updates
Introducing PHP Latest Updates
Iftekhar Eather1.3K views

Recently uploaded

Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Moses Kemibaro
35 views38 slides
CryptoBotsAI by
CryptoBotsAICryptoBotsAI
CryptoBotsAIchandureddyvadala199
42 views5 slides
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell by
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell
"Node.js vs workers — A comparison of two JavaScript runtimes", James M SnellFwdays
14 views30 slides
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 by
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023BookNet Canada
44 views19 slides
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...ShapeBlue
199 views20 slides
The Power of Generative AI in Accelerating No Code Adoption.pdf by
The Power of Generative AI in Accelerating No Code Adoption.pdfThe Power of Generative AI in Accelerating No Code Adoption.pdf
The Power of Generative AI in Accelerating No Code Adoption.pdfSaeed Al Dhaheri
39 views18 slides

Recently uploaded(20)

Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De... by Moses Kemibaro
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Don’t Make A Human Do A Robot’s Job! : 6 Reasons Why AI Will Save Us & Not De...
Moses Kemibaro35 views
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell by Fwdays
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell
"Node.js vs workers — A comparison of two JavaScript runtimes", James M Snell
Fwdays14 views
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023 by BookNet Canada
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
Redefining the book supply chain: A glimpse into the future - Tech Forum 2023
BookNet Canada44 views
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or... by ShapeBlue
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
Zero to Cloud Hero: Crafting a Private Cloud from Scratch with XCP-ng, Xen Or...
ShapeBlue199 views
The Power of Generative AI in Accelerating No Code Adoption.pdf by Saeed Al Dhaheri
The Power of Generative AI in Accelerating No Code Adoption.pdfThe Power of Generative AI in Accelerating No Code Adoption.pdf
The Power of Generative AI in Accelerating No Code Adoption.pdf
Saeed Al Dhaheri39 views
Initiating and Advancing Your Strategic GIS Governance Strategy by Safe Software
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
Safe Software184 views
"Node.js Development in 2024: trends and tools", Nikita Galkin by Fwdays
"Node.js Development in 2024: trends and tools", Nikita Galkin "Node.js Development in 2024: trends and tools", Nikita Galkin
"Node.js Development in 2024: trends and tools", Nikita Galkin
Fwdays33 views
Cocktail of Environments. How to Mix Test and Development Environments and St... by Aleksandr Tarasov
Cocktail of Environments. How to Mix Test and Development Environments and St...Cocktail of Environments. How to Mix Test and Development Environments and St...
Cocktail of Environments. How to Mix Test and Development Environments and St...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading... by The Digital Insurer
Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...Webinar : Desperately Seeking Transformation - Part 2:  Insights from leading...
Webinar : Desperately Seeking Transformation - Part 2: Insights from leading...
Measurecamp Brussels - Synthetic data.pdf by Human37
Measurecamp Brussels - Synthetic data.pdfMeasurecamp Brussels - Synthetic data.pdf
Measurecamp Brussels - Synthetic data.pdf
Human37 26 views
AIM102-S_Cognizant_CognizantCognitive by PhilipBasford
AIM102-S_Cognizant_CognizantCognitiveAIM102-S_Cognizant_CognizantCognitive
AIM102-S_Cognizant_CognizantCognitive
PhilipBasford21 views
Innovation & Entrepreneurship strategies in Dairy Industry by PervaizDar1
Innovation & Entrepreneurship strategies in Dairy IndustryInnovation & Entrepreneurship strategies in Dairy Industry
Innovation & Entrepreneurship strategies in Dairy Industry
PervaizDar135 views
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」 by PC Cluster Consortium
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」
PCCC23:日本AMD株式会社 テーマ1「AMD Instinct™ アクセラレーターの概要」
Digital Personal Data Protection (DPDP) Practical Approach For CISOs by Priyanka Aash
Digital Personal Data Protection (DPDP) Practical Approach For CISOsDigital Personal Data Protection (DPDP) Practical Approach For CISOs
Digital Personal Data Protection (DPDP) Practical Approach For CISOs
Priyanka Aash162 views
What is Authentication Active Directory_.pptx by HeenaMehta35
What is Authentication Active Directory_.pptxWhat is Authentication Active Directory_.pptx
What is Authentication Active Directory_.pptx
HeenaMehta3515 views
The Role of Patterns in the Era of Large Language Models by Yunyao Li
The Role of Patterns in the Era of Large Language ModelsThe Role of Patterns in the Era of Large Language Models
The Role of Patterns in the Era of Large Language Models
Yunyao Li91 views

The Origin of Lithium