Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
What's New in ZF 1.10? Ralph Schindler Zend Framework Software Engineer
In a Nutshell <ul><li>Numerous improvements </li></ul><ul><li>New Components </li></ul><ul><li>New Services </li></ul><ul>...
Improvements Building incrementally
Improvements <ul><li>Zend_Filter_Boolean </li></ul>Insert->Header & Footer
Improvements <ul><li>Zend_Filter_Null </li></ul>Insert->Header & Footer
Improvements <ul><li>Zend_Filter_Compress / Decompress </li></ul>Insert->Header & Footer
Improvements <ul><li>Zend_Validate_Callback </li></ul>Insert->Header & Footer
Improvements <ul><li>Zend_Validate_CreditCard </li></ul><ul><ul><li>Supported CC Institutes: </li></ul></ul><ul><ul><ul><l...
Improvements <ul><li>Zend_Validate_PostCode </li></ul><ul><ul><li>Allows you to determine if a given value is a valid post...
Improvements <ul><li>Zend_Log::factory() & Zend Monitor Writer Adapter </li></ul>Insert->Header & Footer
Improvements <ul><li>Zend_Log::factory() &  Zend Monitor Writer Adapter </li></ul>Insert->Header & Footer
Improvements <ul><li>Zend_Pdf performance enhancements </li></ul><ul><li>Zend_Exception previous Exception support </li></...
Improvements <ul><li>Zend_Application Resources </li></ul><ul><ul><li>Cachemanager </li></ul></ul><ul><ul><li>Dojo </li></...
Improvements <ul><li>Zend_Tool Providers </li></ul><ul><ul><li>No more IncludePath scanner – Explicit loader </li></ul></u...
Improvements
Improvements
Improvements
New Components Extending an already extensible and extensive framework
Zend_Barcode <ul><li>Create barcodes, and render as PDF or images </li></ul><ul><li>Validate barcode values </li></ul>
$renderer  = Zend_Barcode::factory( 'code39' ,   // barcode type 'image' ,   // image or PDF array (   // barcode options ...
$validator  = new    Zend_Validate_Barcode( 'CODE39' ); if   ( $validator ->isValid( $input )) { // valid barcode text }  ...
Zend_Cache <ul><li>New backend: Zend_Cache_Backend_Static </li></ul><ul><ul><li>Cache to named files in your document root...
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  = new Zend_Cache_Manager; $dbCache   =   array ( 'frontend'   =>   array ( 'name'   =>   'Core' , 'options'   =>...
Zend_Feed_Writer <ul><li>Sibling to Zend_Feed_Reader, introduced in ZF 1.9.0 </li></ul><ul><li>Provides full capabilities ...
$feed  = new Zend_Feed_Writer_Feed; $feed ->setTitle( 'ZF Webinars' ) ->setLink(   'http://framework.zend.com/webinars/ato...
$entry  =  $feed ->createEntry(); $entry ->setLink(   'http://framework.zend.com/webinars/2010-03-17' ) ->addAuthor( array...
Zend_Feed_Pubsubhubbub <ul><li>Act as either a PuSH subscriber or publisher </li></ul><ul><ul><li>Subscriber functionality...
$publisher  = new Zend_Feed_Pubsubhubbub_Publisher; $publisher ->addHubUrls( array ( 'http://pubsubhubbub.appspot.com/' , ...
$storage  = new Zend_Feed_Pubsubhubbub_Model_Subscription; $subscriber   =   new Zend_Feed_Pubsubhubbub_Subscriber; $subsc...
$callback  = new   Zend_Feed_Pubsubhubbub_Subscriber_Callback; $callback ->setStorage( $storage ); $callback ->handle(); $...
Zend_Markup <ul><li>Parser and renderer functionality </li></ul><ul><li>Supports: </li></ul><ul><ul><li>BBCode </li></ul><...
Zend_Oauth <ul><li>Act as an Oauth consumer </li></ul>
$config  =  array ( 'callbackUrl'   =>   'http://example.com/callback' , 'siteUrl'   =>   'http://twitter.com/oauth' , 'co...
// Within a controller action, assuming consumer // and session setup above $request   =   $this ->getRequest(); if   (! $...
Zend_Serializer <ul><li>Serialize PHP to a variety of formats, as well as deserialize back to PHP </li></ul><ul><li>Suppor...
$serializer  = Zend_Serializer::factory( 'Json' ); $serialized   =   $serializer -> serialize ( $data ); $unserialized   =...
New Services Extending your reach into the cloud
New Service - LiveDocx <ul><li>http://www.livedocx.com/ </li></ul><ul><li>Best described by this image: </li></ul>Insert->...
New Service - LiveDocx Insert->Header & Footer
New Service - LiveDocx Insert->Header & Footer
New Service - LiveDocx <ul><li>Other API features: </li></ul><ul><ul><li>Local & Remote templates </li></ul></ul><ul><ul><...
New Service - DeveloperGarden <ul><li>Developer Garden is the name of Deutsche Telekom’s developer community. </li></ul><u...
New Service - DeveloperGarden <ul><li>Features (cont.) </li></ul><ul><ul><li>SendSMS </li></ul></ul><ul><ul><ul><li>Send a...
New Service - DeveloperGarden <ul><li>Setup a conference call: </li></ul>Insert->Header & Footer
New Service - WindowsAzure <ul><li>Windows Azure is the name for Microsoft's Software + Services platform </li></ul><ul><l...
New Service – WindowsAzure Insert->Header & Footer
Documentation updates Helping you educate yourself
Versioned Documentation <ul><li>Versioned by minor revision (1.10, 1.9, 1.8, etc.) </li></ul><ul><li>Search by version </l...
New Rendering Engine <ul><li>Now using PhD (PHP's Documentation system) to render online docs as well as downloadable docs...
Tutorials <ul><li>New manual section, “Learning Zend Framework” </li></ul><ul><li>Contains Quick Start, and 8 additional t...
Migration Notes <ul><li>New centralized “Migration Notes” appendix </li></ul><ul><li>Migration notes per minor version </l...
Commenting <ul><li>Manual comments, ala php.net, have been enabled! </li></ul>
Thank you! <ul><li>Information and resources:  http://framework.zend.com/ </li></ul>
Upcoming SlideShare
Loading in …5
×

What's New in ZF 1.10

3,022 views

Published on

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

Published in: Technology
  • Be the first to comment

What's New in ZF 1.10

  1. 1. What's New in ZF 1.10? Ralph Schindler Zend Framework Software Engineer
  2. 2. In a Nutshell <ul><li>Numerous improvements </li></ul><ul><li>New Components </li></ul><ul><li>New Services </li></ul><ul><li>Documentation updates </li></ul>
  3. 3. Improvements Building incrementally
  4. 4. Improvements <ul><li>Zend_Filter_Boolean </li></ul>Insert->Header & Footer
  5. 5. Improvements <ul><li>Zend_Filter_Null </li></ul>Insert->Header & Footer
  6. 6. Improvements <ul><li>Zend_Filter_Compress / Decompress </li></ul>Insert->Header & Footer
  7. 7. Improvements <ul><li>Zend_Validate_Callback </li></ul>Insert->Header & Footer
  8. 8. Improvements <ul><li>Zend_Validate_CreditCard </li></ul><ul><ul><li>Supported CC Institutes: </li></ul></ul><ul><ul><ul><li>American Express, China UnionPay </li></ul></ul></ul><ul><ul><ul><li>Diners Club Card Blanche, Diners Club International, Diners Club US & Canada </li></ul></ul></ul><ul><ul><ul><li>Discover Card, JCB, Laser, Maestro </li></ul></ul></ul><ul><ul><ul><li>MasterCard, Solo </li></ul></ul></ul><ul><ul><ul><li>Visa, Visa Electron </li></ul></ul></ul>Insert->Header & Footer
  9. 9. Improvements <ul><li>Zend_Validate_PostCode </li></ul><ul><ul><li>Allows you to determine if a given value is a valid postal code </li></ul></ul><ul><ul><li>Locale aware </li></ul></ul>Insert->Header & Footer
  10. 10. Improvements <ul><li>Zend_Log::factory() & Zend Monitor Writer Adapter </li></ul>Insert->Header & Footer
  11. 11. Improvements <ul><li>Zend_Log::factory() & Zend Monitor Writer Adapter </li></ul>Insert->Header & Footer
  12. 12. Improvements <ul><li>Zend_Pdf performance enhancements </li></ul><ul><li>Zend_Exception previous Exception support </li></ul><ul><li>Zend_Loader::loadClass() PSR-0 recommendations </li></ul><ul><li>Upgrade to Dojo 1.4 </li></ul>Insert->Header & Footer
  13. 13. Improvements <ul><li>Zend_Application Resources </li></ul><ul><ul><li>Cachemanager </li></ul></ul><ul><ul><li>Dojo </li></ul></ul><ul><ul><li>Jquery </li></ul></ul><ul><ul><li>Layout </li></ul></ul><ul><ul><li>Log </li></ul></ul><ul><ul><li>Mail </li></ul></ul><ul><ul><li>Multidb </li></ul></ul>Insert->Header & Footer
  14. 14. Improvements <ul><li>Zend_Tool Providers </li></ul><ul><ul><li>No more IncludePath scanner – Explicit loader </li></ul></ul><ul><ul><li>Home directory & Configuration </li></ul></ul><ul><ul><li>DbAdapter Provider </li></ul></ul><ul><ul><li>Layout Provider </li></ul></ul><ul><ul><li>Basic Scaffolding </li></ul></ul><ul><ul><ul><li>Model Provider </li></ul></ul></ul><ul><ul><ul><li>Form Provider </li></ul></ul></ul><ul><ul><li>Project in 1.10+ generated with Application_ prefix in code & bootstrap support </li></ul></ul>Insert->Header & Footer
  15. 15. Improvements
  16. 16. Improvements
  17. 17. Improvements
  18. 18. New Components Extending an already extensible and extensive framework
  19. 19. Zend_Barcode <ul><li>Create barcodes, and render as PDF or images </li></ul><ul><li>Validate barcode values </li></ul>
  20. 20. $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' );
  21. 21. $validator = new Zend_Validate_Barcode( 'CODE39' ); if ( $validator ->isValid( $input )) { // valid barcode text } else { // invalid barcode text }
  22. 22. Zend_Cache <ul><li>New backend: Zend_Cache_Backend_Static </li></ul><ul><ul><li>Cache to named files in your document root </li></ul></ul><ul><ul><li>Skip PHP altogether for cached content! </li></ul></ul><ul><li>New: Zend_Cache_Manager </li></ul><ul><ul><li>Use configuration to create Cache objects </li></ul></ul><ul><ul><li>Acts as both a factory and repository for multiple Cache objects </li></ul></ul><ul><ul><li>Aids usage of multi-tiered caching strategies in your ZF applications </li></ul></ul>
  23. 23. RewriteCond %{DOCUMENT_ROOT}/cached/% {REQUEST_URI}.html -f RewriteRule .* cached/%{REQUEST_URI}.%1 [L]
  24. 24. $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' ); }
  25. 25. $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' );
  26. 26. Zend_Feed_Writer <ul><li>Sibling to Zend_Feed_Reader, introduced in ZF 1.9.0 </li></ul><ul><li>Provides full capabilities for generation of a variety of feeds, including feed extensions </li></ul><ul><ul><li>RSS </li></ul></ul><ul><ul><li>RSS2 </li></ul></ul><ul><ul><li>Atom </li></ul></ul><ul><ul><li>DublinCore </li></ul></ul><ul><ul><li>etc. </li></ul></ul>
  27. 27. $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' ));
  28. 28. $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' );
  29. 29. Zend_Feed_Pubsubhubbub <ul><li>Act as either a PuSH subscriber or publisher </li></ul><ul><ul><li>Subscriber functionality allows specifying a callback URL for PuSH's “fat pings” </li></ul></ul><ul><ul><ul><li>Uses DB storage by default to track what feeds have been received previously </li></ul></ul></ul><ul><ul><li>Publisher allows pinging a hub to notify that new content is available </li></ul></ul>
  30. 30. $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();
  31. 31. $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();
  32. 32. $callback = new Zend_Feed_Pubsubhubbub_Subscriber_Callback; $callback ->setStorage( $storage ); $callback ->handle(); $callback ->sendResponse(); if ( $callback ->hasFeedUpdate()) { $feedString = $callback ->getFedUpdate(); // start processing! }
  33. 33. Zend_Markup <ul><li>Parser and renderer functionality </li></ul><ul><li>Supports: </li></ul><ul><ul><li>BBCode </li></ul></ul><ul><ul><li>Textile </li></ul></ul>$bbcode = Zend_Markup::factory( 'Bbcode' ); echo $bbcode ->render( $someBbCodeMarkup ); $textile = Zend_Markup::factory( 'Textile' ); echo $textile ->render( $someTextileMarkup );
  34. 34. Zend_Oauth <ul><li>Act as an Oauth consumer </li></ul>
  35. 35. $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();
  36. 36. // 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(); // ...
  37. 37. Zend_Serializer <ul><li>Serialize PHP to a variety of formats, as well as deserialize back to PHP </li></ul><ul><li>Supported formats include: </li></ul><ul><ul><li>Igbinary </li></ul></ul><ul><ul><li>WDDX </li></ul></ul><ul><ul><li>JSON </li></ul></ul><ul><ul><li>Active Message Format (AMF) 0 and 3 </li></ul></ul><ul><ul><li>Python Pickle </li></ul></ul><ul><ul><li>PHP code or serialization </li></ul></ul>
  38. 38. $serializer = Zend_Serializer::factory( 'Json' ); $serialized = $serializer -> serialize ( $data ); $unserialized = $serializer -> unserialize ( $serialized );
  39. 39. New Services Extending your reach into the cloud
  40. 40. New Service - LiveDocx <ul><li>http://www.livedocx.com/ </li></ul><ul><li>Best described by this image: </li></ul>Insert->Header & Footer
  41. 41. New Service - LiveDocx Insert->Header & Footer
  42. 42. New Service - LiveDocx Insert->Header & Footer
  43. 43. New Service - LiveDocx <ul><li>Other API features: </li></ul><ul><ul><li>Local & Remote templates </li></ul></ul><ul><ul><li>Ability to retrieve information about templates </li></ul></ul><ul><ul><li>Input Template formats: </li></ul></ul><ul><ul><ul><li>Docx, Doc, RTF, TXD </li></ul></ul></ul><ul><ul><li>Output Document formats: </li></ul></ul><ul><ul><ul><li>Docx, Doc, Html, RTF, PDF, TXD, TXT </li></ul></ul></ul><ul><ul><li>Output Image formats: </li></ul></ul><ul><ul><ul><li>BMP, PNG, GIF, TIFF, WMF, JPG </li></ul></ul></ul>Insert->Header & Footer
  44. 44. New Service - DeveloperGarden <ul><li>Developer Garden is the name of Deutsche Telekom’s developer community. </li></ul><ul><li>Features of the API: </li></ul><ul><ul><li>BaseUserService </li></ul></ul><ul><ul><ul><li>Class to manage API quota and user accounting details. </li></ul></ul></ul><ul><ul><li>IPLocation </li></ul></ul><ul><ul><ul><li>Locale the given IP and returns geo coordinates. Works only with IPs allocated in the network of the Deutsche Telekom. </li></ul></ul></ul><ul><ul><li>LocalSearch </li></ul></ul><ul><ul><ul><li>Allows you to search with options nearby or around a given geo coordinate or city. </li></ul></ul></ul>Insert->Header & Footer
  45. 45. New Service - DeveloperGarden <ul><li>Features (cont.) </li></ul><ul><ul><li>SendSMS </li></ul></ul><ul><ul><ul><li>Send a SMS or Flash SMS to a given number. </li></ul></ul></ul><ul><ul><li>SMSValidation </li></ul></ul><ul><ul><ul><li>You can validate a number to use it with SendSMS for also supply a back channel. </li></ul></ul></ul><ul><ul><li>VoiceCall </li></ul></ul><ul><ul><ul><li>Initiates a call between two participants. </li></ul></ul></ul><ul><ul><li>ConferenceCall </li></ul></ul><ul><ul><ul><li>You can configure a whole conference room with participants for an adhoc conference or you can also schedule your conference. </li></ul></ul></ul>Insert->Header & Footer
  46. 46. New Service - DeveloperGarden <ul><li>Setup a conference call: </li></ul>Insert->Header & Footer
  47. 47. New Service - WindowsAzure <ul><li>Windows Azure is the name for Microsoft's Software + Services platform </li></ul><ul><li>Features: </li></ul><ul><ul><li>Interface to Storage API: </li></ul></ul><ul><ul><ul><li>Blobs </li></ul></ul></ul><ul><ul><ul><li>Tables </li></ul></ul></ul><ul><ul><ul><ul><li>Batch processing </li></ul></ul></ul></ul><ul><ul><ul><li>Queues </li></ul></ul></ul>Insert->Header & Footer
  48. 48. New Service – WindowsAzure Insert->Header & Footer
  49. 49. Documentation updates Helping you educate yourself
  50. 50. Versioned Documentation <ul><li>Versioned by minor revision (1.10, 1.9, 1.8, etc.) </li></ul><ul><li>Search by version </li></ul>
  51. 51. New Rendering Engine <ul><li>Now using PhD (PHP's Documentation system) to render online docs as well as downloadable docs </li></ul><ul><li>Faster rendering time and more flexibility in rendering </li></ul><ul><li>Better navigation </li></ul>
  52. 52. Tutorials <ul><li>New manual section, “Learning Zend Framework” </li></ul><ul><li>Contains Quick Start, and 8 additional tutorials </li></ul><ul><li>Part of the ZF repository, which means: </li></ul><ul><ul><li>Versioned </li></ul></ul><ul><ul><li>Translations will be available </li></ul></ul><ul><ul><li>New content can be added </li></ul></ul>
  53. 53.
  54. 54. Migration Notes <ul><li>New centralized “Migration Notes” appendix </li></ul><ul><li>Migration notes per minor version </li></ul>
  55. 55. Commenting <ul><li>Manual comments, ala php.net, have been enabled! </li></ul>
  56. 56. Thank you! <ul><li>Information and resources: http://framework.zend.com/ </li></ul>

×