Microsoft has changed as a company and is becoming more open in the way that we work with and collaborate with others in the industry, in how we listen to customers, and in our approach to the cloud. We contribute to and partner with open source communities and promote interoperability to make it easier and less costly for customers to develop and manage mixed IT environments. We actively participate in the standards setting process and support established and emerging standards in our products. In the cloud, we support key standards that provide the building blocks for open, interoperable cloud services, and we support developer choice of programming languages. We support data portability and believe customers own and control their data, no matter where it resides. donderdag 25 april 13
abstract class ServiceClientDecorator implements ServiceClient { protected $serviceClient; public function __construct(ServiceClient $serviceClient) { $this->serviceClient = $serviceClient; } } class HtmlEntitiesDecorator extends ServiceClientDecorator { public function getData() { return htmlentities($this->serviceClient->getData()); } } class ParagraphDecorator extends ServiceClientDecorator { public function getData() { return ''.$this->serviceClient->getData().''; } } donderdag 25 april 13
$client = new MyWebServiceClient(); // Add our decorators $client = new HtmlEntititesDecorator($client); $client = new ParagraphDecorator($client); // Later in your code, and possibly in multiple places print $client->getData(); donderdag 25 april 13
class DatabaseFactory { // The factory function takes as an argument the // name of the class to produce public static function getInstance($driver) { // Attempt to include the the file containing the class // (not necessary if you use a custom autoloader) if(include_once(dirname(__FILE__).'/drivers/database_'. $driver.'.php')) { // Build the name of the class, instantiate, and return $driver_class = 'Database_'.$driver; return new $driver_class; } else { throw new Exception('Database driver not found'); } } } // To use, call the factory's static method: $db = DatabaseFactory::getInstance('MySQL'); donderdag 25 april 13
class Database { // A static property to hold the single instance of the class private static $instance; // The constructor is private so that outside code cannot instantiate private function __construct() { } // All code that needs to get and instance of the class should call // this function like so: $db = Database::getInstance(); public function getInstance() { // If there is no instance, create one if (!isset(self::$instance)) { $c = __CLASS__; self::$instance = new $c; } return self::$instance; } // Block the clone method private function __clone() {} } // To use, call the static method to get the only instance $db = Database::getInstance(); donderdag 25 april 13
class Book { ! private $_databaseConnection; ! public function __construct() { } ! public function setDatabaseConnection($databaseConnection) { ! ! $this->_databaseConnection = $databaseConnection; ! } } $book = new Book(); $book->setDatabase($databaseConnection); donderdag 25 april 13
Patrick Debois “What is this DevOps thing anyway?” http://www.jedi.be/blog/2010/02/12/ what-is-this-devops-thing-anyway @PatrickDebois donderdag 25 april 13
✓Fear of change ✓Risky deployment ✓It work on my machine ✓Siloisation http://www.jedi.be/blog/2010/02/12/ what-is-this-devops-thing-anyway donderdag 25 april 13
Kris Buytaert “Building Clouds since before the bookstore” http://www.krisbuytaert.be/blog/what-devops “Everything is a Freaking DNS problem” @KrisBuytaert donderdag 25 april 13
That sweet spot between "operating system" or platform stack and the application layer http://www.krisbuytaert.be/blog/what-devops donderdag 25 april 13
The systematic process of building, deploying, managing, and using an application or group of applications http://www.krisbuytaert.be/blog/what-devops donderdag 25 april 13