Presentation is loading. Please wait.

Presentation is loading. Please wait.

URails Meeting 001. HTTP Old/Young guys with beards decided “We need to communicate. Let’s use text!” Hypertext Transfer Protocol HTTP is just sending.

Similar presentations


Presentation on theme: "URails Meeting 001. HTTP Old/Young guys with beards decided “We need to communicate. Let’s use text!” Hypertext Transfer Protocol HTTP is just sending."— Presentation transcript:

1 URails Meeting 001

2 HTTP Old/Young guys with beards decided “We need to communicate. Let’s use text!” Hypertext Transfer Protocol HTTP is just sending and receiving text from a server You don’t even need a browser, you just need to follow the protocol! (curl example)

3 Server Client (Such as a web browser) Client (Such as a web browser) “Hey, I want to see www.kewl.com” “Here you go” GET / HTTP/1.1 Host: kewl.com Connection: close User-Agent: my-browser Accept-Encoding: gzip Accept-Charset: ISO-8859-1,UTF- 8;q=0.7,*;q=0.7 Cache-Control: no-cache This is my Kewl website! HTTP Header ---->  Response

4 What do HTTP servers send back? HTML? – YES! Anything it wants? – YES! Most commonly, HTML is sent for viewing webpages, but other formats are used like XML, JSON, ANY-THING

5 What is HTML “Pretty text with formatting” How does it work? <- closing tag – Hierarchical representation of data (Tree anyone?) And… that’s it (basically) Demo time!

6 It isn’t enough! Dynamic vs. Static? What if we want content on a webpage to change without humans editing HTML? Time Example What’s happening? – The web server, when it receives a request for a website, replaces “dynamic” content with plain text/html before sending it to the client

7 Server Client (Such as a web browser) Client (Such as a web browser) “Hey, I want to see www.kewl.com” “Here you go” GET / HTTP/1.1 Host: kewl.com Connection: close User-Agent: my-browser Accept-Encoding: gzip Accept-Charset: ISO-8859-1,UTF- 8;q=0.7,*;q=0.7 Cache-Control: no-cache This is my Kewl website! 2011-07-14 replaced with 2011-07-14

8 Databases What are they and why are they important? – They help keep large amounts of data organized, easily accessible, and (hopefully) safe from corruption – We will talk more about Databases in later lectures

9 Server Client (Such as a web browser) Client (Such as a web browser) Database Safely stores all data related to a website Gets data from database, mixes it with HTML, sends it to the client (often referred to as “Business Logic”) Receives HTML, and presents it prettily to the user

10 What types of websites use this model? Almost all of them (at least any worth using) Facebook/Engadget/Twitter/Hulu/ESPN/etc. How do you think Facebooks uses databases?

11 So Why Ruby on Rails? The Web is the Wild-Wild-West of programming. It’s a hodge-podge of different technologies that have to work together What is involved in building a webpage? – HTML – Javascript – CSS – Databases – Security – Managing sessions – Etc… Bottom line: It can get complicated

12 So why Ruby on Rails? (cont.) Ruby is a sweet language (more on that in later lectures) Rails is a “framework” that provides an excellent way to abstract away and organize the complexity of building dynamic websites Define “framework”? (this phrase is used a lot in CS) Let’s see an example! (Get ready for an overload) – After we look at MVC

13 Server Client (Such as a web browser) Client (Such as a web browser) Database Safely stores all data related to a website Gets specific data from database, mixes it with HTML, sends it to the client (often referred to as “Business Logic”) Receives HTML, and presents it prettily to the user MVC (M)odel (C)ontroller (V)iew

14 Thing we’ll be covering Linux command-line/filesystem Source Code Version Control (SVN/Git) HTML/CSS/Javascript Relational Databases MVC HTTP “Statelessness” of HTTP (sessions, cookies)

15 What to expect Rails is command-line intensive (which is good to learn now rather than later) You will need to run Linux – Options for Windows users Dual Boot (run both windows and linux and choose which to use when your computer boots) Run Linux in a Virtual Machine (free software exists for this) Run Cygwin, which emulates a Linux command-line (similar to a Virtual Machine but less demanding on your computer) Choose one Next Lecture: How to install Cygwin/Linux, Ruby, Rails, some command-line practice, and some more Rails in action if we have time.

16 Why this club will be worth it Rails is a very valuable/employable skill to have The world is moving toward the web, so even if you don’t prefer it, you need to know how to get around if you need to The Rails environment, outside of the web, provides an excellent environment to learn essential skills like getting around at a command- line, version control for source code, and collaborating on non-school projects (rare to find here at the U) Rails is the cool thing to do.

17 If we have time… Where would you like to go from here? Do people have pet projects they already know they want to work on? For those that don’t, are you interested in having a “group” project that we work on together, both during meetings and individually? If not, are there other suggestions?

18 That’s it! Questions?


Download ppt "URails Meeting 001. HTTP Old/Young guys with beards decided “We need to communicate. Let’s use text!” Hypertext Transfer Protocol HTTP is just sending."

Similar presentations


Ads by Google