• Save

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.

Like this presentation? Why not share!

Plant Pyrus in your system - A guide to a plugin system.

on

  • 2,343 views

Anyone that has written a Content Management System or a blog system, has quickly realised that people will want to extend the functionality of the application and thus the developer has to embark on ...

Anyone that has written a Content Management System or a blog system, has quickly realised that people will want to extend the functionality of the application and thus the developer has to embark on a journey to write a plugin system with everything that comes with that.

One of the biggest parts of any plugin system is the part that deals with discovery, installation, upgrading, dependency handling, infrastructure and other equally boring things. An essential part of any plugin system yet everyone dreads writing it, and few actually take on the task of writing it.

With Pyrus (the new PEAR installer) these tasks will not only be easy to do but also a joy. By embedding Pyrus in your application with its lavish new APIs you can use a tried and tested solution that hundred of thousands of people use every day on their command line, but you will be able to provide it right IN your tool, in your admin area, properly integrated with the layout and dictating the flow of the processes so it fits the ideologies of your software. Learn how to provide your users with fantastic experience, at the low price of using in the Pyrus installer in your application instead of trying to write your own solution.

Statistics

Views

Total Views
2,343
Views on SlideShare
2,342
Embed Views
1

Actions

Likes
0
Downloads
0
Comments
0

1 Embed 1

http://www.taaza.com 1

Accessibility

Upload Details

Uploaded via as Apple Keynote

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
  • <br />
  • <br />
  • <br />
  • Package Formats: RPM, DEB, etc (Find more) <br /> Package Managers: Yum, APT-Get, etc (Find more) <br />
  • Package Formats: RPM, DEB, etc (Find more) <br /> Package Managers: Yum, APT-Get, etc (Find more) <br />
  • Package Formats: RPM, DEB, etc (Find more) <br /> Package Managers: Yum, APT-Get, etc (Find more) <br />
  • Package Formats: RPM, DEB, etc (Find more) <br /> Package Managers: Yum, APT-Get, etc (Find more) <br />
  • The pear is the fruit tree of genus Pyrus <br />
  • <br />
  • <br />
  • Written a plugin system? <br /> What about infrastructure? <br /> Mention Jaws. <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • README <br /> CREDITS <br /> LICENSE <br /> RELEASE-1.0.0 <br />
  • README <br /> CREDITS <br /> LICENSE <br /> RELEASE-1.0.0 <br />
  • <br />
  • <br />
  • md5, sha1, sha256 and sha256 <br />
  • md5, sha1, sha256 and sha256 <br />
  • md5, sha1, sha256 and sha256 <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • Clients communicate with <br />
  • Clients communicate with <br />
  • <br />
  • <br />
  • <br />
  • Access to various systems made easy <br /> <br />
  • Access to various systems made easy <br /> <br />
  • Write your own layout and logic <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />
  • <br />

Plant Pyrus in your system - A guide to a plugin system. Plant Pyrus in your system - A guide to a plugin system. Presentation Transcript

  • Plant Pyrus in your System http://joind.in/1560 Helgi Þormar Þorbjörnsson DPC, June 12th 2010
  • ME! • Lead Developer of Pyrus • Work at echolibre • Twitter: @h
  • Pyrus Explained
  • Pyrus Explained Next Generation of the PEAR Installer
  • Pyrus Explained
  • Pyrus Explained • Package Manager
  • Pyrus Explained • Package Manager • Infrastructure Tool
  • Pyrus Explained • Package Manager • Infrastructure Tool • Set of APIs
  • Pyrus Explained • Package Manager • Infrastructure Tool • Set of APIs • PHP 5.3+
  • The Name Change PEAR -> Pyrus
  • Your Experience?
  • Problems with Plugin Systems
  • Problems with Plugin Systems • Infrastructure
  • Problems with Plugin Systems • Infrastructure • Dependency Handling
  • Problems with Plugin Systems • Infrastructure • Dependency Handling • Plugin Authors
  • Problems with Plugin Systems • Infrastructure • Dependency Handling • Plugin Authors • Easy Installation/Upgrade Path
  • Problems with Plugin Systems • Infrastructure • Dependency Handling • Plugin Authors • Easy Installation/Upgrade Path • APIs
  • Packages
  • Packages • Many different package formats
  • Packages • Many different package formats • tar, tgz, tbz, zip and phar
  • Packaging
  • Packaging • Made extremely easy for authors
  • Packaging • Made extremely easy for authors • Complex installations still a bit far off
  • Dependencies
  • Dependencies • Trickiest bit of package management
  • Dependencies • Trickiest bit of package management • Don’t attempt it! :-)
  • Security
  • Security • Sign packages with strong hashes
  • Security • Sign packages with strong hashes • OpenSSL true signing
  • Security • Sign packages with strong hashes • OpenSSL true signing • GPG
  • Installs
  • Installs • By hand
  • Installs • By hand • Channels
  • Installs • By hand • Channels • Multiple formats
  • Updates
  • Updates • Keep your users up to date
  • Updates • Keep your users up to date • List upgrades
  • Updates • Keep your users up to date • List upgrades • Push releases to clients
  • Infrastructure
  • Channels
  • Channels • Simple REST XML
  • Channels • Simple REST XML • Central Hub
  • Restricted Channels
  • Restricted Channels • Authentication
  • Restricted Channels • Authentication • Expose limited packages to X client
  • App Market Who doesn’t want that!?
  • APIs
  • APIs • Major focus of the rewrite
  • APIs • Major focus of the rewrite • Integration made easy
  • Your Own Frontend http://short.ie/webfrontend
  • Your Own Frontend static function installPackage($package)     {         $config = pear2PyrusConfig::singleton(self::$autoload_registry);         $config->preferred_state = 'alpha';         $p = new pear2PyrusPackage($package);         try {             pear2PyrusInstaller::begin();             pear2PyrusInstaller::prepare($p);             pear2PyrusInstaller::commit();         } catch (Exception $e) {             pear2PyrusInstaller::rollback();             echo $e;         }     }
  • Your Own Frontend class ListPackages extends ArrayIterator { function __construct($options = array()) { $packages = array(); $registry = Main::getConfig()->registry; $channel_registry = Main::getConfig()->channelregistry; foreach ($channel_registry as $channel) { Main::getConfig()->default_channel = $channel->name; foreach ($registry->package as $package) { $packages[$channel->name][] = $package->name; } } asort($packages); parent::__construct($packages); } }
  • Interesting API Usage Autoload Package http://short.ie/autoloadpackage
  • Questions?
  • Contact me • email: helgi@php.net • twitter: @h • website: http://www.helgi.ws • http://www.joind.in/1560
  • Contact me
  • Contact me Or... Just find me at the nearest pub!
  • Resources • http://pyrus.php.net • http://pear2.php.net • http://pear.php.net/manual/en/channels.php • http://pear.php.net/manual/en/pyrus.php