<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=IlyA</id>
	<title>Soma-notes - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://homeostasis.scs.carleton.ca/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=IlyA"/>
	<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php/Special:Contributions/IlyA"/>
	<updated>2026-05-14T03:00:46Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.42.1</generator>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2014W_Lecture_6&amp;diff=18495</id>
		<title>WebFund 2014W Lecture 6</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2014W_Lecture_6&amp;diff=18495"/>
		<updated>2014-01-24T22:40:09Z</updated>

		<summary type="html">&lt;p&gt;IlyA: Lecture 6 Notes&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;•	Client-server&lt;br /&gt;
 o	Key distinction: Which ports they communicate on&lt;br /&gt;
 o	Web server means &amp;quot;I have a port listening on port 80&amp;quot;&lt;br /&gt;
•	TCP/IP&lt;br /&gt;
 o	Port number: Identifies programs, 16 bit&lt;br /&gt;
•	DNS&lt;br /&gt;
 o	Translating host-names to IP address&lt;br /&gt;
 o	When typing in an address, browser needs to do a DNS lookup to translate it to an IP address&lt;br /&gt;
•	HTTP&lt;br /&gt;
 o	Modern browsers assume everything starts with &amp;quot;http://&amp;quot;&lt;br /&gt;
•	HTML&lt;br /&gt;
&lt;br /&gt;
•	URL: Uniform Resource Locator&lt;br /&gt;
 o	Components&lt;br /&gt;
    	  Name of the server you wish to contact&lt;br /&gt;
    	  Resource you&#039;re requesting&lt;br /&gt;
•	Server: A &amp;quot;box&amp;quot; to serve and deal with requests&lt;br /&gt;
•	Internet: A network of other local networks, connecting them to each other&lt;br /&gt;
•	Packets: 1500 bytes, switched networks, how computers send information to each other over a network&lt;br /&gt;
 o	Packet loss: When you&#039;re on a connection that loses too many packets, TCP cannot provide the illusion that you&#039;re on a continuous data stream&lt;br /&gt;
•	IP address: source and destination both have one&lt;br /&gt;
 o	Can ping computers to find out their IP addresses and find the IP address of a server serving a webpage&lt;br /&gt;
 o	Identifies the computer to talk to&lt;br /&gt;
•	When you&#039;re writing a web server, you&#039;re just writing a program that&#039;s running on a different port, and talking through TCP/IP&lt;br /&gt;
•	express: a framework&lt;br /&gt;
 o	Difference between framework and middleware: Middleware is code that you can use; a framework is a way to organize your code, that may use middleware&lt;br /&gt;
•	require: importing code from a directory to save time, instead of writing it yourself&lt;br /&gt;
 o	Looks for the file that was input as a parameter&lt;br /&gt;
•	var user refers to ./routers/user, but it&#039;s not used so it doesn&#039;t do anything&lt;br /&gt;
•	Web servers have infinite loops, in order to wait for events to come in so that they may handle it&lt;/div&gt;</summary>
		<author><name>IlyA</name></author>
	</entry>
	<entry>
		<id>https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2014W_Lecture_4&amp;diff=18451</id>
		<title>WebFund 2014W Lecture 4</title>
		<link rel="alternate" type="text/html" href="https://homeostasis.scs.carleton.ca/wiki/index.php?title=WebFund_2014W_Lecture_4&amp;diff=18451"/>
		<updated>2014-01-20T18:20:41Z</updated>

		<summary type="html">&lt;p&gt;IlyA: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The audio from the lecture given on January 17, 2014 is available [http://homeostasis.scs.carleton.ca/~soma/webfund-2014w/lectures/comp2406-2013f-lec04-17Jan2014.mp3 here].&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Lecture 4&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Assignment 1 Discussion&lt;br /&gt;
&lt;br /&gt;
•	Pieces of the code&lt;br /&gt;
  o	  Node&lt;br /&gt;
  o	  Jade&lt;br /&gt;
  o	  HTTP&lt;br /&gt;
  o	  Bootstrap&lt;br /&gt;
  o	  jQuery&lt;br /&gt;
  o	  HTML&lt;br /&gt;
•	app.js&lt;br /&gt;
  o	  JavaScript&lt;br /&gt;
•	How do the other pieces fit?&lt;br /&gt;
  o	  Look at the top, at the require lines&lt;br /&gt;
  o	  Reference to the node&#039;s module system &lt;br /&gt;
    	    Searches for the directory indicated for an index.js file&lt;br /&gt;
    	    All loaded into variable you loaded it into (an &#039;exports&#039; object is returned)&lt;br /&gt;
    	    Methods in the index.js beginning with &amp;quot;exports&amp;quot; are accessible by the var you loaded the object into&lt;br /&gt;
•	When does app.js end?&lt;br /&gt;
  o	  In the fraction of the second of when it&#039;s called&lt;br /&gt;
  o    	  Purpose of the file is to set up the page&lt;br /&gt;
  o	  app.get and app.post&lt;br /&gt;
    	    Registered as callbacks since they run once and never again, but the functions that are registered ran everytime it&#039;s requested&lt;br /&gt;
    	    for app.get: if one parameter, you&#039;re accessing a field; 2 parameters and you&#039;re specifying a path&lt;br /&gt;
  o	  app.use&lt;br /&gt;
    	    calls specific code from the parameter indicated&lt;br /&gt;
    	    path: directory name&lt;br /&gt;
    	    express.static&lt;br /&gt;
•	apache; a static webserver; anything in the directory indicated can be accessed	&lt;br /&gt;
  o	  app.set&lt;br /&gt;
    	    sets a field in the app object specified in the first parameter, to whatever specified in the second parameter&lt;br /&gt;
  o	  Ordering of lines in app.js is important&lt;br /&gt;
    	    e.g. having something loaded before loading the public folder&#039;s files tells node that the previous file takes precedence&lt;br /&gt;
•	When rendering an object (res.render) for a response to a request, you pass in a jade template, and an object with fields (parameterizing the template)&lt;br /&gt;
•	View engine: engine used as a template for HTMLs (e.g. &#039;jade&#039;)&lt;br /&gt;
  o	  completely restricted access to server objects/variables due to security concerns; templates are isolated&lt;br /&gt;
  o	  since we want to dynamically generate the page, we have to use a template&lt;br /&gt;
  o	  some things we want to keep constant and not have to rerender all the time, and sometimes we want to change specific content&lt;br /&gt;
  o	  makes it clear that we&#039;re not writing HTML, just a template that will be converted into an HTML document&lt;br /&gt;
•	Spaces and tabs do not mix in jade. Use one only.&lt;br /&gt;
•	Why do we need a different language for Jade?&lt;br /&gt;
  o	  Domain-specific languages&lt;br /&gt;
    	    In Computer Science, a way to solve a problem is to create a language to solve it&lt;br /&gt;
    	    Makes things, previously complicated, easy&lt;br /&gt;
    	    CSS does not look like HTML, because it is a domain-specific language&lt;br /&gt;
    	    Compound languages: always language embedding&lt;br /&gt;
•	Bootstrap&lt;br /&gt;
  o	  Built off jQuery&lt;br /&gt;
  o	  Runs on the client; completely in the browser&lt;br /&gt;
    	     allows you to dynamically change CSS to fit user&#039;s browser/screen (i.e. on the phone), less intensive on you (offloading a lot of work onto the browser)&lt;br /&gt;
    	    Major Reason: latency&lt;br /&gt;
•	Everytime you make a request, to the server, it takes time an incredibly short time&lt;br /&gt;
•	Annoying for the user to constantly wait for pages/response to actions&lt;br /&gt;
•	Downloads webpages in the background; predicting what you will need soon in order to save time&lt;br /&gt;
  o	  Allows you to grab an applet/webpage from another web server&lt;br /&gt;
    	    Cons: may not be always up, may send something different, usually done in faith, your application could break because of another web server that you don&#039;t have control over&lt;br /&gt;
  o	  2 portions: CSS (for styles), and JavaScript (code that makes it do things)&lt;br /&gt;
    	    JavaScript runs inside the browser (not yet ran something like this)&lt;/div&gt;</summary>
		<author><name>IlyA</name></author>
	</entry>
</feed>