• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Development with TYPO3 5.0
 

Development with TYPO3 5.0

on

  • 1,157 views

This session from the TYPO3 Conference 2007 gives you a peek into the current development state of the TYPO3 Framework and its main features such as Aspect Oriented Programming, Dependency Injection ...

This session from the TYPO3 Conference 2007 gives you a peek into the current development state of the TYPO3 Framework and its main features such as Aspect Oriented Programming, Dependency Injection and the Model View Controller Framework. Bottom line of all development with 5.0 is: Domain Driven Design.

Statistics

Views

Total Views
1,157
Views on SlideShare
1,057
Embed Views
100

Actions

Likes
0
Downloads
7
Comments
0

2 Embeds 100

http://flow3.typo3.org 57
http://flow.typo3.org 43

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

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

    Development with TYPO3 5.0 Development with TYPO3 5.0 Presentation Transcript

    • Development with TYPO3 5.0T3CON07 – Karlsruhe, Germany
    • Brought your own towel?„ A towel is about the most useful thing an interstellar hitch hiker can carry. ” Douglas Adams Inspiring people to share
    • Brought your own code?„ The TYPO3 Framework is about the most useful thing a PHP developer can use. ” Robert Lemke Inspiring people to share
    • TopictextThe Guide One manual for all available at http://5-0.dev.typo3.org Inspiring people to share
    • Overview What happened so far ... System overview Domain Driven Design Model View Controller Voodoo Got Arguments? Components: playing LEGO™ The aspect of security Future and other timing issues Inspiring people to share
    • What happened so far Inspiring people to share
    • What happened so farBuy none get two for free. CMS k 1.0 5.0 ewor Fram Inspiring people to share
    • What happened so farThe results so far General design decisions, directory layout, coding guidelines TYPO3 Framework consisting of: Component Manager (supports Dependency Injection) AOP Framework Package Manager (basic functionality) MVC Framework (alpha ...) Property Editor / Validation / Data Types (early dev phase) Inspiring people to share
    • What happened so farThe results even so farer Testing package (contains a PHPUnit testrunner) TYPO3 CR dropped Java implementation – started PHP implementation support JSR-283 instead of JSR-170 Storing and Retrieving nodes works Inspiring people to share
    • What happened so farThe results finally TypoScript package improved and enhanced syntax: TypoScript 2.0 fully object oriented and consistent self-documenting contains a working TS parser CMS package contains a few TS objects and stdWrap ports (processors) Inspiring people to share
    • Read before first useSystem Overview Inspiring people to share
    • System OverviewInstallation You need PHP6 You dont need Java Current installation options: svn checkout http://5-0.dev.typo3.org/svn/TYPO3/ download the TYPO3 installer Inspiring people to share
    • System Overview: InstallationInstalling PHP6 Inspiring people to share
    • System Overview: InstallationInstalling TYPO3 Inspiring people to share
    • System Overview: InstallationFile structure Inspiring people to share
    • System Overview: InstallationFile structure Inspiring people to share
    • System OverviewComponents Components are re-usable, properly encapsulated objects The lifecycle of a component and the combination of active components is managed by the Component Manager All classes in the TYPO3 context are considered as components Components are configurable Inspiring people to share
    • System Overview: ComponentsClass ≙ Component Classes are automatically registered as components if they reside in the Classes directory of a package and their name follows the TYPO3 naming conventions Inspiring people to share
    • System Overview: ComponentsExample Inspiring people to share
    • System OverviewPackage Manager Like the good old Extension Manager - but without UI yet Scans the Packages directory for packages Registers classes as components and partly configures them Will connect to T3PR (TYPO3 Package Repository) Package file format is just plain .zip Will provide access via Web / CLI and offer Web Services Inspiring people to share
    • System OverviewModel View Controller yes, has it – but what flavor? index.php contains a tiny bootstrap the Framework package handles requests, provides a Front Controller and a Dispatcher which dispatches requests to the Action Controllers more about that later Inspiring people to share
    • System Overview: Model View Controllerindex.php Inspiring people to share
    • Domain Driven Design A domain is the activity or business of the user Domain Driven Design is about focussing on the domain and domain logic accurately mapping the domain concepts to software forming a ubiquitous language among the project members Inspiring people to share
    • Tower of Babel
    • Domain Driven DesignUbiquitous language The common vocabulary is an important prerequisite for successful collaboration Use the same words for discussion, modeling, development and documentation Inspiring people to share
    • Domain Driven DesignPhone Book Domain Model Inspiring people to share
    • Domain Driven DesignPhone Book Domain Model Inspiring people to share
    • Domain Driven DesignMore phone book actions show phone book entries check if user may delete phone book entry export phone book entries log phone book actions Inspiring people to share
    • ✘Domain Driven DesignMore phone book actions show phone book entries not in domain check if user may delete phone book entry the export phone book entries of a phone log phone book actions book Inspiring people to share
    • Domain Driven DesignLayered Architecture View Presentation Controller Application Logic (Service Layer) Domain Domain Model (Domain Layer) Data Mapper (part of Content Repository) Data source Data Source Abstraction Inspiring people to share
    • Domain Driven DesignLayered Architecture View Presentation Controller Application Logic (Service Layer) Domain Domain Model (Domain Layer) Data Mapper (part of Content Repository) Data source Data Source Abstraction Inspiring people to share
    • Creating a new package
    • Domain Driven DesignPhoneBook DEMO Inspiring people to share
    • Domain Driven DesignPhoneBookEntries DEMO Inspiring people to share
    • Model View Controller VoodooBasic recipe Domain Model our phone book – contains the data and knows everything about the domain Action Controller can handle requests for taking actions - show the phone book entries, create new ones etc. View Render the requested output by using the model Inspiring people to share
    • Model View Controller VoodooPhone Book Action Controller DEMO Inspiring people to share
    • Model View Controller VoodooSimple Phone Book View DEMO Inspiring people to share
    • Model View Controller VoodooTemplate View Inspiring people to share
    • Model View Controller VoodooTemplate View Inspiring people to share
    • Model View Controller VoodooTemplate View DEMO Inspiring people to share
    • Model View Controller VoodooFlexible recipe Domain Model our phone book – contains the data and knows everything about the domain Action Controller can handle requests for taking actions - show the phone book entries, create new ones etc. Views / Widgets Render the requested output by using the model Inspiring people to share
    • Model View Controller VoodooWidgets In TYPO3 a Widget is a reusable composite of a Presentation Model (Model) a Widget View (View) a Presentation Controller (Presenter) Widgets serve as re-usable design elements and as part of the user interface Inspiring people to share
    • Model View Controller VoodooWidgets The advantages of widgets: Consistent look and feel for standard presentation elements (tables, lists, forms, texts, images, ...) Centralized templating, can be overridden for special cases Automatic support for different request / response types so easy! Inspiring people to share
    • Model View Controller VoodooPresentation Controller Action Controller Presentation Controller is configured with a Presentation Model, receives a request, takes the required prepares the presentation and returns actions and prepares a response the rendered result can handle (web- / CLI- / ...) requests can render the widget handleRequest($request, $response) render() Inspiring people to share
    • Model View Controller VoodooRequest / Response Request Handler Web Request Web Request Web Request Resolver Handler Builder Inspiring people to share
    • Model View Controller VoodooWidget-based Action Controller Implement the widget based Action Controller Inspiring people to share
    • Model View Controller VoodooWidget-based Action Controller Show that widget also renders at command line Inspiring people to share
    • Got arguments? GET and POST arguments are the No.1 source for XSS and injection attacks TYPO3 5.0 takes special care of all user input and HTML output Data Types and Property Editors are used for type conversion at defined stages Controllers only get access to arguments they registered on beforehand Inspiring people to share
    • Got arguments?Properties & Data Types Work in progress (still hot) We use Property objects instead of string, integer etc. in certain areas Property objects can be combined (XHTML object + Text object + ....) "Property editors" are used to transform properties depending on the context Inspiring people to share
    • Got arguments?Validation A concept for validation is in place but not fully implemented yet We work with "Data Binding" More details ... this winter. Inspiring people to share
    • Got arguments?Registering arguments Practical example how to register POST arguments. Inspiring people to share
    • Components Inspiring people to share
    • ComponentsPlaying with building blocks The combination of components used is configurable (orchestration) The less components know about each other the easier it is to reuse them in a variety of contexts Create your own LEGO set by creating cleanly separated, decoupled components! Inspiring people to share
    • ComponentsComponent Dependencies Components seldomly come alone Components depend on other components which depend on other components which ... Inspiring people to share
    • ComponentsComponent Dependencies Components seldomly come alone Components depend on other components which depend on other components which ... Problem: Components explicitly refer to other components: $phoneBookManager = new PhoneBookManager Inspiring people to share
    • ComponentsDependency Injection A component doesnt ask for the instance of another component but gets it injected This methodology is referred to as the "Hollywood Principle": "Dont call us, well call you" Enforces loose coupling and high cohesion Makes you a better programmer Inspiring people to share
    • ComponentsPractical examples for DI Example using ... Constructor Injection Setter Injection Autowiring Inspiring people to share
    • Aspect Oriented Programming AOP is a programming paradigm complements OOP by separating concerns to improve modularization OOP modularizes concerns: methods, classes, packages AOP addresses cross-cutting concerns Inspiring people to share
    • Aspect Oriented ProgrammingCross-cutting concerns Presentation Domain Data source Inspiring people to share
    • Aspect Oriented ProgrammingCross-cutting concerns Presentation The concerns live here Domain Data source Inspiring people to share
    • Aspect Oriented ProgrammingCross-cutting concerns Phone Book Domain Model Security Logging Inspiring people to share
    • Aspect Oriented ProgrammingAspects in action Practical example Inspiring people to share
    • Beautiful errors Exception handling and error handling is (basically) implemented Special AOP-supported tools for debugging will be available Verbose debug messages and exception handlers Inspiring people to share
    • Topictext Inspiring people to share
    • Future and other timing issues Well switch from a road map to a country map Next steps are: Finish MVC implementation Properties, Data Types, Validation, Data Binding Implement Widgets, GUI and an initial Backend package Continue developing TYPO3 CR Inspiring people to share
    • For Patrick GaumondFuture and other timing issues Speeeed will be implemented as well Inspiring people to share
    • Recommended literature Inspiring people to share
    • Recommended literature Eric Evans: Domain Driven Design Tackling Complexity in the Heart of Software Addison Wesley 2002 Inspiring people to share
    • Recommended literature Martin Fowler: Patterns of Enterprise Application Architecture Addison Wesley 2002 Inspiring people to share
    • Recommended literature Jimmy Nilsson: Applying Domain-Driven Design and Patterns Addison Wesley 2006 Inspiring people to share
    • Links TYPO3 5.0 Subsite http://typo3.org/gimmefive TYPO3 5.0 Development Website http://5-0.dev.typo3.org TYPO3 5.0 Documentation http://5-0.dev.typo3.org/guide Jochen Weiland PHP 6 Hosting http://www.jweiland.net Inspiring people to share
    • So long and thanks for the fishQuestions Inspiring people to share beer