Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
bongaus.fiSpotting Service  Powered by    Django           Juho Vepsäläinen
Who?● Jukka Raimovaara (Mentalhouse Oy),  ○ Perl-guru, hosting● Juho Vepsäläinen (Koodilehto co-op),  ○ Python, JavaScript...
What?● bongaus.fi - Spotting information in one  place● Target (QR) -> url -> Info● Examine info later● Competitions (who ...
Why?● Initiated by Jyväskylä Design Week  (contract work)● Extended on need basis (AgileJkl pivot)● On longer term we migh...
Evolution
http://autiomaa.galleria.fi/kuvat/2012/agilejkl/20120418-IMG_8483.jpg
http://autiomaa.galleria.fi/kuvat/2012/agilejkl/20120418-IMG_8530.jpg
http://autiomaa.galleria.fi/kuvat/2012/agilejkl/20120418-IMG_8522.jpg
Development Notes● Instanssi demo: working Minimum Viable  Product (MVP) with a few users● Design Week: no notable use, bo...
Technology
http://dl-web.dropbox.com/u/10320/django/wallpaper/magic-pony-django-wallpaper.png
Why Django?● Challenge: team of two, tight schedule● Familiar already. Couldve used Node or  something else but Django fel...
http://www.flickr.com/photos/12142259@N00/4084706293/ PixelPlacebo CC BY-NC
Why Bootstrap?● Creating a good and responsive CSS  layout is tough● Bootstrap helps quite a bit!● Provides column layout ...
Architecture    gunicorn                      Bootstrap                             Django 1.3               (markdown, so...
In Addition●   pip●   virtualenv, virtualenvwrapper●   git●   Adobe InDesign (generated cards)●   Adobe Illustrator (logo)...
Data Model● Modeled Events, Targets, Spotting and a  couple of more● Defined some business logic there  instead of views (...
Lessons Learned
South● Definitely worth using● Worked mostly fine● Had to dump it once and build own  custom migration (SQLite to rescue)●...
http://www.flickr.com/photos/9049083@N04/2332755401/   aldoaldoz CC BY-NC-SA
Migration Migraine1. Decided to do some drastic changes to   schema2. Dumped South3. Wrote migration manually4. Migrate da...
http://www.flickr.com/photos/68907151@N00/45751138/ Kevin Severud BY-SA
Database● SQLite ok for dev● Made it difficult to spot certain issues,  though due to loose constraints● MySQL in producti...
http://www.flickr.com/photos/92079962@N00/165513002/ Esther17 BY-NC-ND
Authentication + Authorization●   Djangos native auth in dev●   Custom solution (ext. auth.) in production●   Ext. auth ho...
On External Auth● Part of Luova paja that runs on a CMS● Provides registration + login (FB, regular)● Effectively performs...
http://www.flickr.com/photos/95572727@N00/338474903/ Stuck in Customs BY-NC-SA
Testing● Unit tests for core logic● Eased development somewhat (harder to  break)● Probably shouldve tested views and urls...
http://www.flickr.com/photos/75654019@N00/100230432/ luxuryluke CC BY-NC-ND
Bootstrap● Somewhat useful without customizations  even● Use vanilla version till you need to  optimize (request size, amo...
http://www.flickr.com/photos/25489182@N04/5022825091/ Philipp Lücke BY-NC
Development Speed● Developing a MVP was a good idea  (Instanssi demo)● The rest grew around that● Pivots affect velocity (...
"Perfect is the enemy of good"
Summary
Summary● bongaus.fi provides a way to store  spotting information in one place● Might grow into a business of some sort● M...
??       ?
bongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by Django
bongaus.fi - Spotting Service Powered by Django
Upcoming SlideShare
Loading in …5
×

bongaus.fi - Spotting Service Powered by Django

2,321 views

Published on

A talk I held at Djangoconfi '12. Beginner level. This talk mainly shows the whole process and stack used.

  • Be the first to comment

  • Be the first to like this

bongaus.fi - Spotting Service Powered by Django

  1. 1. bongaus.fiSpotting Service Powered by Django Juho Vepsäläinen
  2. 2. Who?● Jukka Raimovaara (Mentalhouse Oy), ○ Perl-guru, hosting● Juho Vepsäläinen (Koodilehto co-op), ○ Python, JavaScript ○ @bebraw (Twitter) ○ nixtu.blogspot.com
  3. 3. What?● bongaus.fi - Spotting information in one place● Target (QR) -> url -> Info● Examine info later● Competitions (who spotted most? ...)● Analytics after event
  4. 4. Why?● Initiated by Jyväskylä Design Week (contract work)● Extended on need basis (AgileJkl pivot)● On longer term we might want to get some bucks out of it
  5. 5. Evolution
  6. 6. http://autiomaa.galleria.fi/kuvat/2012/agilejkl/20120418-IMG_8483.jpg
  7. 7. http://autiomaa.galleria.fi/kuvat/2012/agilejkl/20120418-IMG_8530.jpg
  8. 8. http://autiomaa.galleria.fi/kuvat/2012/agilejkl/20120418-IMG_8522.jpg
  9. 9. Development Notes● Instanssi demo: working Minimum Viable Product (MVP) with a few users● Design Week: no notable use, bottleneck in content production● AgileJkl pivot: success, around half (~100) of the attendees participated
  10. 10. Technology
  11. 11. http://dl-web.dropbox.com/u/10320/django/wallpaper/magic-pony-django-wallpaper.png
  12. 12. Why Django?● Challenge: team of two, tight schedule● Familiar already. Couldve used Node or something else but Django felt like a safe bet● Admin UI big bonus on retrospect
  13. 13. http://www.flickr.com/photos/12142259@N00/4084706293/ PixelPlacebo CC BY-NC
  14. 14. Why Bootstrap?● Creating a good and responsive CSS layout is tough● Bootstrap helps quite a bit!● Provides column layout and lots of other goodies● http://twitter.github.com/bootstrap/
  15. 15. Architecture gunicorn Bootstrap Django 1.3 (markdown, sorl-thumbnail, qrcode, auth Luova paja jsonrpclib, django-simplegravatar) MySQL + South
  16. 16. In Addition● pip● virtualenv, virtualenvwrapper● git● Adobe InDesign (generated cards)● Adobe Illustrator (logo)● jQuery (Slimbox 2, Masonry, Rating)
  17. 17. Data Model● Modeled Events, Targets, Spotting and a couple of more● Defined some business logic there instead of views (good idea in this case)● Could go further in this by using Managers and some meta-hackery. See http://dabapps.com/blog/higher-level- query-api-django-orm/
  18. 18. Lessons Learned
  19. 19. South● Definitely worth using● Worked mostly fine● Had to dump it once and build own custom migration (SQLite to rescue)● Souths development (lack of it) worrying
  20. 20. http://www.flickr.com/photos/9049083@N04/2332755401/ aldoaldoz CC BY-NC-SA
  21. 21. Migration Migraine1. Decided to do some drastic changes to schema2. Dumped South3. Wrote migration manually4. Migrate data using SQLite5. dumpdata -> JSON6. loaddata -> MySQL7. Use South again
  22. 22. http://www.flickr.com/photos/68907151@N00/45751138/ Kevin Severud BY-SA
  23. 23. Database● SQLite ok for dev● Made it difficult to spot certain issues, though due to loose constraints● MySQL in production (be careful with conf! UTF-8, engine)● Maintained demo fixtures for a while (good idea)
  24. 24. http://www.flickr.com/photos/92079962@N00/165513002/ Esther17 BY-NC-ND
  25. 25. Authentication + Authorization● Djangos native auth in dev● Custom solution (ext. auth.) in production● Ext. auth hooks into Django User, though● Some custom code for authorization (ie. target ownership)
  26. 26. On External Auth● Part of Luova paja that runs on a CMS● Provides registration + login (FB, regular)● Effectively performs redirects and uses JSON-RPC● Utilizes checksums (secret keys) and user info exchange
  27. 27. http://www.flickr.com/photos/95572727@N00/338474903/ Stuck in Customs BY-NC-SA
  28. 28. Testing● Unit tests for core logic● Eased development somewhat (harder to break)● Probably shouldve tested views and urls too● Acceptance tests that describe the users flow might have been handy too to have (Selenium, zombie?)
  29. 29. http://www.flickr.com/photos/75654019@N00/100230432/ luxuryluke CC BY-NC-ND
  30. 30. Bootstrap● Somewhat useful without customizations even● Use vanilla version till you need to optimize (request size, amount etc.)● Customizable using LESS (colors, etc.)
  31. 31. http://www.flickr.com/photos/25489182@N04/5022825091/ Philipp Lücke BY-NC
  32. 32. Development Speed● Developing a MVP was a good idea (Instanssi demo)● The rest grew around that● Pivots affect velocity (new, possibly conflicting logic)● Tests are essential due to this (easier to spot goof ups)
  33. 33. "Perfect is the enemy of good"
  34. 34. Summary
  35. 35. Summary● bongaus.fi provides a way to store spotting information in one place● Might grow into a business of some sort● MVPs are valuable!● Django+Bootstrap was a good combo
  36. 36. ?? ?

×