SlideShare ist ein Scribd-Unternehmen logo
1 von 39
Downloaden Sie, um offline zu lesen
var string1 = "Hello", string2 = "World";
var myLibrary = new ExampleLibrary();
var concatString = myLibrary.concat(string1, string2);
var myFramework = new ExampleFramework();
myFramework.bind("loadPage", displayMessage);
function displayMessage() {
alert("Hello World!")
}
#aber_ftw
12 Aug
05 Jul
#aber_ftw CS25210 resit: Fri Aug 12th at 3pm (today!)
is the deadline for uploading your web game and report.
#aber_ftw The summer 2016 supplementary (resit)
assignment is now available in Blackboard
Edel Sherratt @edel_sherratt
Edel Sherratt @edel_sherratt
Embed View on Twitter
27 Apr
Felt someone should jump in.. Realtime news
synchronisation #aber_ftw
Connor Goddard @cgddrd
Edel Sherratt @edel_sherratt
$("li").css("background-color","yellow").slideUp("slow");
$()
$('p.text-label') // Returns jQuery object with all DOM elements that match.
$(window.document) // Returns jQuery object representing the document.
$('<p class="text-label">Hello World!</p>') // Returns jQuery object.
$(printGreeting) // Invokes function once DOM is ready.
$("section").length; // Number of <section> elements within the body.
$("section")[1]; // Access the second <section> element.
$("section")[1].html("<p>Hello World!</p>"); // Set the innerHTML for the second
<section> element.
$("section").selector; // Returns "section"
$("section").context; // Most likely returns "document"
$("section").jquery; // Returns jQuery version number (e.g. "1.4.2")
$("section").parent(); // Returns jQuery object for <body> or perhaps <div>.
$("li.selected").css("background-color", "red").siblings().css("background-color",
"white");
$("ul").children().first(); // Returns first <li> element.
// Could also do: $("li").first();
// Get the associated CSS property.
$("h2").css("color") // Returns "rgb(45, 62, 79)".
// Change the background-color CSS property for all <H2> elements.
$("h2").css("background-color", "#47D591");
<H2>
// Change the "href" attribute of an <A> element.
$("a").attr("href","http://www.qinusty.co.uk/dapstep.mp3");
// Update the content for the <A> element with the content of the <H2> element.
$("a").text($("a").siblings("h2").text());
// Update the innerHTML for the <A> element with the content of the <H2> element.
$("a").html("<i>" + $("a").siblings("h2").text() + "</i>");
Aber Comp Sci Homepage
// Iterate through all available <LI> elements and change their background colour.
$("li").css("background-color", "red");
each()
$("p").each(function(i) {
$(this).css("background-color", "red");
$(this).append(" (that was li number " + i + ")");
})
// Add 'click' event handler on <LI> elements.
$("li").on("click",function() {
$(this).css("background-color","blue");
});
// Provide custom logic on <FORM> submit.
$("form").on( "submit", function( event ) {
// Perform custom action with form data.
});
// 'Special' event triggered when DOM is ready.
$(document).ready(function() {
// Initalise component or display content.
});
<script src="lib/js/jquery-1.12.3.min.js"></script>
<script src="https://code.jquery.com/jquery-1.12.0.min.js"></script>
<H1>
<H1>
<H1> onLoad()
buttonpressed()
ng-
{{ ... }}
<!-- ng-app is used to "bootstrap" AngularJS, by designating the root element of
the application -->
<body ng-app="">
<div>
<p>The sum of 5 + 5 is: {{ 5 + 5 }}</p> <!-- "The sum of 5 + 5 is: 10" -->
</div>
</body>
<div ng-app="">
<!-- ng-model binds the content of the input box to the property "name". -->
<p>Name: <input type="text" ng-model="name"></p>
<p>My name is: {{name}}></p>
</div>
<div ng-app="" ng-controller="myController">
<p>First Name: <input type="text" ng-model="firstName"></p>
<p>Surname: <input type="text" ng-model="surname"></p>
<p>My full name is: {{firstName + " " + surname}}></p>
</div>
<script>
var myApp = angular.module('myApp', []);
// Define our new AngularJS controller.
myApp.controller('myController', function($scope) {
// $scope provides access to our model.
$scope.firstName= "John";
$scope.surname= "Doe";
});
</script>
™
Javascript Libraries & Frameworks | Connor Goddard
Javascript Libraries & Frameworks | Connor Goddard
Javascript Libraries & Frameworks | Connor Goddard
Javascript Libraries & Frameworks | Connor Goddard
Javascript Libraries & Frameworks | Connor Goddard

Weitere ähnliche Inhalte

Was ist angesagt?

Advanced Scripting in Second Life
Advanced Scripting in Second LifeAdvanced Scripting in Second Life
Advanced Scripting in Second Lifejeremykemp
 
Addthis widget
Addthis widgetAddthis widget
Addthis widgetmasilopm
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applicationsKexin Xie
 
2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.js2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.jsNoritada Shimizu
 

Was ist angesagt? (7)

Advanced Scripting in Second Life
Advanced Scripting in Second LifeAdvanced Scripting in Second Life
Advanced Scripting in Second Life
 
Addthis widget
Addthis widgetAddthis widget
Addthis widget
 
google chart
google chartgoogle chart
google chart
 
Functional programming
Functional programming Functional programming
Functional programming
 
Scaling up data science applications
Scaling up data science applicationsScaling up data science applications
Scaling up data science applications
 
20151224-games
20151224-games20151224-games
20151224-games
 
2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.js2016 gunma.web games-and-asm.js
2016 gunma.web games-and-asm.js
 

Andere mochten auch

(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...Amazon Web Services
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureSimon Willison
 
Java vs javascript (XPages)
Java vs javascript (XPages)Java vs javascript (XPages)
Java vs javascript (XPages)Andrew Barickman
 
JavaOne 2014: Java vs JavaScript
JavaOne 2014:   Java vs JavaScriptJavaOne 2014:   Java vs JavaScript
JavaOne 2014: Java vs JavaScriptChris Bailey
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJAXLondon_Conference
 
JavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsJavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsPiyush Katariya
 
Choosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for DevelopmentChoosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for DevelopmentEdward Apostol
 
10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScriptGeertjan Wielenga
 
Webinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without serversWebinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without serversAmazon Web Services
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)Addy Osmani
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksFITC
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersMicroservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersDanilo Poccia
 
Scalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureScalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureNicholas Zakas
 
AWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time BiddingAWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time BiddingAmazon Web Services
 

Andere mochten auch (15)

(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
(DEV306) Building Cross-Platform Applications Using the AWS SDK for JavaScrip...
 
JavaScript Libraries: The Big Picture
JavaScript Libraries: The Big PictureJavaScript Libraries: The Big Picture
JavaScript Libraries: The Big Picture
 
Java vs javascript (XPages)
Java vs javascript (XPages)Java vs javascript (XPages)
Java vs javascript (XPages)
 
JavaOne 2014: Java vs JavaScript
JavaOne 2014:   Java vs JavaScriptJavaOne 2014:   Java vs JavaScript
JavaOne 2014: Java vs JavaScript
 
Javascript libraries
Javascript librariesJavascript libraries
Javascript libraries
 
Java vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris BaileyJava vs. Java Script for enterprise web applications - Chris Bailey
Java vs. Java Script for enterprise web applications - Chris Bailey
 
JavaScript for Enterprise Applications
JavaScript for Enterprise ApplicationsJavaScript for Enterprise Applications
JavaScript for Enterprise Applications
 
Choosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for DevelopmentChoosing Javascript Libraries to Adopt for Development
Choosing Javascript Libraries to Adopt for Development
 
10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript10 Building Blocks for Enterprise JavaScript
10 Building Blocks for Enterprise JavaScript
 
Webinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without serversWebinar AWS 201 Delivering apps without servers
Webinar AWS 201 Delivering apps without servers
 
Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)Tools For jQuery Application Architecture (Extended Slides)
Tools For jQuery Application Architecture (Extended Slides)
 
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript FrameworksBuilding Enterprise Grade Front-End Applications with JavaScript Frameworks
Building Enterprise Grade Front-End Applications with JavaScript Frameworks
 
Microservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker ContainersMicroservice Architecture on AWS using AWS Lambda and Docker Containers
Microservice Architecture on AWS using AWS Lambda and Docker Containers
 
Scalable JavaScript Application Architecture
Scalable JavaScript Application ArchitectureScalable JavaScript Application Architecture
Scalable JavaScript Application Architecture
 
AWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time BiddingAWS Architecture Case Study: Real-Time Bidding
AWS Architecture Case Study: Real-Time Bidding
 

Ähnlich wie Javascript Libraries & Frameworks | Connor Goddard

Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9Jack Franklin
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with ClojureDmitry Buzdin
 
Cheap frontend tricks
Cheap frontend tricksCheap frontend tricks
Cheap frontend tricksambiescent
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensionserwanl
 
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB jhchabran
 
Jquery optimization-tips
Jquery optimization-tipsJquery optimization-tips
Jquery optimization-tipsanubavam-techkt
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web developmentJohannes Brodwall
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in GroovyGanesh Samarthyam
 
The things browsers can do! SAE Alumni Convention 2014
The things browsers can do! SAE Alumni Convention 2014The things browsers can do! SAE Alumni Convention 2014
The things browsers can do! SAE Alumni Convention 2014Christian Heilmann
 
Scala 3camp 2011
Scala   3camp 2011Scala   3camp 2011
Scala 3camp 2011Scalac
 
Introduzione JQuery
Introduzione JQueryIntroduzione JQuery
Introduzione JQueryorestJump
 
jQuery - 10 Time-Savers You (Maybe) Don't Know
jQuery - 10 Time-Savers You (Maybe) Don't KnowjQuery - 10 Time-Savers You (Maybe) Don't Know
jQuery - 10 Time-Savers You (Maybe) Don't Knowgirish82
 
jQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and PerformancejQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and PerformanceJonas De Smet
 

Ähnlich wie Javascript Libraries & Frameworks | Connor Goddard (20)

jQuery
jQueryjQuery
jQuery
 
JQuery Flot
JQuery FlotJQuery Flot
JQuery Flot
 
jQuery Essentials
jQuery EssentialsjQuery Essentials
jQuery Essentials
 
Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9Introduction to jQuery - Barcamp London 9
Introduction to jQuery - Barcamp London 9
 
Refactoring to Macros with Clojure
Refactoring to Macros with ClojureRefactoring to Macros with Clojure
Refactoring to Macros with Clojure
 
Cheap frontend tricks
Cheap frontend tricksCheap frontend tricks
Cheap frontend tricks
 
JQuery
JQueryJQuery
JQuery
 
Paris js extensions
Paris js extensionsParis js extensions
Paris js extensions
 
Html5 For Jjugccc2009fall
Html5 For Jjugccc2009fallHtml5 For Jjugccc2009fall
Html5 For Jjugccc2009fall
 
Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB Introduction à CoffeeScript pour ParisRB
Introduction à CoffeeScript pour ParisRB
 
Jquery optimization-tips
Jquery optimization-tipsJquery optimization-tips
Jquery optimization-tips
 
Bare-knuckle web development
Bare-knuckle web developmentBare-knuckle web development
Bare-knuckle web development
 
Productive Programming in Groovy
Productive Programming in GroovyProductive Programming in Groovy
Productive Programming in Groovy
 
The things browsers can do! SAE Alumni Convention 2014
The things browsers can do! SAE Alumni Convention 2014The things browsers can do! SAE Alumni Convention 2014
The things browsers can do! SAE Alumni Convention 2014
 
Scala 3camp 2011
Scala   3camp 2011Scala   3camp 2011
Scala 3camp 2011
 
Advance java
Advance javaAdvance java
Advance java
 
Introduzione JQuery
Introduzione JQueryIntroduzione JQuery
Introduzione JQuery
 
jQuery - 10 Time-Savers You (Maybe) Don't Know
jQuery - 10 Time-Savers You (Maybe) Don't KnowjQuery - 10 Time-Savers You (Maybe) Don't Know
jQuery - 10 Time-Savers You (Maybe) Don't Know
 
jQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and PerformancejQuery: Tips, tricks and hints for better development and Performance
jQuery: Tips, tricks and hints for better development and Performance
 
A Shiny Example-- R
A Shiny Example-- RA Shiny Example-- R
A Shiny Example-- R
 

Javascript Libraries & Frameworks | Connor Goddard

  • 1.
  • 2.
  • 3.
  • 4.
  • 5. var string1 = "Hello", string2 = "World"; var myLibrary = new ExampleLibrary(); var concatString = myLibrary.concat(string1, string2); var myFramework = new ExampleFramework(); myFramework.bind("loadPage", displayMessage); function displayMessage() { alert("Hello World!") }
  • 6.
  • 7. #aber_ftw 12 Aug 05 Jul #aber_ftw CS25210 resit: Fri Aug 12th at 3pm (today!) is the deadline for uploading your web game and report. #aber_ftw The summer 2016 supplementary (resit) assignment is now available in Blackboard Edel Sherratt @edel_sherratt Edel Sherratt @edel_sherratt
  • 8. Embed View on Twitter 27 Apr Felt someone should jump in.. Realtime news synchronisation #aber_ftw Connor Goddard @cgddrd Edel Sherratt @edel_sherratt
  • 9.
  • 10.
  • 12. $() $('p.text-label') // Returns jQuery object with all DOM elements that match. $(window.document) // Returns jQuery object representing the document. $('<p class="text-label">Hello World!</p>') // Returns jQuery object. $(printGreeting) // Invokes function once DOM is ready.
  • 13. $("section").length; // Number of <section> elements within the body. $("section")[1]; // Access the second <section> element. $("section")[1].html("<p>Hello World!</p>"); // Set the innerHTML for the second <section> element.
  • 14. $("section").selector; // Returns "section" $("section").context; // Most likely returns "document" $("section").jquery; // Returns jQuery version number (e.g. "1.4.2") $("section").parent(); // Returns jQuery object for <body> or perhaps <div>. $("li.selected").css("background-color", "red").siblings().css("background-color", "white"); $("ul").children().first(); // Returns first <li> element. // Could also do: $("li").first();
  • 15. // Get the associated CSS property. $("h2").css("color") // Returns "rgb(45, 62, 79)". // Change the background-color CSS property for all <H2> elements. $("h2").css("background-color", "#47D591"); <H2>
  • 16. // Change the "href" attribute of an <A> element. $("a").attr("href","http://www.qinusty.co.uk/dapstep.mp3"); // Update the content for the <A> element with the content of the <H2> element. $("a").text($("a").siblings("h2").text()); // Update the innerHTML for the <A> element with the content of the <H2> element. $("a").html("<i>" + $("a").siblings("h2").text() + "</i>"); Aber Comp Sci Homepage
  • 17. // Iterate through all available <LI> elements and change their background colour. $("li").css("background-color", "red"); each() $("p").each(function(i) { $(this).css("background-color", "red"); $(this).append(" (that was li number " + i + ")"); })
  • 18. // Add 'click' event handler on <LI> elements. $("li").on("click",function() { $(this).css("background-color","blue"); }); // Provide custom logic on <FORM> submit. $("form").on( "submit", function( event ) { // Perform custom action with form data. }); // 'Special' event triggered when DOM is ready. $(document).ready(function() { // Initalise component or display content. });
  • 21.
  • 22.
  • 23.
  • 24.
  • 25.
  • 26. ng- {{ ... }} <!-- ng-app is used to "bootstrap" AngularJS, by designating the root element of the application --> <body ng-app=""> <div> <p>The sum of 5 + 5 is: {{ 5 + 5 }}</p> <!-- "The sum of 5 + 5 is: 10" --> </div> </body>
  • 27. <div ng-app=""> <!-- ng-model binds the content of the input box to the property "name". --> <p>Name: <input type="text" ng-model="name"></p> <p>My name is: {{name}}></p> </div>
  • 28. <div ng-app="" ng-controller="myController"> <p>First Name: <input type="text" ng-model="firstName"></p> <p>Surname: <input type="text" ng-model="surname"></p> <p>My full name is: {{firstName + " " + surname}}></p> </div> <script> var myApp = angular.module('myApp', []); // Define our new AngularJS controller. myApp.controller('myController', function($scope) { // $scope provides access to our model. $scope.firstName= "John"; $scope.surname= "Doe"; }); </script>
  • 29.
  • 30.
  • 31.
  • 32.
  • 33.
  • 34.