Web
Programming

Fall 2012
course
navigation

Oct 23

Further discussion of SQL and ORM.
1. Discuss homework.
2. Discuss Sam's SqlAlchemy example based on the invoice schema on http://csmarlboro.org/sqlite/
3. Discuss Jim's exploration of SqlSoup (a "do the right thing" ORM layer on top of SqlAlchemy) at http://csmarlboro.org/mahoney/sqldemos/planet_express/
Aside: When using an ORM (and Sam's and Jim's examples both have some of this) it can be very easy and tempting to do things in the higher language that can be done much faster in SQL. For a trivial example, imagine finding person=Jim by asking SQL for *all* the records, then looping in python looking for Jim. Very inefficient, and missing the point of using a database engine. However, deciding which tasks need to go fast and run entirely within the SQL engine and which logic should be outside in the python isn't always a clear choice.
4. Depending on time, talk about web hosting & configuring MySQL in the wild.
5. Continue discussion of larger concepts around web frameworks : MVC, CRUD, REST, and URL considerations.
6. Talk about LAMP & PHP ? Do we want to spend time on this?

python aside

If interest and/or need, go over some python syntax, particularly

coming soon

Starting to read this documentation would be a good idea :
http://flask.pocoo.org/
http://cs.marlboro.edu/ courses/ fall2012/web/ notes/ Oct_23
last modified Thursday October 25 2012 1:21 pm EDT