Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.



Published on

Slides from my talk about EmbedJS at HH.js

Published in: Technology
  • Be the first to comment

  • Be the first to like this


  1. 1. EmbedJS The Toolkit. The Philosophy. Jens Arps uxebu
  2. 2. We open the mobile web.
  3. 3. EmbedJS (Based on the Dojo Toolkit)
  4. 4. JS capable devices… …and there will be more to embed JavaScript on.
  5. 5. The Approach Take your library apart to reconstruct it as needed
  6. 6. ZOMG!! Why?!?
  7. 7. No code branching at runtime.
  8. 8. 1) No code branching at runtime. How? Why? • Features have different implementations. •You wouldn‘t want to ship a car w/ a fuel tank and a battery if you only need one of them. • Ship no useless code. • Don‘t waste computing power on runtime branching. Feature: energyDepot Implementations: fuelTank, battery
  9. 9. Highly flexible build system.
  10. 10. 2) Highly flexible build system. How? Why? • Features are as small as possible/reasonable. • Dependencies are declared in a implementaion => feature way. • Ship only what you need!!You don‘t need a certain feature for your project? Don‘t ship it!
  11. 11. Highly maintainable codebase.
  12. 12. 3) Highly maintainable codebase. How? Why? • Coder is forced to separate semantically different code. • Errors in one implementation do not affect another impl. • Small features make errors easy to isolate. • Self-contained features make erros easier to fix. • Other coders can easily join in on a project. • Features are as small as possible/reasonable. • Features are semantically meaningful units. • Features are as self-contained as possible.
  13. 13. What did this do to EmbedJS?
  14. 14. • A very selective API (a cherry-picked ~70 methods @ < 25k, unzipped). • Implementations for every feature for almost every possible platform. *) • A simple-to-use but highly effectve build tool (that you can use for your own projects, too). • The possibility to create a unique custom build for your project - in seconds. • The possibility for you to extend EmbedJS with the features/platforms you want. The tools:
  15. 15. Issues?
  16. 16. Let‘s look at some code.
  17. 17. Thanks! @embedjs @uxebu @jensarps