Science To Bfg
Upcoming SlideShare
Loading in...5
×
 

Like this? Share it with your network

Share

Science To Bfg

on

  • 1,583 views

 

Statistics

Views

Total Views
1,583
Views on SlideShare
1,581
Embed Views
2

Actions

Likes
0
Downloads
4
Comments
0

1 Embed 2

http://www.slideshare.net 2

Accessibility

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Science To Bfg Presentation Transcript

  • 1. Migrating a public NASA site to Repoze BFG Chris Shenton koansys.com
  • 2. Talk Overview • Science@NASA • Repoze BFG • S@N in BFG
  • 3. science@nasa • science.nasa.gov • 13 years of stories • 1.8 million visits/month • manually maintained • varying HTML formats over time • no built-in search
  • 4. s@n varying html • 2009
  • 5. s@n varying html • 2003
  • 6. s@n varying html • 1996
  • 7. CMS Wanted • Folders, Pages • Files, Images • Search • TTW Editor • Permissions per object
  • 8. Existing Plone Site • nasascience.nasa.gov • too complex
  • 9. New Plone Site? • Plone3’s become painful :-(
  • 10. Repoze BFG? • Same Zope Object Database • Similar ZPT Templates • Same Catalog index, search • Tiny • Fast • Easy to learn
  • 11. Repoze BFG • http://bfg.repoze.org/ • “Zope with the serial numbers filed off” • Chris McDonough’s 4th implementation • 100% test coverage • Excellent, complete documenation • Good fit for CMS-shaped data • ZODB • Traversal
  • 12. ZODB • Persistent object store • Python objects • Dictionaries, attributes • children = page.items() • parent = page.__parent__
  • 13. ZODB for lightly structured data recipes Spanish seafood paella sangria grouper squid on bbq cava red
  • 14. ZODB: flexible recipes Spanish seafood paella sangria grouper squid on bbq cava red tasting photo notes
  • 15. Traversal: the way we think /recipes/Spanish/sangria/cava recipes /recipes/seafood/squid Spanish seafood paella sangria grouper squid on bbq cava red
  • 16. Traversal We don’t need no stinking ORM
  • 17. Models: just Python • Folderish Page
  • 18. Models: just Python • File • Image • subclass • blobs
  • 19. Views: fill templates
  • 20. View: add, edit
  • 21. Templates Chameleon: ZPT on steroids • ZPT, TAL, METAL • http://chameleon.repoze.org/docs/zpt/ • http://www.zope.org/Documentation/ Books/ZopeBook/2_6Edition/ZPT.stx • http://wiki.zope.org/ZPT/ TALSpecification14
  • 22. Templates: O-wrap • define-slot
  • 23. Templates: page view • fill-slot
  • 24. Catalog: index • define indices
  • 25. Catalog: search • view
  • 26. Import science@nasa • wget site • import html • use xpaths
  • 27. But will it blend? • Live demo!