So what happened is our looks something like this. I left off the other attribute–it’s no big deal; our variable (month) gets substituted into the string. So if: month=”November”, the string, “November” renders and we get a text box that looks like this–which is what we’d expect. But if (month)
We’re going to make this change to the app we’ve been working on, and we’ve got to do two things. We need to make a thanks handler. We need to add the thanks URL, and we need to redirect to the thanks URL. Okay, let’s go ahead and do these.
Okay–so, cool. Let’s try this out in practice. So here we are in our Editor–here’s our form HTML. We’re going to have to edit this to make it a little bit more complex. And I want to put in a few new lines as well to make it a little
The correct answer is consistency. We’ve gotten our database system–this whole group of machines here– operating in a state that is inconsistent. The master has one view of the world, and the slave has a different view of the world. And we may have inserted some item into here, and
I want to talk for a moment about how to scale databases. Now, like databases themselves, this is a very broad topic, but there’s a couple concepts I’d like to introduce because they’re going to affect us in this class. There’s two reasons you might need to scale a database.
Caching refers to storing the result of an operation so that future request return faster. Basically, if you do something once you know whether it’s a database query or rendering some HTML or you know, anything that might be slow. You store the results so you don’t have to do
Okay, one last function to write. This is to determine if what the user entered for the year is valid.
Okay, time for a quiz. What I’d like you to do is write a function that, given input from the user, returns whether or not it is a valid month.
The answer is: it’s after the HTTP request headers. Let me show you how to find that out. So first we’ll go to our Editor and we’ll switch these lines around again so we can see the actual request. So I comment these two guys out, and I uncomment these
Next, I’d like you to write a function that, given what the user types in for the day, returns whether that day is valid or not.