CS 142 Lecture Notes: Rails Controllers and Views

Slides:



Advertisements
Similar presentations
CS 142 Lecture Notes: FormsSlide 1 Simple Form Product: Price:
Advertisements

CS 142 Lecture Notes: Rails Controllers and ViewsSlide 1 Simple Rails Template
CS 142 Lecture Notes: HTMLSlide 1 Introduction This article is a review of the book Dietary Preferences of Penguins, by Alice Jones and Bill Smith. Jones.
XHTML II DIGITAL MEDIA: COMMUNICATION AND DESIGN F2007.
CS 142 Lecture Notes: HTMLSlide 1 Introduction There are several good reasons for taking CS142: Web Applications: ● You will learn a variety of interesting.
F DIGITAL MEDIA: COMMUNICATION AND DESIGN INTRODUCTION TO XML AND XHTML.
 XHTML is aimed to replace HTML  XHTML is almost identical to HTML 4.01  XHTML is a stricter and cleaner version of HTML  XHTML is HTML defined as.
XHTML and Forms Review – Page 1CSCI 2910 – Client/Server-Side Programming CSCI 2910 Client/Server-Side Programming Topic: Review XHTML and Forms.
XHTML Instructor: Charles Moen CSCI/CINF XHTML  A stricter version of HTML  Extensible HTML  The XHTML specification is maintained by the World.
Frames in XHTML Please use speaker notes for additional information!
Lesson 4.
IT Engineering I Instructor: Rezvan Shiravi
Assignment 2 Creating WEB Page ITC105 MD. Shihab Uddin Imam
Images and Tables ables.asp.
CIS 375—Web App Dev II JavaScript I. 2 Introduction to DTD JavaScript is a scripting language developed by ________. A scripting language is a lightweight.
CIS 228 The Internet 9/20/11 XHTML 1.0. “Quirks” Mode Today, all browsers support standards Compliant pages are displayed similarly There are multiple.
© 2016 Pearson Education, Inc., Hoboken, NJ. All rights reserved.
What is XHTML? XHTML stands for Extensible Hypertext Markup Language
CSE 102 Introduction to Web Design and Programming
CSE 102 Introduction to Web Design and Programming
RDF and RDB 2 D2RQ.
CSE 102 Introduction to Web Design and Programming
CIS 228 The Internet 9/20/11 XHTML 1.0.
JavaScript: Control Structures I
CSE 102 Introduction to Web Design and Programming
CSE 102 Introduction to Web Design and Programming
Introduction to PHP FdSc Module 109 Server side scripting and
RDF and RDB 2 D2RQ.
You and your (DNA) parasites
Chapter 44 JavaServer Face
XHTML Basics.
What is XHTML?.
Web Development & Design Foundations with HTML5 8th Edition
Using the Internet to publish data and applications
XHTML 1 by Carsomyr.
CSE 102 Introduction to Web Design and Programming
Introduction to HTML5.
XHTML Basics.
XHTML
XHTML Basics.
HTML A brief introduction HTML.
The Internet Day 8, 9/22 Review HFHTML ch 1 - 7
JavaScript: Arrays.
Chapter 8 - JavaScript: Control Structures I
Introduction There are several good reasons for taking CS142: Web Applications: You will learn a variety of interesting concepts. It may inspire you to.
JavaScript: Functions
Instructor: Charles Moen
Stylin’ with CSS.
Your Page and Review Objectives
Note that iframes are available in HTML5.
Chapter 39 JavaServer Face
CS 142 Lecture Notes: Rails Controllers and Views
LESSON 1 Module 2: XHTML Basics Basic XHTML.
XHTML Basics.
CSCI 2910 Client/Server-Side Programming
Introduction to HTML5.
RDF and RDB 2 D2RQ.
Chapter 7 - JavaScript: Introduction to Scripting
Creating a Basic Web Page
XHTML Basics.
You and your (DNA) parasites
XHTML 7-May-19.
XHTML Basics.
Introduction to HTML5.
XHTML 29-May-19.
محمد احمدی نیا XHTML محمد احمدی نیا
Chapter 8 - JavaScript: Control Structures I
Web Design & Development
Your Page and Review.
Creating Web Documents
Presentation transcript:

CS 142 Lecture Notes: Rails Controllers and Views Simple Rails Template <?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Hello, User</title> </head> <body> <p> This page was fetched at <%= Time.now() %> </p> </body> </html> CS 142 Lecture Notes: Rails Controllers and Views

Control Structures in Templates ?xml version="1.0" encoding="utf-8"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Rails Parameters</title> </head> <body> <p> The <code>params</code> hash contains the following values: </p> <% params.each do |key, value| %> <p><%= key %>: <%= value %></p> <% end %> </body> </ht CS 142 Lecture Notes: Rails Controllers and Views

CS 142 Lecture Notes: Rails Controllers and Views

CS 142 Lecture Notes: Rails Controllers and Views Templates printf("The capital of %s is %s\n", state, capital); vs. print("The capital of); print(state); print(" is "); print(capital); print("\n"); CS 142 Lecture Notes: Rails Controllers and Views