The File Abstraction Layer in TYPO3 6.0

7,058 views
6,661 views

Published on

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.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
7,058
On SlideShare
0
From Embeds
0
Number of Embeds
20
Actions
Shares
0
Downloads
23
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

The File Abstraction Layer in TYPO3 6.0

  1. 1. T3CON12 Québec CityFILE ABSTRACTION LAYER 1
  2. 2. AGENDA Introduction into File Abstraction  current State in TYPO3  goals and concepts http://theplayunderground.com/images/Folder%20Stack.jpg 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. 3. STEFFEN RITTER Germany, near Frankfurt Studied Computer Science Freelancer for T YPO3 Development T YPO3 since 2006  Core Team Member  Release Manager 4.7 3
  4. 4. Current State,INTRODUCTION Goals, History, Concepts 4
  5. 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. 6. INTRODUCTION: GOALS omit superfluous copies  reference files central meta-data management no direct file-system access external file-systems „DAM“ with core support 6
  7. 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. 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 File 8
  9. 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. 10. FILE ABSTRACTION Changes for Editors IN TYPO3 6.0 10
  11. 11. CHANGES FOR EDITORS: FILE MODULE 11
  12. 12. CHANGES FOR EDITOR: IMAGES 12
  13. 13. CHANGES FOR EDITOR: HCI CHANGES 13
  14. 14. CHANGES FOR EDITORS: UPLOADS 14
  15. 15. CHANGES FOR EDITORS: FILE-META DATA 15
  16. 16. CHANGES FOR EDITORS: FILE-META DATA WITH MEDIA INSTALLED:  „bridge to DAM“ 16
  17. 17. FILE ABSTRACTION Architecture IN TYPO3 6.0 17
  18. 18. ARCHITECTURE: CLASS HIERARCHY  Interface to code against  Objects in memory  In file-system 18
  19. 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. 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 Identifier 1:user_upload/Admin/test.html  Extends identifier with Storage UID  [StorageUid]:[Identifier] uid  Indexed elements  Database relations 20
  21. 21. ARCHITECTURE: IDENTIFY A RESOURCE WAAAHH? 21
  22. 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. 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. 24. ARCHITECTURE: STORAGE AND MOUNTPOINTS Top-Level in file-tree Drivers can ship custom config  WebDAV: Username, Password, … Of fline/Online detection for Remote data sources 24
  25. 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 shown 25
  26. 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. 27. FAL VS. DAM 27
  28. 28. FILE ABSTRACTION LAYER AND D.A.M. FAL is NOT compatible to DAM FAL won‘t 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. 29. Use, Extend DEVELOPERS and customize the FileINFORMATION Abstraction Layer 29
  30. 30. DEVELOPERS INFORMATION: CUSTOM DRIVERS Possibilities: WebDAV, Flickr, Amazon S3, FTP, SharePoint… Driver Interface + Registry 1. implement Interface 2. Register at Registry 3. configure within Storage 30
  31. 31. DEVELOPERS INFORMATION: T YPOSCRIPT New TypoScript Object „FILES“ 31
  32. 32. DEVELOPERS INFORMATION: WORKING WITH COLLECTIONS collections selected in TCE -Form PHP Code has to work with them 32
  33. 33. DEVELOPERS INFORMATION: RETRIEVING FILES FROM T YPOLINK Currently: Check for „is file“ New prefix „file:“  file:1:user_upload/index.html  file:735 33

×