1 / 23

Java on ios ? yes you can !

Java on ios ? yes you can !. Niklas Therning / @ ntherning Henric Müller / @ henricmuller Trillian Mobile AB r obovm.com. The RoboVM Project. Goal: Java on iOS and other JVM languages: Scala , Groovy , Clojure, … Open -source since Jan 2013 github.com/robovm

finian
Download Presentation

Java on ios ? yes you can !

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Java on ios?yesyoucan! Niklas Therning / @ntherning Henric Müller / @henricmuller Trillian Mobile AB robovm.com

  2. The RoboVM Project • Goal: Java on iOS • andother JVM languages: Scala,Groovy,Clojure, … • Open-sourcesinceJan 2013 • github.com/robovm • License allows closed source apps • www.robovm.com / @robovm

  3. RoboVM Features • Java bytecodetomachinecode • AheadOfTime, no interpreter, no JIT • Fastapps • Runtimeclassesbased on Android • java.*, javax.*, etcincl. I/O, reflection • Supports 3rd party JAR files • Supports standard JNI(static)

  4. RoboVM Features • Bindings for nativeiOS APIs • Full access to hardware, services, UI, etc

  5. RoboVM Features • Integrateswithpopular Java tools • sbt • Leiningen

  6. RoboVM is … … not an AndroidtoiOSappconverter … not a Java toObj-C source translator … not only for games* * (Though it worksgreat for games too!)

  7. Current Status • 100+ apps in App Store • Thousandsofusers • 1.0 scheduled for late 2014

  8. 1.0 Alpha 2 just released! λ Introduces lambdas and default methods

  9. Showcase: ContractRPunch clock for contractors

  10. Cross-platformappdevelopment Option #1 – Native UI

  11. Cross-platformappdevelopmentOption #1 – Native UI • Pros • UserExperience • Performance • Cons • Less codereuse • Learning curve – API/tooldifferences

  12. Cross-platformappdevelopmentOption #1 – Native UI Usepatternstomaximizecodereuse MVC MVVM Controller Controller Viewmodel Viewmodel View View Model Model View View Model Model

  13. 3 separatemodules Core (model) Android iOS

  14. Common modelcode: publicclassClientModel{ publicClientcreate() { … } publicintcount() { … } publicClient get(intindex) { … } …

  15. UITableViewCellgetRowCell(UITableViewtableView, NSIndexPathindexPath) { UITableViewCellcell = tableView.dequeueReusableCell("cell"); if(cell == null) { cell= newUITableViewCell(UITableViewCellStyle.Value1, "cell"); cell.setAccessoryType(UITableViewCellAccessoryType.DisclosureIndicator); } Clientclient = clientModel.get((int) indexPath.getRow()); cell.getTextLabel().setText(client.getName()); returncell; } iOSspecific UI code:

  16. publicViewgetView(int position, ViewconvertView, ViewGroupparent) { Viewview= convertView; if (convertView== null) { view= inflater.inflate(android.R.layout.simple_list_item_1, parent, false); } Clientclient = clientModel.get(position); TextViewtext= (TextView) view.findViewById(android.R.id.text1); text.setText(client.getName()); returnview; } Androidspecific UI code:

  17. Cross-platformappdevelopmentOption #1 – Native UI DEMO #1

  18. Cross-platformappdevelopment Option #2 – Cross Platform UI JavaFX from the OpenJFXproject

  19. Cross-platformappdevelopmentOption #2 – Cross Platform UI • Pros • Close to 100% codereuse • Cons • UserExperience • Performance

  20. Cross-platformappdevelopmentOption #2 – Cross Platform UI DEMO #2

  21. ContractR and othersamplescan be found at github.com/robovm/robovm-samples

  22. Commercial Licenses • Launch late 2014 • Standard Java debugger support • Support options Open source version still letsyoudevelopamazingapps for freewithout limitations!

  23. ? Check outwww.robovm.com and follow @robovm

More Related