Friday, January 21, 2011

App Engine: Getting Started

On Monday I will be showing you how to write a simple app engine app. All the documentation for the app engine can be found here. Go there and browse around.

You will also want to get going and download and install the Google app engine SDK. You might also want to download the eclipse plugin, which I use for my own development (and you will see me using in class). In lecture I will be following the getting started tutorials.

Below is the short intro video that Google provides, to get you started.

And, this is a good video of a talk by Guido van Rossum on the App Engine. It gives a bigger picture of what it does and how it works. He gives a nice overview of all the APIs the app engine provides. We will be going over these in more detail later on in class, as we learn to use them.

Wednesday, January 19, 2011

Learning Python Videos

On Friday I will be going over Python basics in class. I highly recommend that you dig deeper by reading the recommended Python book and watching the Google's Python class videos. The first one of which is embedded below. The first 3 videos (day 1, parts 1,2,3) cover most of what you will need. Note that since the app engine does not let us read/write files you can skip that part.

You will need to install the google app engine eclipse plugin which (if I remember correctly) will also install the pydev plugin for eclipse automatically. You might also need to install python itself, if you don't already have it.

Monday, January 17, 2011

A Short History of the Web

Below is presentation I used the first day in class. There is more stuff I would like to put in there but, I don't know how to organize it so it makes sense.

Sunday, January 16, 2011

Facebook Will be Replaced by a Protocol

Friday we talked about how everyone used to be online, at AOL, until Tim created the web kept the protocols open and the whole world followed. That is, AOL was replaced by HTTP. The same thing happened a decade earlier when email was a product, sold by different vendors, each one incompatible with the others (that is, you could not send email from one to the others). Then, slowly but surely, all those companies disappeared as everyone moved to SMTP.

Right now, Facebook is in the same position AOL was 20 years ago. It has a closed system and tons of users. Inevitably, people will grow tired of the lock-in and a social-network protocol will take over (maybe, opensocial? I don't know, it seems over-complicated to me). After that, you will be able to "friend" or "follow" anyone in the Internet, regardless of which social app they use, just like you can email anyone regardless of which mail reader they use.

And, that, is just my opinion. Dvorak has similar complaints, but he is just another old curmudgeon, like me. Tim Berners-Lee is very concerned, and rightly so, that we should prefer open standards over giving all our data to one company who does not let others access it. What do you think?

Friday, January 14, 2011

Are There Jobs in Web Applications Development?

Yes, but, Why? I think because:

  1. Many of the fastest-growing technology companies (facebook, twitter, google, salesforce, and tons of other small companies) are web application companies.
  2. Old technology companies like Microsoft, IBM, SAP, and Oracle are "moving to the cloud", which means they are moving many of their applications from the desktop to the web.
  3. Many other regular companies (banks, insurance companies, etc.) are converting their old desktop-based (Visual Basic) software to web applications because of demand from their clients and employees. Others are keeping the old apps but making all the new apps as web apps.
  4. The iphone and android devices are largely used as communication devices (yelp, facebook app, evernote, etc.) that talk to a web application. Well, that, and as really expensive and really annoying to use Nintendo DSs.

One data point is stackoverflow's recent survey which showed that 40% of stackoverflow users describe themselves as Web Application Developer (question 7). That is a huge number. I think its a bit inflated due to self-selection bias (web app developers are more likely to read the blog).

HW1: HTTP and Firebug

The goal of this homework is to show that you understand how HTTP works and how to use firebug/chrome/etc. to see and understand everything that is happening as a web page loads.

First, install firebug in or browser, or use chrome. Then use it to answer the following questions:

  1. What server is used by www.sc.edu?
  2. How many GET calls are required to show that one page?
  3. Are they using jquery? google analytics? list all the 3rd-party libraries they use.
  4. How many cookies are being used? what are their keys?
  5. What us the full path name of the facebook image (the little F) that appears at the bottom of the page?

You will turn in this homework by writing all your answers in a text file. When you are done upload it to i-am-done.appspot.com/242/HW1. This homework is due on Friday January 21 @ 11am. Please note that simply doing the homework is not enough to learn everything you need to know. You will also need to do the required reading (below) and play with firebug to make sure you understand what it is doing.

Required Reading

Recommended Reading

  • You can view this rather long but interesting interview with Tim Berners-Lee about his life and the early days of the web.
  • Read URL Design: a short post on how to design your URL space. You will need to know about URL design when we start building our web app in a couple of weeks.

Wednesday, January 12, 2011

Recommended Reading

Below is a set of books that cover the topics we will be covering in this class. I have read these and like them, especially Javascript: The Good Parts. You should either have a copy of each one or a similar book/website you plan to use as reference.

While programming, I like to use gotapi.com as a reference.

Sunday, December 26, 2010

Grading

The class grade will be based on the, almost weekly, individual programming homeworks. Each one of the N homeworks will be worth 1/N of your final grade.

There will also be several challenge rounds. These will be one-on-one meetings in my office where you will answer questions about the homework you submitted and the material it covered. The goal is simply to ascertain whether or not you did the homework. So the questions will be easy, if you did the homework, but impossible otherwise. If you answer correctly then you get to keep the grade you earned in the homework. Incorrect answers will result in severe penalties, up to and including failing the class.

I will post in this blog the names of the students whose turn it is to take the challenge and the date. I expect each student will answer three challenges in the semester.

Grading Rubric for Programs

Trait Exceptional Acceptable Amateur Unsatisfactory
Specifications The program works and meets all of the specifications. The program works and produces the correct results and displays them correctly. It also meets most of the other specifications. The program produces some correct results but fails at others. The program is producing incorrect results.
Readability The code is exceptionally well organized and very easy to follow. The code is fairly easy to read. The code is readable only by someone who knows what it is supposed to be doing. The code is poorly organized and very difficult to read.
Reusability The code could be reused as a whole or each routine could be reused. Most of the code could be reused in other programs. Some parts of the code could be reused in other programs. The code is not organized for reusability.
Documentation The documentation is well written and clearly explains what the code is accomplishing and how. The documentation consists of embedded comment and some simple header documentation that is somewhat useful in understanding the code. The documentation is simply comments embedded in the code with some simple header comments separating routines. The documentation is simply comments embedded in the code and does not help the reader understand the code.
Delivery The program was delivered on time. The program was delivered within a week of the due date. The code was within 2 weeks of the due date. The code was more than 2 weeks overdue.
Efficiency The code is extremely efficient without sacrificing readability and understanding. The code is fairly efficient without sacrificing readability and understanding. The code is brute force and unnecessarily long. The code is huge and appears to be patched together.

The grade for each each program will mostly (80%) consist of meeting the specifications and the rest will be divided roughly evenly between readability, reusability, documentation, and efficiency. If a homework is late by less than 1 hour it will get 5% off, if less than 1 week then the penalty is 30% off, if less than 2 weeks its 50% off, if more than 2 weeks then it gets 0.

About

Instructor: José M. Vidal
   Homepage: http://jmvidal.cse.sc.edu
   Office: SWGN 3A51
Class Homepage: http://www.csce242.com
Meeting Time: MWF 11:15--12:05pm. Swearingen 2A27.
Textbook: Recommended books as well as gotapi.com.

This class will cover the development of web applications. We cover all the basic technologies necessary for building web applications as well as new technologies and trends which will used by web application developers in the next decade.

This is an introductory class and no previous knowledge of web technologies is assumed. However, I will assume that you can program, at the level of a good CSCE 145 graduate. See the list of topics covered for more details.

We will only meet on the classroom on Mondays and Wednesdays (if that). Fridays I will be available in the lab to answer questions.

Schedule and Topics

I hope to cover all the technologies you need to build a modern web application. We will be using the google app engine as our platform (the Python one, but you can use the Java version if you want). Time permitting, I would also like have you build a simple LAMP (Linux + Apache + mysql + PHP) app and deploy it on Amazon's EC2.

Below are the topics we will cover in, roughly, the order I plan to cover them:

  1. Web history: HTTP, firebug
  2. Google app engine. Python. HTML
  3. App engine datastore: a noSQL datastore.
  4. Django templates. CSS
  5. JavaScript: the language. Functional programming. Prototype inheritance.
  6. JavaScript and the DOM. jQuery.
  7. App engine memcache.
  8. HTML5: localStorage. jQuery for iPhone.
  9. Canvas. SVG
  10. App engine XMPP
  11. REST
  12. Mashups: facebook, delicious, flickr...
  13. Another way: LAMP on EC2