Opened 13 years ago

Closed 13 years ago

#8447 closed enhancement (fixed)

create a mobile profile of Dojo, specifically targeting WebKit

Reported by: alex Owned by: alex
Priority: high Milestone: 1.3
Component: Core Version: 1.2.3
Keywords: Cc: dylan, dante, James Burke, wildbill, Eugene Lazutkin, Adam Peller
Blocked By: Blocking:


Dojo needs a mobile variant. The simplest way to do that (today) is to simply create a version of dojo.js that removes everything non-webkit related.

Change History (15)

comment:1 Changed 13 years ago by alex

(In [16384]) ifdef's for the core to create a webkit-only version for use in, e.g., mobile devices. Refs #8447

Build this version with:

./ profile=base action=clean,release webkitMobile=true


comment:2 Changed 13 years ago by Eugene Lazutkin

Cc: Eugene Lazutkin added

comment:3 Changed 13 years ago by Adam Peller

Cc: Adam Peller added

comment:4 Changed 13 years ago by alex

Status: newassigned

thanks for adding peller to the cc, elazutkin. My bad for forgetting.

comment:5 Changed 13 years ago by alex

some quick implementation notes:

  • the ifdef approach isn't comprehensive. In query.js I was able to create a very tiny alternate implementation which relies on QSA *only* and ditches the DOM branch. We need more alternate implementations of things which can be pass-throughs like forEach, filter, map, etc.
  • some features might be dropped entirely for mobile use or totally re-worked. For example, CSS animations should make the animation system obsolete and a stub package loader might be entirely appropriate
  • more build system love is needed so that we can create a version which breaks up Dojo's core into file sizes small enough for devices like iphone to cache

comment:6 Changed 13 years ago by alex

(In [16389]) fix test html unit test failure in webkitMobile profile. Refs #8447. !strict

comment:7 Changed 13 years ago by alex

(In [16390]) my bad. Refs #8447. !strict

comment:8 Changed 13 years ago by alex

(In [16392]) tighten it up just a bit more for the webkitMobile build. Refs #8447. !strict

comment:9 Changed 13 years ago by alex

(In [16394]) more mobileWebkit exclusions. Refs #8447. !strict

comment:10 Changed 13 years ago by alex

just to track our progress here, this version of dojo.js now weighs in at 57K uncompressed at 20K gzipped, in comparison with our latest nightly build which was 79K uncompressed and 27K gzipped. These are 28% and 26% reductions in size (respectively) with no change in functionality or API.

comment:11 Changed 13 years ago by dante

I think this is the wrong ticket to mention a syntax error from removing closures in base. will find that ticket. Have this to add here:

Also, please document this before closing. You can follow the model of the page I did covering the recent expandProvide feature:

I created a link to that page from:

comment:12 Changed 13 years ago by dante

it was this ticket, trac is out of sync. in [16407] all builds broke:

sugr:~/www/dojobox/cleantrunk/util/buildscripts dante$ ./ action=release profile=base version=1.3.0
release:  Using profile: profiles/base.profile.js
release:  Using version number: 1.3.0 for the release.
release:  Deleting: ../../release/dojo
release:  Copying: ../../dojo to: ../../release/dojo/dojo
release:  Building dojo.js and layer files
release:  Interning strings for file: ../../release/dojo/dojo/dojo.js
release:  Optimizing (shrinksafe) file: ../../release/dojo/dojo/dojo.js
js: line 9189: syntax error

js: })();
js: .^

all of nightly is broken with "hasResource is undefined" and dojo.js isn't building.

comment:13 Changed 13 years ago by alex

(In [16414]) fixes build breakage that haysmark and phiggins found. Refs #8447. !strict

comment:14 Changed 13 years ago by alex

(In [16416]) fix for IE in non-build environment. !strict. Refs #8447

comment:15 Changed 13 years ago by alex

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.