Introduction to MySQL

On top of my Cloud track to TEC 20ii I’m doing two of the LAMP track sessions.  Here are the slides for my introduction to MySQL:

Introduction to MySQL

If you’re new to SQL this might be useful to you.  My other LAMP track session is on PHP security.  I should have those slides up tomorrow.

Advertisements

Overview of Cloud Services

Here are the slides from my first talk at TEC 20ii which introduces the Cloud Programming technology track.  If you’re still trying to figure out what the heck this “Cloud” thing is then this might help:

Overview of Cloud Services

As always, feel free to provide feedback in the comments section if you have any suggestions or corrections.

Cloud Programming: JavaScript Applications

JavaScript Applications under the banner of Cloud?  Maybe a stretch, but I’ve included a session on this topic in my cloud track at TEC 20ii.  I think JavaScript application development belongs in the world of cloud computing for two reasons.  JavaScript can offload work from the server to the client, and because you can create applications which maintain their state you can reduce the number of HTTP requests, and the size of each request.  On top of that, ubiquitous access is part of many “What is the Cloud” definitions, and the most supported language for developing mobile applications with HTML 5.

With that in mind, here are my slides from my talk on JavaScript at TEC20ii:

Cloud Programming: JavaScript Applications

If you’re following along, here are links the the source referenced in the slides:

nc.html
nc.css
nc.js

Cloud Programming: Introduction to Node.js

Out of all the technologies I’ve been looking at for “what’s next”, Nodejs is the one I’m most excited about. Only a few months ago I was guessing that Node.js would be ready for prime time in about three years. I was figuring on another year for stability and security issues to settle down, another year for the API’s and libraries to be in good shape, and one more year for the technology to prove itself in real world scenarios. It may not be 100% ready for every problem but its a lot further along than I had imagined in such a short time.

I attended a recent TechTalksTO event where James Duncan from Joyent spoke about their use of node.js.  He said that Joyent is already using node.js in production extensively, and happily.  Joyent also provides free node.js hosting for developers who want to get their feet wet without setting up a server.

Here are my slides for the Introduction to Node.js talk at TEC 20ii:

Cloud Programming: Introduction to Node.js

If you’re following along, here are links to the source code:

chat.js
index.html

Cloud Programming: Introduction to CouchDB

CouchDB is my personal favorite of the new breed of “NoSQL” databases.  Here are my slides for my CouchDB presentation at the TEC 20ii conference:

Cloud Programming: CouchDB

If you’re following along you might want to copy and paste from these examples:

Our First Design Document’s Stub:

{ "people": { "map": "function(doc) {}" } }

Our First View:

function (doc) {
if (doc.name) {
emit(doc.name, doc._rev);
}
}

Our Second View’s Stub: (pasted into the design document; slide 48)

"parties": { "map": "function(doc) {}" }

Our Second View:

function (doc) {
if (doc.party) {
emit(doc.party, 1);
}
}

Our First Reduce Function:

function (key, values, rereduce) {
return sum (values);
}

Cloud Programming: Introduction to Google App Engine

As part of my “Cloud Programming” track at TEC 20ii I’m presenting an introduction to Google App Engine.  I’ll be making any updates / corrections to the Google Presentation here:

Introduction to Google App Engine

These slides cover installing Google App Engine on Windows and writing your first application.  It includes a very simple introduction to the datastore.

Warning:  Don’t build a hit counter this way – this is just a simple way to introduce App Engine, but should not be used in production.  Counting records is a slow operation in distributed databases, and this will actually read each record to get the count.  There are better but more complicated ways to do this.

app.yaml:

application: myfirstapp
version: 1
runtime: python
api_version: 1

handlers:
– url: .*
script: main.py

main.py snippet (broken):

class MainHandler(webapp.RequestHandler):
def get(self):
hit = HitInfo(useragent = self.request.headers['User-Agent'])
hit.put()
hits = HitInfo.all().count()
self.response.out.write('Hello number '+hits)

main.py snippet (corrected):

class MainHandler(webapp.RequestHandler):
def get(self):
hit = HitInfo(useragent = self.request.headers['User-Agent'])
hit.put()
hits = HitInfo.all().count()
self.response.out.write('Hello number '+str(hits))

Creating Views in CouchDB Futon

CouchDBI’ve been playing with CouchDB which is a “NoSQL” non-relational database server designed specifically for web development.  There are a lot of things I really like about it.  One of those is the integrated web user interface called Futon.  I was trying to create views but the only really obvious way I found was to use a command line tool called CouchApp.  CouchApp is great for building web apps on CouchDB but is really overkill when you want to just try some things in Futon.  Read on for more details on creating design documents from Futon. Read more…