Top Banner
January 2016 Native to Native mobile code conversion By Kamal YOUBI CEO & CTO of MyAppConverter.com
18

MyAppconverter platform mappings

Apr 12, 2017

Download

Technology

Kamal Youbi
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: MyAppconverter platform mappings

January 2016

Native to Native mobile code conversion

By Kamal YOUBICEO & CTO of MyAppConverter.com

Page 2: MyAppconverter platform mappings

Summary• WhatisMyAppConverter• TheCoreTransformationEngine• SemanticDrivenTransformations• AsDevelopers,whywouldyoucare?• UsingMyAppConverter Conversionservice• Ios ApplicationsLifecycle• GeneratedAndroidLifecycle• Thenativestructureofthemobileapplications:IOS• Thenativestructureofthemobileapplications:Android• Mappingsmethodsignatures• MyAppConverter languageSyntaxesMappings• MyAppConverterMappingPlatformdifferences

Page 3: MyAppconverter platform mappings

What is MyAppConverter?

No SDK to download No Runtime

All platforms Peace of Mind

Instantly & Automatically Native Code Conversion(Online or via IDE plugin)

Your converted code is native with no embedded runtime for

maximum performance

Currently supporting iOS to Android & will be

extended to other platforms

We don't store nor share anyof your data and code

Page 4: MyAppconverter platform mappings

iOS project code

Android project code

Models(Android)

Mapping

Parsing

Transformation

AutomaticCodeGeneration

The Core Transformation Engine

Models(iOS)

Metamodels(iOS)

Metamodels(Android)

Page 5: MyAppconverter platform mappings

Technology

Architecture

Business

Semantic

LevelofAbstraction

SourceApplication TargetApplication

• MappingByintent• Transformationasaservice• Nativetonative• Readableanddocumentedcode• NoembeddedRuntime• Multi-platformcoverage• NoEditorDependency

• Lowscalability• NouseableCode

• Embedded Runtime

• StrongEditorDependency

if(

AA

==

AA

)

then

{log(

test

“) if

(AA

==

AA

)

then

{log(

test

“)}

}

if(

AA

==

AA

)

then

{log(

test

“) if

(AA

==

AA

)

then

{log(

test

“)}

}

Semantic DrivenTransformation

Page 6: MyAppconverter platform mappings

As Developers, why would you care?• Total freedom to develop on your favourite platform without limiting

yourself to other platforms

• Your converted code is fully documented & readable

• Being platform and technology agnostic, we guarantee the scalability of your code

• Enabling open source mapping will allow developers to benefit from all the technologies and market innovation across all platforms

• You will be part of an active, vibrant and global community of developers across borders and technologies

• You want to create mobile apps that can be available to anyone, anywhere no matter what the smartphone is and with the best UX

Page 7: MyAppconverter platform mappings

UsingMyAppConverter Conversionservice

Page 8: MyAppconverter platform mappings

Ios ApplicationsLifecycleAniOSapplicationgoesthrough asetofstatesasitruns.Asanappmovesthrough thestatesofitslifecycle,thestateoftheappisdefinedbyitslevelofactivitysuchasNotRunning, ActiveorSuspended.

Page 9: MyAppconverter platform mappings

GeneratedAndroidLifecycleThegeneratedandroidapplicationiseventdrivenandgoesthrowasetofthefollowing setofevents

Page 10: MyAppconverter platform mappings

Thenativestructureofthemobileapplications:IOS

• TheIos applicationstructurefollowamodelviewControllerpattern.

Page 11: MyAppconverter platform mappings

Thenativestructureofthemobileapplications:IOS

• TheUIApplicationMain functionintheprojectsetsupseveralkeyobjectsandstartstheapprunning.

• AttheheartofeveryiOSappistheUIApplication (AppDelegate)object,whosejobistofacilitatetheinteractionsbetweenthesystemandotherobjects intheapp.

• TheAppDelegate startthe initialviewcontrollerandloaditsUIelementsfromthemain.storyboard ortheequivalent.xib file.

• UsingMyAppConversion servicegetsyouanandroidstudioprojectthathaveanalmostequivalentstructure.

Page 12: MyAppconverter platform mappings

Thenativestructureofthemobileapplications:Android

• TheresultedandroidappprocessstartbyinstantiatingtheApplicationobject,andthenstarttheLauncherActivity.

• TheLauncherActivity usestheApplicationinstancetostarttheinitialviewcontroller,andloaditsviewandfinallyaddittotheLauncherActivity view

Page 13: MyAppconverter platform mappings

Mappingsmethodsignatures• ThegeneratedjavamethodnametheconcatenationofiOS

methodnameandthealiases• Thefirstletterofeachaliasiscapitalized.• ThetypesoftheparametersiniOSareconvertedtotheir

mappedequivalent.

Page 14: MyAppconverter platform mappings

MyAppConverter languageSyntaxesMappings

• Classes• Categories• Enums• Structs• Pointers• Memorymanagement• Blocks

• Protocols• Primitivetypes• Datastructures• Casting• Typedef• Macros

WhenconvertingobjectivectojavaMyAppConverter takescareofallthefollowingaspectsofthelanguage.TheMapping knowledgebaseprovideanimplementation foreachelementofthefollowing inthetargetplatform

Page 15: MyAppconverter platform mappings

MyAppConverter MappingPlatformdifferences

• Density-independentpixels(dp)anddesigninvectorat1x– OnAndroid,thekeyunitofmeasureisthedensity-independentpixel

–WhenconvertingfromIosMyAppConvertertransformspointsoniOSandCSSpixelstoDPs.

– MeasuringandsizingthingsinDPsensuresyourdesignshaveaconsistentphysicalsizeacrossdevicesofvaryingdensity.

Page 16: MyAppconverter platform mappings

MyAppConverter MappingPlatformdifferences

• ThesystemBackbuttonAndroid phoneshaveabackbutton, whichcanbeusedtoreturn topreviousscreensintheapp.

iPhones don’t have this button, this is usually done by a “back” chevron in the top left of the screen, MyAppConverterConvert itto a back button and mapps the android back button to the same event

Page 17: MyAppconverter platform mappings

MyAppConverter MappingPlatformdifferences

• Bottomtabs– OniOS,it’scommontouseabottomtabbartoswitchbetweenviewsinthe

app.Android’s platformconventionistodisplaytabsforviewcontrolatthetopofthescreeninstead.Inaddition, Androidappsmayusebottombarstodisplayactions.

• Gestures– Offering touchgesturestooperateyourappisagreatwaytomakethe

experiencefast,fluidanddelightful. Youshould alwaysbemindful ofuserexpectationsforgesture-basedinteractiononaplatform.OnAndroid, mostofthecommongestureshaveverystandardizedbehaviors,souserswillexpectyourapptosupport those.There’sanentiresectioninthematerialdesignguidelines coveringgestures,butit’smostimportant togetacoupleofthekeygesturesright.

Page 18: MyAppconverter platform mappings

MyAppConverter MappingPlatformdifferences

• Bottomtabs– OniOS,it’scommontouseabottomtabbartoswitchbetweenviewsinthe

app.Android’s platformconventionistodisplaytabsforviewcontrolatthetopofthescreeninstead.Inaddition, Androidappsmayusebottombarstodisplayactions.

• Gestures– Offering touchgesturestooperateyourappisagreatwaytomakethe

experiencefast,fluidanddelightful. Youshould alwaysbemindful ofuserexpectationsforgesture-basedinteractiononaplatform.OnAndroid, mostofthecommongestureshaveverystandardizedbehaviors,souserswillexpectyourapptosupport those.There’sanentiresectioninthematerialdesignguidelines coveringgestures,butit’smostimportant togetacoupleofthekeygesturesright.