I forgot to mention before that I looked at the example where multiple routes are used
I think it's cool how whatever you put in, it will replace "{{name}}" but if nothing is put in it will put stranger. I just don't quite understand the code because I don't understand why it defaults to stranger but is somehow overwritten if a different route is put in and I also don't see why you need the "name=name" part.
I also looked at a login form which talked about Get requests and Post requests which seems kind of complicated and an Error request which seems pretty simple.
Tuesday, December 23, 2014
Friday, December 19, 2014
Bottle
On Thursday and Friday I was working on more bottle. I didn't make a lot of progress at first because it just looked weird to me for some reason but now I think I understand it. I know the difference between dynamic and static routes now and I just started reading about filters which don't seem too complicated. The only filter I don't understand is the ":re" but the rest seem simple, like ":int" which I assume only allows a route to be a number.
Wednesday, December 17, 2014
SQL Query Review
For future reference, the way sqlite reads an sql file is with ".read". In this case I used ".read moviedb.sql" and then ".read moviedbinsert.sql" for the data. I reviewed sql queries and I messed around with selecting certain data.
SELECT Fname, Likes.PersonID, Title, Likes.MovieID FROM Person, Likes, Movies WHERE Fname = "Rusty" AND Person.PersonID = Likes.PersonID AND Movies.MovieID = Likes.MovieID;
Like this would only show the person's first name, then their ID, and the title and ID of
the movie they like. You can try more complicated things with a lot of data using "or" or the "like"
statement which finds data restricted to certain letters or greater than or less than a certain
number.
SELECT Fname, Likes.PersonID, Title, Likes.MovieID
FROM Person, Likes, Movies
WHERE Lname LIKE "%o"
AND Person.PersonID = Likes.PersonID
AND Movies.MovieID = Likes.MovieID;
This displayed a person's first name, their ID, along with the name and ID of the movie they
liked but it sorted it by last names only ending in "o".
I think I understand SQL pretty well again, I think I just need to learn how to apply it better though,
like when using it for a form.
SQL Review
I started reviewing and it's all pretty easy to understand except for a few things I had to review like "referencing". I kind of forgot how to import the files though and I don't think I ever documented that so I have to figure that out...
Movie Database
Movie Database Data
Movie Database
- This file is for the actual creation of the database
- Primary keys are unique values
- When a value is referenced it is simply a value being supplied from another table
Movie Database Data
- This was the actual data for the database, it's all very straightforward
Tuesday, December 16, 2014
Bottle
I set up bottle and I started reading the tutorial. I made the Hello World example which you saw on Jack's computer. I kept rereading a lot of the tutorial, like I didn't understand what routes are. I kind of understand some of the concepts but a lot of it I don't fully get.
Friday, December 12, 2014
Media Queries
On Thursday and Friday I worked on media queries which turned out to be more annoying than expected. On Friday, Sam found out that my style was not being applied even without the media query which is obviously a problem. I applied a text color to <h1> which is what I should of done in the beginning. I don't know why the background color was not changing though but I should be able to do more with the media queries now. Anyway, right now the list is set to green all the time and black when the device width is more than 480px but I also got orientation working so that when the phone is landscape the text changes to pink.
Wednesday, December 10, 2014
Responsive Layout
There are multiple ways to implement responsive layout but it seems like the best way is through media queries like you mentioned. I read about them on w3schools and jquerymobile. I didn't realize that you could also make portrait and landscape modes for a web page. I don't really know how to use media queries to change a web page from a desktop site to a mobile site though. I'll try to apply it anyway, like adding a navbar or even just changing the background color depending on the screen size.
Subscribe to:
Posts (Atom)
