Download - Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications
![Page 1: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/1.jpg)
CROSS-PLATFORM MOBILE DEVELOPMENT
Alexander ShitikovHead of mobile development department
![Page 2: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/2.jpg)
HYBRID APPLICATIONS
![Page 3: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/3.jpg)
TECHNOLOGIES
![Page 4: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/4.jpg)
BUSINESS LOGIC
Shared logic
for each platform
![Page 5: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/5.jpg)
BUSINESS LOGIC
![Page 6: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/6.jpg)
BUSINESS LOGIC
![Page 7: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/7.jpg)
JAVA AS THE BRIDGE
![Page 8: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/8.jpg)
CHALLENGES
• To create cross-platform mobile business logic library on Java
• To give fully-native interface to developers to interact with it
![Page 9: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/9.jpg)
SOLUTION
• RoboVM
• Objective-C JNI wrapper generator
![Page 10: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/10.jpg)
FEATURES
• Memory management
• Threading
• Namespaces
• Inheritance
• Mapping
• Overloading
• Exceptions
![Page 11: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/11.jpg)
MEMORY MANAGEMENT
• Java object from native
• Native object from java
![Page 12: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/12.jpg)
THREADING
• Control by java
• Control by native
![Page 13: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/13.jpg)
NAMESPACES
java.lang.String -> MTCString
Problem:pl.mobiletrends.String -> MTCString
![Page 14: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/14.jpg)
NAMESPACES
java.lang.String -> java_lang_String
![Page 15: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/15.jpg)
NAMESPACES
java.lang.String -> JavaLangString
![Page 16: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/16.jpg)
NAMESPACES
java.lang.String -> MTCJLString
![Page 17: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/17.jpg)
INHERITANCE AND MAPPING
• class -> @interface
• interface -> @protocol
• boolean -> bool
• byte -> char
• …
• Int[] -> PrimitiveIntArray
• Int[][] -> NSArray<PrimitiveIntArray>
• Object -> MTCObject
![Page 18: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/18.jpg)
INHERITANCE ARTIFACT
public Animal getAnimal() { … }
- (MTCAnimal *)getAnimal;
MTC + Animal.getClass().getShortName()
![Page 19: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/19.jpg)
MAPPING EXAMPLE
public String getTestString() {return “Hello, World!”;
}public int[] getGivenArray(int[] array) {
return array;}
- (MTCString *)getTestString;
- (PrimitiveIntArray *)getGivenArray:(PrimitiveIntArray *)array;
![Page 20: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/20.jpg)
OVERLOADING CHALLENGES
public void overload(int a) {…
}public void overload(int[] a) {
…}
- (void)overload:(int)a;
- (void)overload:(PrimitiveIntArray *)a;
![Page 21: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/21.jpg)
OVERLOADING SOLUTION
public void overload(int a) {…
}public void overload(int[] a) {
…}
- (void)overloadWithAint:(int)a;
- (void)overloadWithAintArray:(PrimitiveIntArray *)a;
![Page 22: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/22.jpg)
EXCEPTIONS
public static void throwException() {
throw new NullPointerException(“MTC 2016”);}
+ (void)throwException;…@try {
[MTCCustomClass throwException]} @catch (MTCNullPointerException *e) {
...} @finally { ... }
![Page 23: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/23.jpg)
PROJECT STATUS
March-April 2016 alpha version
![Page 24: Alexander Shitikov: Cross Platform Mobile Development. Business Logic for mobile applications](https://reader031.vdocument.in/reader031/viewer/2022030305/587180361a28ab230b8b758b/html5/thumbnails/24.jpg)
mobile.agima.ru +7 495 981-01-85 [email protected]
THANK YOU FOR ATTENTION!
Alexander ShitikovHead of mobile development department
facebook.com/shitikov.ap