Functional Java Script - Webtechcon 2009
Upcoming SlideShare
Loading in...5
×
 

Functional Java Script - Webtechcon 2009

on

  • 1,772 views

These slides (and the linked code samples) show some aspects of functional javascript programming.

These slides (and the linked code samples) show some aspects of functional javascript programming.

Statistics

Views

Total Views
1,772
Views on SlideShare
1,769
Embed Views
3

Actions

Likes
5
Downloads
38
Comments
0

1 Embed 3

http://www.slideshare.net 3

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

Functional Java Script - Webtechcon 2009 Functional Java Script - Webtechcon 2009 Presentation Transcript

  • Functional JavaScript Practical Tips, Tricks and Experiences @wolframkriesing @uxebu Montag, 16. November 2009
  • Montag, 16. November 2009
  • JavaScript Usability AJAX Browser mobile django widgets FrontEnd dojo OpenSource Web2.0 CSS UserExperience Montag, 16. November 2009
  • What is Functional Programming? Montag, 16. November 2009
  • Montag, 16. November 2009
  • treats computation as the evaluation of mathematical functions avoids state and mutable data output value of a function depends only on the input Montag, 16. November 2009
  • avoids state and mutable data Montag, 16. November 2009
  • output value of a function depends only on the input Montag, 16. November 2009
  • What is it? • programming style functions, closures, arguments, scope • mathemetics • stay focused • practical, pragmatic • functions create scope! Montag, 16. November 2009
  • Another Perspective nums.slice(0,3) take 3 nums Montag, 16. November 2009
  • Demo sum.html http://static.uxebu.com/~cain/functional-examples/sum.html Montag, 16. November 2009
  • Function creates scope what else can? Montag, 16. November 2009
  • •(function(){})() • create scope •(function(d){...})(dojo) • reduce side effects • prototype overriding can screw you! Montag, 16. November 2009
  • •(function(d){...})(dojo) • reduce side effects • prototype overriding can screw you! • function returning a function • apply/call allow to pass context • closures Montag, 16. November 2009
  • Demo create-scope.html http://static.uxebu.com/~cain/functional-examples/create-scope.html Montag, 16. November 2009
  • Closures Montag, 16. November 2009
  • Montag, 16. November 2009
  • Are you lazy! Montag, 16. November 2009
  • You like to be? Montag, 16. November 2009
  • Be lazy! Montag, 16. November 2009
  • Lazy JavaScript... Montag, 16. November 2009
  • ROX Montag, 16. November 2009
  • Demo lazy.html http://static.uxebu.com/~cain/functional-examples/lazy.html Montag, 16. November 2009
  • Demo hitch.html http://static.uxebu.com/~cain/functional-examples/hitch.html Montag, 16. November 2009
  • Use side effects Montag, 16. November 2009
  • Use side effects Montag, 16. November 2009
  • Montag, 16. November 2009
  • ["00300_car", "00060_bike", "00200_motorbike", ...] [300, 60, 200, ...].sort() Montag, 16. November 2009
  • Montag, 16. November 2009
  • Montag, 16. November 2009
  • Demo dojox.lang.functional.lambda Montag, 16. November 2009
  • Used where? • AJAX • jQuery, dojo, YUI, etc. • $.each, $.map, ... • $("div").css("color", "red") • dojo.hitch() • etc. Montag, 16. November 2009
  • Pros + Cons • reduces cost • simplify problems • speed? • seperate concerns think different • • confidence++ • learn when to use it • testability • it's optional Montag, 16. November 2009
  • thx, Q&A @wolframkriesing @uxebu Montag, 16. November 2009