Successfully reported this slideshow.

5 best practices for (web/ software) development (2010)

2,285 views

Published on

Some of the best practices we've acquired while developing for the web! A presentation for students Communication and Multimedia Design at Noordelijke Hogeschool Leeuwarden in their Discover Web2.0 lecture series.

Published in: Technology
  • Be the first to comment

5 best practices for (web/ software) development (2010)

  1. 1. 5 BEST PRACTICES FOR DEVELOPMENT 5 best practices for (web/ software) development
  2. 2. ERWIN ELLING
  3. 3. @erwinelling “passionate web versatilist”
  4. 4. 5 BEST PRACTICES
  5. 5. 1: MODEL VIEW CONTROLLER http://www.flickr.com/photos/wardofsky/2350781947/
  6. 6. we use the django framework (for python)
  7. 7. there’s also rails (for ruby)
  8. 8. and e.g. cakephp (for php) also other frameworks (non-MVC) save lots of time: ARP (for flash), jquery & prototype (for javascript), ... trend towards more and more abstraction and more human readable code
  9. 9. models
  10. 10. url dispatcher
  11. 11. controllers (called views in django; django prefers to call their framework: MTV)
  12. 12. view (template in django)
  13. 13. 2: DO NOT REINVENT THE WHEEL http://www.flickr.com/photos/european_patent_office/3364865051 reuse the stuff that’s readily available
  14. 14. DJANGOSNIPPETS django pluggables for code
  15. 15. google groups for help
  16. 16. do not develop it yourself when it’s already available: ning
  17. 17. wordpress
  18. 18. again frameworks: pinax, framework (combination of apss) on top of django
  19. 19. used pinax for jijmaaktgeschiedenis.nu wanted to add twitter...
  20. 20. someone else had done most of the work for me
  21. 21. hardly had to code myself: just added this; easy
  22. 22. 3: DEVELOPMENT INFRASTRUCTURE & VERSION CONTROL http://www.flickr.com/photos/11397615@N00/3306159672/ different environments in your infrastructure Development, Test, Acceptance, Production In Dutch OTAP: Ontwikkel, Test, Acceptatie, Productie
  23. 23. http://www.flickr.com/photos/parsingphase/3294364709/ version control, e.g. SVN, git, mercurial
  24. 24. blame someone for mistakes! oops, i did it again
  25. 25. let the person who makes mistakes pay for the team’s beers!
  26. 26. 4: AUTOMATE http://www.flickr.com/photos/denis_fox/3537539725/ think about how many repetitive tasks you perform!
  27. 27. this doesn’t look as much work, but i made some faults and have to do this 10 times a day now i can do this with one command!
  28. 28. use shortcuts for repeatable tasks
  29. 29. capistrano (in ruby) e.g. for automating deployment and testing rollbacks when things go wrong
  30. 30. buildout, in python
  31. 31. automation is good for avoiding problems. letting people fool around while sudo’ing is dangerous
  32. 32. e.g. sudo rm -rf oops!
  33. 33. 5: CLEAN CODE http://www.flickr.com/photos/ezu/277341190/ costs some time at first, saves lots of time later
  34. 34. comments
  35. 35. refactor, refactor, refactor no todo’s in code get rid of ugly stuff no hacks to “solve” problems
  36. 36. how many fucks in google code?
  37. 37. DRY http://www.flickr.com/photos/plinton/21543765220 Don’t Repeat Yourself
  38. 38. fat models, skinny controllers
  39. 39. pair programming, code reviews, read other’s code

×