Successfully reported this slideshow.
Your SlideShare is downloading. ×

Getting Started With Datascript and Reagent

Upcoming SlideShare
Scalable Event Tracking
Scalable Event Tracking
Loading in …3
×

Check these out next

1 of 30
1 of 30

Getting Started With Datascript and Reagent

Download to read offline

Quick introduction on how to use Datascript with Reagent to build web applications.

Given to the Cambridge NonDysFunctional Programmers Meetup on November 13th 2014.

Quick introduction on how to use Datascript with Reagent to build web applications.

Given to the Cambridge NonDysFunctional Programmers Meetup on November 13th 2014.

More Related Content

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

Getting Started With Datascript and Reagent

  1. 1. Getting started with Datascript & Reagent for webapps Brice Fernandes @fractallambda brice@fractallambda.com tiny.cc/reactive-datascript
  2. 2. DataScript: Datomic-like queries on Clojurescript browser objects Reagent: Clojurescript wrapper around Facebook’s React.js reactive UI library
  3. 3. Hints Use lein  cljsbuild  auto to rebuild whenever your files are modified Create a new tabset in LightTable: ^-space then search for Tabset: Add a tablet Create a browser tab in LightTable: ^-space then search for Browser: Add browser tab
  4. 4. Rendering to the page1 Reagent Atoms are special2 Enter Datascript3 Binding Datascript & Reagent4 Fun with Datascript5
  5. 5. Your turn. Make a basic profile page for a dog
  6. 6. Rendering to the page1 Reagent Atoms are special2 Enter Datascript3 Binding Datascript & Reagent4 Fun with Datascript5
  7. 7. Your turn. Let a dog change mood by clicking a button
  8. 8. Rendering to the page1 Reagent Atoms are special2 Enter Datascript3 Binding Datascript & Reagent4 Fun with Datascript5
  9. 9. … …
  10. 10. Listing all dogs
  11. 11.
  12. 12. Dog Match-Making
  13. 13. … …
  14. 14. Your turn. Match male dogs of similar age (~1 year) into packs and list possible packs
  15. 15. Datomic Query Docs: http://docs.datomic.com/query.html Datascript Test Examples: http://tiny.cc/datascript-test Datalog/Datascript Tutorial: http://www.learndatalogtoday.org/
  16. 16. ! What Happens when you change the DB?
  17. 17.
  18. 18. :(Nothing…
  19. 19. Rendering to the page1 Reagent Atoms are special2 Enter Datascript3 Binding Datascript & Reagent4 More Fun with Datascript5
  20. 20. … …
  21. 21. 1 2
  22. 22. Your turn. Update 1) The members count 2) The pairings
  23. 23. Rendering to the page1 Reagent Atoms are special2 Enter Datascript3 Binding Datascript & Reagent4 Fun with Datascript5
  24. 24. Your turn. Add to the app :-) Suggest looking at one:many relations (parents / child)
  25. 25. Brice Fernandes @fractallambda brice@fractallambda.com tiny.cc/reactive-datascript ? Bind and Unbind Function from https://gist.github.com/allgress/11348685

×