Bumpy road of Drupal 7 How to build a fast content How to build a fast content management application management application
Aug 07, 2015
Bumpy road of Drupal 7How to build a fast contentHow to build a fast content
management applicationmanagement application
Who Uses Drupal?Who Uses Drupal?GovernmentGovernment
MediaMediaRetailRetail
FinanceFinanceIndustryIndustry
EducationEducationEntertainmentEntertainment
Title of the articleTitle of the article
Title of the section #1Lorem ipsum dolor sit amet, consecteturadipiscing elit. Vivamus vel venenatis nunc.Praesent luctus auctor turpis nec cursus.Sed commodo feugiat ullamcorper. Title of the section #2Lorem ipsum dolor sit amet, consecteturadipiscing elit. Vivamus vel venenatis nunc.Praesent luctus auctor turpis nec cursus.Sed commodo feugiat ullamcorper. Title of the section #3 ...
DemoDemo
Title of the articleTitle of the article
Title of the section #1Lorem ipsum dolor sit amet, consecteturadipiscing elit. Vivamus vel venenatis nunc.Praesent luctus auctor turpis nec cursus.Sed commodo feugiat ullamcorper.
Title of the section #2Lorem ipsum dolor sit amet, consecteturadipiscing elit. Vivamus vel venenatis nunc.Praesent luctus auctor turpis nec cursus.Sed commodo feugiat ullamcorper.
Title of the section #3 ...
Edit "Title of the article"Edit "Title of the article"
Title of Section Body of Section
Title of the section #1
Lorem ipsum dolor sit amet, consectetur adipiscingelit. Vivamus vel venenatis nunc. Praesent luctusauctor turpis nec cursus.
Title of Section Body of Section
Title of the section #2
Entity ReferenceEntity Reference
Entity API Entity API (Required)(Required)Entity Construction Kit (ECK)Entity Construction Kit (ECK)
Inline Entity FormInline Entity Form
Entity Reference fasterEntity Reference fasterthan Field collectionthan Field collection
by by 25-59%25-59%
Possible problemsPossible problems1. Edit Content (Form Loading)1. Edit Content (Form Loading)
2. Save & View Content2. Save & View Content
Possible problemsPossible problems1. Edit Content (Form Loading)1. Edit Content (Form Loading)
2. Save & View Content2. Save & View Content
3. Revisioning3. Revisioning
MultifieldMultifieldProvide a compound field solution for Drupal 7Provide a compound field solution for Drupal 7
LimitationsLimitations
The sub-fields inside the multifield are limited toone valueCannot have a multifield inside another multifieldMore issue related to advanced field typesUnholy things to Field and Entity APIs
of the Multifieldof the Multifield
Custom field fasterCustom field fasterthan Entity Referencethan Entity Reference
by by 25%25%
and faster Field Collectionand faster Field Collectionby by 43-6543-65%%
Another ways toAnother ways tooptimizeoptimize
Optimize Database Queries: enableEntity Cache, etc.Minimize of the structure: remove unused (HTML)elementsDivide the form: move out "hard" field(s)from the form
Edit Edit "Title of the article""Title of the article"
Title
Body
References
Title of the some article
Lorem ipsum dolor sit amet, consectetur adipiscingelit. Vivamus vel venenatis nunc. Praesent luctusauctor turpis nec cursus.
Article 1
Article 2
1. Create custom field widget ("empty" widget to hideform elements) 2. Build custom form to edit field's values and display(render) it on the Edit Node page
Create custom table and provide functionalityto save field's values into custom table
StepsSteps
StructureStructureof the custom tableof the custom table
LegendLegendform_build_id - Form Build ID of the Node Edit formentity_id - Node IDrevision_id - Node Revision IDuser_id - User's ID who save value(s)values - Value(s) of the field (serialized)expired - Determine whether values are expired
form_build_id entity_id revision_id user_id values expired
1. Create custom field widget ("empty" widget to hideform elements) 2. Build custom form to edit field's values and display(render) it on the Edit Node page
Create custom table and provide functionalityto save field's values into custom table
3. Provide validate (presave) function to set form values(of the References field)
StepsSteps
ResourcesResources
https://www.drupal.org/project/entityhttps://www.drupal.org/project/eck
https://www.drupal.org/project/field_collectionhttps://www.drupal.org/project/multifieldhttps://www.drupal.org/project/examples
https://www.drupal.org/node/707832
Thank you!Thank you!
Pavlo ShevchukSenior Software Engineerhttp://drupal.org/u/pshevchuk