What's New in ZF 1.10
Upcoming SlideShare
Loading in...5
×
 

What's New in ZF 1.10

on

  • 3,113 views

Slides from a webinar where we discussed the new features in Zend Framework 1.10

Slides from a webinar where we discussed the new features in Zend Framework 1.10

Statistics

Views

Total Views
3,113
Views on SlideShare
3,090
Embed Views
23

Actions

Likes
3
Downloads
42
Comments
0

2 Embeds 23

http://www.slideshare.net 21
http://localhost 2

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

    What's New in ZF 1.10 What's New in ZF 1.10 Presentation Transcript

    • What's New in ZF 1.10? Ralph Schindler Zend Framework Software Engineer
    • In a Nutshell
      • Numerous improvements
      • New Components
      • New Services
      • Documentation updates
    • Improvements Building incrementally
    • Improvements
      • Zend_Filter_Boolean
      Insert->Header & Footer
    • Improvements
      • Zend_Filter_Null
      Insert->Header & Footer
    • Improvements
      • Zend_Filter_Compress / Decompress
      Insert->Header & Footer
    • Improvements
      • Zend_Validate_Callback
      Insert->Header & Footer
    • Improvements
      • Zend_Validate_CreditCard
        • Supported CC Institutes:
          • American Express, China UnionPay
          • Diners Club Card Blanche, Diners Club International, Diners Club US & Canada
          • Discover Card, JCB, Laser, Maestro
          • MasterCard, Solo
          • Visa, Visa Electron
      Insert->Header & Footer
    • Improvements
      • Zend_Validate_PostCode
        • Allows you to determine if a given value is a valid postal code
        • Locale aware
      Insert->Header & Footer
    • Improvements
      • Zend_Log::factory() & Zend Monitor Writer Adapter
      Insert->Header & Footer
    • Improvements
      • Zend_Log::factory() & Zend Monitor Writer Adapter
      Insert->Header & Footer
    • Improvements
      • Zend_Pdf performance enhancements
      • Zend_Exception previous Exception support
      • Zend_Loader::loadClass() PSR-0 recommendations
      • Upgrade to Dojo 1.4
      Insert->Header & Footer
    • Improvements
      • Zend_Application Resources
        • Cachemanager
        • Dojo
        • Jquery
        • Layout
        • Log
        • Mail
        • Multidb
      Insert->Header & Footer
    • Improvements
      • Zend_Tool Providers
        • No more IncludePath scanner – Explicit loader
        • Home directory & Configuration
        • DbAdapter Provider
        • Layout Provider
        • Basic Scaffolding
          • Model Provider
          • Form Provider
        • Project in 1.10+ generated with Application_ prefix in code & bootstrap support
      Insert->Header & Footer
    • Improvements
    • Improvements
    • Improvements
    • New Components Extending an already extensible and extensive framework
    • Zend_Barcode
      • Create barcodes, and render as PDF or images
      • Validate barcode values
    • $renderer = Zend_Barcode::factory( 'code39' , // barcode type 'image' , // image or PDF array ( // barcode options 'text' => 'ZENDFRAMEWORK' , ), array ( // renderer options 'imageType' => 'png' , ) ); $image = $renderer ->draw(); imagepng ( $image , __DIR__ . '/barcode.png' );
    • $validator = new Zend_Validate_Barcode( 'CODE39' ); if ( $validator ->isValid( $input )) { // valid barcode text } else { // invalid barcode text }
    • Zend_Cache
      • New backend: Zend_Cache_Backend_Static
        • Cache to named files in your document root
        • Skip PHP altogether for cached content!
      • New: Zend_Cache_Manager
        • Use configuration to create Cache objects
        • Acts as both a factory and repository for multiple Cache objects
        • Aids usage of multi-tiered caching strategies in your ZF applications
    • RewriteCond %{DOCUMENT_ROOT}/cached/% {REQUEST_URI}.html -f RewriteRule .* cached/%{REQUEST_URI}.%1 [L]
    • $options = array ( 'public_dir' => APPLICATION_PATH . '/../public/cache' , ); // Where $manager is a Zend_Cache_Manager instance $manager ->setTemplateOptions( 'page' , $options ); $cache = $manager ->getCache( 'page' ); // In an action controller: public function preDispatch() { $this ->_helper->cache( // cache these actions: array ( 'foo' , 'bar' , 'baz' ), // use these tags: array ( $this ->_request->getControllerName()), // with this extension: 'html' ); }
    • $manager = new Zend_Cache_Manager; $dbCache = array ( 'frontend' => array ( 'name' => 'Core' , 'options' => array ( 'lifetime' => 3600, 'automatic_serialization' => true, ) ), 'backend' => array ( 'name' => 'Core' , 'options' => array ( 'cache_dir' => APPLICATION_PATH . '/../data/cache/db' , ), ), ); $manager ->setCacheTemplate( 'db' , $dbCache ); $cache = $manager ->getCache( 'db' );
    • Zend_Feed_Writer
      • Sibling to Zend_Feed_Reader, introduced in ZF 1.9.0
      • Provides full capabilities for generation of a variety of feeds, including feed extensions
        • RSS
        • RSS2
        • Atom
        • DublinCore
        • etc.
    • $feed = new Zend_Feed_Writer_Feed; $feed ->setTitle( 'ZF Webinars' ) ->setLink( 'http://framework.zend.com/webinars/atom' , 'atom' ) ->addAuthor( array ( 'name' => 'ZF DevTeam' , 'email' => 'fw-general@lists.zend.com' , 'uri' => 'http://framework.zend.com/' , )) ->setDateModified( strtotime ( '2010-03-17 12:00:00' ));
    • $entry = $feed ->createEntry(); $entry ->setLink( 'http://framework.zend.com/webinars/2010-03-17' ) ->addAuthor( array ( 'name' => 'Ralph Schindler' , 'email' => 'ralph.schindler@zend.com' , 'uri' => 'http://framework.zend.com/' , )) ->setDateModified( strtotime ( '2010-03-17 12:00:00' )) ->setDateCreated( strtotime ( '2010-03-15 08:39:00' )); $output = $feed ->export( 'atom' );
    • Zend_Feed_Pubsubhubbub
      • Act as either a PuSH subscriber or publisher
        • Subscriber functionality allows specifying a callback URL for PuSH's “fat pings”
          • Uses DB storage by default to track what feeds have been received previously
        • Publisher allows pinging a hub to notify that new content is available
    • $publisher = new Zend_Feed_Pubsubhubbub_Publisher; $publisher ->addHubUrls( array ( 'http://pubsubhubbub.appspot.com/' , 'http://wordpress.org/extend/plugins/pushpress/' , )) ->addUpdatedTopicUrls( array ( 'http://framework.zend.com/webinars/atom' , )); // Notify $publisher ->notifyAll();
    • $storage = new Zend_Feed_Pubsubhubbub_Model_Subscription; $subscriber = new Zend_Feed_Pubsubhubbub_Subscriber; $subscriber ->setStorage( $storage ) ->addHubUrl( 'http://pubsubhubbub.appspot.com/' ) ->setTopicUrl( 'http://framework.zend.com/webinars/atom' ) ->setCallbackUrl( 'http://www.mydomain.com/hubbub/callback' ) ->subscribeAll();
    • $callback = new Zend_Feed_Pubsubhubbub_Subscriber_Callback; $callback ->setStorage( $storage ); $callback ->handle(); $callback ->sendResponse(); if ( $callback ->hasFeedUpdate()) { $feedString = $callback ->getFedUpdate(); // start processing! }
    • Zend_Markup
      • Parser and renderer functionality
      • Supports:
        • BBCode
        • Textile
      $bbcode = Zend_Markup::factory( 'Bbcode' ); echo $bbcode ->render( $someBbCodeMarkup ); $textile = Zend_Markup::factory( 'Textile' ); echo $textile ->render( $someTextileMarkup );
    • Zend_Oauth
      • Act as an Oauth consumer
    • $config = array ( 'callbackUrl' => 'http://example.com/callback' , 'siteUrl' => 'http://twitter.com/oauth' , 'consumerKey' => 'gg3DsFTW9OU9eWPnbuPzQ' , 'consumerSecret' => 'tFB0fyWLSMf74lkEu9FTyoHXcazOWpbrAjTCCK48A' ); $consumer = new Zend_Oauth_Consumer( $config ); // Get request token: $token = $consumer ->getRequestToken(); // Persist the token $session = new Zend_Session_Namespace( 'oauth' ); $session ->token = serialize ( $token ); // Redirect to oauth provider $consumer ->redirect();
    • // Within a controller action, assuming consumer // and session setup above $request = $this ->getRequest(); if (! $request ->isGet() || !isset( $session ->token) ) { // error condition! } $token = $consumer ->getAccessToken( $request ->getQuery(), unserialize ( $session ->token) ); // use the token! $client = $token ->getHttpClient(); // ...
    • Zend_Serializer
      • Serialize PHP to a variety of formats, as well as deserialize back to PHP
      • Supported formats include:
        • Igbinary
        • WDDX
        • JSON
        • Active Message Format (AMF) 0 and 3
        • Python Pickle
        • PHP code or serialization
    • $serializer = Zend_Serializer::factory( 'Json' ); $serialized = $serializer -> serialize ( $data ); $unserialized = $serializer -> unserialize ( $serialized );
    • New Services Extending your reach into the cloud
    • New Service - LiveDocx
      • http://www.livedocx.com/
      • Best described by this image:
      Insert->Header & Footer
    • New Service - LiveDocx Insert->Header & Footer
    • New Service - LiveDocx Insert->Header & Footer
    • New Service - LiveDocx
      • Other API features:
        • Local & Remote templates
        • Ability to retrieve information about templates
        • Input Template formats:
          • Docx, Doc, RTF, TXD
        • Output Document formats:
          • Docx, Doc, Html, RTF, PDF, TXD, TXT
        • Output Image formats:
          • BMP, PNG, GIF, TIFF, WMF, JPG
      Insert->Header & Footer
    • New Service - DeveloperGarden
      • Developer Garden is the name of Deutsche Telekom’s developer community.
      • Features of the API:
        • BaseUserService
          • Class to manage API quota and user accounting details.
        • IPLocation
          • Locale the given IP and returns geo coordinates. Works only with IPs allocated in the network of the Deutsche Telekom.
        • LocalSearch
          • Allows you to search with options nearby or around a given geo coordinate or city.
      Insert->Header & Footer
    • New Service - DeveloperGarden
      • Features (cont.)
        • SendSMS
          • Send a SMS or Flash SMS to a given number.
        • SMSValidation
          • You can validate a number to use it with SendSMS for also supply a back channel.
        • VoiceCall
          • Initiates a call between two participants.
        • ConferenceCall
          • You can configure a whole conference room with participants for an adhoc conference or you can also schedule your conference.
      Insert->Header & Footer
    • New Service - DeveloperGarden
      • Setup a conference call:
      Insert->Header & Footer
    • New Service - WindowsAzure
      • Windows Azure is the name for Microsoft's Software + Services platform
      • Features:
        • Interface to Storage API:
          • Blobs
          • Tables
            • Batch processing
          • Queues
      Insert->Header & Footer
    • New Service – WindowsAzure Insert->Header & Footer
    • Documentation updates Helping you educate yourself
    • Versioned Documentation
      • Versioned by minor revision (1.10, 1.9, 1.8, etc.)
      • Search by version
    • New Rendering Engine
      • Now using PhD (PHP's Documentation system) to render online docs as well as downloadable docs
      • Faster rendering time and more flexibility in rendering
      • Better navigation
    • Tutorials
      • New manual section, “Learning Zend Framework”
      • Contains Quick Start, and 8 additional tutorials
      • Part of the ZF repository, which means:
        • Versioned
        • Translations will be available
        • New content can be added
    • Migration Notes
      • New centralized “Migration Notes” appendix
      • Migration notes per minor version
    • Commenting
      • Manual comments, ala php.net, have been enabled!
    • Thank you!
      • Information and resources: http://framework.zend.com/