SlideShare a Scribd company logo
1 of 32
Introducing: Zend Framework

John Coggeshall




                  Copyright © 2006, Zend Technologies Inc.
Welcome

   • Today I’ll be introducing you to the Zend
      Framework
          What it is
          Why we’re doing it
          How to use it
          Where it’s going
          How to be a part of it




Oct 1, 2012                                      #2
Getting Started


   • Zend Framework is..
        A modular collection of PHP classes based on PHP 5 to
         simplify common tasks
        A starting point for your applications
        A demonstration of PHP 5 best practices
        A smaller component of the PHP Collaboration Project
   • Zend Framework isn’t…
        A free-reign open source project
        A religion




Oct 1, 2012                                                 #3
Goals of the Framework


   • Zend Framework strives to be fundamentally….
        An industry-leading framework for PHP application
         development
        A partnership between many companies already
         experienced in PHP Framework development
   • Zend Framework strives to be technically…
        A source of high-quality, PHP 5 / E_STRICT compatible
         application components
        Completely PHP 5 powered, requiring as few external PHP
         extensions as necessary
        A minimal object hierarchy to achieve the necessary goals
        Modular design allowing developers to use the framework at
         will, as they see fit.



Oct 1, 2012                                                      #4
Why Yet another Framework?


   • Keep PHP competitive with other technologies
        .NET, Java, etc.
   • Provide “clean” IP to enable commercial use
        Real companies can’t just “borrow” code from the
         Internet without clear licensing
   • “Extreme Simplicity”: It may not be simple
       technically, but using it should be.
   •   Take full advantage of PHP 5




Oct 1, 2012                                                 #5
The Framework License


   • Zend Framework is licensed using a PHP/BSD
      style license
        Anyone can use it, for anything, no strings attached –
         period.
   • Along with the license of the framework itself,
      contributors must sign a Contributor License
      Agreement (CLA)




Oct 1, 2012                                                   #6
There’s no such thing as a free…


   • Why spend so much time and effort on
      something, just to give it away?
        Yes, we’re still interested in making money
   • For the continued success of PHP it must be a
      collaboration beyond OSS hackers
        Through the PHP Collaboration project, and projects
         like Zend Framework, we can leverage the knowledge
         of some of the best in the industry in the benefit of PHP
         as a whole
        As you might expect, Zend benefits with PHP




Oct 1, 2012                                                     #7
We eat our own dog food


   • Zend Framework is more than unit-tested, it is
      used in real-life production environments
        Gives us the ability to test performance, ease of use,
         etc. in a practical environment

        Zend and its partners are already using the preview
         release of the Framework to speed development of
         their applications

        Both the Framework homepage
         (framework.zend.com) and our new Developer’s Zone
         (devzone.zend.com) use the preview release of
         Framework as their foundation.



Oct 1, 2012                                                       #8
The grail: Extreme Simplicity


   • Many of PHP 5’s most exciting new technologies
      are really simple to use:
        Simple XML
        SOAP
        Tidy
   • While the underlying technologies may be
      extremely complex, the end-user APIs are
      reduced to an extremely simple interface




Oct 1, 2012                                       #9
Getting the Grail


   • To achieve the grail of extreme simplicity
        “Simple things should be simple, complex things should
         be possible”
   • Use-at-will architecture
        You shouldn’t be forced into buying the whole pizza
         just for a slice
        Use individual components (controller/model) without
         being forced to use everything (your own
         template/view)
   • Configuration-less
        The framework should be plug-and-go, no
         configuration files necessary




Oct 1, 2012                                                    # 10
Zend Framework from 10,000 feet




Oct 1, 2012                       # 11
Completely PHP-5 focused


   •   Requires PHP 5.0.4 or later for near future
   •   Takes full advantage of the PHP exception model
   •   Constants are all at the class-level
   •   No functions in global namespace
   •   ZE2 / SPL technologies fully utilized where it
       makes sense
   •   Black magic __magic() functions used very
       sparsely




Oct 1, 2012                                        # 12
Preview Release


   • PR 1.2 is the latest preview release of the
      Framework including many immediately useful
      tools such as:
          A basic MVC framework for application design
          A PDO-based database layer
          Feed (RSS, Atom) ingestion and manipulation
          An HTTP client
          Input data filtering
          Json support for AJAX
          PDF generation and manipulation
          RPC / Web service support
          And more!



Oct 1, 2012                                               # 13
Getting Zend Framework


   • You can either get the framework preview
      release or check out the latest repository version


   • Preview Release: http://framework.zend.com/

   • Repository:
         $ svn checkout http://framework.zend.com/svn/framework/trunk




Oct 1, 2012                                                             # 14
Installing Zend Framework


   • Installing the framework is very easy, just modify
      your include_path to include the library/
      directory

   From php.ini:
        ……
        include_path=“.:/usr/local/lib/php:/usr/local/lib/ZendFramework”
        ……

   From .htaccess
        ……
        php_value include_path “.:/usr/local/lib/php:/usr/local/lib/ZendFramework”
        ……



Oct 1, 2012                                                                # 15
MVC Pattern


   • MVC, or Model View Controller pattern is a
       powerful technique for developing user
       interfaces
   •   Originally was conceived for client-side GUI
       applications and adopted to the web
   •   Zend Framework provides a simplistic MVC
       model




Oct 1, 2012                                           # 16
Example Controller




   • Note: indexAction() is declared abstract in
      Zend_Controller_Action, and therefore must be
      defined in any Action/Page controller




Oct 1, 2012                                           # 17
Passing Parameters


   • Beyond $_GET/$_POST you can also pass
      parameters to a specific controller action by
      appending them to the URL:
        http://localhost/foo/dosomething/param1/value1/param2/value2

   • Parameters can be accessed from within the
      action by name
        $this->_getParam(<key> [, <default value>]);
        $this->_getAllParams();




Oct 1, 2012                                                         # 18
Dealing with 404s


   • 404 errors are no longer the responsibility of
       Apache per-se, and are more likely to result in a
       ‘Class not found’ / ‘Method not found’ exception
   •   To deal with these Zend Framework provides two
       methods
        In the event of a controller not found, the
         IndexController::noRoute() method will be called
         instead
        In the event a controller action is not defined, it is the
         responsibility of the controller to implement safeguards
         (i.e. __call() which traps bad action calls)




Oct 1, 2012                                                     # 19
Chaining Controllers


   • Controllers can be chained together to either
      break business logic out into components, or to
      otherwise redirect the user
        $this->_forward(<controller_name> [, <parameters>])
        Parameters are a series of key/value pairs
        Controller Chaining does not occur until the current
         action is complete, to immediately forward you must
         return from the current action after calling _forward()
   • Forwarding does not cause a refresh on the
      client, to physically refresh the browser
        $this->_redirect(<url>);



Oct 1, 2012                                                    # 20
Final thoughts on MVC


   • Although the pattern dictates three individual
       class types, they are as conceptual as functional
   •   For instance a “model” or “view” isn’t absolutely
       necessary to gain most of the benefit of MVC
        You can always perform queries from a controller
        You can always print output from a controller
   • Although not necessary, they are never the less
       recommended




Oct 1, 2012                                                 # 21
Input Filtering




             Copyright © 2006, Zend Technologies Inc.
Zend_InputFilter


   • Security is a primary concern in Zend Framework
   • As such, we provide facilities to clean and
      manage untrusted data in your applications via
      Zend_InputFilter and Zend_Filter
        Provides a number of methods for filtering data against
         many common data types (digits, alphanumeric,
         alpha, phone, etc.)




Oct 1, 2012                                                  # 23
Using Zend_InputFilter

   • With Input Filter you can both test data types and
      retrieve filtered data easily




   • Note, by default the source of the data and all of
      it’s references are destroyed when filtered

Oct 1, 2012                                         # 24
Zend_Mail


   • Simplifies building and sending e-mail

   • Supports MIME types and multipart e-mail

   • Supports multiple transports and persistent
      connections automatically

   • Supports large file attachments via the streams
      API improving performance



Oct 1, 2012                                            # 25
Sending HTML mail is now really easy




Oct 1, 2012                            # 26
Zend_Search


   • PHP 5 implementation of the popular Lucene
      search engine from the Java world.


   • Simplified API

   • Requires no special PHP extensions

   • Fully compatible with the binary index format of
      Java Lucene 1.4 and above


Oct 1, 2012                                         # 27
Zend_Search Features


   • Ranked Searching
        Best results always first

   • Many Query types: phrase, wildcard, proximity

   • Search by field (Author, title, body, etc.)

   • Robust, and simple API
        One-method intelligent searches against indexes, or
         complex OO queries if desired
        Index multiple document types, with different field
         requirements
Oct 1, 2012                                                    # 28
Using Zend_Search


   • Using Zend Search is very easy




   • The search engine also boasts a parser for google-like searching: zend php -java




Oct 1, 2012                                                                         # 29
Adding documents to the index




Oct 1, 2012                     # 30
Cool things about Zend_Search


   • The Lucene search engine allows you to index
      multiple document types in a single index, each
      with different index fields
        Index Individual documents with different searchable
         criterion
        I.e. Index code samples by functions used, while
         articles by title, author, and keywords in the same
         index
   • Because it is 100% compatible with Lucene 1.4+,
      it is compatible with all pre-created index files




Oct 1, 2012                                                    # 31
Questions?




             Copyright © 2006, Zend Technologies Inc.

More Related Content

What's hot

Web services on IBM i with PHP and Zend Framework
Web services on IBM i with PHP and Zend FrameworkWeb services on IBM i with PHP and Zend Framework
Web services on IBM i with PHP and Zend FrameworkAlan Seiden
 
PHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM iPHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM iAlan Seiden
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi Shlomo Vanunu
 
Aop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHPAop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHPSerge Smertin
 
Running open source PHP applications on you IBM i
Running open source PHP applications on you IBM iRunning open source PHP applications on you IBM i
Running open source PHP applications on you IBM iProximity Group
 

What's hot (8)

Web services on IBM i with PHP and Zend Framework
Web services on IBM i with PHP and Zend FrameworkWeb services on IBM i with PHP and Zend Framework
Web services on IBM i with PHP and Zend Framework
 
PHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM iPHP Toolkit from Zend and IBM: Open Source on IBM i
PHP Toolkit from Zend and IBM: Open Source on IBM i
 
Zend Products and PHP for IBMi
Zend Products and PHP for IBMi  Zend Products and PHP for IBMi
Zend Products and PHP for IBMi
 
Getting started with PHP on IBM i
Getting started with PHP on IBM iGetting started with PHP on IBM i
Getting started with PHP on IBM i
 
Zend Code in ZF 2.0
Zend Code in ZF 2.0Zend Code in ZF 2.0
Zend Code in ZF 2.0
 
Dependency Injection Styles
Dependency Injection StylesDependency Injection Styles
Dependency Injection Styles
 
Aop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHPAop, Metaprogramming and codegeneration with PHP
Aop, Metaprogramming and codegeneration with PHP
 
Running open source PHP applications on you IBM i
Running open source PHP applications on you IBM iRunning open source PHP applications on you IBM i
Running open source PHP applications on you IBM i
 

Viewers also liked

Presentation bsm wms product control 2014 en
Presentation  bsm wms  product control  2014 enPresentation  bsm wms  product control  2014 en
Presentation bsm wms product control 2014 enBinh Nguyen
 
Poseidon and cupid
Poseidon and cupidPoseidon and cupid
Poseidon and cupidLeireLopez
 
めんえす通信 大阪版ご掲載検討資料
めんえす通信 大阪版ご掲載検討資料めんえす通信 大阪版ご掲載検討資料
めんえす通信 大阪版ご掲載検討資料menesmenes
 
BNI United: Power Dance
BNI United: Power DanceBNI United: Power Dance
BNI United: Power DancePeter Bull
 
Tutorial de música clásica con blogs1
Tutorial de música clásica con blogs1Tutorial de música clásica con blogs1
Tutorial de música clásica con blogs1lesmasson
 
Brand shell moerdijk 3 6-14
Brand shell moerdijk 3 6-14Brand shell moerdijk 3 6-14
Brand shell moerdijk 3 6-14leo_smid
 
Shambhavi romantic bestseller marathi saga dr. shriniwas janardan kashalikar
Shambhavi  romantic bestseller marathi saga dr. shriniwas janardan kashalikarShambhavi  romantic bestseller marathi saga dr. shriniwas janardan kashalikar
Shambhavi romantic bestseller marathi saga dr. shriniwas janardan kashalikarshriniwas kashalikar
 
Location shots
Location shotsLocation shots
Location shotsMevanson
 
8 file2 business cycles
8 file2 business cycles8 file2 business cycles
8 file2 business cyclesdomsr
 
LAPORAN BERITA MAGANG222222
LAPORAN BERITA MAGANG222222LAPORAN BERITA MAGANG222222
LAPORAN BERITA MAGANG222222Farah Olii
 

Viewers also liked (18)

Presentation bsm wms product control 2014 en
Presentation  bsm wms  product control  2014 enPresentation  bsm wms  product control  2014 en
Presentation bsm wms product control 2014 en
 
Peace 2
Peace  2Peace  2
Peace 2
 
Poseidon and cupid
Poseidon and cupidPoseidon and cupid
Poseidon and cupid
 
4 ll 43 final
4 ll 43   final4 ll 43   final
4 ll 43 final
 
めんえす通信 大阪版ご掲載検討資料
めんえす通信 大阪版ご掲載検討資料めんえす通信 大阪版ご掲載検討資料
めんえす通信 大阪版ご掲載検討資料
 
Ece4760 hw4
Ece4760 hw4Ece4760 hw4
Ece4760 hw4
 
BNI United: Power Dance
BNI United: Power DanceBNI United: Power Dance
BNI United: Power Dance
 
Ficha Tec Sichel
Ficha Tec SichelFicha Tec Sichel
Ficha Tec Sichel
 
sistema operativo
sistema operativosistema operativo
sistema operativo
 
Tutorial de música clásica con blogs1
Tutorial de música clásica con blogs1Tutorial de música clásica con blogs1
Tutorial de música clásica con blogs1
 
Brand shell moerdijk 3 6-14
Brand shell moerdijk 3 6-14Brand shell moerdijk 3 6-14
Brand shell moerdijk 3 6-14
 
Shambhavi romantic bestseller marathi saga dr. shriniwas janardan kashalikar
Shambhavi  romantic bestseller marathi saga dr. shriniwas janardan kashalikarShambhavi  romantic bestseller marathi saga dr. shriniwas janardan kashalikar
Shambhavi romantic bestseller marathi saga dr. shriniwas janardan kashalikar
 
Diálogo por construir corrientes
Diálogo por construir corrientesDiálogo por construir corrientes
Diálogo por construir corrientes
 
Celebrity Day
Celebrity DayCelebrity Day
Celebrity Day
 
Location shots
Location shotsLocation shots
Location shots
 
universe
universeuniverse
universe
 
8 file2 business cycles
8 file2 business cycles8 file2 business cycles
8 file2 business cycles
 
LAPORAN BERITA MAGANG222222
LAPORAN BERITA MAGANG222222LAPORAN BERITA MAGANG222222
LAPORAN BERITA MAGANG222222
 

Similar to Zend

Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentDiego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentDiego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentDiego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentDiego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentDiego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentDiego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentDiego Delon
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentKaiuwe
 

Similar to Zend (20)

green
greengreen
green
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Unit Test for ZF SlideShare Component
Unit Test for ZF SlideShare ComponentUnit Test for ZF SlideShare Component
Unit Test for ZF SlideShare Component
 
Demo
DemoDemo
Demo
 
first pitch
first pitchfirst pitch
first pitch
 
werwr
werwrwerwr
werwr
 
sdfsdf
sdfsdfsdfsdf
sdfsdf
 
college
collegecollege
college
 
first pitch
first pitchfirst pitch
first pitch
 

Recently uploaded

GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in managementchhavia330
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst SummitHolger Mueller
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfpollardmorgan
 
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc.../:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...lizamodels9
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.Aaiza Hassan
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsApsara Of India
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessAggregage
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...lizamodels9
 
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝soniya singh
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...anilsa9823
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Serviceankitnayak356677
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Servicediscovermytutordmt
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...lizamodels9
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024christinemoorman
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...lizamodels9
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communicationskarancommunications
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Roomdivyansh0kumar0
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...lizamodels9
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation SlidesKeppelCorporation
 

Recently uploaded (20)

GD Birla and his contribution in management
GD Birla and his contribution in managementGD Birla and his contribution in management
GD Birla and his contribution in management
 
Progress Report - Oracle Database Analyst Summit
Progress  Report - Oracle Database Analyst SummitProgress  Report - Oracle Database Analyst Summit
Progress Report - Oracle Database Analyst Summit
 
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdfIntro to BCG's Carbon Emissions Benchmark_vF.pdf
Intro to BCG's Carbon Emissions Benchmark_vF.pdf
 
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc.../:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
/:Call Girls In Jaypee Siddharth - 5 Star Hotel New Delhi ➥9990211544 Top Esc...
 
M.C Lodges -- Guest House in Jhang.
M.C Lodges --  Guest House in Jhang.M.C Lodges --  Guest House in Jhang.
M.C Lodges -- Guest House in Jhang.
 
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call GirlsCash Payment 9602870969 Escort Service in Udaipur Call Girls
Cash Payment 9602870969 Escort Service in Udaipur Call Girls
 
Sales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for SuccessSales & Marketing Alignment: How to Synergize for Success
Sales & Marketing Alignment: How to Synergize for Success
 
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
Lowrate Call Girls In Sector 18 Noida ❤️8860477959 Escorts 100% Genuine Servi...
 
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
Call Girls in Mehrauli Delhi 💯Call Us 🔝8264348440🔝
 
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
Lucknow 💋 Escorts in Lucknow - 450+ Call Girl Cash Payment 8923113531 Neha Th...
 
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts ServiceVip Female Escorts Noida 9711199171 Greater Noida Escorts Service
Vip Female Escorts Noida 9711199171 Greater Noida Escorts Service
 
Best Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting PartnershipBest Practices for Implementing an External Recruiting Partnership
Best Practices for Implementing an External Recruiting Partnership
 
Call Girls in Gomti Nagar - 7388211116 - With room Service
Call Girls in Gomti Nagar - 7388211116  - With room ServiceCall Girls in Gomti Nagar - 7388211116  - With room Service
Call Girls in Gomti Nagar - 7388211116 - With room Service
 
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
Call Girls In Sikandarpur Gurgaon ❤️8860477959_Russian 100% Genuine Escorts I...
 
The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024The CMO Survey - Highlights and Insights Report - Spring 2024
The CMO Survey - Highlights and Insights Report - Spring 2024
 
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
Call Girls In Radisson Blu Hotel New Delhi Paschim Vihar ❤️8860477959 Escorts...
 
Pharma Works Profile of Karan Communications
Pharma Works Profile of Karan CommunicationsPharma Works Profile of Karan Communications
Pharma Works Profile of Karan Communications
 
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130  Available With RoomVIP Kolkata Call Girl Howrah 👉 8250192130  Available With Room
VIP Kolkata Call Girl Howrah 👉 8250192130 Available With Room
 
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
Lowrate Call Girls In Laxmi Nagar Delhi ❤️8860477959 Escorts 100% Genuine Ser...
 
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
Keppel Ltd. 1Q 2024 Business Update  Presentation SlidesKeppel Ltd. 1Q 2024 Business Update  Presentation Slides
Keppel Ltd. 1Q 2024 Business Update Presentation Slides
 

Zend

  • 1. Introducing: Zend Framework John Coggeshall Copyright © 2006, Zend Technologies Inc.
  • 2. Welcome • Today I’ll be introducing you to the Zend Framework  What it is  Why we’re doing it  How to use it  Where it’s going  How to be a part of it Oct 1, 2012 #2
  • 3. Getting Started • Zend Framework is..  A modular collection of PHP classes based on PHP 5 to simplify common tasks  A starting point for your applications  A demonstration of PHP 5 best practices  A smaller component of the PHP Collaboration Project • Zend Framework isn’t…  A free-reign open source project  A religion Oct 1, 2012 #3
  • 4. Goals of the Framework • Zend Framework strives to be fundamentally….  An industry-leading framework for PHP application development  A partnership between many companies already experienced in PHP Framework development • Zend Framework strives to be technically…  A source of high-quality, PHP 5 / E_STRICT compatible application components  Completely PHP 5 powered, requiring as few external PHP extensions as necessary  A minimal object hierarchy to achieve the necessary goals  Modular design allowing developers to use the framework at will, as they see fit. Oct 1, 2012 #4
  • 5. Why Yet another Framework? • Keep PHP competitive with other technologies  .NET, Java, etc. • Provide “clean” IP to enable commercial use  Real companies can’t just “borrow” code from the Internet without clear licensing • “Extreme Simplicity”: It may not be simple technically, but using it should be. • Take full advantage of PHP 5 Oct 1, 2012 #5
  • 6. The Framework License • Zend Framework is licensed using a PHP/BSD style license  Anyone can use it, for anything, no strings attached – period. • Along with the license of the framework itself, contributors must sign a Contributor License Agreement (CLA) Oct 1, 2012 #6
  • 7. There’s no such thing as a free… • Why spend so much time and effort on something, just to give it away?  Yes, we’re still interested in making money • For the continued success of PHP it must be a collaboration beyond OSS hackers  Through the PHP Collaboration project, and projects like Zend Framework, we can leverage the knowledge of some of the best in the industry in the benefit of PHP as a whole  As you might expect, Zend benefits with PHP Oct 1, 2012 #7
  • 8. We eat our own dog food • Zend Framework is more than unit-tested, it is used in real-life production environments  Gives us the ability to test performance, ease of use, etc. in a practical environment  Zend and its partners are already using the preview release of the Framework to speed development of their applications  Both the Framework homepage (framework.zend.com) and our new Developer’s Zone (devzone.zend.com) use the preview release of Framework as their foundation. Oct 1, 2012 #8
  • 9. The grail: Extreme Simplicity • Many of PHP 5’s most exciting new technologies are really simple to use:  Simple XML  SOAP  Tidy • While the underlying technologies may be extremely complex, the end-user APIs are reduced to an extremely simple interface Oct 1, 2012 #9
  • 10. Getting the Grail • To achieve the grail of extreme simplicity  “Simple things should be simple, complex things should be possible” • Use-at-will architecture  You shouldn’t be forced into buying the whole pizza just for a slice  Use individual components (controller/model) without being forced to use everything (your own template/view) • Configuration-less  The framework should be plug-and-go, no configuration files necessary Oct 1, 2012 # 10
  • 11. Zend Framework from 10,000 feet Oct 1, 2012 # 11
  • 12. Completely PHP-5 focused • Requires PHP 5.0.4 or later for near future • Takes full advantage of the PHP exception model • Constants are all at the class-level • No functions in global namespace • ZE2 / SPL technologies fully utilized where it makes sense • Black magic __magic() functions used very sparsely Oct 1, 2012 # 12
  • 13. Preview Release • PR 1.2 is the latest preview release of the Framework including many immediately useful tools such as:  A basic MVC framework for application design  A PDO-based database layer  Feed (RSS, Atom) ingestion and manipulation  An HTTP client  Input data filtering  Json support for AJAX  PDF generation and manipulation  RPC / Web service support  And more! Oct 1, 2012 # 13
  • 14. Getting Zend Framework • You can either get the framework preview release or check out the latest repository version • Preview Release: http://framework.zend.com/ • Repository: $ svn checkout http://framework.zend.com/svn/framework/trunk Oct 1, 2012 # 14
  • 15. Installing Zend Framework • Installing the framework is very easy, just modify your include_path to include the library/ directory From php.ini: …… include_path=“.:/usr/local/lib/php:/usr/local/lib/ZendFramework” …… From .htaccess …… php_value include_path “.:/usr/local/lib/php:/usr/local/lib/ZendFramework” …… Oct 1, 2012 # 15
  • 16. MVC Pattern • MVC, or Model View Controller pattern is a powerful technique for developing user interfaces • Originally was conceived for client-side GUI applications and adopted to the web • Zend Framework provides a simplistic MVC model Oct 1, 2012 # 16
  • 17. Example Controller • Note: indexAction() is declared abstract in Zend_Controller_Action, and therefore must be defined in any Action/Page controller Oct 1, 2012 # 17
  • 18. Passing Parameters • Beyond $_GET/$_POST you can also pass parameters to a specific controller action by appending them to the URL:  http://localhost/foo/dosomething/param1/value1/param2/value2 • Parameters can be accessed from within the action by name  $this->_getParam(<key> [, <default value>]);  $this->_getAllParams(); Oct 1, 2012 # 18
  • 19. Dealing with 404s • 404 errors are no longer the responsibility of Apache per-se, and are more likely to result in a ‘Class not found’ / ‘Method not found’ exception • To deal with these Zend Framework provides two methods  In the event of a controller not found, the IndexController::noRoute() method will be called instead  In the event a controller action is not defined, it is the responsibility of the controller to implement safeguards (i.e. __call() which traps bad action calls) Oct 1, 2012 # 19
  • 20. Chaining Controllers • Controllers can be chained together to either break business logic out into components, or to otherwise redirect the user  $this->_forward(<controller_name> [, <parameters>])  Parameters are a series of key/value pairs  Controller Chaining does not occur until the current action is complete, to immediately forward you must return from the current action after calling _forward() • Forwarding does not cause a refresh on the client, to physically refresh the browser  $this->_redirect(<url>); Oct 1, 2012 # 20
  • 21. Final thoughts on MVC • Although the pattern dictates three individual class types, they are as conceptual as functional • For instance a “model” or “view” isn’t absolutely necessary to gain most of the benefit of MVC  You can always perform queries from a controller  You can always print output from a controller • Although not necessary, they are never the less recommended Oct 1, 2012 # 21
  • 22. Input Filtering Copyright © 2006, Zend Technologies Inc.
  • 23. Zend_InputFilter • Security is a primary concern in Zend Framework • As such, we provide facilities to clean and manage untrusted data in your applications via Zend_InputFilter and Zend_Filter  Provides a number of methods for filtering data against many common data types (digits, alphanumeric, alpha, phone, etc.) Oct 1, 2012 # 23
  • 24. Using Zend_InputFilter • With Input Filter you can both test data types and retrieve filtered data easily • Note, by default the source of the data and all of it’s references are destroyed when filtered Oct 1, 2012 # 24
  • 25. Zend_Mail • Simplifies building and sending e-mail • Supports MIME types and multipart e-mail • Supports multiple transports and persistent connections automatically • Supports large file attachments via the streams API improving performance Oct 1, 2012 # 25
  • 26. Sending HTML mail is now really easy Oct 1, 2012 # 26
  • 27. Zend_Search • PHP 5 implementation of the popular Lucene search engine from the Java world. • Simplified API • Requires no special PHP extensions • Fully compatible with the binary index format of Java Lucene 1.4 and above Oct 1, 2012 # 27
  • 28. Zend_Search Features • Ranked Searching  Best results always first • Many Query types: phrase, wildcard, proximity • Search by field (Author, title, body, etc.) • Robust, and simple API  One-method intelligent searches against indexes, or complex OO queries if desired  Index multiple document types, with different field requirements Oct 1, 2012 # 28
  • 29. Using Zend_Search • Using Zend Search is very easy • The search engine also boasts a parser for google-like searching: zend php -java Oct 1, 2012 # 29
  • 30. Adding documents to the index Oct 1, 2012 # 30
  • 31. Cool things about Zend_Search • The Lucene search engine allows you to index multiple document types in a single index, each with different index fields  Index Individual documents with different searchable criterion  I.e. Index code samples by functions used, while articles by title, author, and keywords in the same index • Because it is 100% compatible with Lucene 1.4+, it is compatible with all pre-created index files Oct 1, 2012 # 31
  • 32. Questions? Copyright © 2006, Zend Technologies Inc.