Presentation is loading. Please wait.

Presentation is loading. Please wait.

Programming in Html5 with Javascript and CSS3

Similar presentations


Presentation on theme: "Programming in Html5 with Javascript and CSS3"— Presentation transcript:

1 Programming in Html5 with Javascript and CSS3
1. Self Intro 2. Agenda – no exam questions; discuss what I’ve learnt instead 3. HTML5 + CSS3 + JS + Exam Exam

2 HTML5, CSS3, Javascript Structure Presentation Behaviour
HTML5 stresses spearting structure, presentation, and behaviour

3 HTML5 Which technology is HTML5 preceded by and derived from?
SGML XHTML 1.0 XML XML – always requires matching tags, has no specific set of tags SGML – older markup language, HTML roots are from, which was used in doc publishing XHTML – XML-based that tightened the HTML specification HTML5 originates from HTML4.0. It contains most of it’s tags but many of them have been redefined to be semantic tags.

4 HTML5: Semantic markup

5 Semantic markup

6 HTML5 Input eLEMENTS <input type="color" name=“mycolor">
<input type=“date" name=“mydate"> <input type=“ " name=“my "> <input type=“number" name=“mynumber"> <input type=“range" name=“myage“ min=“1” max=“100”> See in browser!

7 HTML5 Graphics <canvas id="myCanvas" width="200" height="100"></canvas> <svg width=“300” height=“200”><polygon points=“100…"  style="fill:lime;" /> </svg>

8 Other HTML5 eLEMENTS <audio> <caption> <datalist>
<figure> <progress> <section> <video>

9 Other HTML5 stuff Geolocation Drag/drop Web Storage App Cache
Web Workers Server-Sent Events

10 CSS3 is the latest standard for CSS
It is completely backwards-compatible with earlier versions of CSS

11 Applying styles Inline style Embedded style External style sheet

12 Cascading styles Browser agent User normal User important
Author normal Author important Browser agent User normal Author normal Author important User important Now let’s take a look at new stuff introduced in CSS3

13 Css3 Borders Rounded borders Borders with shadow
Use the border-radius property to make rounded corners Borders with shadow Use the box-shadow property to add shadow to boxes

14 Css3 gradients Linear gradients Radial gradients
background: linear-gradient(direction, color-stop1, color-stop2, ...); Radial gradients background: radial-gradient(center, shape size, start-color, ..., last-color);

15 Css3 Text effects Text shadow effect Word-wrapping
text-shadow: 5px 5px 5px #FF0000; Word-wrapping word-wrap: break-word;

16 More about Css3 Fonts Animations 2D / 3D Transforms Multiple columns
User Interface Fonts – import fonts that are not available from browser Animations – change of color, change of position of shapes 2d/3d transforms – rotate, scale, skew, matrix Multiple columns – column-gap, width, span User Interface – box-sizing, box-flex

17 Javascript Implementing inheritance Jquery and Ajax

18 Implementing inheritance
JavaScript provides the ability to implement inheritance, which is useful when you can define the relationship between two objects as an “is a” relationship. For example, an apple is a fruit, an employee is a person, and a piano is an instrument. This class is wrapped in an IIFE. The wrapper encapsulates the function and the Vehicle prototype. There is no attempt to make the data private. The code works as follows. When the code is loaded into the browser, the IIFE is immediately invoked. A nested function called Vehicle is defined in the IIFE. The Vehicle function’s prototype defines getInfo and startEngine functions that are on every instance of Vehicle. A reference to the Vehicle function is returned, which is assigned to the Vehicle variable. This is a great way to create a class, and all future class examples use this pattern. To create Vehicle objects, you use the new keyword with the Vehicle variable. The following test creates an instance of Vehicle and tests the getInfo and startEngine methods.

19 Implementing inheritance
JavaScript provides the ability to implement inheritance, which is useful when you can define the relationship between two objects as an “is a” relationship. For example, an apple is a fruit, an employee is a person, and a piano is an instrument. This class is wrapped in an IIFE. The wrapper encapsulates the function and the Vehicle prototype. There is no attempt to make the data private. The code works as follows. When the code is loaded into the browser, the IIFE is immediately invoked. A nested function called Vehicle is defined in the IIFE. The Vehicle function’s prototype defines getInfo and startEngine functions that are on every instance of Vehicle. A reference to the Vehicle function is returned, which is assigned to the Vehicle variable. This is a great way to create a class, and all future class examples use this pattern. To create Vehicle objects, you use the new keyword with the Vehicle variable. The following test creates an instance of Vehicle and tests the getInfo and startEngine methods.

20 jQuery Ajax Callbacks object CSS Deferred object Events Selectors
jQuery is a library of helper functions that are cross browser–compatible. You can minimize the amount of browser-specific code. jQuery is written in JavaScript, so it is JavaScript. You can read the jQuery source code to understand how jQuery works. It’s easy to use, it’s stable, it’s fully documented, and it works well with other frameworks. The following is a list of the categories of functionality jQuery provides

21 Ajax Asynchronous Javascript and XML
Using AJAX, you can write JavaScript that asynchronously calls the server and processes the result. While this is happening, the user’s screen doesn’t lock up or freeze while waiting for the call to the server to complete. In this example, jQuery retrieves the values of x and y. A data variable object is then created to hold x and y. The $.ajax() call is executed next; it takes an object argument with all the settings for the call. In this example, the object is created inline. The url property is set, and the data is set to the data object created in the previous statement. The type property is the HTTP method, which supports GET, POST, PUT, and DELETE, but remember that many firewalls block PUT and DELETE. The cache property is set to false to indicate that the result should not be cached. The dataType property defines the type of data you expect to receive from the server and can be set to ‘json’, ‘xml’, ‘html’, ‘script’, ‘jsonp’, or ‘text’.

22 Javascript Serializing forms XMLHttpRequest Implementing namespaces
Adding event listeners Parsing JSON Objects Use of isNan

23 Programming in HTML5 with CSS3 and Javascript
Exam 70:480 Programming in HTML5 with CSS3 and Javascript

24 Exam 70:480 Earn the following certificates:
Microsoft Certified Professional (MCP) Microsoft Specialist: Programming in HTML5, CSS3 and Javascript Counts towards Microsoft Certified Solutions Developer (MCSD) Web Apps Windows Store Apps Using HTML5 Sharepoint Applications Test centres in Wellington $221.00

25 Exam 70:480 45 questions, 2.5 hours Get 700 points to pass
Microsoft Training Guide: Brain dumps available online 4 sections 32/45 to pass

26 Goodluck! 


Download ppt "Programming in Html5 with Javascript and CSS3"

Similar presentations


Ads by Google