Last month CEO Jeff Haynie spoke at the Amsterdam Titanium meetup I’m co-leading. The subject was of course Hyperloop, the foundation under Titanium 4.x also known as Ti.Next. Watch it here:
More native, more JS
But what I find maybe even more exciting is that it will implement the full NodeJS require specs. There’s an example in the Hyperloop repository demonstrating this. This means Titanium can require the
index.js by it’s directory name, require from a project’s local
node_modules folder, but also a global one.
In turn, this means you can drop a
package.json file with dependencies in your project directory, run
npm install and have NPM install packages like lodash and all their dependencies to the local or global
Another area that would benefit from NPM is Alloy. Already before it was stable, in July 2012 Tony and Jeff knew Alloy would need some kind of widget dependency management and as you go through the discussion under the related ticket you’ll see NPM arose as the logical solution there as well. This means Alloy will need some modifications done to be able to load widgets, but possibly also builtins and sync adapters from modules placed in the local or global
Of course a lot of packages on NPM depend on NodeJS core modules like fs, path etc. These obviously wouldn’t normally work in a Titanium environment, but as you’ll hear Jeff saying in the video Appcelerator is actually planning on writing an Hyperloop version of the full NodeJS core API in a later stadium! This will open it up for even more modules and would let you use something like wrench to traverse files on the device!
We still have maybe as long as one year to go until Ti.Next will be ready for production builds. I’m convinced the above will spur a whole new wave of new Titanium modules and Alloy widgets and other components, as well as solving the problem of re-using proprietary components. Therefor, I’ve opened a ticket requesting this to be implemented in Titanium 3.x. Please watch the ticket with me and add your comments and maybe we can enjoy these new features earlier next year!