Top Banner

Click here to load reader

The File Abstraction Layer in TYPO3 6.0

Jun 30, 2015



The Slides of th Talk about the FileAbstraction Layer at the T3CON12 in Québec City, Canada.

Gives an Overview about Concepts, Changes for Editors as well as a short introduction in usage for Development.


2. AGENDA Introduction into File Abstraction current State in TYPO3 goals and concepts The File Abstraction Layer in T YPO3 6.0 influences on editors architecture FAL vs. DAM Developers Information: Customize FAL custom Drivers usage in Extensions extending FAL 2 3. STEFFEN RITTER Germany, near Frankfurt Studied Computer Science Freelancer for T YPO3 Development T YPO3 since 2006 Core Team Member Release Manager 4.73 4. Current State,INTRODUCTION Goals, History, Concepts4 5. INTRODUCTION: CURRENT STATE plain PHP functions ( fopen, is_dir, ) operating system restriction: Windows vs. Unix files in T YPO3 site root Usage copied to uploads/ thumbnails copied to typo3temp/ obtains disk space replacing files dif ficult meta-data distributed 5 6. INTRODUCTION: GOALS omit superfluous copies reference files central meta-data management no direct file-system access external file-systems DAM with core support6 7. INTRODUCTION: HISTORY AND FUTURE planned since years several attempts / refactorings huge task DAM not core finally: BLE-project with planned integration in 4.7 released with 6.0alpha1 improvements and actions welcome 7 8. INTRODUCTION: CONCEPTS Resource element in file-system File real file in file -system Folder structuring unit of file -system Folder in local file-system, tag or album in Flickr ProcessedFile variants References File8 9. INTRODUCTION: CONCEPTS Storage unix: mount Mount-point definition Aggregation: Driver, Name, Path, user-mount Driver low -level interface php file-system calls WebDAV: PUT/GET/POST 9 10. FILE ABSTRACTION Changes for EditorsIN TYPO3 6.0 10 11. CHANGES FOR EDITORS: FILE MODULE 11 12. CHANGES FOR EDITOR: IMAGES 12 13. CHANGES FOR EDITOR: HCI CHANGES13 14. CHANGES FOR EDITORS: UPLOADS 14 15. CHANGES FOR EDITORS: FILE-META DATA15 16. CHANGES FOR EDITORS: FILE-META DATA WITH MEDIA INSTALLED: bridge to DAM16 17. FILE ABSTRACTION ArchitectureIN TYPO3 6.017 18. ARCHITECTURE: CLASS HIERARCHY Interface to code against Objects in memory In file-system 18 19. ARCHITECTURE: PERSISTENCE File:database(sys_file) Folder:transient Storage: database(sys_storage) FileReference: database(sys_file_reference) ProcessedFile: database(sys_file_processedfile) References in Database: [UID] Folder: [???]19 20. ARCHITECTURE: IDENTIFY A RESOURCE 4 dif ferent Identifier: Identifier Combined Identifier uid Sha1 (internal only) Identifier user_upload/Admin/test.html String, unique within Storage useless without storage Combined Identifier1:user_upload/Admin/test.html Extends identifier with Storage UID [StorageUid]:[Identifier] uid Indexed elements Database relations 20 21. ARCHITECTURE: IDENTIFY A RESOURCE WAAAHH?21 22. ARCHITECTURE: IDENTIFY A RESOURCEWhich Identifier to use? Combined-Identifier: TypoScript, Hand over file to FAL manual references Uid internally (extensions, php, database) Whenever possible (better performance) 22 23. ARCHITECTURE: IDENTIFY A RESOURCEGimmick / Backwards compatibilty: Legacy Files Virtual Storage uid: 0 local-driver Root at TYPO3_site not indexed! Access all files: 0:uploads/pics/bla.jpg 0:typo3conf/ext/myEXT/ext_icon.gif 23 24. ARCHITECTURE: STORAGE AND MOUNTPOINTS Top-Level in file-tree Drivers can ship custom config WebDAV: Username, Password, Of fline/Online detection forRemote data sources24 25. ARCHITECTURE:STORAGE AND MOUNTPOINTS FileMounts: new definition Label Storage All Folders in Storage selectable User-FileMounts filter Storage All storages in filetree Only accessible folder shown25 26. ARCHITECTURE: COLLECTIONS New collection Interfaces since T YPO3 4.7 Central storage/grouping of records/data Similar JCF / STL Container FAL extends Collection: Folder-Collection: All files within a folder Static-Collection: pre selected files Extensions/Upload-CE uses collection Central exchange of files 26 27. FAL VS. DAM27 28. FILE ABSTRACTION LAYER AND D.A.M. FAL is NOT compatible to DAM FAL wont replace DAM FAL concentrates on file meta -data DAM concentrates on file -content meta-data DAM 2.0 Media Extension Static collections- FAL Folder collections- FAL Tag/Filter collection - t.b.d Migration possible (to a certain extend) New projects with DAM??? Start with 6.0alpha1 and FAL!!! 28 29. Use, Extend DEVELOPERS and customizethe FileINFORMATION AbstractionLayer29 30. DEVELOPERS INFORMATION:CUSTOM DRIVERS Possibilities: WebDAV, Flickr, Amazon S3, FTP, SharePoint Driver Interface + Registry1. implement Interface2. Register at Registry3. configure within Storage 30 31. DEVELOPERS INFORMATION: T YPOSCRIPT New TypoScript Object FILES 31 32. DEVELOPERS INFORMATION:WORKING WITH COLLECTIONS collections selected in TCE -FormPHP Code has to work with them32 33. DEVELOPERS INFORMATION:RETRIEVING FILES FROM T YPOLINK Currently: Check for is file New prefix file: file:1:user_upload/index.html file:73533

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.