Marc Ingram Entity Field Query API Examiner.com http://drupal.org/user/77320
The need for a query builder Where we are now Drupal 6 has no concept of a query builder http://buytaert.net/starting-to-work-on-drupal-7  Feb 2008 Every query must be hand crafted for a specific database
View offers the ability to create custom queries on the fly View 3 allows for plugable backends
Views based queries are not always optimal D7 changes this
Views in core Why for developers? No GUI
Lacks the structured tpl structure that views provides
Need to be able to write code Why is this possible? Fields in core
Plugable storage
Fields in Core What does fields in core mean? Bundles/Entities This is the basic building block Taxonomy terms, Taxonomy vocabularies, Users, Nodes, Files You can build your own Fields Allows you define fields that can be used by entities Instances Associates fields with given entities and bundles
Entities and bundles hook_entity_info() Allows you to create new entities
Example of a node entity
hook_entity_info_alter() Bundle is a sub class of an entity CCK content type
Taxonomy terms are classified by vocabularies
Bundles can have there own properties
Fields All entities are now fieldable This means the concept of cck is no longer restricted to nodes Core comes with predefined field types Text, Options, Number, List CCK minus user and node reference these are still contrib

Entity Query API

  • 1.
    Marc Ingram EntityField Query API Examiner.com http://drupal.org/user/77320
  • 2.
    The need fora query builder Where we are now Drupal 6 has no concept of a query builder http://buytaert.net/starting-to-work-on-drupal-7 Feb 2008 Every query must be hand crafted for a specific database
  • 3.
    View offers theability to create custom queries on the fly View 3 allows for plugable backends
  • 4.
    Views based queriesare not always optimal D7 changes this
  • 5.
    Views in coreWhy for developers? No GUI
  • 6.
    Lacks the structuredtpl structure that views provides
  • 7.
    Need to beable to write code Why is this possible? Fields in core
  • 8.
  • 9.
    Fields in CoreWhat does fields in core mean? Bundles/Entities This is the basic building block Taxonomy terms, Taxonomy vocabularies, Users, Nodes, Files You can build your own Fields Allows you define fields that can be used by entities Instances Associates fields with given entities and bundles
  • 10.
    Entities and bundleshook_entity_info() Allows you to create new entities
  • 11.
    Example of anode entity
  • 12.
    hook_entity_info_alter() Bundle isa sub class of an entity CCK content type
  • 13.
    Taxonomy terms areclassified by vocabularies
  • 14.
    Bundles can havethere own properties
  • 15.
    Fields All entitiesare now fieldable This means the concept of cck is no longer restricted to nodes Core comes with predefined field types Text, Options, Number, List CCK minus user and node reference these are still contrib