[MAS s60] Web Development BasicsPresentation Transcript
MAS-s60Intro To Web Development Rahul Bhargava 11/28/12
2. MVC dominates the Web• fat Model represents the data – Database access + “business logic” – (sometimes) tells view when data changes• skinny Controller is glue – Parse user input, gather data, clean and pass to view• lightweight View is the UI – HTML + inline code – Put re-used code in helper libraries
3. Microframeworks• Positives – Easier learning curves • Not many assumptions to learn • Not many commands to understand – Get results quickly • Real web app in just a few lines of code• Negatives – Only do a few things out of the box (need libraries to do more) – Don’t scale well with features
3. Microframework: Flask• Dependencies – Python (I still recommend v2.7) – Python Setup Tools• Install – > pip install flask – Or – > easy_install flask• Quickstart – demo
4. Frameworks• Positives – Lots of simplifying assumptions – Built for production environments – More basics built-in (db, email, etc)• Negatives – Opaque • Takes a while to learn common patterns – Annoying if you don’t do things “right”
4. Framework: Rails• Dependencies – Ruby (use RVM to install) – RubyGems• Install – > gem install rails• Quickstart – Demo• Install Aptana’s RadRails to get started quickly!
6. CSS• Learn in-situ with browser console• Demo• Lots of frameworks to help – Bootstrap CSS – 960.js• Abstractions: SCSS / LESS
7. Tangent: Package Managers• Package Managers – Brew for OSX – Npm for nodejs – Gem for rails – Pip/easy_install for python – Apt-get/aptitude for Ubuntu – App Store for Mac/iOS – Etc.
7. Tangent: Things We’ve Named http://www.flickr.com/photos/revcyborg/22883042/ Erik Witzer80/20 Inc. Wikipedia Eric Ries
8. Strategies• Multilingualism? or “One language to rule them all”• Prototype? Product?• Opinionated? Agnostic?
Homework Options• Modify one of the examples – Add history to the backbone-js example – Show more stories on the rails example – Build a better mobile UI• Build a tiny web app for the Glass infrastructure• Build this silly app in another framework