ss
What is a Field Type• Base building block of all content in eZ Publish• Collection of methods to store, read and validate ...
What is a datatype (aka FieldType)
Updated GlossaryeZ Publish 4 eZ Publish 5Content object ContentContent class Content TypeContent object attribute FieldCon...
How it is consumed
FieldType APIeZPublishSPIFieldTypeFieldType• getFieldTypeIdentifier• acceptValue / getEmptyValue• fromHash / toHash• fromP...
FieldType SPI (interfaces to implement)•eZPublishSPIFieldTypeFieldStorage• storeFieldData• getFieldData• deleteFieldData• ...
FieldType API abstract classeseZPublishCoreFieldTypeFieldType• Abstract that implements …SPIFieldTypeFieldType• Default be...
FieldType API abstract classes #2•eZPublishCoreFieldTypeValue• Abstract for field value•eZPublishCoreFieldTypeValidationEr...
FieldType standardized unit/integration tests•API integration tests• Using real world implementation of repository• Tests ...
What about BC•Right now: Think dual kernel• Datatype [legacy] for the backoffice• FieldType [5.x] for the front•Yes, you c...
The end?Twitter: @bdunogier & @andreromGoogle+: http://gplus.to/BertrandDunogierSlideShare: http://slideshare.net/Bertrand...
Upcoming SlideShare
Loading in...5
×

eZ Unconference#2 - Fieldtype - A. Rømcke

405

Published on

eZ Unconference

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
405
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
11
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

eZ Unconference#2 - Fieldtype - A. Rømcke

  1. 1. ss
  2. 2. What is a Field Type• Base building block of all content in eZ Publish• Collection of methods to store, read and validate content• Object oriented architecture of content model• Content type – blueprint of a single piece of content• Collection of class attributes, which are of some (data)type• Content – a single piece of content• Instance of a class• Collection of Fields, values of FieldDefinitions
  3. 3. What is a datatype (aka FieldType)
  4. 4. Updated GlossaryeZ Publish 4 eZ Publish 5Content object ContentContent class Content TypeContent object attribute FieldContent class attribute Field DefinitionObject attribute content Field ValueDatatype Field Type
  5. 5. How it is consumed
  6. 6. FieldType APIeZPublishSPIFieldTypeFieldType• getFieldTypeIdentifier• acceptValue / getEmptyValue• fromHash / toHash• fromPersistenceValue / toPersistenceValue• getSettingsSchema /getValidatorConfigurationSchema• validateFieldSettings / validateValidatorConfiguration• validate• getName• isSearchable
  7. 7. FieldType SPI (interfaces to implement)•eZPublishSPIFieldTypeFieldStorage• storeFieldData• getFieldData• deleteFieldData• hasFieldData• getIndexData•eZPublishSPIFieldTypeIndexable•eZPublishSPIFieldTypeValidationError
  8. 8. FieldType API abstract classeseZPublishCoreFieldTypeFieldType• Abstract that implements …SPIFieldTypeFieldType• Default behavior of some methods + validator handlingNeeded for Legacy Storage Engine:eZPublishCoreFieldTypeGatewayBasedStorage• Abstract that implements …SPIFieldTypeFieldStorageeZPublishCoreFieldTypeStorageGateway• Abstract for gateways to external storage• Used by GatewayBasedStorageeZPublishCorePersistenceLegacyContentFieldValueConverter
  9. 9. FieldType API abstract classes #2•eZPublishCoreFieldTypeValue• Abstract for field value•eZPublishCoreFieldTypeValidationError• Implementation of…SPIFieldTypeValidationError•eZPublishCoreFieldTypeValidator• Abstract for all validators to extend•eZPublishCoreIOIOService• Binary files IO handling
  10. 10. FieldType standardized unit/integration tests•API integration tests• Using real world implementation of repository• Tests if our field type plays well with others• eZPublishAPIRepositoryTestsFieldTypeTextLineIntegrationTest.php•SPI integration tests• Hooks directly into persistence implementation• Tests if our field type stores and loads data correctly• eZPublishSPITestsFieldTypeTextLineIntegrationTest.php•Unit testing of the field type• Tests the field type methods (units), one by one• eZPublishCoreFieldTypeTestsTextLineTest.php•TDD is your friend. Really!
  11. 11. What about BC•Right now: Think dual kernel• Datatype [legacy] for the backoffice• FieldType [5.x] for the front•Yes, you currently have to write both
  12. 12. The end?Twitter: @bdunogier & @andreromGoogle+: http://gplus.to/BertrandDunogierSlideShare: http://slideshare.net/BertrandDunogier
  1. ¿Le ha llamado la atención una diapositiva en particular?

    Recortar diapositivas es una manera útil de recopilar información importante para consultarla más tarde.

×