Which JS Framework is best suited for Rhomobile?

Well, I've read blog posts and seen code samples on using Ember and Angular with Rho and also a blog post by Rob Galvin on what to look for in a JS Framework, but I'd like to know which framework is best suited for Rhomobile development. Is it Angular? Can we have some kind of comparison chart/table?

Jon Tara
I think you already know my

I think you already know my answer, Mark.

None. That is, if what you mean is an MVC framework.

I think it's best to stick to only UI frameworks for JS.

Now, I'd love to find a more modern and lightweight alternative to jQuery Mobile. I'm working on a new project using Bootstrap. I can live with it, but to me, it's TOO lightweight. It is certainly faster than JQM, which is a disappointment (for JQM), given that you are re-loading (from cache, of course) all of the CSS and JS on every page! And I hate grid systems.

I'd like something that does do page transitions. And pages within pages. That is, I'd like it to automatically (like JQM) load-in another page, with transitions, either to replace the current page, or into an element on the current page. (I had so much hope for the JQM Page Container - and then after all that fiddling they did for 1.4 - it was only an internal change, and there is only one page container...)

So, I'd like a fancy UI framework. Without the MVC part. (Optional extra would be fine, would make those that want such things happy.)

Something like Dojo. Haven't looked at it in a while, and looked like it was dying, but now I see there's been a fresh effort. Honestly, though, I haven't surveyed the alternatives lately, so would love to hear what people are using that provides a rich UI without templates and MVC.

JQM doesn't look like it's going anywhere, though, I'm afraid.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
I agree, Jon. What we need is

I agree, Jon. What we need is a good cross-platform 'V' framework (minus the M and the C). And maybe some good cross platform webview to accompany it. You know, recently my app which was using jQM and was looking fine in my WP7.1 phone now looks shitty after I upgraded to WP8.1. Now even the submit button is a button without the word "Submit" on it!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
Mark,There are still many

Mark,

There are still many ways to slice it, many are still choosing the various pieces of their app stack from a variety of sources and others are going with more opinionated frameworks. I have used Ionic Framework on a number of projects. Although it bundles and runs on top of Cordova and Angular, you can still use their UI/Angular bits (basically the WWW folder replacing the cordova.js with Rho's JS lib). It gives you a nice stack to work with and their UI is really mobile first - take for example their collection-repeat directive which handles of the 'performant' things for you. Of course you have to buy into the Angular way of doing things - but in general I feel the SPA approach is highly preferred anyway. If you like the Material UI look, we just did at not too long ago.

I would be curious to see what others are using for UI layer.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
I'll be exploring Ionic. Can

I'll be exploring Ionic. Can you do a blog post or tech talk on how to use it with Rho, specifically focusing on UI?

How about a cross-platform webkit for the problem scenario I encountered with WP above (and potentially, other platforms whenever a device OS or browser is updated as in above). I'm looking for some (free?) webkit we can bundle with the app independently of RhoElements.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon Tara
Cross-platform webkit for iOS

Cross-platform webkit for iOS is impossible, at least for App Store releases, for policy reasons. Apple doesn't allow third-party web engines in the App Store.

Any so-called "web browser" in the App store is just some chrome around UIWebView (or the new WKWebView).

It might be possible for Enterprise apps.

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
Unfortunate. But true ...

Unfortunate. But true ...

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Robert Galvin
Mark,Here is the blog I just

Mark,

Here is the blog I just posted on Ionic - it also includes some starter projects:

There is no easy way to swap out the Webkit used by RhoMobile, not sure if you want to do that anyway. Each OS is making strives to make their own Webview perform better then the previous versions. Any Webview that attempts to be cross-platform will most likely lag behind the native one you get out of the box.

You may want to consider replacing JQM (it's future and current life is questionable right now IMOP) with something that may be more consistent across platforms. I am now sure how Ionic fares in a WP environment, but it seems that others have used it with success.

EDIT - I just read the article and it explains why JQM also does not work on WP 8:

"...relies on innerHTML-property, which is not accessible on Windows Phone 8.1 for security reasons"



So unless you move to something else, you are probably left with coming up with your own shims for JQM on WP8, unless someone else has already done it.


Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
Ok, great! Thank you

Ok, great! Thank you

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Jon Tara
Eagerly awaiting Bootstrap 4,

Eagerly awaiting Bootstrap 4, because now the dimensions will all be based on ems, not pixels, making a scalable UI for accessibility a practicality.

I've worked with a scalable UI using jQuery Mobile. One of my colleagues (painfully) patched jQuery Mobile CSS to change all the pixel dimensions. I did some further tweaks, such as making sure borders are still pixels. (You don't really want 1 3/4 pixel borders...)

I've done a lot of layout work with flex-box CSS, since it is supported on all modern devices, and is pretty-much flexible layout magic. There are THREE syntaxes, though, as the industry has worked through the bumps. The Bourbon mixin library for Sass deals with the chaos for you, and so I've used it in the past for flexible layout.

I recently discovered a little CSS gem called Flexbox Grid

It's a drop-in replacement for the Bootstrap grid module. I use Bootstrap Sass edition, use the .scss source files, and omit the grid component. flexbox-grid uses flex-box CSS instead of floats and clears, and brings the ability to make boxes flexible and grow/shrink around content, so that you are not locked-in to a strict grid structure.

I see some developers are using jQuery Mobile's Ajax and page transition code without the rest of jQuery Mobile, or else using a custom JQM with all of the other widgets cut-out. But it is still limited to a single container, and has a lot of crufty code for old browsers that most of us don't need.

I'm looking with great interest at MoOx/pjax · GitHub See the author's impressive personal home page, that uses this: Freelance Front-end Web Developer (HTML5, CSS 3, Javascript, Responsive web design, front-end performance optimization)

Note that it's not the same as jquery/pjax, in fact it doesn't even need jQuery! It can replace MULTIPLE independent elements on a page from a single Ajax request, and with a bit of extra code, can load off-screen and then do transitions like JQM,

As you can see, lately I'm going in the direction of just putting-together bits and pieces of code and CSS, rather than looking for a framework that, alas, may not materialize. Everybody is focused on MVC/MVCC in the browser, which does make a lot of sense if you want to make a performant website or webapp. And for PhoneGap, where you are stuck in Javascript. But it comes with a huge learning curve, and very considerable overlap with what Rhodes already offers in the way of MVC. Where I have seen new UI frameworks, they always want to hitch a ride on some client-side MVC, and I haven't a clue how to effectuate a divorce - it looks complicated!

I'd still welcome news of a new UI/widget-only framework that can deal with Ajax page/section loading!

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Mark Nongkhlaw
Jon, I'd not be surprised if

Jon, I'd not be surprised if a new MVC JS-based framework emerges combining the 'best of breed' UI and Rho JS APIs, that is, assuming they manage to substitute all the current (and future ?) Ruby based APIs.

Your comments?

Vote: 
Vote up!
Vote down!

Points: 0

You voted ‘up’


Log in to post comments