- developer at Kainos, on placement year from University
- @Jack_Franklin
- javascriptplayground.com
A collection of tips, tricks and me moaning.
- JavaScript is awesome, the DOM sucks.
- jQuery, MooTools, Dojo and so on are big
- jQuery 1.8 minified = 93KB.
- That's a lot if I'm on a crappy connection or a crappy phone
- From jQuery 2.0 we'll be able to build custom builds, this is AWESOME
- Zepto (http://www.zeptojs.com).
- 25% of the size of jQuery
- Modern Browsers only (no extra code for old ones)
- Can make your own custom build
Note that some optional features of Zepto specifically target mobile browsers; as the original project goal was to specifically provide a leaner alternative to jQuery for the mobile web.
- matches jQuery API
- support targeted for mobile browsers
- iOS4 + Safari
- Android Browser
- Webkit based browsers
- webOS Browser
- Blackberry browser
- Use Zepto over jQuery or similar.
- Worth revisiting when jQuery 2 gives custom builds
- Alternative to Zepto
- "Super Micro tiny dom library"
- 10KB, 4KB gzipped
- http://xuijs.com/
- FORGET recreating UI Components
- Use CSS to style site differently at different screen sizes.
- mixed opinion from me
- great aim but its browser support aims are its achilles heel
- poor performance reported often, especially on Android
- most apps look the same - jQuery Mobile theme roller
- Appcelerator Titanium
- PhoneGap
- (with Titanium) great idea, tough to pull off in reality
- Both Titanium & PhoneGap have matured hugely recently.
- One code base (HTML/CSS/JS), multiple apps (iOS, Android, webOS, Blackberry, etc)
- Certainly worth checking out.
- often sites can be "turned mobile" with some well written Media Queries and CSS styles
- don't use JS if CSS could do the job
- minimal amount of HTTP Requests and smallest size possible (minify, etc)
- do you really need JS?
- Emulating native components sucks
- Solve your app's problem
- XUI or Zepto for smaller JS dependencies
- codebase as small as possible
- media queries and CSS styling
- @Jack_Franklin
- jackfranklin.co.uk
- javascriptplayground.com