trajectory: integrating sql data into your plone site, plone conference 2016, by eric steele

14
Integrating SQL Data into your Plone site

Upload: t-kim-nguyen

Post on 25-Jan-2017

41 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

Integrating SQL Data into your Plone site

Page 2: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

So here's the thing...

Page 3: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

SQLAlchemy

Page 4: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

A mapping is made from URL patterns to controllers (or views) that are called to generate the rendered web page. The URL pattern is also used to pull parameter information from the URLs which can then be passed on."^"In traversal, there is no explicit mapping of URLs to controllers or views. Instead a model structure is traversed step by step, guided by the URL."

traject· Martijn Fassen

· "A URL dispatch to object system that combines aspects of routing and traversal."

collective.trajectory· Izhar Firdaus

Page 5: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

traject· Pattern· Model

· Factory

Page 6: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

Patternpattern = u'teams/:team_id/athlete/:user_id'

'teams/12/athlete/47''teams/walla-walla-wallabees/athlete/bfergler'

Page 7: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

ModelAthlete(12, 47)Athlete(team='walla-walla-wallabees', athlete='bfergler')

* Marker interface: IAthlete

Page 8: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

Factory* Creates object on the fly

Page 9: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

Object + Marker Interface + ZCA =

Page 10: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

Evil

Page 11: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

· Views· Content Listing

· Local Role Adapters

Page 12: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele

https://github.com/esteele/example.trajectory

Page 13: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele
Page 14: Trajectory: Integrating SQL Data into your Plone Site, Plone Conference 2016, by Eric Steele