• Share
  • Email
  • Embed
  • Like
  • Save
  • Private Content
Extbase and Beyond
 

Extbase and Beyond

on

  • 12,207 views

With Extbase - a new framework for extension development introduced in TYPO3 4.3 - you are able to develop with the paradigms of FLOW3 today. During this talk, you get in touch with the features of ...

With Extbase - a new framework for extension development introduced in TYPO3 4.3 - you are able to develop with the paradigms of FLOW3 today. During this talk, you get in touch with the features of the framework to understand how it supports your development process to develop clean code cost efficient in less time. Extbase is one cornerstone for a smooth transition to TYPO3 v5, another is reusable business domain knowledge in form of Generic Domain Models available in 4.x and 5.x. The Generic Domain Models will enable you to add a Semantic Web topping.

Statistics

Views

Total Views
12,207
Views on SlideShare
6,066
Embed Views
6,141

Actions

Likes
4
Downloads
37
Comments
0

4 Embeds 6,141

http://www.typo3.ru 6067
http://www.slideshare.net 70
http://myblog.mbless.de 2
http://typo3.ru 2

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

    Extbase and Beyond Extbase and Beyond Presentation Transcript

    • Extbase and Beyond Jochen Rau <jochen.rau@typoplanet.de> Irving, Texas May 22, 2010
    • Who is this?
    • Dipl.-Ing. Mechanical Engineering
    • infected with TYPO3 in 2OO1
    • Tübingen
    • 6O% selfemployed 6O% father
    • 8O% ---- selfemployed 6O% 6O% father
    • 5 years: Fraunhofer- Gesellschaft German Aerospace Center
    • 5 years: high school teacher
    • What is Extbase all about?
    • v4 2OO6
    • v5 v4
    • v5 v4
    • v5 v4
    • Extbase v5 v4
    • v5 v4
    • Extbase FLO W 4
    • Extbase 6O% FLO W 4
    • Extbase 25% FLO W 4
    • Extbase 25%W FLO 4
    • Extbase 2O% W FLO 4
    • Extbase W FLO 4
    • Extbase FLOW 3
    • What is Extbase all about?
    • Extbase
    • OOP A ggregate DDD Extbase V iew Entity Hel per M VC VfB R epository
    • Extbase Value
    • clean architecture domain driven modular patterns
    • rapid development use conventions stay focused be relieved
    • smooth transition you code data
    • What is Extbase all about?
    • tp://commons.wikimedia.org/wiki/File:Z%C3%BCrich_-_Seefeld_-_Heureka_IMG_1757.JPG
    • tx_ttnews 3397 tx_pbsurvey_pi1 253O tx_ttproducts_pi1 1O9O tx_mmforum_pi1 6126 tx_veguestbook_pi1 1156 tp://commons.wikimedia.org/wiki/File:Z%C3%BCrich_-_Seefeld_-_Heureka_IMG_1757.JPG
    • /** * Main news function: calls the init_news() function and decides by the given CODEs which of the * functions to display news should by called. * * @param string $content : function output is added to this * @param array $conf : configuration array * @return string $content: complete content generated by the tt_news plugin */ function main_news($content, $conf) { $this->local_cObj = t3lib_div::makeInstance('tslib_cObj'); // Local cObj. $this->init($conf); if ($this->conf['displayCurrentRecord']) { $this->config['code'] = $this->conf['defaultCode']?trim($this->conf['defaultCode']):'SINGLE'; $this->tt_news_uid = $this->cObj->data['uid']; } // get codes and decide which function is used to process the content $codes = t3lib_div::trimExplode(',', $this->config['code']?$this->config['code']:$this->conf['defaultCode'], 1); if (!count($codes)) { // no code at all $codes = array(); $noCode = true; } while (list(, $theCode) = each($codes)) { $theCode = (string)strtoupper(trim($theCode)); $this->theCode = $theCode; switch ($theCode) { case 'SINGLE': $content .= $this->displaySingle(); break; case 'VERSION_PREVIEW': $content .= $this->displayVersionPreview(); break; case 'LATEST': case 'LIST': case 'SEARCH': case 'XML': $content .= $this->displayList(); break; case 'AMENU': $content .= $this->newsArchiveMenu(); break; case 'CATMENU': $content .= $this->displayCatMenu(); break; default:
    • /** * Displays the "single view" of a news article. Is also used when displaying single news records with the "insert records" content element. * * @return string html-code for the "single view" */ function displaySingle() { $singleWhere = 'tt_news.uid=' . intval($this->tt_news_uid); $singleWhere .= ' AND type NOT IN(1,2)' . $this->enableFields; // only real news -> type=0 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery( '*', 'tt_news', $singleWhere); $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); // get the translated record if the content language is not the default language if ($GLOBALS['TSFE']->sys_language_content) { $OLmode = ($this->sys_language_mode == 'strict'?'hideNonTranslated':''); $row = $GLOBALS['TSFE']->sys_page->getRecordOverlay('tt_news', $row, $GLOBALS['TSFE']->sys_language_content, $OLmode); } if ($this->versioningEnabled) { // get workspaces Overlay $GLOBALS['TSFE']->sys_page->versionOL('tt_news',$row); // fix pid for record from workspace $GLOBALS['TSFE']->sys_page->fixVersioningPid('tt_news',$row); } $GLOBALS['TSFE']->displayedNews[]=$row['uid']; if (is_array($row) && ($row['pid'] > 0 || $this->vPrev)) { // never display versions of a news record (having pid=-1) for normal website users // Get the subpart code if ($this->conf['displayCurrentRecord']) { $item = trim($this->getNewsSubpart($this->templateCode, $this->spMarker('###TEMPLATE_SINGLE_RECORDINSERT###'), $row)); } if (!$item) { $item = $this->getNewsSubpart($this->templateCode, $this->spMarker('###TEMPLATE_SINGLE###'), $row); } // reset marker array $wrappedSubpartArray = array(); // build the backToList link if ($this->conf['useHRDates']) { $pointerName = 'pointer'; $wrappedSubpartArray['###LINK_ITEM###'] = explode('|', $this->pi_linkTP_keepPIvars('|', array( 'tt_news' => null, 'backPid' => null, $this->config['singleViewPointerName'] => null, 'pS' => null, 'pL' => null), $this->allowCaching, ($this->conf['dontUseBackPid']?1:0), $this->config['backPid']));
    • if ($this->conf ['useHRDates']) { $pointerName = 'pointer'; $wrappedSubpartArray ['###LINK_ITEM###'] = explode('|', $this- >pi_linkTP_keepPIvars ('|', array( 'tt_news' => null, 'backPid' => null, $this->config ['singleViewPointerName '] => null, 'pS' => null, 'pL' => null), $this- >allowCaching, ($this- >conf ['dontUseBackPid']? 1:0), $this->config ['backPid'])); } else { $wrappedSubpartArray ['###LINK_ITEM###'] = explode('|', $this- >pi_linkTP_keepPIvars ('|', array( 'tt_news' => null, 'backPid' => null, $this->config ['singleViewPointerName '] => null), $this- >allowCaching, ($this- >conf ['dontUseBackPid']? 1:0), $this->config ['backPid'])); } // set the title of the single view page to the title of the news record if ($this->conf ['substitutePagetitle'] ) { $GLOBALS['TSFE']->page ['title'] = $row ['title']; // set pagetitle for indexed search to news title $GLOBALS['TSFE']- >indexedDocTitle = $row ['title']; } if ($this->conf ['displaySingle.'] ['catOrderBy']) { $this->config ['catOrderBy'] = $this- >conf['displaySingle.'] ['catOrderBy']; } $markerArray = $this- >getItemMarkerArray ($row, 'displaySingle'); // Substitute $content = $this->cObj- >substituteMarkerArrayC ached($item, $markerArray, array(), $wrappedSubpartArray); } elseif ($this- >sys_language_mode == 'strict' && $this- >tt_news_uid && $GLOBALS['TSFE']- >sys_language_content) { // not existing translation $noTranslMsg = $this- >local_cObj->stdWrap ($this->pi_getLL ('noTranslMsg'), $this- >conf ['noNewsIdMsg_stdWrap.' ]); $content = $noTranslMsg; } elseif ($row['pid'] < 0) { // a non-public version of a record was requested $nonPlublicVersion = $this->local_cObj- >stdWrap($this- >pi_getLL ('nonPlublicVersionMsg' ), $this->conf ['nonPlublicVersionMsg_ stdWrap.']); $content = $nonPlublicVersion; } else { // if singleview is shown with no tt_news uid given from GETvars (&tx_ttnews[tt_news]=) an error message is displayed.
    • control flow business logic CRUD data render output other , eg. config
    • control flow business logic aggregate CRUD data render output other , eg. config
    • control flow business logic generalize CRUD data render output other , eg. config
    • partition
    • Extbase use & Fluid
    • control flow business logic CRUD data render output other , eg. config
    • Controller Domain Model Domain Repository View other , eg. config
    • TYPO3
    • 1 userFunc Extbase TYPO3 Dispatcher
    • 1 2 userFunc Request BlogExample Extbase TYPO3 Dispatcher Controller
    • 1 2 userFunc Request BlogExample Extbase TYPO3 Dispatcher Controller 3 findByTitle('MyBlog') Repository Domain Model Blog Post Comment Tag
    • 1 2 userFunc Request BlogExample Extbase TYPO3 Dispatcher Controller 3 findByTitle('MyBlog') Blog 4 Repository Domain Model Blog Post Comment Tag
    • 1 2 userFunc Request BlogExample Extbase TYPO3 Dispatcher Controller 3 assign(Blog) findByTitle('MyBlog') render() 5 Blog 4 View Repository Domain Model Blog Post Comment Tag
    • 1 2 userFunc Request BlogExample Extbase TYPO3 Dispatcher HTML Response Controller 6 3 assign(Blog) findByTitle('MyBlog') render() 5 Blog Response 4 View Repository Domain Model Blog Post Comment Tag
    • 1 2 userFunc Request BlogExample Extbase TYPO3 Dispatcher HTML Response Controller 6 3 assign(Blog) findByTitle('MyBlog') render() 5 Blog Response 4 View Repository Domain Model Blog Post Comment Tag
    • 1 2 userFunc Request BlogExample Extbase TYPO3 Dispatcher HTML Response Controller 6 3 assign(Blog) findByTitle('MyBlog') render() 5 Blog Response 4 View Repository Domain Model Blog Post Comment Tag
    • Hmmm. Much better. Lasagna code de Spagh etti co
    • What's coming
    • Performance SQL queries object tracking caching
    • Dev Experience speaking exceptions documentation kickstarter
    • Catalyse dispatcher persistence backend process for patches
    • And beyond Extbase?
    • IMHO
    • http://www.sxc.hu/photo/516864/ Generic Domain Models
    • WRUV I
    • William Street Rajan United States Virginia Indian
    • William Street Rajan United States Virginia Indian
    • William Street Rajan United States Virginia Indian x WRUVI William Street Rajan United States Virginia Indian
    • William Street Rajan United States Virginia Indian x WRUVI William Street Rajan United States Virginia Indian
    • William Street Rajan United States Virginia Indian x WRUVI William Street Rajan United States Virginia Indian
    • Organization Date Customer Event Invoice Publication Product Price Article Location Number Image Your Model
    • Generic Domain Models based on high quality, open standards OASIS CIQ 3.0 for persons, organizations, addresses, names BMEcat for product, suppliers, catalogs, prices iCalendar for calendar, events, dates etc. challenges XML2PHP interoperability consistent semantics @jochen: it's time for an example
    • Product Line Engineering
    • Generic Domain Models ViewHelpers Extbase Fluid TYPO3 v4
    • Extbase Fluid TYPO3 v4
    • Extbase Fluid TYPO3 v4
    • Extbase Fluid TYPO3 v4
    • Extbase Fluid TYPO3 v4
    • platform Generic Domain ViewHelpers Models Fluid TYPO3 v5 FLOW3
    • building blocks Generic Domain ViewHelpers Models Fluid TYPO3 v5 FLOW3
    • TYPO3 Generic Domain ViewHelpers Models Fluid TYPO3 v5 FLOW3
    • packages P P P P P P P P P P Generic Domain ViewHelpers Models Fluid TYPO3 v5 FLOW3
    • TYPO3 Social Site P P P P P P P P P P Generic Domain ViewHelpers Models Fluid TYPO3 v5 FLOW3
    • TYPO3 Enterprise P P P P P P P P P P Generic Domain ViewHelpers Models Fluid TYPO3 v5 FLOW3
    • TYPO3 Blog P P P P P P P P P P Generic Domain ViewHelpers Models Fluid TYPO3 v5 FLOW3
    • Product Line P P P P P P P P P P Generic Domain ViewHelpers Models Fluid TYPO3 v5 FLOW3
    • The meaning of things
    • http://webscience.org/people.html
    • Knublauch, Holger. KBeans Specification: Semantic Transparency for Components and Domain Models. Technical Report FAW-TR-01001, FAW Ulm, 2001.
    • Semantic annotations /** * A container for defining the unique characteristics of a person only * * @version $Id$ * @copyright Copyright belongs to the respective authors * @license http://www.gnu.org/licenses/gpl.html GNU General Public License, version 3 or later * @prefix foaf: <http://xmlns.com/foaf/0.1/> * @prefix owl: <http://www.w3.org/2002/07/owl#> * @prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> * @prefix core: <http://www.typo3.org/semantic/core/> * @prefix gen: <http://www.typo3.org/semantic/ext/generic/domain/model/> * @semantic gen:Person rdfs:subClassOf gen:Party * @semantic gen:Person owl:disjointWith gen:Organization * @semantic gen:Person core:isMemberOf gen:Organization */ class Tx_Generic_Domain_Model_Person extends Tx_Generic_Domain_Model_Party { /** * Party Names * @var Tx_Extbase_Persistence_ObjectStorage<Tx_Generic_Domain_Model_PersonName> * @semantic gen:partyNames gen:areOfType foaf:name */ protected $partyNames; /**
    • Semantic Query with SPARQL ## Find all authors of News Articles that are posted on a page with the english title "Welcome" PREFIX core:<http:://www.typo3.org/ontology/core/#> PREFIX generic:<http:://www.typo3.org/ontology/ext/generic/#> PREFIX rdfs:<http://www.w3.org/2000/01/rdf-schema#> SELECT $person $article FROM <http:://localhost/repository.rdf> WHERE { $person rdfs:type generic:Person . $person core:authorOf $article . $article rdfs:type core:NewsArticle . $article core:isPlacedOn $page . $page core:title "Welcome"@en . }
    • [TYPO3-dev] The state of support for the Semantic Web / RDFA / Web 3.0 in TYPO3 Jochen Rau jochen.rau at typoplanet.de Mon Aug 31 16:26:51 CEST 2009 • Previous message: [TYPO3-dev] The state of support for the Semantic Web / RDFA / Web 3.0 in TYPO3 • Next message: [TYPO3-dev] The state of support for the Semantic Web / RDFA / Web 3.0 in TYPO3 • Messages sorted by: [ date ] [ thread ] [ subject ] [ author ] get Extbase ready ;-) de ne generic domain models bind objects to an ontology elaborate on the use cases of semantic content make the integration of semantic web technology a movement of the community
    • Bastian Waidelich Sebastian Kurfürst Sebastian Gebhard Than k You Steffen Kamper Felix Oertel Franz Ripfel and the TYPO3 V5 Team for all the inspiration and the beautiful code Ingmar Schlecht Patrick Lobacher Franz Koch Xavier Perseguers