• Save
TYPO3 Flow 2.0 (T3CON13 San Francisco)
Upcoming SlideShare
Loading in...5

TYPO3 Flow 2.0 (T3CON13 San Francisco)



Just one year after its 1.0 release, TYPO3 Flow (formerly known as FLOW3) raises the version number to introduce a couple of new major features. Flow, probably being the most advanced PHP application ...

Just one year after its 1.0 release, TYPO3 Flow (formerly known as FLOW3) raises the version number to introduce a couple of new major features. Flow, probably being the most advanced PHP application framework on the market, brings back the joy of development and is especially well suited for enterprise applications. In this session you’ll get a compact introduction into the feature set of Flow 2.0 and what's coming up in the next version.



Total Views
Views on SlideShare
Embed Views



1 Embed 13

https://twitter.com 13



Upload Details

Uploaded via as Adobe PDF

Usage Rights

CC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike LicenseCC Attribution-NonCommercial-ShareAlike License

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
Post Comment
Edit your comment

TYPO3 Flow 2.0 (T3CON13 San Francisco) TYPO3 Flow 2.0 (T3CON13 San Francisco) Presentation Transcript

  • TYPO3 Flow 2.0Robert Lemke_
  • TEXT HEREproject founder of TYPO3 Flow and TYPO3 Neosco-founder of the TYPO3 Associationcoach, coder, consultant36 years oldlives in Lübeck, Germany1 wife, 2 daughters, 1 espresso machinelikes drumming
  • 72 new features177 bug fixes236 improvements View slide
  • Composer View slide
  • Installation via Composer$ curl -s https://getcomposer.org/installer | php$ sudo mv composer.phar /usr/local/bin/composer$ composer create-project --stability="beta" --dev typo3/flow-base-distribution MyProject
  • Composer is forDevelopmentnot forDeployment
  • http://bit.ly/flow-composer-video
  • NativeSessions
  • written in pure PHP
  • for the cloud
  • /*** @FlowInject* @var TYPO3FlowSessionSessionManagerInterface*/protected $sessionManager;…$session = $this->sessionManager->getCurrentSession();$session->isStarted();$session->getId();
  • $session->putData(username, robert);$session->hasKey(username);$username = $session->getData(username);
  • $session = $this->sessionManager->getSession($sessionId);$username = $session->getData(username);
  • $session->addTag(user12345);…$session = $this->sessionManager->getSessionByTag(user12345);
  • Caches.yaml:Flow_Session_Storage:backend: TYPO3FlowCacheBackendApcBackend
  • 404, 505
  • TYPO3:Flow:error:exceptionHandler:defaultRenderingOptions: []renderingGroups:notFoundExceptions:matchingStatusCodes: [404]options:templatePathAndFilename: resource://TYPO3.Flow/Private/Templates/Evariables:errorDescription: Sorry, the page you requested was not found.databaseConnectionExceptions:matchingExceptionClassNames: [TYPO3FlowPersistenceDoctrineDatabaoptions:templatePathAndFilename: resource://TYPO3.Flow/Private/Templates/Evariables:errorDescription: Sorry, the database connection couldnt be es
  • PersistedRoles
  • roles:User: []Manager: [User]Editor: [User, TYPO3.Neos:Editor]
  • $role = $this->policyService->createRole(Vendor.Package:Role);$this->policyService->hasRole(Vendor.Package:Role);$role = $this->policyService->getRole(Vendor.Package:Role);
  • SafeRequestMethods
  • Network Working Group R. FieldingRequest for Comments: 2616 UC IrvineObsoletes: 2068 J. GettysCategory: Standards Track Compaq/W3CJ. MogulCompaqH. FrystykW3C/MITL. MasinterXeroxP. LeachMicrosoftT. Berners-LeeW3C/MITJune 1999Hypertext Transfer Protocol -- HTTP/1.1Status of this MemoThis document specifies an Internet standards track protocol for theInternet community, and requests discussion and suggestions forimprovements. Please refer to the current edition of the "Internet
  • 9.1 Safe and Idempotent Methods9.1.1 Safe MethodsImplementors should be aware that the software represents the user intheir interactions over the Internet, and should be careful to allow theuser to be aware of any actions they might take which may have anunexpected significance to themselves or others.In particular, the convention has been established that the GET and HEADmethods SHOULD NOT have the significance of taking an action other thanretrieval. These methods ought to be considered "safe". This allows useragents to represent other methods, such as POST, PUT and DELETE, in aspecial way, so that the user is made aware of the fact that a possiblyunsafe action is being requested.Naturally, it is not possible to ensure that the server does not generateside-effects as a result of performing a GET request; in fact, somedynamic resources consider that a feature. The important distinction hereis that the user did not request the side-effects, so therefore cannot beheld accountable for them.9.1.2 Idempotent Methods
  • no automatic persistence
  • speeds up link generation
  • LazyDependencyInjection
  • class BookController extends ActionController {/*** @FlowInject* @var BookRepository*/protected $bookRepository;}
  • class BookController extends ActionController {…public function myAction() {// $this->bookRepository is instance of Dependency Proxy$this->bookRepository->findAll();// $this->bookRepository is the real BookRepository}}
  • $greet = function($name) {printf("Hello %s", $name);};$greet(World);
  • class BookController extends BookController_Originalimplements ProxyInterface {/*** Autogenerated Proxy Method*/public function __construct() {$this->Flow_Proxy_injectProperties();}
  • $bookRepository_reference = &$this->bookRepository;$this->bookRepository =Bootstrap::$staticObjectManager->getLazyDependencyByHash(d0e87f8f658d7866eec63db44a6918b4, $bookRepository_reference);if ($this->bookRepository === NULL) {$this->bookRepository = Bootstrap::$staticObjectManager->createLazyDependency(d0e87f8f658d7866eec63db44a6918b4, $bookRepository_reference,RobertLemkeExampleBookshopDomainRepositoryBookRepository,function() {return Bootstrap::$staticObjectManager->get(RobertLemkeExampleBookshopDomainRepositoryBookRepository);});}
  • class BookController extends ActionController {…public function myAction() {$this->bookRepository->findAll();}}
  • class DependencyProxy {…/*** Proxy magic call method which triggers the injection of the real dependency* and returns the result of a call to the original method in the dependency** @param string $methodName Name of the method to be called* @param array $arguments An array of arguments to be passed to the method* @return mixed*/public function __call($methodName, array $arguments) {return call_user_func_array(array($this->_activateDependency(), $methodName),$arguments);}/*** Activate the dependency and set it in the object.** @return object The real dependency object* @api*/public function _activateDependency() {$realDependency = $this->builder->__invoke();foreach($this->propertyVariables as &$propertyVariable) {$propertyVariable = $realDependency;}return $realDependency;}
  • StaticMethodCompilation
  • /*** Returns a map of action method names and their parameters.** @return array Array of method parameters by action name*/public function getActionMethodParameters() {$methodParameters = $this->reflectionService->getMethodParameters(get_class($this), $this->actionMethodName);foreach ($methodParameters as $parameterName => $parameterInfo) {...}return $methodParameters;}}
  • /*** Returns a map of action method names and their parameters.** @param TYPO3FlowObjectObjectManagerInterface $objectManager* @return array Array of method parameters by action name* @FlowCompileStatic*/static public function getActionMethodParameters($objectManager) {$reflectionService = $objectManager->get(TYPO3FlowReflectionReflectionService);$className = get_called_class();$methodParameters = $reflectionService->getMethodParameters($className, get_class_methods($className));foreach ($methodParameters as $parameterName => $parameterInfo) {...}return $methodParameters;}
  • Speed
  • Uncached Welcome Screen
  • 2.1
  • Cloud Resources
  • resource:# Definition of resource storages provided by the Flow core.# Storages are used for storing and retrieving resources.storages:#defaultPersistentResourcesStorage:storage: TYPO3FlowResourceStorageFileSystemStoragestorageOptions:path: %FLOW_PATH_DATA%Persistent/Resources/# Definition of the default resource collections.# Collections are used to bundle / group static or persistent resources# for common processing and publication.collections:# Collection which contains all persistent resourcespersistentResources:sources:-storage: defaultPersistentResourcesStoragetarget: localWebDirectoryPersistentResourcesTarget# Definition of the basic resource publication targets.targets:# Target for publishing persistent resources to the local web directorylocalWebDirectoryPersistentResourcesTarget:target: TYPO3FlowResourceTargetFileSystemTargettargetOptions:path: %FLOW_PATH_WEB%_Resources/Persistent/baseUri: _Resources/Persistent/mirrorMode: link
  • Minifying & Filters
  • Routing: Request Methods
  • 2.2
  • Page Cache & Reverse Proxy
  • Multi Persistence
  • Ask me anything
  • https://github.com/robertlemke
  • TYPO3 Flow Trainings andInhouse Workshops
  • Robert Lemke_robertlemke.com@robertlemke