Week Ten (MGDP2050)

From Wiki @ Karl Jones dot com
Revision as of 10:24, 12 April 2016 by Karl Jones (Talk | contribs)

Jump to: navigation, search

Week Ten of Web Design and Development II (MGDP2050).

See also Week Nine (MGDP2050) - Week Eleven (MGDP2050).

Project

Your semester project website can use whatever technologies you need to meet your own goals.

The project does not need to include everything from the weekly exercises.

  • The weekly exercises are designed to introduce students to a wide range of topics, only some of which will be relevant to your project.

For example, you probably don't want to use Backbone.js for your project:

  • A website that uses Backbone.js is built entirely around Backbone (thus the name).
  • Learning Backbone.js would take too much time -- an entire semester.

Similarly, don't use jQuery unless you really need jQuery.

The only technology (beyond HTML and CSS) to which we are committed is Bootstrap, because it is widely used for responsive web design.

Lecture notes

See Week Ten lecture notes (MGDP2050).

Exercises: in class

Goal

Create a web page which demonstrates Backbone.js and Ajax, similar to this example page.

Create week10 folder and web pages

Create a new folder named week10, and a new web page named index.html, with the usual exercise styles, title, etc.

Add content for Backbone.js

Add content for Backbone.js. You can use View Source and copy the code from the example page, or copy the code below:

<script type="text/template" id="itemlist_template">
 <li><%= item_name %></li>
</script>

<ol id="items">
</ol>

Save local copies of Underscore.js and Backbone.js

Add script elements for Underscore.js and Backbone.js

You can use View Source and copy the code from the example page, or copy the code below:

Create a custom JavaScript file

You can use View Source and copy the code from the example page, or copy the code below:

Add script element for custom JavaScript file

Add a script element for your custom JavaScript.

You can use View Source and copy the code from the example page, or copy the code below:

Create a JSON file, and change the data

Create a JSON file named data.json, similar to this example:

Save the JSON file in your week10 folder.

Change the item names ("Solid Gold Submarine", etc.) to names of your choice, related to your project topic.

Upload work to server, and test

Note that you must test this exercise online -- it will not work locally.

Make link from Home page to exercise page

Make link from Home page to exercise page.

Upload your Home page, and test the link to your exercise.

Update your home page

On your Home page, make a link to this exercise.