45
2.0 Leaner & Meaner

TiConf NY 2014 - Alloy 2.0

Embed Size (px)

DESCRIPTION

The future of Alloy and open source development at Appcelerator

Citation preview

Page 1: TiConf NY 2014 - Alloy 2.0

2.0Leaner & Meaner

Page 2: TiConf NY 2014 - Alloy 2.0

#HappyMothersDayFromTiConf

Page 3: TiConf NY 2014 - Alloy 2.0

Text

Tony Lukasavage@tonylukasavage [email protected]

Page 4: TiConf NY 2014 - Alloy 2.0

MVC framework for Titanium

Declarative UI via XML

Styling via TSS

Models & data bindings

Widgets

Embeds best practices and high performance techniques aimed at delivering the most stable,

high quality Titaniums apps possible.

Page 5: TiConf NY 2014 - Alloy 2.0

3 types of people

Those who love Alloy Those who have never used Alloy Those who have founded Apperson Labs

Page 6: TiConf NY 2014 - Alloy 2.0

Why Alloy Works

Community-driven effort

Feedback loop

Iterations & experience

Features based on need

Page 7: TiConf NY 2014 - Alloy 2.0

How can we do better?

Vision & Transparency Road map Ownership

Page 8: TiConf NY 2014 - Alloy 2.0

app development Features, best practices, and stability

“If builders built buildings like programmers wrote programs, then the first woodpecker that came along would destroy civilization.”

— Gerald Weinberg

Page 9: TiConf NY 2014 - Alloy 2.0

Write Once Mode

Page 10: TiConf NY 2014 - Alloy 2.0

Parity Mode

Aims for a higher degree of a write once, run anywhere experience

Parity where parity matters, but still provide native experience

Large, integrated effort

Intelligently creating new normalized APIs

Page 11: TiConf NY 2014 - Alloy 2.0

XML Templating

Page 12: TiConf NY 2014 - Alloy 2.0

view modules

Same views you know and love

Compiled to separate modules

Promotes reuse and export

Possible to generate entirely new syntax (i.e., hyperloop)

Page 13: TiConf NY 2014 - Alloy 2.0

Titanium

iOS

Windows

Page 14: TiConf NY 2014 - Alloy 2.0

How do you export your own controller definition?

How can you do true prototype inheritance on controllers?

How do you create a controller-specific model in code and use it with view-model binding?

How do I get arguments in my controller without this hideous syntax: var args = arguments[0] || {};

How do you skip time-consuming AST parsing on controllers that don’t need it?

Controller Trivia

Page 15: TiConf NY 2014 - Alloy 2.0

How do we solve all of that with one fundamental

change?

Page 16: TiConf NY 2014 - Alloy 2.0

Pure JS controllers

Page 17: TiConf NY 2014 - Alloy 2.0

TSS.. more or LESS

Alternates forms of style syntax?

What about something like LESS?

Improvements to the core of TSS, driven by external TSS pre-processor development

Page 18: TiConf NY 2014 - Alloy 2.0

data models

Simpler and more focused

No more masking Backbone

Expose a programmatic interface for view-model binding

Faster, more intelligent data binding

Page 19: TiConf NY 2014 - Alloy 2.0

Existing format

exports.definition? What happens to it?

Why separate definition from models and collections?

extendModel & extendCollection… WAT?!

Page 20: TiConf NY 2014 - Alloy 2.0

Hey look, Backbone!

Use Backbone conventions

Simpler, pure CommonJS format

Unnecessary Cruft

Page 21: TiConf NY 2014 - Alloy 2.0

nested collectionsVery specific use cases: TableView & ListView

Efficiency and convention

Page 22: TiConf NY 2014 - Alloy 2.0

bidirectional binding

Very specific use cases: TextField & TextArea

Convenience where it makes sense.

Page 23: TiConf NY 2014 - Alloy 2.0

dev experience faster, happier development

“I love it when a plan comes together” — John “Hannibal” Smith

Page 24: TiConf NY 2014 - Alloy 2.0

local installs

Have as many non-conflicting alloy installs as you want.

Can be global or per-project

Allows you to take Alloy updates on a needed basis, just like Titanium.

Alloy as a dependency

Page 25: TiConf NY 2014 - Alloy 2.0

export widgetsWidgets in traditional Titanium apps

Fully functional

Native or plain CommonJS modules

Page 26: TiConf NY 2014 - Alloy 2.0

scaffoldingrobust generators for widgets, builtins, adapters, commands, and generic commonjs modules

Configurable to your environment

Not just code structure, but ready for distribution

Page 27: TiConf NY 2014 - Alloy 2.0

ridiculously fast compiles

No builtins

Pure JS controllers to handle inheritance

Separation between controller and views

There’s full runtime version of the Alloy library

Page 28: TiConf NY 2014 - Alloy 2.0

No more AST parsing!!!100x speed up with Alloy compiles

Leave the AST parsing to optional pre-processors

LiveView, TiShadow, and RapidDev just got extremely more powerful

Page 29: TiConf NY 2014 - Alloy 2.0

parallel compiles

Android Blackberry iOS MobileWeb

$  alloy  compile  —platform  all

Page 30: TiConf NY 2014 - Alloy 2.0

rock solid with metrics

!

“What’s measured improves” — Peter F. Drucker

Page 31: TiConf NY 2014 - Alloy 2.0

unit testing

Page 32: TiConf NY 2014 - Alloy 2.0

Travis CI for continuous integration

Covers master, branches, and even pull requests

Page 33: TiConf NY 2014 - Alloy 2.0

test coverage

Page 34: TiConf NY 2014 - Alloy 2.0

ti-mocha

Page 35: TiConf NY 2014 - Alloy 2.0

contributing made easy

“In open source… to really do something well, you have to get a lot of people involved.”

— Linus Torvalds

Page 36: TiConf NY 2014 - Alloy 2.0

npm

70K+ modules, 1/4 billion downloads a month

distribution for all widgets, “builtins”, adapters, commands, and anything we come up with.

It’ll just work with Ti.Next

require() will work like node.js

ti-commonjs in the meantime

Page 37: TiConf NY 2014 - Alloy 2.0

ti-commonjs

Library and CLI hook that provides a node.js-style commonjs implementation to ti.current

Using npm for package management just works

Initially supported on android and ios

Initially alloy, but could work for traditional titanium

Page 38: TiConf NY 2014 - Alloy 2.0

VS

Undo incremental growth and expansion of repo

grok-ability

Externalize non-essential modules

widgets

“builtins”

tools

Page 39: TiConf NY 2014 - Alloy 2.0

git-style subcommands

Add arbitrary commands that can make use of Alloy configuration data

Extensibility allowing for out-of-band contributions

Page 40: TiConf NY 2014 - Alloy 2.0

module API

!

Use Alloy as a node.js module, not just a CLI

No more expensive, unreliable sub-processing

natural progression with git-style subcommands

Page 41: TiConf NY 2014 - Alloy 2.0

get on board migrating to the awesomeness

“If you want to make enemies, try to change something.”

— Woodrow Wilson

Page 42: TiConf NY 2014 - Alloy 2.0

1.X -> 2.0Migration will be a driving force behind the new features, not an afterthought.

Old formats will be deprecated, but most will still work

New controllers, views, models, styles, widgets, and even builtins will be able to be migrated through an automation script.

You could very well be porting to 2.0 with no manual intervention

Page 43: TiConf NY 2014 - Alloy 2.0

wrap-up

Page 44: TiConf NY 2014 - Alloy 2.0

try to keep up

http://bit.ly/alloy_2

Page 45: TiConf NY 2014 - Alloy 2.0

Special Thanks

Fokke Zandbergen Mads Moller Aaron Saunders

Paul Egli David Bankier Tim Poulsen