Best of Two Worlds

Loading...

Flash Player 9 (or above) is needed to view presentations.
We have detected that you do not have it on your computer. To install it, go here.

1 comments

Comments 1 - 1 of 1 previous next Post a comment

Post a comment
Embed Video
Edit your comment Cancel

Favorites, Groups & Events

Best of Two Worlds - Presentation Transcript

  1. Best of two Worlds
    • Stefan Priebsch, e-novative GmbH
  2. Disclaimer
  3. ezComponents
    • http://ez.no/de/ezcomponents
    • New BSD License
    • Minimum requirement: PHP 5.2.1
  4. Installing ezComponents
    • via PEAR Installer
    • Download compressed archive
    • from Subversion
  5. Using ezComponents
    • All components depend on ezcBase
    • The autoload directory is required
  6. ezc Directory Structure
    • design/ Class diagram and specification
    • docs/ Documentation and sample code
    • src/ Component source code
    • tests/ Unit tests
  7. Zend Framework
    • http://framework.zend.com/
    • New BSD License
    • Minimum requirement: PHP 5.1.4 PHP >= 5.2.3 recommended
  8. Installing Zend Framework
    • Download compressed archive (stable release or nightly snapshot)
    • from Subversion
  9. ZF Directory Structure
    • demos/
    • externals/ Dojo
    • laboratory/ Zend_Tool
    • library/ Classes in PEAR naming scheme
    • tests/
  10. MVC
  11.  
  12.  
  13. ezcArchive
    • Creates and extracts archives
    • Supports tar, zip, gzip and bzip2
  14. ezcArchive
    • $archive = ezcArchive::open( "compress.zlib:///tmp/my_archive.tar.gz" ); while( $archive->valid() ) { // Returns the current entry (ezcArchiveEntry). $entry = $archive->current(); // ezcArchiveEntry has an __toString() method. echo $entry, " "; // Extract the current archive entry to /tmp/target_location/ $archive->extractCurrent( "/tmp/target_location/" ); $archive->next(); }
  15. Zend_ACL
    • Acess Control Lists
    • Defines which Role has access to which Resources
    • Supports Inheritance
  16. Zend_ACL
    • $acl = new Zend_Acl(); $acl->addRole(new Zend_Acl_Role('guest')) ->addRole(new Zend_Acl_Role('member')) ->addRole(new Zend_Acl_Role('admin')); $parents = array('guest', 'member', 'admin'); $acl->addRole(new Zend_Acl_Role('someUser'), $parents); $acl->add(new Zend_Acl_Resource('someResource')); $acl->deny('guest', 'someResource'); $acl->allow('member', 'someResource'); echo $acl->isAllowed('someUser', 'someResource') ? 'allowed' : 'denied';
  17. ezcGraph
    • Creates graphs
  18. ezcGraph
    • $graph = new ezcGraphPieChart(); $graph->title = 'Access statistics'; $graph->data['Access statistics'] = new ezcGraphArrayDataSet( array( 'Mozilla' => 19113, 'Explorer' => 10917, 'Opera' => 1464, 'Safari' => 652, 'Konqueror' => 474, ) ); $graph->data['Access statistics']->highlight['Opera'] = true; $graph->render( 400, 150, 'tutorial_simple_pie.svg' );
  19. ezcGraph
  20. ezcGraph
  21. Zend_PDF
    • Create and load PDF
    • Manipulate pages
    • Text drawing
    • Primitive drawing
    • Image drawing
  22. Zend_PDF
    • $pdf = Zend_Pdf::load('file'); $page = new Zend_Pdf_Page(Zend_Pdf_Page::SIZE_A4); $page->drawText('Hello world!', 72, 720); $pdf->pages[] = $page; $pdf->save('file');
  23. ezcMail
    • Send, retrieve and parse email
    • MTA, SMTP, POP, IMAP
    • HTML Email
    • Inline Images
    • Attachments
  24. ezcMail
    • $mail = new ezcMailComposer(); $mail->from = new ezcMailAddress( 'sender@example.com', 'Adrian Ripburger' ); $mail->addTo( new ezcMailAddress( 'receiver@example.com', 'Maureen Corley' ) ); $mail->subject = "This is the subject of the example mail"; $mail->plainText = "This is the body of the example mail."; $mail->build(); $transport = new ezcMailMtaTransport(); $transport->send( $mail );
  25. ezcMail
    • $pop3 = new ezcMailPop3Transport( "pop3.example.com" ); $pop3->authenticate( "user", "*****" ); $pop3->status( $num, $size ); $set = $pop3->fetchAll(); $parser = new ezcMailParser(); $mail = $parser->parseMail( $set );
  26. Zend_Mail
    • Composing and sending email
    • Text and multipart MIME-e-mail
    • Sendmail, SMTP
  27. Zend_Mail
    • $mail = new Zend_Mail(); $mail->setBodyText('This is the text of the mail.') ->setFrom('somebody@example.com', 'Some Sender') ->addTo('somebody_else@example.com', 'Some Recipient') ->setSubject('TestSubject') ->send();
  28. Search
    • Zend_Search_Lucene „a general purpose text search engine written entirely in PHP 5“
    • ezcSearch Interface to a Solr Server
  29. Combining both
    • Install ezComponents to ez/
    • Install Zend Framework to ZF/
    • Create a bootstrap file: set_include_path('ez' . PATH_SEPARATOR . ini_get('include_path')); require_once 'Base/src/base.php'; spl_autoload_register(array('ezcBase', 'autoload')); set_include_path('ZF/library' . PATH_SEPARATOR . ini_get('include_path')); require_once 'Zend/Loader.php'; Zend_Loader::registerAutoload();
  30. More ezComponents
    • Authentication (various backends)
    • Cache (APC, memcache)
    • Database abstraction (builds on PDO)
    • Feed (parse and create)
    • ImageAnalysis and ImageConversion
    • PersistentObject (DataMapper pattern)
    • Workflow (programatically or XML)
  31. More ZF Components
    • Cache (APC, memcache)
    • PDF (without external dependency)
    • REST (client and server)
    • Web Services (Amazon, Delicious, Flickr, ReCaptcha, Yahoo, ...)
    • Date, Measure, Currency
    • Pagination
    • Zend_Text
  32. Thank you.
  33. http://www.priebsch.de http://www.e-novative.de [email_address] Profiles at Xing, LinkedIn, Facebook
  34.  

+ Stefan PriebschStefan Priebsch, 2 years ago

custom

831 views, 0 favs, 0 embeds more stats

Introducing ezComponents and Zend Framework, and sh more

More info about this document

© All Rights Reserved

Go to text version

  • Total Views 831
    • 831 on SlideShare
    • 0 from embeds
  • Comments 1
  • Favorites 0
  • Downloads 19
Most viewed embeds

more

All embeds

less

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate. If needed, use the feedback form to let us know more details.

Cancel
File a copyright complaint
Having problems? Go to our helpdesk?

Categories