SlideShare a Scribd company logo
JavaScript for Web
Developer
ZUBZIB BLACK COFFEE #8
CHALERMPON AREEPONG (NINE)
AGENDA
Basic Programming
Object Oriented Programming
3rd JavaScript Libraries
AJAX, JSON, Handle Event
Debugging
Unit Test
MVC
JavaScript (JS)
Created in 1995 by Brendan Eich
Name: Mocha in LAB, LiveScript for Netscape Navigator 2.0 and last rename to
JavaScript with Netscape 2 beta in December 1995
Microsoft add JavaScript to IE in 1996 called JScript
Brendan Eich
Java script for web developer
Stuff You Should Know
JavaScript run in Web Browser
JavaScript integrate with DOM
JavaScript is a dynamic type
Current JavaScript complied to ECMA-262 version 5.1
http://en.wikipedia.org/wiki/ECMAScript
JavaScript no coding standard, has only Best Practice
JavaScript IDE Tools
Web Browser Developer Tool
◦ Chrome (F12)
◦ Firefox add-in Firebug (F12)
◦ IE (F12)
◦ Safari
◦ Others
JavaScript IDE Tools
IDE Setup
◦ Visual Studio
◦ WebMatrix
◦ Kineticwing
◦ WebStrom
◦ CodeMirror
◦ Other
http://en.wikipedia.org/wiki/Comparison
_of_JavaScript-
based_source_code_editors
Cloud IDE
◦ Cloud9
◦ CodeAnywhere
◦ Cloud IDE
◦ Sourcekit
◦ Codepen, jsfiddle, jsbin
◦ Other
http://www.hongkiat.com/blog/cloud-
ide-developers/
Demo tool
Chrome
jsfiddle
Visual Studio 2012 Update 3
Resharper 8
JavaScript Basic Programming
Declare Variable
var testString = 'ASP.NET & MVC Developers Thailand';
var testInt = 2000;
var testBool = true;
var testDouble = 2000.2334;
var testReg = /(?:.d){2}/;
var testUndefined;
var testNull = null;
var testArray = new [0, 1, 2, 3];
var testObj = new {};
var testFunc = new function () { };
JavaScript Basic Programming
Declare Function
//Declare function
function MVCShowOff() { return "Hi there, we are X!!"; }
var message = MVCShowOff(); //call
//Declare varriable function
var MvcShowOff = function () { return "Hi there, we are X!!"; };
message = MvcShowOff(); //call
//Declare Self-Invoking function
(function () { return "Hi there, we are X!!"; })();//<-- (); is a caller
//Declare Annonymous Function
document.onload = function (e) { alert("Hi there, we are X!!"); };
JavaScript Basic Programming
Parameter Function
//Declare Function with parameter
function Mid2Vals(hi, low) { return (hi + low) / 2; }
var result = Mid2Vals(5, 10);
//Declare Function without parameter and use arguments parameter
function Mid2Vals() { return (arguments[0] + arguments[1]) / 2; }
var result = Mid2Vals(5, 10);
JavaScript Basic Programming
Class and Object
//1. Declare Object Type, Class
function MvcMember() {
this.name = "Nine not K9";
this.isInstuctor = true;
};
//Declare varriable and call
var mrNine = new MvcMember();
alert(mrNine.isInstuctor); // true
//2. Declare Object literal
var mrNine = {
name : "Nine not K9",
isInstuctor : true
};
//Call
alert(mrNine.isInstuctor); // true
JavaScript Basic Programming
Complex Class Object
//1. Declare Class
function MvcMember() {
this.name = "Nine not K9";
this.isInstuctor = true;
this.event = new function Event() {
this.name = "Zubzib Black Coffee #5 Update Skills v1";
this.session = new function Session() {
this.name = "JavaScript for Web Developer";
this.audiences = 40; };
this.place = "University of Thai Chamber of Commerce";
this.location = new function Location() {
this.lat = 13.779276;
this.long = 100.560326;
this.getGeoLocation = lat + ', ' + long; };};};
//2. Initial varriable and access data
var mrNine = new MvcMember();
alert(mrNine.event.name);
alert(mrNine.event.session.name);
alert(mrNine.event.location.getGeoLocation);
JavaScript Basic Programming
Late Declare Variable and Function
//1. Declare Class
function MvcMember() {
this.name = "Nine not K9";
this.isInstuctor = true;
};
//And initial an object
var mrNine = new MvcMember();
//2. late declare variable
mrNine.say = "Hi everybody"; // mrNine["say"] = "Hi everybody"; //same
//3. late declare function
mrNine.thinkAbout = function (source) { return "I'm thinking about the " + source; };
JavaScript Basic Programming
Condition, Loop, try… catch
//IF Else condition
var x = 0, y = 1;
if (x == 1) { alert('Yes'); }
else { alert('No'); }
//Switch Condition
var word = "Hi";
switch (word) {
case "Hi":
alert('How r u?');
default:
alert("Hey what's was wrong with you?");
}
//While loop
var x = 5;
while (x<1) { x--; }
alert(x);
//For loop
var title = "JavaScript".split('');
for (var i = 0; i < title.length; i++) {
alert(title[i]);
}
JavaScript Basic Programming
Condition, Loop, try… catch
// For Each Loop
var topic = "JavaScript very easy".split(' ');
topic.forEach(function(word) { alert(word); });
//try catch block
try {
var x;
x.ErrorPlease();
} catch(e) {
alert("catch error : " + e.message);
}
JavaScript Basic Programming
Comparisons 1
// Assigh value
var x = 10;
console.log("x="+x);
//Comparison
var a = "test", b = "TEST";
var result = a == b;
console.log("comparison a == b ? "+result);
//Identity
var identityResult = a === x;
console.log("identity a is b ? " + identityResult);
JavaScript Basic Programming
Comparison 2
//check base type and value type
var undef;
var num = 90;
var str = "Test";
var bool = true;
var func = function (a, b) { return a + b; };
var object = { x: 500 };
var arr = ["Nine", "Non", "Tape"];
console.log(typeof undef); //"undefined"
console.log(typeof num); //"number"
console.log(typeof str); //"string"
console.log(typeof bool); //"boolean"
console.log(typeof func); //"function"
console.log(typeof object); // "object"
console.log(typeof arr); // "object"
//check object instance of class
var arr = ["Nine", "Non", "Tape"];
console.log(arr instanceof Array); // true
function Speaker() { this.name = "Nine"; }
var mrNine = new Speaker();
console.log(mrNine instanceof Speaker); // true
JavaScript Basic Programming
Value of variables are always false in condition
var a = null;
var b; // undefined
var c = 0;
var d = false;
var e = "";
if (a) // false
if (b) // false
if (c) // false
if (d) // false
if (e) // false
JavaScript Basic Programming
Inheritance with Prototype
function Speaker(isSpeaking) { this.isSpeaking = isSpeaking == null ? false :
isSpeaking; }
Speaker.prototype.say = function () {return "Break session"; };
function ZZSpeaker () { this.isEating = true; }
ZZSpeaker.prototype = new Speaker();
ZZSpeaker.prototype.sleepyShow = function () { alert('wake up !!!'); };
ZZSpeaker.prototype.say = function () { return "Ask me please.."; };
var nineSpeak = new ZZSpeaker();
nineSpeak.say();
nineSpeak.sleepyShow();
3rd JavaScript Framework and
Library
jQuery is a library created on top JavaScript, to help us access DOM and populate HTML
element, content , CSS, animation and DOM Event
The two thinks jQuery dose
1. SELECT elements or a group of element by CSS Selector
2. Take Action on elements
3rd JavaScript Framework and
Library
jQuery : Get Started
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<div class="test"></div>
<!-- 1. Add script reference to local or CDN -->
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script>
<script>
//2. declare document ready
$(document).ready(function () {
$('div.test').html("<h1>JavaScript for web developer</h1>");
});
</script>
</body>
</html>
3rd JavaScript Framework and
Library
jQuery : query and action
<div class="test"></div>
<input id="btnShowMessage" type="button" value="click me" />
//2. declare document ready
$(document).ready(function () {
//3. Bind Element Action to custom function
$('#btnShowMessage').click(function () {
$('div.test').html("<h1>DOM Ready binding event</h1>");
});
});
//4. Early binding event can declare out of DOM Ready block
$('#btnShowMessage').on('click', function () {
$('div.test').html("<h1>Early binding event</h1>");
});
Java script for web developer
AJAX ????
Java script for web developer
AJAX: Asynchronous JavaScript and
XML
None blocking user action and no screen freeze
Use AJAX (native code)
// This is the client-side script
// Initialize the Ajax request
var xhr = XMLHttpRequest();
xhr.open('get', 'http://google.com');
// Track the state changes of the request
xhr.onreadystatechange = function () {
// Ready state 4 means the request is done
if (xhr.readyState === 4) {
// 200 is a successful return
if (xhr.status === 200) {
alert(xhr.responseText); // 'This is the returned text.'
} else {
alert('Error: ' + xhr.status); // An error occurred during the request
} }}
// Send the request to send-ajax-data.php
xhr.send(null);
Use AJAX with JQUERY
$.get()
$.post()
$.getJSON()
$.ajax()
Demo
$.get('ajax/test.html', function (data) {
$('.result').html(data);
alert('Load was performed.');
});
$.post('ajax/test.html', function (data) {
$('.result').html(data);
});
$.getJSON('ajax/test.json', function (data) {
var items = [];
$.each(data, function (key, val) {
items.push('<li id="' + key + '">' + val + '</li>');
});
});
JSON ????
Java script for web developer
JSON : JavaScript Object Notation
JSON is a text-based open standard designed for human-readable data interchange
//JavaScript Object
var session = { name: 'Nine', sessionName: 'JavaScript for Web Developer', };
//JSON Object
{"name": "Nine", "sessionName" : "JavaScript for Web Developer" }
JSON
JavaScript Object to JSON
var session = { name: $('input#name').val(), sessionName:
$('input#sesseionName').val() };
//convert to json
var json = JSON.stringify(session);
JSON
Demo JSON
Debug JavaScript
JavaScript Debugger Tools
1. Browser Web Developer Tools (F12)
2. Visual Studio 2012 + IE10 or later
Debug JavaScript
Put break point and click html button
JavaScript Unit Testing
article
MVC power by AngularJS
article

More Related Content

What's hot (20)

JavaScript 101
JavaScript 101JavaScript 101
JavaScript 101
ygv2000
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
Aaron Gustafson
 
Promises, Promises
Promises, PromisesPromises, Promises
Promises, Promises
Domenic Denicola
 
Supercharging reflective libraries with InvokeDynamic
Supercharging reflective libraries with InvokeDynamicSupercharging reflective libraries with InvokeDynamic
Supercharging reflective libraries with InvokeDynamic
Ian Robertson
 
AngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile ServicesAngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile Services
Rainer Stropek
 
Jasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishyJasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishy
Igor Napierala
 
Javascript basics for automation testing
Javascript  basics for automation testingJavascript  basics for automation testing
Javascript basics for automation testing
Vikas Thange
 
Java Script Best Practices
Java Script Best PracticesJava Script Best Practices
Java Script Best Practices
Enrique Juan de Dios
 
Redux for ReactJS Programmers
Redux for ReactJS ProgrammersRedux for ReactJS Programmers
Redux for ReactJS Programmers
David Rodenas
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascript
Doeun KOCH
 
A Re-Introduction to JavaScript
A Re-Introduction to JavaScriptA Re-Introduction to JavaScript
A Re-Introduction to JavaScript
Simon Willison
 
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptWorkshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
Visual Engineering
 
$q and Promises in AngularJS
$q and Promises in AngularJS $q and Promises in AngularJS
$q and Promises in AngularJS
a_sharif
 
Solid Software Design Principles
Solid Software Design PrinciplesSolid Software Design Principles
Solid Software Design Principles
Jon Kruger
 
Workshop 5: JavaScript testing
Workshop 5: JavaScript testingWorkshop 5: JavaScript testing
Workshop 5: JavaScript testing
Visual Engineering
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with Karma
ExoLeaders.com
 
What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?
Christophe Porteneuve
 
Workshop 10: ECMAScript 6
Workshop 10: ECMAScript 6Workshop 10: ECMAScript 6
Workshop 10: ECMAScript 6
Visual Engineering
 
Callbacks and control flow in Node js
Callbacks and control flow in Node jsCallbacks and control flow in Node js
Callbacks and control flow in Node js
Thomas Roch
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Jon Kruger
 
JavaScript 101
JavaScript 101JavaScript 101
JavaScript 101
ygv2000
 
Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]Fundamental JavaScript [UTC, March 2014]
Fundamental JavaScript [UTC, March 2014]
Aaron Gustafson
 
Supercharging reflective libraries with InvokeDynamic
Supercharging reflective libraries with InvokeDynamicSupercharging reflective libraries with InvokeDynamic
Supercharging reflective libraries with InvokeDynamic
Ian Robertson
 
AngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile ServicesAngularJS with TypeScript and Windows Azure Mobile Services
AngularJS with TypeScript and Windows Azure Mobile Services
Rainer Stropek
 
Jasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishyJasmine - why JS tests don't smell fishy
Jasmine - why JS tests don't smell fishy
Igor Napierala
 
Javascript basics for automation testing
Javascript  basics for automation testingJavascript  basics for automation testing
Javascript basics for automation testing
Vikas Thange
 
Redux for ReactJS Programmers
Redux for ReactJS ProgrammersRedux for ReactJS Programmers
Redux for ReactJS Programmers
David Rodenas
 
Advanced javascript
Advanced javascriptAdvanced javascript
Advanced javascript
Doeun KOCH
 
A Re-Introduction to JavaScript
A Re-Introduction to JavaScriptA Re-Introduction to JavaScript
A Re-Introduction to JavaScript
Simon Willison
 
Workshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScriptWorkshop 1: Good practices in JavaScript
Workshop 1: Good practices in JavaScript
Visual Engineering
 
$q and Promises in AngularJS
$q and Promises in AngularJS $q and Promises in AngularJS
$q and Promises in AngularJS
a_sharif
 
Solid Software Design Principles
Solid Software Design PrinciplesSolid Software Design Principles
Solid Software Design Principles
Jon Kruger
 
Workshop 5: JavaScript testing
Workshop 5: JavaScript testingWorkshop 5: JavaScript testing
Workshop 5: JavaScript testing
Visual Engineering
 
Good karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with KarmaGood karma: UX Patterns and Unit Testing in Angular with Karma
Good karma: UX Patterns and Unit Testing in Angular with Karma
ExoLeaders.com
 
What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?What's up with Prototype and script.aculo.us?
What's up with Prototype and script.aculo.us?
Christophe Porteneuve
 
Callbacks and control flow in Node js
Callbacks and control flow in Node jsCallbacks and control flow in Node js
Callbacks and control flow in Node js
Thomas Roch
 
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby DeveloperVenturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Venturing Into The Wild: A .NET Developer's Experience As A Ruby Developer
Jon Kruger
 

Viewers also liked (11)

JavaScript for Beginners
JavaScript for BeginnersJavaScript for Beginners
JavaScript for Beginners
Edward Gilligan III.
 
Powershell Certificate
Powershell CertificatePowershell Certificate
Powershell Certificate
Edward Gilligan III.
 
JavaScript
JavaScriptJavaScript
JavaScript
tutorialsruby
 
Dom API In Java Script
Dom API In Java ScriptDom API In Java Script
Dom API In Java Script
Rajat Pandit
 
JavaScript Library Overview
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overview
jeresig
 
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with ExamplesJavascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
OUM SAOKOSAL
 
DIWE - Programming with JavaScript
DIWE - Programming with JavaScriptDIWE - Programming with JavaScript
DIWE - Programming with JavaScript
Rasan Samarasinghe
 
Le Wagon - Javascript for Beginners
Le Wagon - Javascript for BeginnersLe Wagon - Javascript for Beginners
Le Wagon - Javascript for Beginners
Sébastien Saunier
 
Unobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQueryUnobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQuery
Simon Willison
 
Maintainable JavaScript 2012
Maintainable JavaScript 2012Maintainable JavaScript 2012
Maintainable JavaScript 2012
Nicholas Zakas
 
Writing Efficient JavaScript
Writing Efficient JavaScriptWriting Efficient JavaScript
Writing Efficient JavaScript
Nicholas Zakas
 
Dom API In Java Script
Dom API In Java ScriptDom API In Java Script
Dom API In Java Script
Rajat Pandit
 
JavaScript Library Overview
JavaScript Library OverviewJavaScript Library Overview
JavaScript Library Overview
jeresig
 
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with ExamplesJavascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
Javascript & DOM - Part 1- Javascript Tutorial for Beginners with Examples
OUM SAOKOSAL
 
DIWE - Programming with JavaScript
DIWE - Programming with JavaScriptDIWE - Programming with JavaScript
DIWE - Programming with JavaScript
Rasan Samarasinghe
 
Le Wagon - Javascript for Beginners
Le Wagon - Javascript for BeginnersLe Wagon - Javascript for Beginners
Le Wagon - Javascript for Beginners
Sébastien Saunier
 
Unobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQueryUnobtrusive JavaScript with jQuery
Unobtrusive JavaScript with jQuery
Simon Willison
 
Maintainable JavaScript 2012
Maintainable JavaScript 2012Maintainable JavaScript 2012
Maintainable JavaScript 2012
Nicholas Zakas
 
Writing Efficient JavaScript
Writing Efficient JavaScriptWriting Efficient JavaScript
Writing Efficient JavaScript
Nicholas Zakas
 
Ad

Similar to Java script for web developer (20)

Introduction to Javascript
Introduction to JavascriptIntroduction to Javascript
Introduction to Javascript
Amit Tyagi
 
Intro to Javascript
Intro to JavascriptIntro to Javascript
Intro to Javascript
Anjan Banda
 
wp-UNIT_III.pptx
wp-UNIT_III.pptxwp-UNIT_III.pptx
wp-UNIT_III.pptx
GANDHAMKUMAR2
 
Java Script basics and DOM
Java Script basics and DOMJava Script basics and DOM
Java Script basics and DOM
Sukrit Gupta
 
Wt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technologyWt unit 2 ppts client sied technology
Wt unit 2 ppts client sied technology
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
Wt unit 2 ppts client side technology
Wt unit 2 ppts client side technologyWt unit 2 ppts client side technology
Wt unit 2 ppts client side technology
PUNE VIDYARTHI GRIHA'S COLLEGE OF ENGINEERING, NASHIK
 
JavaScript - An Introduction
JavaScript - An IntroductionJavaScript - An Introduction
JavaScript - An Introduction
Manvendra Singh
 
JavaScript lesson 1.pptx
JavaScript lesson 1.pptxJavaScript lesson 1.pptx
JavaScript lesson 1.pptx
MuqaddarNiazi1
 
JavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQueryJavaScript Fundamentals & JQuery
JavaScript Fundamentals & JQuery
Jamshid Hashimi
 
JavaScript Neednt Hurt - JavaBin talk
JavaScript Neednt Hurt - JavaBin talkJavaScript Neednt Hurt - JavaBin talk
JavaScript Neednt Hurt - JavaBin talk
Thomas Kjeldahl Nilsson
 
Basics of JavaScript
Basics of JavaScriptBasics of JavaScript
Basics of JavaScript
Bala Narayanan
 
All of Javascript
All of JavascriptAll of Javascript
All of Javascript
Togakangaroo
 
JavaScript for real men
JavaScript for real menJavaScript for real men
JavaScript for real men
Ivano Malavolta
 
JavaScript Tutorial
JavaScript  TutorialJavaScript  Tutorial
JavaScript Tutorial
Bui Kiet
 
Java script
Java scriptJava script
Java script
Jay Patel
 
Lecture 5 javascript
Lecture 5 javascriptLecture 5 javascript
Lecture 5 javascript
Mujtaba Haider
 
jQuery with javascript training by Technnovation Labs
jQuery with javascript training by Technnovation LabsjQuery with javascript training by Technnovation Labs
jQuery with javascript training by Technnovation Labs
Prasad Shende
 
javascriptPresentation.pdf
javascriptPresentation.pdfjavascriptPresentation.pdf
javascriptPresentation.pdf
wildcat9335
 
WT Module-3.pptx
WT Module-3.pptxWT Module-3.pptx
WT Module-3.pptx
RamyaH11
 
"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues"Javascript" por Tiago Rodrigues
"Javascript" por Tiago Rodrigues
Núcleo de Electrónica e Informática da Universidade do Algarve
 
Ad

More from Chalermpon Areepong (10)

DevRock #02 akka.net intro part
DevRock #02 akka.net intro partDevRock #02 akka.net intro part
DevRock #02 akka.net intro part
Chalermpon Areepong
 
Web API authentication and authorization
Web API authentication and authorization Web API authentication and authorization
Web API authentication and authorization
Chalermpon Areepong
 
Build your website with angularjs and web apis
Build your website with angularjs and web apisBuild your website with angularjs and web apis
Build your website with angularjs and web apis
Chalermpon Areepong
 
ASP.NET WEB API Training
ASP.NET WEB API TrainingASP.NET WEB API Training
ASP.NET WEB API Training
Chalermpon Areepong
 
ZZ BC#8 Hello ASP.NET MVC 4 (dks)
ZZ BC#8 Hello ASP.NET MVC 4 (dks)ZZ BC#8 Hello ASP.NET MVC 4 (dks)
ZZ BC#8 Hello ASP.NET MVC 4 (dks)
Chalermpon Areepong
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
Chalermpon Areepong
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
Chalermpon Areepong
 
Build your web app with asp.net mvc 2 from scratch
Build your web app with asp.net mvc 2 from scratchBuild your web app with asp.net mvc 2 from scratch
Build your web app with asp.net mvc 2 from scratch
Chalermpon Areepong
 
Gf vtzz-05--j queryshowcase
Gf vtzz-05--j queryshowcaseGf vtzz-05--j queryshowcase
Gf vtzz-05--j queryshowcase
Chalermpon Areepong
 
J query
J queryJ query
J query
Chalermpon Areepong
 
Web API authentication and authorization
Web API authentication and authorization Web API authentication and authorization
Web API authentication and authorization
Chalermpon Areepong
 
Build your website with angularjs and web apis
Build your website with angularjs and web apisBuild your website with angularjs and web apis
Build your website with angularjs and web apis
Chalermpon Areepong
 
ZZ BC#8 Hello ASP.NET MVC 4 (dks)
ZZ BC#8 Hello ASP.NET MVC 4 (dks)ZZ BC#8 Hello ASP.NET MVC 4 (dks)
ZZ BC#8 Hello ASP.NET MVC 4 (dks)
Chalermpon Areepong
 
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
ZZ BC#7.5 asp.net mvc practice  and guideline refresh! ZZ BC#7.5 asp.net mvc practice  and guideline refresh!
ZZ BC#7.5 asp.net mvc practice and guideline refresh!
Chalermpon Areepong
 
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvpZZ BC#7 asp.net mvc practice and guideline by NineMvp
ZZ BC#7 asp.net mvc practice and guideline by NineMvp
Chalermpon Areepong
 
Build your web app with asp.net mvc 2 from scratch
Build your web app with asp.net mvc 2 from scratchBuild your web app with asp.net mvc 2 from scratch
Build your web app with asp.net mvc 2 from scratch
Chalermpon Areepong
 

Recently uploaded (20)

Introduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUEIntroduction to Typescript - GDG On Campus EUE
Introduction to Typescript - GDG On Campus EUE
Google Developer Group On Campus European Universities in Egypt
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptxFIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FMEEnabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdfWar_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptxFIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdfENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptxFIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FMESupporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Scaling GenAI Inference From Prototype to Production: Real-World Lessons in S...
Anish Kumar
 
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptxFIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Seminar: Authentication for a Billion Consumers - Amazon.pptx
FIDO Alliance
 
Your startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean accountYour startup on AWS - How to architect and maintain a Lean and Mean account
Your startup on AWS - How to architect and maintain a Lean and Mean account
angelo60207
 
Murdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementaryMurdledescargadarkweb.pdfvolumen1 100 elementary
Murdledescargadarkweb.pdfvolumen1 100 elementary
JorgeSemperteguiMont
 
Enabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FMEEnabling BIM / GIS integrations with Other Systems with FME
Enabling BIM / GIS integrations with Other Systems with FME
Safe Software
 
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven InfrastructureNo-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
No-Code Workflows for CAD & 3D Data: Scaling AI-Driven Infrastructure
Safe Software
 
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
AudGram Review: Build Visually Appealing, AI-Enhanced Audiograms to Engage Yo...
SOFTTECHHUB
 
June Patch Tuesday
June Patch TuesdayJune Patch Tuesday
June Patch Tuesday
Ivanti
 
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdfWar_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
War_And_Cyber_3_Years_Of_Struggle_And_Lessons_For_Global_Security.pdf
biswajitbanerjee38
 
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
“Addressing Evolving AI Model Challenges Through Memory and Storage,” a Prese...
Edge AI and Vision Alliance
 
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptxFIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Seminar: Perspectives on Passkeys & Consumer Adoption.pptx
FIDO Alliance
 
Down the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training RoadblocksDown the Rabbit Hole – Solving 5 Training Roadblocks
Down the Rabbit Hole – Solving 5 Training Roadblocks
Rustici Software
 
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdfENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
ENERGY CONSUMPTION CALCULATION IN ENERGY-EFFICIENT AIR CONDITIONER.pdf
Muhammad Rizwan Akram
 
Oracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization ProgramOracle Cloud and AI Specialization Program
Oracle Cloud and AI Specialization Program
VICTOR MAESTRE RAMIREZ
 
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
FME for Distribution & Transmission Integrity Management Program (DIMP & TIMP)
Safe Software
 
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptxFIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Seminar: New Data: Passkey Adoption in the Workforce.pptx
FIDO Alliance
 
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy SurveyTrustArc Webinar - 2025 Global Privacy Survey
TrustArc Webinar - 2025 Global Privacy Survey
TrustArc
 
Supporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FMESupporting the NextGen 911 Digital Transformation with FME
Supporting the NextGen 911 Digital Transformation with FME
Safe Software
 
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free DownloadViral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Viral>Wondershare Filmora 14.5.18.12900 Crack Free Download
Puppy jhon
 

Java script for web developer

  • 1. JavaScript for Web Developer ZUBZIB BLACK COFFEE #8 CHALERMPON AREEPONG (NINE)
  • 2. AGENDA Basic Programming Object Oriented Programming 3rd JavaScript Libraries AJAX, JSON, Handle Event Debugging Unit Test MVC
  • 3. JavaScript (JS) Created in 1995 by Brendan Eich Name: Mocha in LAB, LiveScript for Netscape Navigator 2.0 and last rename to JavaScript with Netscape 2 beta in December 1995 Microsoft add JavaScript to IE in 1996 called JScript
  • 6. Stuff You Should Know JavaScript run in Web Browser JavaScript integrate with DOM JavaScript is a dynamic type Current JavaScript complied to ECMA-262 version 5.1 http://en.wikipedia.org/wiki/ECMAScript JavaScript no coding standard, has only Best Practice
  • 7. JavaScript IDE Tools Web Browser Developer Tool ◦ Chrome (F12) ◦ Firefox add-in Firebug (F12) ◦ IE (F12) ◦ Safari ◦ Others
  • 8. JavaScript IDE Tools IDE Setup ◦ Visual Studio ◦ WebMatrix ◦ Kineticwing ◦ WebStrom ◦ CodeMirror ◦ Other http://en.wikipedia.org/wiki/Comparison _of_JavaScript- based_source_code_editors Cloud IDE ◦ Cloud9 ◦ CodeAnywhere ◦ Cloud IDE ◦ Sourcekit ◦ Codepen, jsfiddle, jsbin ◦ Other http://www.hongkiat.com/blog/cloud- ide-developers/
  • 9. Demo tool Chrome jsfiddle Visual Studio 2012 Update 3 Resharper 8
  • 10. JavaScript Basic Programming Declare Variable var testString = 'ASP.NET & MVC Developers Thailand'; var testInt = 2000; var testBool = true; var testDouble = 2000.2334; var testReg = /(?:.d){2}/; var testUndefined; var testNull = null; var testArray = new [0, 1, 2, 3]; var testObj = new {}; var testFunc = new function () { };
  • 11. JavaScript Basic Programming Declare Function //Declare function function MVCShowOff() { return "Hi there, we are X!!"; } var message = MVCShowOff(); //call //Declare varriable function var MvcShowOff = function () { return "Hi there, we are X!!"; }; message = MvcShowOff(); //call //Declare Self-Invoking function (function () { return "Hi there, we are X!!"; })();//<-- (); is a caller //Declare Annonymous Function document.onload = function (e) { alert("Hi there, we are X!!"); };
  • 12. JavaScript Basic Programming Parameter Function //Declare Function with parameter function Mid2Vals(hi, low) { return (hi + low) / 2; } var result = Mid2Vals(5, 10); //Declare Function without parameter and use arguments parameter function Mid2Vals() { return (arguments[0] + arguments[1]) / 2; } var result = Mid2Vals(5, 10);
  • 13. JavaScript Basic Programming Class and Object //1. Declare Object Type, Class function MvcMember() { this.name = "Nine not K9"; this.isInstuctor = true; }; //Declare varriable and call var mrNine = new MvcMember(); alert(mrNine.isInstuctor); // true //2. Declare Object literal var mrNine = { name : "Nine not K9", isInstuctor : true }; //Call alert(mrNine.isInstuctor); // true
  • 14. JavaScript Basic Programming Complex Class Object //1. Declare Class function MvcMember() { this.name = "Nine not K9"; this.isInstuctor = true; this.event = new function Event() { this.name = "Zubzib Black Coffee #5 Update Skills v1"; this.session = new function Session() { this.name = "JavaScript for Web Developer"; this.audiences = 40; }; this.place = "University of Thai Chamber of Commerce"; this.location = new function Location() { this.lat = 13.779276; this.long = 100.560326; this.getGeoLocation = lat + ', ' + long; };};}; //2. Initial varriable and access data var mrNine = new MvcMember(); alert(mrNine.event.name); alert(mrNine.event.session.name); alert(mrNine.event.location.getGeoLocation);
  • 15. JavaScript Basic Programming Late Declare Variable and Function //1. Declare Class function MvcMember() { this.name = "Nine not K9"; this.isInstuctor = true; }; //And initial an object var mrNine = new MvcMember(); //2. late declare variable mrNine.say = "Hi everybody"; // mrNine["say"] = "Hi everybody"; //same //3. late declare function mrNine.thinkAbout = function (source) { return "I'm thinking about the " + source; };
  • 16. JavaScript Basic Programming Condition, Loop, try… catch //IF Else condition var x = 0, y = 1; if (x == 1) { alert('Yes'); } else { alert('No'); } //Switch Condition var word = "Hi"; switch (word) { case "Hi": alert('How r u?'); default: alert("Hey what's was wrong with you?"); } //While loop var x = 5; while (x<1) { x--; } alert(x); //For loop var title = "JavaScript".split(''); for (var i = 0; i < title.length; i++) { alert(title[i]); }
  • 17. JavaScript Basic Programming Condition, Loop, try… catch // For Each Loop var topic = "JavaScript very easy".split(' '); topic.forEach(function(word) { alert(word); }); //try catch block try { var x; x.ErrorPlease(); } catch(e) { alert("catch error : " + e.message); }
  • 18. JavaScript Basic Programming Comparisons 1 // Assigh value var x = 10; console.log("x="+x); //Comparison var a = "test", b = "TEST"; var result = a == b; console.log("comparison a == b ? "+result); //Identity var identityResult = a === x; console.log("identity a is b ? " + identityResult);
  • 19. JavaScript Basic Programming Comparison 2 //check base type and value type var undef; var num = 90; var str = "Test"; var bool = true; var func = function (a, b) { return a + b; }; var object = { x: 500 }; var arr = ["Nine", "Non", "Tape"]; console.log(typeof undef); //"undefined" console.log(typeof num); //"number" console.log(typeof str); //"string" console.log(typeof bool); //"boolean" console.log(typeof func); //"function" console.log(typeof object); // "object" console.log(typeof arr); // "object" //check object instance of class var arr = ["Nine", "Non", "Tape"]; console.log(arr instanceof Array); // true function Speaker() { this.name = "Nine"; } var mrNine = new Speaker(); console.log(mrNine instanceof Speaker); // true
  • 20. JavaScript Basic Programming Value of variables are always false in condition var a = null; var b; // undefined var c = 0; var d = false; var e = ""; if (a) // false if (b) // false if (c) // false if (d) // false if (e) // false
  • 21. JavaScript Basic Programming Inheritance with Prototype function Speaker(isSpeaking) { this.isSpeaking = isSpeaking == null ? false : isSpeaking; } Speaker.prototype.say = function () {return "Break session"; }; function ZZSpeaker () { this.isEating = true; } ZZSpeaker.prototype = new Speaker(); ZZSpeaker.prototype.sleepyShow = function () { alert('wake up !!!'); }; ZZSpeaker.prototype.say = function () { return "Ask me please.."; }; var nineSpeak = new ZZSpeaker(); nineSpeak.say(); nineSpeak.sleepyShow();
  • 22. 3rd JavaScript Framework and Library jQuery is a library created on top JavaScript, to help us access DOM and populate HTML element, content , CSS, animation and DOM Event The two thinks jQuery dose 1. SELECT elements or a group of element by CSS Selector 2. Take Action on elements
  • 23. 3rd JavaScript Framework and Library jQuery : Get Started <!DOCTYPE html> <html> <head> <title></title> </head> <body> <div class="test"></div> <!-- 1. Add script reference to local or CDN --> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js"></script> <script> //2. declare document ready $(document).ready(function () { $('div.test').html("<h1>JavaScript for web developer</h1>"); }); </script> </body> </html>
  • 24. 3rd JavaScript Framework and Library jQuery : query and action <div class="test"></div> <input id="btnShowMessage" type="button" value="click me" /> //2. declare document ready $(document).ready(function () { //3. Bind Element Action to custom function $('#btnShowMessage').click(function () { $('div.test').html("<h1>DOM Ready binding event</h1>"); }); }); //4. Early binding event can declare out of DOM Ready block $('#btnShowMessage').on('click', function () { $('div.test').html("<h1>Early binding event</h1>"); });
  • 28. AJAX: Asynchronous JavaScript and XML None blocking user action and no screen freeze
  • 29. Use AJAX (native code) // This is the client-side script // Initialize the Ajax request var xhr = XMLHttpRequest(); xhr.open('get', 'http://google.com'); // Track the state changes of the request xhr.onreadystatechange = function () { // Ready state 4 means the request is done if (xhr.readyState === 4) { // 200 is a successful return if (xhr.status === 200) { alert(xhr.responseText); // 'This is the returned text.' } else { alert('Error: ' + xhr.status); // An error occurred during the request } }} // Send the request to send-ajax-data.php xhr.send(null);
  • 30. Use AJAX with JQUERY $.get() $.post() $.getJSON() $.ajax() Demo $.get('ajax/test.html', function (data) { $('.result').html(data); alert('Load was performed.'); }); $.post('ajax/test.html', function (data) { $('.result').html(data); }); $.getJSON('ajax/test.json', function (data) { var items = []; $.each(data, function (key, val) { items.push('<li id="' + key + '">' + val + '</li>'); }); });
  • 33. JSON : JavaScript Object Notation JSON is a text-based open standard designed for human-readable data interchange //JavaScript Object var session = { name: 'Nine', sessionName: 'JavaScript for Web Developer', }; //JSON Object {"name": "Nine", "sessionName" : "JavaScript for Web Developer" }
  • 34. JSON JavaScript Object to JSON var session = { name: $('input#name').val(), sessionName: $('input#sesseionName').val() }; //convert to json var json = JSON.stringify(session);
  • 36. Debug JavaScript JavaScript Debugger Tools 1. Browser Web Developer Tools (F12) 2. Visual Studio 2012 + IE10 or later
  • 37. Debug JavaScript Put break point and click html button
  • 39. MVC power by AngularJS article