You are on page 1of 3

Technologies - 2/3 sentence discription

JQuery
A JavaScript library primarily for client-side HTML manipulation. Enable
s easy HMTL prepending, appending, CSS manipulation, event listening, and more.
HAML
An HTML templating language. In Rails it is an alternative to ERB to des
cribe HTML contents with dynamic content. Useful in rails views.
Bootstrap
HTML/CSS/JS framework to quickly start up a web site. Dynamic, mobile fi
rst. Offers preset stylized html elements, CSS themes, JS animations, etc. Usefu
l for getting a reasonable looking website quickly.
Flexboxes
A CSS3 layout model that uses elements that will resize them selves base
d on the viewing size of the browser or device. Consists of "Flex containers", "
flex items", "axes", and more.
Backbone.js
A lightweight, RESTful JSON JavaScript framework primarily for single pa
ge web applications in the Model-View-Presenter paradigm.
SASS
Syntactically Awesome StyleSheets. Stylesheet/scripting language that ex
tends CSS3 with basic programming functionality.
Ruby
JavaScript
Testing
Levels
Unit
Integration
System
process to increase confidence in implementation by observing behavior
proves presence, not absence of mistakes
idea is too vague, need specification. Implementation is then tested against
specification.
Security
Goals
Confidentiality: authorize access
Integrity: valid, untampered data
Availability: no down-time
Authenticity: verify users
Non-repudiation: proof of party participation in transactions
Methods of attack
people "social engineering"
software "exploits"
channel "man-in-the-middle"
Encryption
encrypt/decrypt data using shared key
Encryption Function
create one good encryption function that relies on parameter
One-Time Pad
random sequence of encryption ciphers to be used on data

Problems: pad is long and can't be reused


Solution: use pseudo-random sequence generated from seed (key)
Public Key Encryption
Algorithm for Encrypt (E) and Decrypt (D) known by all
Person picks key (seed) for both
E_key is public: anyone can encrypt a message using my key
D_key is private: only I can decrypt a message that was meant for me to
read
Encrypt/Decrypt are same: (m^k) mod n
Key is a pair (k,n)
D(m) = (m^d) mod n
E(m) = (m^k) mod n
Choosing keys
Choose 2 large prime numbers: p and q
n = pq
pick any d relatively prime to (p-1)(q-1)
find an e s.t. e*d = 1 mod (p-1)(q-1)
Unicode and UTF-8
Glyphs vs. Characters
one character can have many glyphs: e, E, ... italics, etc.
one glyph can be different characters: A = Latin A & Greek Alpha
character can be made of multiple glyphs: ,
Security issue: character can look same but be different glyph
Unicode
each character is assigned unique code point:
integer value
also assigned name
Convention
write code points as U+hex
ex: U+006D
current version 7.0
113,000+ code points
123 scripts

REST/Rails/HTTP
Routes (all 7)
METHOD
index
create
new
show
edit
update
destroy

HTTP Verb
GET
POST
GET
GET
GET
PUT
DELETE

STANDARD
create
read
update
destroy

Justifications for extra methods


index: show but for collections
new: create combined with show
edit: step before update that uses database information to fill form
Model

Class that represents tables in the database


Controller
Ruby class that extends ApplicationController
contains action methods
$ rails generate controller ModelName ActionName ActionName2
results in route, ModelNameController, ActionName and ActionName2 de
fined in ModelNameController
Layouts
Overall structure of HTML page. Controllers often load templates into th
e layout as an action.
Contain sitewide elements, styling
Render/Redirect
Actions must render or redirect (or use Ajax) to manipulate what the use
r sees
render will construct an HTTP response
redirect will send an HTTP redirect that will result in the router handl
ing what the user sees next. Useful for transfering control flow to new controll
er.
View
File that is contstructed into an HTML page
Partials
blob of ERb that can be inserted into a view
useful for things like sidebars that will be on most pages
<%= render 'view_folder/partial_name' %>

You might also like