• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 3 fuera de 23 páginas
Examen

SE 3901 Midterm 2 QUESTIONS WITH ANSWERS

Document preview thumbnail
Vista previa 3 fuera de 23 páginas

SE 3901 Midterm 2 QUESTIONS WITH ANSWERS

Vista previa del contenido

CSE 3901: Midterm 2 QUESTIONS
|\ |\ |\ |\ |\




WITH ANSWERS |\




STATIC SITES SECTION|\ |\ |\




What is static site generation? - CORRECT ANSWERS ✔✔Using a
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\


program to produce HTML pages |\ |\ |\ |\ |\




(kind of like compiling programs)
|\ |\ |\ |\




Middleman


what are the source files used in SSG? - CORRECT ANSWERS
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\


✔✔.md
.erb
.scss


What is Middleman? - CORRECT ANSWERS ✔✔A ruby Gem
|\ |\ |\ |\ |\ |\ |\ |\




the project is its own directory
|\ |\ |\ |\ |\




lots of subdirectories for css, images, etc
|\ |\ |\ |\ |\ |\




Compile the source files like a program
|\ |\ |\ |\ |\ |\




can then copy to any location
|\ |\ |\ |\ |\




What are the three benefits of using a program for Static Site
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\


Generation? - CORRECT ANSWERS ✔✔1. Code reuse and single
|\ |\ |\ |\ |\ |\ |\ |\ |\


point of control (visual identity)
|\ |\ |\ |\

,2. Authoring of content in a language that is more human-
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\


friendly (improved syntax) |\ |\




3. Parameterized generation of markup and content (content
|\ |\ |\ |\ |\ |\ |\ |\


generation)


Describe Visual Identity (code reuse/single POC) Motivation -
|\ |\ |\ |\ |\ |\ |\ |\


CORRECT ANSWERS ✔✔-Having common headers and footers
|\ |\ |\ |\ |\ |\ |\


and making the whole website have a base design for every page
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\




-duplicated code ruins single POC |\ |\ |\ |\




-Solution: putting common HTML in one file (a partial) and every
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\


page includes it |\ |\




What is ERb? - CORRECT ANSWERS ✔✔Embedded Ruby
|\ |\ |\ |\ |\ |\ |\




-things like <% code %> <%= expr %> and <%# text %>
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\




How to generate a site - CORRECT ANSWERS ✔✔save source files
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\


as html.erb
|\ |\ |\




>> bundle exec middleman build
|\ |\ |\ |\




this then makes them .html
|\ |\ |\ |\




what is a partial - CORRECT ANSWERS ✔✔a document fragment
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\


included in other documents |\ |\ |\




-include in template as <%= partial "navigation" %>
|\ |\ |\ |\ |\ |\ |\




what is special about naming a partial? - CORRECT ANSWERS
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\


✔✔they always start with _ and end in .erb still (no html)
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\

, How to customize arguments with a partial - CORRECT ANSWERS
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\


✔✔in the normal page when you call the partial:
|\ |\ |\ |\ |\ |\ |\ |\




<%= partial "banner", :locals => { :name => "Syllabus",
|\ |\ |\ |\ |\ |\ |\ |\


:amount => 34 } %>
|\ |\ |\ |\ |\




in the partial file:
|\ |\ |\




<h3> ,%= name %> </h3> |\ |\ |\ |\




<p> Costs <%= "$#{amount}.00" %></p>
|\ |\ |\ |\




What is Layout - CORRECT ANSWERS ✔✔It is a file that can make
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\


a consistent structure across every page in a website
|\ |\ |\ |\ |\ |\ |\ |\ |\




How do you label where there's page specific stuff in Layout.erb?
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\


- CORRECT ANSWERS ✔✔<%= yield =>
|\ |\ |\ |\ |\ |\




How do you fix the issue of using a layout when each page needs
|\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\ |\


a diff <title>? - CORRECT ANSWERS ✔✔Ruby variable
|\ |\ |\ |\ |\ |\ |\ |\ |\


current_page
ie: current_page.path
|\




So in the actual page file you put:
|\ |\ |\ |\ |\ |\ |\ |\




<title><%= current_page.data.title %> </title> |\ |\ |\




and in the layout.erb:
|\ |\ |\




---
title: "Contact Info" |\ |\

Información del documento

Subido en
25 de agosto de 2025
Número de páginas
23
Escrito en
2025/2026
Tipo
Examen
Contiene
Preguntas y respuestas
$20.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
EXAMSTUDYPLUG
4.5
(242)
Vendido
386
Seguidores
107
Artículos
20954
Última venta
1 día hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes