Currently developing in Titanium, a couple questions about ionic


#1

I’ve been having a great time in Ionic, but I like Angular and for all the problems it has, the DOM is a fast build environment.

Currently my team is using Titanium for our cross-platform builds. It isn’t bad at all, but I think the Ti devs are working on their next gen platform while their current one is feeling a bit aged. Case in point, Android animations are all linear and lack a lot of functionality that came along with 4.x.

So far, my testing in Ionic has proven the webviews to be operating at a nice speed. I don’t think anyone could tell which app was made with the ionic framework vs. Titanium’s Alloy.

Here are my questions being somewhat new-ish to Phonegap/Cordova.

  1. In Titanium Alloy, we can set values by pixel density, making it much easier to support various Android devices. I’m guessing in ionic we have to go the direction of responsive design based on screen resolution? Or is there a nice library to let me set my css vales with a pixel density reference?

  2. Has anyone here ported their ionic framework to steroids.js? I gather the steroids team is basically lifting ionic and converting some of the UI elements to native UI - similar to how Titanium works. I have yet to see crazy slow-downs, but this seems like a solid idea. Just curious if anyone has made the transition and how easy/hard it was.

  3. Before I plow down this road too much farther, I have found more people moving from cordova to titanium rather than the other way around. Have any of you made the trip from Titanium to ionic? Noticed any speed/performance issues?

Thanks!


#2

Hey there :smile:

So yeah right now, this is the best I can answer your question.

  1. Responsive design is the approach you can take, but you can target css values base and screen resolution, such as in this example css.

    /* 1.25 dpr /
    @media
    (-webkit-min-device-pixel-ratio: 1.25),
    (min-resolution: 120dpi){
    /
    Retina-specific stuff here */
    }

    /* 1.3 dpr /
    @media
    (-webkit-min-device-pixel-ratio: 1.3),
    (min-resolution: 124.8dpi){
    /
    Retina-specific stuff here */
    }

    /* 1.5 dpr /
    @media
    (-webkit-min-device-pixel-ratio: 1.5),
    (min-resolution: 144dpi){
    /
    Retina-specific stuff here */
    }

some reference

  1. Not that I know of, can’t be much help here.

  2. With newer devices, and a few tricks, and just making sure you write performant code. The app can only behave as well as it was written.
    With cordova, the pitfalls tend to be older versions of android (which we don’t support anyways)