JavaScript for PHP Developers - Funkatron

May 18, 2010 - aka ECMAScript 3, circa 1999. JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010. Baseline is JS 1.5. 14. There are newer versions and functionality has been added, but you can't necessarily rely on anything beyond 1.5 to be supported everywhere ...
16MB Sizes 1 Downloads 112 Views
JavaScript for PHP Developers Ed Finkler @funkatron [email protected] May 18, 2010 #tekX #js4php http://joind.in/1564

What is this?

2

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

A practical overview of JS for the PHP developer Stop c+p'ing, start writing

3

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

- get you to stop copying and pasting and start writing JS

NOT CS-oriented I'm too dumb for that

4

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

- for much smarter people than me - I'm constantly learning new stuff about JavaScript 3 years after

My experiences and best practices FWIW

5

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

JavaScript dev is opinionated JS devs are kind of dickheads

6

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

History of JavaScript

7

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

Brendan Eich

8

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

"Mocha"

9

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

"LiveScript"

10

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

"JavaScript" Seemed like a good idea at the time

http://www.infoworld.com/d/developer-world/javascript-creator-ponders-past-future-704

11

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

Jesus Christ what a bad name

ECMAScript Yeesh

12

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

Core JavaScript

13

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

Baseline is JS 1.5 aka ECMAScript 3, circa 1999

14

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

There are newer versions and functionality has been added, but you can't necessarily rely on anything beyond 1.5 to be supported everywhere

Dynamically typed Hey, I know that!

15

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

Object-based

16

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

Object-oriented But not how you think

17

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

No classes Prototypal inheritance

Functional First class, baby!

18

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

Pass functions as parameters Declare functions anywhere Anonymous ("lamba") functions used a lot

Malleable Like giving clay to a monkey

19

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

you can redefine almost anything, including core objects

Core is pretty darn small You mean I don't have to memorize 4,500 function names?

20

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

Core JS Core Objects

Core Global Functions

Boolean

decodeURI

Number

decodeURIComponent

String

encodeURI

Array

encodeURIComponent

Object

eval

Function

isFinite

RegExp

isNaN

Date

parseFloat parseInt

21

JavaScript for PHP Developers - Ed Finkler - tek-X - May 18, 2010

What's missing? All the cool stuff!<