Software engineering notes

Posts Tagged ‘bayjax

notes: Bayjax Meetup @ Yahoo! Sunnyvale (7/27): Crockford “The JSON Saga”

with 2 comments

Douglas Crockford describing The JSON Saga

Douglas Crockford talking about "The JSON Saga"

 

notes from Bayjax Meetup: http://www.meetup.com/BayJax/calendar/108524

Doug Crockford on the json saga

– json already existed in nature, but crockford discovered it

– it wwas being used at netscape in he form of array literals in communication 5 yrs before crockford discovered it

– crockford’s first transmission used js embedded in html in a frame for cross-browser compatability

– they set document.domain to get around the same origin policy

– backslashes are tolerated in json so we can put html in json

– original name was JSML, but that conflicted w/ a pre-existing java protcol

– json’s good for interserver and db applications

– some of his customers balked at usage because it wasn’t standard, so crockford put up a website to standardize it

– json is the intersection of modern programming languages

— simple values

— sequence of values

— collection of named values

— an intersection is easier to find than a union

– js is brilliant for state machines

– most ppl implement json parsers using eval, but this must be guarded by regex to valiudate the json, which slows it doen

– the latest version of ecma script implements a native JSON.parse, which is ver fast

– ajax was an important influence on json uptake

– improvements

— strip comments 

— comments broke the parser

— comment parsing greatly increased complexity

— alignment w/ yaml

— added e notation to numnbers

– no version number

— everything’s crap until 3.0, but we avoid this by not having version numbers

— perhaps someday it will be replaced

— at least one piece of the stack will remain constant forever

– minimalism

— can fit on the back of a business card

– influences

— lisp s-expressions

— perhaps the greatest influence

— rebol

— al built upon a represenation of data, which is then executable

— rebol is a brilliant language

— JS, Python, NewtonScript

— Brendon Ike is a brilliant guy, so it’s no accident that it has brilliant aspects

— all were developed in isolation at the same time

— NeXT

— OpenStep property lists

— XML

— how did it become so popular?

—- html reduced it to basics, made it more basic, and made it easier to get everything to balance

—- A-level CTOs threw it out, but the B- and C-level developers embraced it and outnumbered the A-levels

— john seely brown said “maybe only something this simple could work”

—- he thought that the future was in loosely coupled systems

— xmlsucks.org

— some guy named pault lists all the xml alternatives

– disruption

– the 1st rule of workmanship: use the right tool for the right job

– xml arose out of: one tool to rule them all

– where did the idea come from that every data format should be a document format?

— runoff was one of the first

— GML

— Scribe

— the first place where document formate were done well

— separated format from markup

— if the web had been based on scribe instead of sgml, it would be a better place today

— scribe was the first time where doc format was used for data

– license

— MIT + “the software shall be used for good, not evil”

– the logo

— related to the ambihelical hexnut 😛

— a square and a circle w/ a twist

— data interchange we can believe in

– questions

— what would make html better

— make it extensible

— to be able to define new tags using css

— is there case-sensitivity in unicode?

— maybe.  use lower-case in the meantime

— what would you like to see replace json

— jsonp is brilliant

— currently, we can’t easily represent simple bags

— remove the quotes from the keys

— a = []; a[0] = a; => infinite loop when run thru parser

— schema-less langs

— i don’t care

— brilliant work in schema-less dbs now

— why no commnets

— because ppl were using them to communicate w/ the parser

doug crockford on the json saga
– json already existed in nature, but crockford discovered it
– it wwas being used at netscape in he form of array literals in communication 5 yrs before crockford discovered it
– crockford’s first transmission used js embedded in html in a frame for cross-browser compatability
– they set document.domain to get around the same origin policy
– backslashes are tolerated in json so we can put html in json
– original name was JSML, but that conflicted w/ a pre-existing java protcol
– json’s good for interserver and db applications
– some of his customers balked at usage because it wasn’t standard, so crockford put up a website to standardize it
– json is the intersection of modern programming languages
— simple values
— sequence of values
— collection of named values
— an intersection is easier to find than a union
– js is brilliant for state machines
– most ppl implement json parsers using eval, but this must be guarded by regex to valiudate the json, which slows it doen
– the latest version of ecma script implements a native JSON.parse, which is ver fast
– ajax was an important influence on json uptake
– improvements
— strip comments 
— comments broke the parser
— comment parsing greatly increased complexity
— alignment w/ yaml
— added e notation to numnbers
– no version number
— everything’s crap until 3.0, but we avoid this by not having version numbers
— perhaps someday it will be replaced
— at least one piece of the stack will remain constant forever
– minimalism
— can fit on the back of a business card
– influences
— lisp s-expressions
— perhaps the greatest influence
— rebol
— al built upon a represenation of data, which is then executable
— rebol is a brilliant language
— JS, Python, NewtonScript
— Brendon Ike is a brilliant guy, so it’s no accident that it has brilliant aspects
— all were developed in isolation at the same time
— NeXT
— OpenStep property lists
— XML
— how did it become so popular?
—- html reduced it to basics, made it more basic, and made it easier to get everything to balance
—- A-level CTOs threw it out, but the B- and C-level developers embraced it and outnumbered the A-levels
— john seely brown said “maybe only something this simple could work”
—- he thought that the future was in loosely coupled systems
— xmlsucks.org
— some guy named pault lists all the xml alternatives
– disruption
– the 1st rule of workmanship: use the right tool for the right job
– xml arose out of: one tool to rule them all
– where did the idea come from that every data format should be a document format?
— runoff was one of the first
— GML
— Scribe
— the first place where document formate were done well
— separated format from markup
— if the web had been based on scribe instead of sgml, it would be a better place today
— scribe was the first time where doc format was used for data
– license
— MIT + “the software shall be used for good, not evil”
– the logo
— related to the ambihelical hexnut 😛
— a square and a circle w/ a twist
— data interchange we can believe in
– questions
— what would make html better
— make it extensible
— to be able to define new tags using css
— is there case-sensitivity in unicode?
— maybe.  use lower-case in the meantime
— what would you like to see replace json
— jsonp is brilliant
— currently, we can’t easily represent simple bags
— remove the quotes from the keys
— a = []; a[0] = a; => infinite loop when run thru parser
— schema-less langs
— i don’t care
— brilliant work in schema-less dbs now
— why no commnets
— because ppl were using them to communicate w/ the parserdoug crockford on the json saga
– json already existed in nature, but crockford discovered it
– it wwas being used at netscape in he form of array literals in communication 5 yrs before crockford discovered it
– crockford’s first transmission used js embedded in html in a frame for cross-browser compatability
– they set document.domain to get around the same origin policy
– backslashes are tolerated in json so we can put html in json
– original name was JSML, but that conflicted w/ a pre-existing java protcol
– json’s good for interserver and db applications
– some of his customers balked at usage because it wasn’t standard, so crockford put up a website to standardize it
– json is the intersection of modern programming languages
— simple values
— sequence of values
— collection of named values
— an intersection is easier to find than a union
– js is brilliant for state machines
– most ppl implement json parsers using eval, but this must be guarded by regex to valiudate the json, which slows it doen
– the latest version of ecma script implements a native JSON.parse, which is ver fast
– ajax was an important influence on json uptake
– improvements
— strip comments 
— comments broke the parser
— comment parsing greatly increased complexity
— alignment w/ yaml
— added e notation to numnbers
– no version number
— everything’s crap until 3.0, but we avoid this by not having version numbers
— perhaps someday it will be replaced
— at least one piece of the stack will remain constant forever
– minimalism
— can fit on the back of a business card
– influences
— lisp s-expressions
— perhaps the greatest influence
— rebol
— al built upon a represenation of data, which is then executable
— rebol is a brilliant language
— JS, Python, NewtonScript
— Brendon Ike is a brilliant guy, so it’s no accident that it has brilliant aspects
— all were developed in isolation at the same time
— NeXT
— OpenStep property lists
— XML
— how did it become so popular?
—- html reduced it to basics, made it more basic, and made it easier to get everything to balance
—- A-level CTOs threw it out, but the B- and C-level developers embraced it and outnumbered the A-levels
— john seely brown said “maybe only something this simple could work”
—- he thought that the future was in loosely coupled systems
— xmlsucks.org
— some guy named pault lists all the xml alternatives
– disruption
– the 1st rule of workmanship: use the right tool for the right job
– xml arose out of: one tool to rule them all
– where did the idea come from that every data format should be a document format?
— runoff was one of the first
— GML
— Scribe
— the first place where document formate were done well
— separated format from markup
— if the web had been based on scribe instead of sgml, it would be a better place today
— scribe was the first time where doc format was used for data
– license
— MIT + “the software shall be used for good, not evil”
– the logo
— related to the ambihelical hexnut 😛
— a square and a circle w/ a twist
— data interchange we can believe in
– questions
— what would make html better
— make it extensible
— to be able to define new tags using css
— is there case-sensitivity in unicode?
— maybe.  use lower-case in the meantime
— what would you like to see replace json
— jsonp is brilliant
— currently, we can’t easily represent simple bags
— remove the quotes from the keys
— a = []; a[0] = a; => infinite loop when run thru parser
— schema-less langs
— i don’t care
— brilliant work in schema-less dbs now
— why no commnets
— because ppl were using them to communicate w/ the parser

Written by Erik

July 28, 2009 at 8:30 am

Posted in notes

Tagged with , , , ,

notes: Bayjax Meetup (7/27) @ Yahoo! Sunnyvale: Jon Leblanc on YQL + YUI

leave a comment »

 

Jon Leblanc talking about YQL + YUI

Jon Leblanc talking about YQL + YUI

 

 

Meetup: http://www.meetup.com/BayJax/calendar/10852424/

jonleblanc on using yui w/ yql
– “select * from internet” gets a laugh
– the console (developer.yahoo.com/yql/console) is an easy way to get started w/ yql
– there are ~80 tables of y! data
– 253 community tables on github.com/yql
– yql execute
– yql insert|update|delete
– christian heilmann’s “geomaker” tool scrapes a url, extracts locations, and plots them on a map
– github.com/jsleblanc/yql-utilities
— js-yql-display
— yql can return jsonp and jsonpx
— yql plays well w/ yui
– questions
— rate limiting
— 1000/hr/ip w/ oauth
— w/ oauth 100k/day/ip
— caching?
— defaults to 5 min
— build your own table or append a var to url to break the cache

jonleblanc on using yui w/ yql

– the console (developer.yahoo.com/yql/console) is an easy way to get started w/ yql

– there are ~80 tables of y! data

– 253 community tables on github.com/yql

– yql execute

– yql insert|update|delete

– christian heilmann’s “geomaker” tool scrapes a url, extracts locations, and plots them on a map

– github.com/jcleblanc/yql-utilities

— js-yql-display

— yql can return jsonp and jsonpx

— yql plays well w/ yui

– links are on http://speakerrate.com/jcleblanc

– questions

— rate limiting

— 1000/hr/ip w/ oauth

— w/ oauth 100k/day/ip

— caching?

— defaults to 5 min

— build your own table or append a var to url to break the cache

Written by Erik

July 27, 2009 at 7:58 pm

Posted in notes

Tagged with , , , ,

notes: Bayjax Meetup @ Yahoo! Sunnyvale (7/27): Nicole Sullivan on OO CSS

leave a comment »

 

Nicole Sullivan talking about Object Oriented CSS

Nicole Sullivan talking about Object Oriented CSS

 

 

meetup: http://www.meetup.com/BayJax/calendar/10852424/

nicole sullivan (@stubbornella) on object-oriented css

– slides are on slideshare/stubbornella

– how we are doing css wrong:

— we require expert-level developers to be effective

— filesize is growing out of control

— code re-use is almost nonexistant

— code is too fragile

– most important mistake: we write overly clever modules; everything is a one-off

— so size increases best-case at a 1-1 rate

– so what is oocss?

— stubbornella did write an open-source framework

— oocss lives to the left of the curly braces

– pieces: selctors

— the size of the css file is one of the largest factors in css performance; focus on http requests

— reflows and rendering is not that important

— duplication is worse than stale rules

— define default values; don’t repeat defaults

— define structure in a separate class

— style classes rather than elements; define styles to be dom-independant

— avoid styling elements; define styles in classes

— give all our rules the same strength; make every rule to have the same speceficity

— use hacks sparingly

— we should only need hacks for ie 5.5, 6, and maybe 7; nothing else requires it

— use underscore and star instead of js to apply browser hacks

— avoid specifying location, eg use .sidenave instead of .nav ul

— avoid overly-specific classes

— avoid singeltons, ie aoid using ids

— ids kill re-use

— use mixins

— use encapsulation

— if an object can live on its own, use wrapper classes.  Otherwise, avoid cascading

– heading

— componenets are like reusable legos

— > reusing elements makes them performance freebees <

— avoid duplication

— avoid nearly identical modules

— rule: if two modules are two similar to include next to each other, they’re too close for the same site

— avoid location-depemdent styles

— “HEADING” shouldn’t become “heading” on another part of the page

— define global defaults

— apply styles to classes instead of elements

—- respects semantics while allowing visual flexibility

— do we really need more than 6 headings?

– module

– grid

– questiojns

— if the html is broken, nice css wont work, right?

— yes.  a css obj is composed of html and css

— any research into compilation?

— the w3c should implement “extends” and “inherits” instead of us using compilation

Written by Erik

July 27, 2009 at 7:14 pm

notes: Bayjax Meetup @ Yahoo! Sunnyvale (7/27): Satyen Desai on YUI3 architecture

with one comment

Satyen Desai describing architecture of YUI3

Satyen Desai describing architecture of YUI3

satyen desai talking about YUI 3 arch concepts & lessons learned

– mtivation
— yui2 is mature, why change it?
— lighter 
— allow fine-grained include control
— rethink the way we use code: move away from traditional inheritance model towards js augmentation & mixins
— make it easier
— yui2 has four different widget api classes; yui3 has a single, standard api
— make common actions easier
—- iteration
—- chaining
— runtime performance, ie make it faster
— yui2 has always used a good namespace
— yui3 takes namespacing further by giving you instance-level control
-examples
— self-populating
— yui3 pulls down dependencies in an optimized way
—- no more file-order concerns
— yui3 offers protection
— each instance is sandboxed and pulls in its dependencies indeendant of other instances
— self-populating
— naturally creates anonymous function wrappers
— code re-use
— yui3 avoids the kitchen sink by breaking libs into sub-modules and allowing the developer to only load the submodules required
– plugins and examples
— in yui2, all instances of a class contain the kitchen sink
— in yui3, we can use and extend at the sub-module-level
– events
— built from decoupled code
— event facades wrap events in a consistent, normalized interface
— facedes wrap custom events as well
— on and after events are built into the event publisher
— bubbling
— yui3 affords more control over the event stack
— detaching listeners
– node facade
— a single location for wrking w/ anything html related
— enhances and normalizes
— yui3 build utils into the facade as opposed to yui2’s library-based orientation
— extendable
— we can attach plug-ins to a node, eg an io object
— iterationa and batch operations are suported
– core lang convneineces
— isType methods
– questions
— cross domain?
— managed via flash object
— multiple versions?
— the last version loaded is the current version available
— what does yui3 do better than other libs?
— yui3 excels in readability and maintainablility
— can yui3 be used on top of yui2?
— currently, you can use both on a page, but not necessarily build one on the other
– this talk is available online

 

Satyen Desai describing YUI3 architecture

Satyen Desai describing YUI3 architecture

 

 

meetup: http://www.meetup.com/BayJax/calendar/10852424/

Satyen Desai talking about YUI 3 arch concepts & lessons learned

– motivation

— yui2 is mature, why change it?

— lighter 

— allow fine-grained include control

— rethink the way we use code: move away from traditional inheritance model towards js augmentation & mixins

— make it easier

— yui2 has four different widget api classes; yui3 has a single, standard api

— make common actions easier

—- iteration

—- chaining

— runtime performance, ie make it faster

— yui2 has always used a good namespace

— yui3 takes namespacing further by giving you instance-level control

-examples

— self-populating

— yui3 pulls down dependencies in an optimized way

—- no more file-order concerns

— yui3 offers protection

— each instance is sandboxed and pulls in its dependencies indeendant of other instances

— self-populating

— naturally creates anonymous function wrappers

— code re-use

— yui3 avoids the kitchen sink by breaking libs into sub-modules and allowing the developer to only load the submodules required

– plugins and examples

— in yui2, all instances of a class contain the kitchen sink

— in yui3, we can use and extend at the sub-module-level

– events

— built from decoupled code

— event facades wrap events in a consistent, normalized interface

— facedes wrap custom events as well

— on and after events are built into the event publisher

— bubbling

— yui3 affords more control over the event stack

— detaching listeners

– node facade

— a single location for wrking w/ anything html related

— enhances and normalizes

— yui3 build utils into the facade as opposed to yui2’s library-based orientation

— extendable

— we can attach plug-ins to a node, eg an io object

— iterationa and batch operations are suported

– core lang convneineces

— isType methods

– questions

— cross domain?

— managed via flash object

— multiple versions?

— the last version loaded is the current version available

— what does yui3 do better than other libs?

— yui3 excels in readability and maintainablility

— can yui3 be used on top of yui2?

— currently, you can use both on a page, but not necessarily build one on the other

– this talk is available online: http://developer.yahoo.com/yui/theater/

Written by Erik

July 27, 2009 at 6:41 pm

Posted in notes

Tagged with , ,