Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Exploring ActiveRecord (Ruby China 2017)

leon
September 24, 2017

Exploring ActiveRecord (Ruby China 2017)

1. Meatadata: Association; Attribute;
2. ActiveRecord Hierarchies

leon

September 24, 2017
Tweet

Other Decks in Programming

Transcript

  1. 2 Agenda Ø Preface ü Beauty Of Mathematics Ø Metadata

    ü Reflection; Association; Attribute Ø Hierarchies ü Scoping Ø Wrapping Up
  2. 9 Ø Hibernate (JAVA) Ø Entity Framework (C#) Ø SQLBoiler

    (Golang) Ø Django (Python) Ø ActiveRecord (Ruby)
  3. 12 Tasks Split Up Ø Data Structure: ü Association; Reflection;

    Attribute; Graph Ø Algorithm ü Graph copy ü Topology sort ü Priority queue Ø Detail is evil !!
  4. 19 Association & Reflection Ø Reflection ü Host; Options Ø

    Association: ü Owner ü Reflection ü Target
  5. 20

  6. 23 Attribute Ø Attribute: two dimensions ü Type • data

    type; SQL type • casting from/to database type ü Value • Accessor for business model
  7. 24

  8. 33

  9. 35 Summary Ø Functionalities ü Metadata Management ü Accessor Methods

    Generation ü Scoping && Relation Ø Design ü Meta Programming ü Multiple Layers Design For Single Responsibility ü Interface Over Implementation Ø Program = Data Structure + Algorithm