TITANIUM Appcelerator – Mobile APP ? – TITANIUM Vs PHONEGAP Round TWO



TITANIUM Appcelerator – Mobile APP ? – TITANIUM Vs PHONEGAP Round TWO

0 1


PresTitanium

presentation de Titanium pour CLERMONTECH

On Github ss-bb / PresTitanium

TITANIUM Appcelerator

Clemont'ech APIHour #11 Olivier GOYON 15/10/2014

What is this "thing"?

Titanium is a (free) framework to create powerful cross-plateforme mobile apps

Mobile APP ?

  • Native Code (always win)

Mobile APP ?

  • Cross-Plateform Mobile Framework
  • Write once, run anywhere (WORA)
  • ( HTML5 webresponsive )

APP VS HTML5

Cross-Plateform Mobile Framework

  • Appcelerator Titanium
  • PhoneGap / Apache Cordova
  • Xamarin (c#)
  • MoSync (C++) -> NEVER use HTML/JAVASCRIPT
  • RhoMobile/Rhodes (ruby)
pour les technologie WEB , 2 outil sont en concurrence direct. mais n'oublions pas pour les autres : mosync pour c , c++ , meme pour php python,bonne IDE mais compiler en html5 , pb d'acces au fonction native comme liste contact , photo , etc. de même pour Rhomobile/rhodes en ruby , Xamarin en c#, et bien d'autre. timer 2,30

TITANIUM Vs PHONEGAP

OS PHONEGAP TITANIUM ANDROID yes yes IOS yes yes BLACKBERRY yes yes WINDOWS PHONE yes yes/no BADA-SYMBIAN-AUTRE yes no La guerre titanium /phonegap. Vous trouverez des tas et des tas d'article dessus, je vais résumer grossièrement en 2 points: ne pas regarder les article avant fin 2013 TIZEN. pas plus d'une minute.

TITANIUM Vs PHONEGAP Round TWO

Phonegap

  • Uses the browser graphics engine !

  • Camera
  • Contact
  • Accelerometer
  • Contact list
  • GeoLoc

Titanium

  • Creates native IHM components !

  • Same as Phonegap
  • Database
  • Contact management
  • Playback/recording
  • etc ...
parler RAPIDEMENT != fonction et != NATIF !

!! NATIVE !!

  • Performance
  • UI components
  • Look & Feel
  • Behavior
timer 4min

Titanium History

Titanium 1.x Titanium 2.x Titanium 3.x Ti.next

Titanium provides

  • SDK
  • IDE
  • Emulator(s)
  • Powershell
genymotion : The fastest Android emulator ...

How Titanium works

  • Javascript code !
  • Titanium connects JS to native API
  • JS + JS engine + native API => native mobile APP

How Titanium code looks like ? for JS suckers

                            var Win = Ti.UI.createWindow({
    backgroundColor: '#f00'
});
                        

How Titanium code looks like ? for JS beginners

                            var Window = Ti.UI.createWindow({
    backgroundColor: '#f00'
});

var MyView = Ti.UI.createView({
    backgroundColor: '#00f',
    height: 200,
    width: 200
});

MyView.addEventListener('click', function(e) {
    alerte('coucou1');//pour debug like a pro
});

Window.add(MyView);
Window.open();
                        

Titanium debugger !

The goal :

How Titanium code looks like ? for nice JS

                            var Window = Titanium.UI.createWindow({
    fullscreen : true,
    navBarHidden : true,
    backgroundColor : "white",
    exitOnClose : true
});

Window.orientationModes = [Ti.UI.LANDSCAPE_LEFT];

var UserView = new (require('UI/viewconfigUser'))();

Window.add(UserView);
Window.open();
                        

Js => Node | Require | Common

                            //dans viewconfigUser
function viewConfig() {
    var UserView = Ti.UI.createView({backgroundColor:'white' });

    var Login = Ti.UI.createTextField({
        hintText:"saisissez votre login"
        //du code
    });

    var Password = ...;

    //code, codeur ,coder

return UserView;
}
module.exports = viewConfig;
                        
faire du code propre et modulaire n'est pas interdit par la convention de genève !

OK, I can code, is that all ?

NO !

Monitoring allocations

On IOS : iOS simulator

On Android : DDMS

Mobile Application Performance Management (Version Pro)

Deployement on Appstore

with titanium >3.2 ->right click, deploy on Appstore , follow instruction.

You want some cloud also. Easy

Appcelerator Cloud Services (Version Pro)

Appcelerator Cloud Services provide a wide array of automatically scaled network features and data objects.

Javascript => no pattern !

Javascript => Spaghetti code !

FALSE

Alloy

Alloy is a development framework to facilitate the rapid development of high quality mobile applications.

It follows a model-view-controller (MVC) architecture

XML Views, Data Migration in JSON , Backbone, etc etc

Alloy presentation at CODESTRONG conf

Alloy Code ! for another nice JS

                            // a view
<alloy>
    <window>
        <imageview id="imageView" onclick="clickImage"></imageview>
        <label>click the picture</label>
    </window>
</alloy>
                        
                            // a controller
function clickImage(e) {
Titanium.UI.createAlertDialog({title:'Image View', message:'You clicked me!'}).show();
}
$.index.open();
                        

Alloy : TO MUCH THINGS

  • MVC
  • Widgets
  • Tasks
  • Tests
  • ...

Titanium documentation

DocumentationKitchen sink

CODESTRONG

Titanium Windows -> soon (Q4 2014 OR Q1 2015?)

doc: "Currently, Windows 8 App development and ..."

tl;dr : Windows 8 et windows phone is done through the command-line tools(Powershell)

Concretely :

Windows 8 SDK required Visual Studio 2012

Windows 8.1 SDK required Visual Studio 2013

Windows Phone 8 development is only supports on systems running 64-bit Windows 8. Visual Studio 2012 Pro edition or higher is required to run the Windows Phone simulator.

Getting Start Windows8 SDK

Thanks! Merci !

Any questions? Des questions?

0