$30 off During Our Annual Pro Sale. View Details »

Building Maintainable Titanium Mobile Apps

ravidsrk
October 12, 2015

Building Maintainable Titanium Mobile Apps

Video: https://university.appcelerator.com/video/rEiC9D9F/Ravindra-Kumar-Building-Maintainable-Titanium-Mobile-Apps

Creating the right development environment for building maintainable mobile apps should be the primary concern of a team embarking on native app development. Constructing a comprehensive continuous build process integrating unit testing and build monitoring should be one of the development teams primary goals.

This session will show you how to leverage a number of mature and powerful tools to make creating your titanium development process quick and effective.
* Unit testing in Titanium
* Testing with TiMocha
* Testing inside Titanium Studio
* Taking advantage of Mocha JSON reporter
* Continuous integration with travis and titanium-cli

ravidsrk

October 12, 2015
Tweet

More Decks by ravidsrk

Other Decks in Programming

Transcript

  1. ABOUT ME RAVINDRA KUMAR Self Employed Mobile App Developer, Open

    Source Addict, was MOBILE ARCHITECT @ hacker, bug fixer, benchmark runner Email: [email protected] Twitter: @ravidsrk Github: ravidsrk CLEARTRIP
  2. AGENDA Introduction to Building Maintainable Mobile Apps Unit testing in

    Titanium Testing with ti-mocha Taking advantage of ti-mocha reporter Demo What next?
  3. WARNING BEFORE WE START Unit testing != TDD Limitations mobile

    app testing? (UI) Don't write tests against titanium api? ( e.g. should(win.open).be.a.Function; ) Myths: 1. Not everything can be tested with unit tests? 2. Projects take longer because of the additional test code that has to be written.
  4. MAINTAINABLE?? TITANIUM?? APP?? Ensuring bugs are found fast and automatically

    via automated tests. Prevent breaking of already tested functionality when adding code or modifying it. Allows for easy refactoring without worrying of breaking changes. Make changes to support new environments operating systems or tools Make it easier for others to maintain the software
  5. UNIT TESTING IN TITANIUM? Frequent changes in Titainium API/Android SDK/iOS

    SDK. Helpfull while adopting to new platform which ti going to support in future Jeff Haynie says: TiO2 (Titanium + Oxygen) is the most important oxide, which exists in three important polymorphs; anatase, brookite, and rutile. Oxygen is vital to life on earth -- and so is testing to building great software.
  6. TRICKS TO TEST TITANIUM APPS Avoid global events and using

    the titanium namespace for storing things unless necessary Use commonjs modules for everything In the event callbacks, use functions that you can call anytime you want, that way it is a lot easier to share common behaviours and call them anywhere you want Reuse code
  7. WHAT NEXT? Automate Unit Testing a Titanium Alloy project Simple

    Unit Testing in Appcelerator Titanium Alloy https://github.com/denvers/unit-test-titanium-alloy- project An Appcelerator Titanium Jasmine (Javascript Testing) Module