Difference between revisions of "Homework 2"
From Protein Prediction 2 Winter Semester 2014
(→Tasks) |
(→= Simple Math in JavaScript) |
||
(23 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
+ | == Last Week == |
||
+ | |||
+ | * Did you the students register on the mailing list and receive the first 'hello world' post? |
||
+ | * Verify: Have you filled in this [https://docs.google.com/forms/d/1i9JP_9vS0wLRz-KIHGSTlqMwTzVuyMGChbW5eNZQYz0/viewform form]? ('''till Oct 23''') |
||
+ | * Comments, questions, show&talk for the assignment [http://www.codecademy.com/skills/make-a-website Make a Website @ Codecademy] ? |
||
+ | * Any other thing? Git, GitHub, Codecademy, BioJs, D3, ... |
||
+ | |||
== Tasks == |
== Tasks == |
||
* Finish [http://www.codecademy.com/skills/make-an-interactive-website Codecademy Develop an Interactive Website] ('''till Oct 30''') |
* Finish [http://www.codecademy.com/skills/make-an-interactive-website Codecademy Develop an Interactive Website] ('''till Oct 30''') |
||
− | * Read [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript Mozilla's Introduction to Object-Oriented Javascript] |
||
− | * Verify: Have you filled in this [https://docs.google.com/forms/d/1i9JP_9vS0wLRz-KIHGSTlqMwTzVuyMGChbW5eNZQYz0/viewform form]? ('''till Oct 23''') |
||
== Optional == |
== Optional == |
||
* Read [http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml Google's JavaScript guide] |
* Read [http://google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml Google's JavaScript guide] |
||
+ | * Special [http://www.codecademy.com/tracks/javascript JavaScript Codecademy] |
||
+ | * Read [https://developer.mozilla.org/en-US/docs/Web/JavaScript/Introduction_to_Object-Oriented_JavaScript Mozilla's Introduction to Object-Oriented Javascript] |
||
== Live coding == |
== Live coding == |
||
+ | In the following example you will learn about basic javascript, the event system and usage of external libraries (i.e. ajax) |
||
+ | We are using JSBin for the live coding examples. JSBin allows you to code in JavaScript and see the output immediatly. |
||
+ | We provided Unit Tests for your Code (They will turn green if you solve the exercise :) ). |
||
+ | |||
+ | === Simple Math in JavaScript === |
||
+ | |||
+ | * [http://jsbin.com/fajas/8/edit isPrime] |
||
+ | Help: [http://en.wikipedia.org/wiki/Prime_number Prime numbers] |
||
+ | ; Solution for isPrime [http://jsbin.com/jolone/1/edit?js,console,output ] |
||
+ | |||
+ | === Events & Observer pattern === |
||
+ | |||
+ | * [http://jsbin.com/huhuwe/4/edit?js,console,output MiniEvents] |
||
+ | Help: [https://en.wikipedia.org/wiki/Observer_pattern Observer pattern] |
||
+ | ; Solution for MiniEvents [http://jsbin.com/jatewe/3/edit?js,console,output] |
||
+ | |||
+ | === Ajax === |
||
+ | |||
+ | * [http://jsbin.com/vepab/17/edit?js,console,output UniProt] |
||
+ | Help: [http://zeptojs.com/#$.get $.get] |
||
+ | ; Solution for UniProt [http://jsbin.com/pudica/edit?js,console,output] |
||
+ | === Helpful links === |
||
− | * [http://jsbin.com/fajas/edit isPrime] |
||
+ | they give you an overview of available JS functions |
||
− | * [http://jsbin.com/huhuwe/3/edit?js,console,output MiniEvents] |
||
− | * [http:// |
+ | * [http://overapi.com/javascript/ JS cheatsheet] |
+ | * [http://www.w3schools.com/js/default.asp W3schools] |
||
+ | * [http://www.dannyg.com/dl/JSB6RefBooklet.pdf JS-"Bible"] |
Latest revision as of 19:00, 29 October 2014
Contents
Last Week
- Did you the students register on the mailing list and receive the first 'hello world' post?
- Verify: Have you filled in this form? (till Oct 23)
- Comments, questions, show&talk for the assignment Make a Website @ Codecademy ?
- Any other thing? Git, GitHub, Codecademy, BioJs, D3, ...
Tasks
- Finish Codecademy Develop an Interactive Website (till Oct 30)
Optional
- Read Google's JavaScript guide
- Special JavaScript Codecademy
- Read Mozilla's Introduction to Object-Oriented Javascript
Live coding
In the following example you will learn about basic javascript, the event system and usage of external libraries (i.e. ajax) We are using JSBin for the live coding examples. JSBin allows you to code in JavaScript and see the output immediatly. We provided Unit Tests for your Code (They will turn green if you solve the exercise :) ).
Simple Math in JavaScript
Help: Prime numbers
- Solution for isPrime [1]
Events & Observer pattern
Help: Observer pattern
- Solution for MiniEvents [2]
Ajax
Help: $.get
- Solution for UniProt [3]
Helpful links
they give you an overview of available JS functions