Amsterdam Meetup Presentation - Marts 2014

Post on 27-Jan-2015

108 views 1 download

Tags:

description

Native modules + some insights in the new Hyperloop

transcript

Ti & Native DevelopmentMads Møller

CTO – Napp

mm@napp.dk

@nappdev

https://github.com/viezel

TITANIUM & NATIVE

• Introduction to native• Why native?• 3rd party libraies• Example module• Hyperloop & its future• Q&A

INTRODUCTION TO NATIVE

INTRODUCTION TO NATIVE

INTRODUCTION TO NATIVE

WHY NATIVE

WHY NATIVE?

• Leverage native features– 3rd party libraires– Create new UI components– Customize Ti components

• Performance– Speed– Animation– Heavy operations

• Better understanding of the platform– You gain a lot of knowledge of how Android & iOS really works!

IS IT HARD?

WHY NATIVE - IS IT HARD?

• Is it hard to learn?– Yes and No. (not really)

• It requires– Learn a new syntax– Understand how the os platform works– Learn how Titanium works

• Benefits– Freedom to build what you want

THIRD PARTY LIBRARIES

THIRD PARTY LIBRARIES

• Soo many services– We want to use them inside Titanium

• Often easy to implement

THIRD PARTY LIBRARIES

• Example– Lets build a TestFlight module

• Why Testflight?– Simple API– Easy to get started

TESTFLIGHT – MODULE

• What is Testflight?– Over the air distribution of apps– Test & exception reporting

What to do:1. Grab the SDK2. Read the docs and quick start guide3. Lets implement it

Source code: https://github.com/viezel/NappTestFlight

TESTFLIGHT – IOS MODULE

TESTFLIGHT – ANDROID MODULE

HYPERLOOP

HYPERLOOP

• What is Hyperloop?– Next-generation compiler that converts JavaScript source code

into native code. – It will support iOS, Android and Win8– Multi threaded, Super Performance

• Hyperloop == Ti.Next– No. But it’s the foundation for Ti.Next. Hyperloop will compile the

new javascript based Titanium SDK.

• How to get it?– https://github.com/appcelerator/hyperloop– npm install -g hyperloop

HYPERLOOP - IS IT HARD?

• Is it hard to learn?– Yes and No. (not really)

• It requires– Learn a new special kind of javascript– Understand how the os platform works– Learn how Titanium works

• Benefits– Freedom to build what you want– Do it in javascript

HYPERLOOP - IOS

HYPERLOOP

HYPERLOOP – MY OWN OPINION• Super interesting

– Great performance– Hopefully more module developers

• Still not super easy to learn– Since it’s a new special javascript syntax, its hard to find great

learning resources.– What does this line of code mean? (it is javascript)UIButton.alloc().initWithFrame(CGRectMake(110, 100, 100, 44));

HYPERLOOP – MY OWN OPINION• Whats still missing?

– Simplier way to do modules– Syntax should be less OS oriented

HYPERLOOP – FUTURE

• Cross platform modules– Single codebase– Build an abstraction layer– Will make Titanium even more powerful– E.g. Testflight module could be a unified module

• Windows & Mac desktop apps– Write desktop apps using Hyperloop

• Ti.Next• Might be that abstraction we need for module development• Looking forward to see this implementation

HYPERLOOP – FUTURE

• Leverage C libraries– SVG, PDF, OpenCV, game engines etc. – Lots of libs out there– Enormous potential– Native performance

Q& AMads Møller

CTO – Napp

mm@napp.dk

@nappdev

https://github.com/viezel