Zend framework dans Azure

19

description

Retour d'expérience sur un développement Zend Framework 2 dans Microsoft Azure - Evenement AFUP Paris : RV du 2 avril 2014 : Intéropérabilité des frameworks

Transcript of Zend framework dans Azure

Page 1: Zend framework dans Azure
Page 2: Zend framework dans Azure

Jean-Philippe Chaput Co-Founder & CTO

Page 3: Zend framework dans Azure

Organiser un événement n’est plus un cauchemar !

Reproduction avec l’aimable autorisation de François Tancré / Eventpixr

Page 4: Zend framework dans Azure

04

Page 5: Zend framework dans Azure

Video Social R.o.I Event

Page 6: Zend framework dans Azure
Page 7: Zend framework dans Azure
Page 8: Zend framework dans Azure
Page 9: Zend framework dans Azure

Service Bus + Notification Hub

Windows Azure Cache User Web site

Table storage

Architecture Streami sur Windows Azure

Cloud services

Internet

Media Services

Git Repository

Autoscale

Blob storage

Virtual Machine

Page 10: Zend framework dans Azure

Notre environnement de développement

Page 11: Zend framework dans Azure

Les frameworks

Page 12: Zend framework dans Azure

ZF2 tips pour Azure : Autoloader Classmap

classmap_generator.php.bat -l "..\..\modules\MONMODULE »

class Module!{! public function getAutoloaderConfig()! {! return array(! 'Zend\Loader\ClassMapAutoloader' => array(! __DIR__ . '/autoload_classmap.php',! ),! 'Zend\Loader\StandardAutoloader' => array(! 'namespaces' => array(! __NAMESPACE__ => __DIR__ . '/src/' . __NAMESPACE__,! ),! ),! );! }!}!

ZF2/bin

Module.php

Page 13: Zend framework dans Azure

ZF2 tips pour Azure : Template map

templatemap_generator.php

'view_manager' => array(! 'template_map' => array(! 'live/live/checkin’ => __DIR__ . '/../view/live/live/checkin.phtml',! 'live/live/facebook’=> __DIR__ . '/../view/live/live/facebook.phtml',! 'live/live/twitter’ => __DIR__ . '/../view/live/live/twitter.phtml',! 'live/live/video' => __DIR__ . '/../view/live/live/video.phtml',! ),! 'template_path_stack' => array(! 'live' => __DIR__ . '/../view',! ),! ),!

https://gist.github.com/Hounddog/4169214

module.config.php

Page 14: Zend framework dans Azure

ZF2 tips pour Azure : ViewModels

namespace Foo;!class BarController extends AbstractActionController!{! public function someAction()! {! $viewModel = new ViewModel();! $viewModel->setTemplate('MODULE / CONTROLLER / ACTION');! // Pour cet exemple: $viewModel->setTemplate('foo/bar/some');! ! // Autre action du controller! ! return $viewModel->setVariables(array(! ‘variable’=>$valeur! ));! }!}!

Page 15: Zend framework dans Azure

ZF2 tips pour Azure : Module config cache

Modifier le fichier config/application.config.php!

'module_listener_options' => array(! 'config_cache_enabled' => true,! 'module_map_cache_enabled' => true,! 'config_cache_key' => 'module_config_cache',! 'cache_dir' => './data/cache',! );!

Page 16: Zend framework dans Azure

ZF2 tips pour Azure : Autres

favicon.ico – robots.txt - apple icons https://github.com/EvanDotPro/EdpSuperluminal OpCode caching (APC,…) Debug : http://xdebug.org/docs/install https://github.com/jokkedk/webgrind

Page 17: Zend framework dans Azure

ZF2 tips pour Windows Azure

Page 18: Zend framework dans Azure

www.windowsazure.com

Page 19: Zend framework dans Azure

Mail. [email protected] Fb. http://fb.com/jphchaput