• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 3 out of 23 pages
Exam (elaborations)

SE 3901 Midterm 2 QUESTIONS WITH ANSWERS

Document preview thumbnail
Preview 3 out of 23 pages

SE 3901 Midterm 2 QUESTIONS WITH ANSWERS

Content preview

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" |\ |\

Document information

Uploaded on
August 25, 2025
Number of pages
23
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
$20.99

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
EXAMSTUDYPLUG
4.5
(242)
Sold
386
Followers
107
Items
20954
Last sold
1 day ago



Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions