Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

Add GUI for Cordova #18

Closed
wants to merge 3 commits into from
Closed

Conversation

wtrocki
Copy link
Contributor

@wtrocki wtrocki commented Mar 5, 2018

Motivation

Apache Cordova abstract from UI implementations.
Developers can use any framework that has supports mobile device sizes.
We need some UI framework for our demos (change cordova demo to look similar to react native demo). This framework should be simple enough and do not enforce specific development style or tooling as this will make this implementation framework specific. Alternative will be to use ionic, but it seem too heavy/custom for this particular use case.

For this use case I picked JQuery mobile which is:

  • Really simple, UI focused framework
  • Abstracts from JavaScript implementation (only HTML and CSS)
  • Allow developers to reuse code in other framework as it will be generic.

Considering that example application is used only for testing purposes this seem to be all we need. Jquery and JQuery mobile needs to be added on the global scope without browserify.

Screenshot

screen shot 2018-03-05 at 7 07 18 pm

Progress

  • Example layout
  • Documentation
  • Config parsing

@wtrocki wtrocki requested a review from wei-lee March 5, 2018 19:20
@wtrocki wtrocki changed the title Add Jquery mobile GUI Add JQuery mobile GUI Mar 5, 2018
Copy link
Contributor

@wei-lee wei-lee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is anything wrong with the code in this PR, however, personally I prefer something more modern and more popular with cross-platform mobile JS developers. I think most developers would prefer Ionic these days?

@david-martin
Copy link
Member

I was ready to +1 this, but @wei-lee comment has made me stop & think.
I know @evanshortiss has shared some stuff about ionic recently (ionic deploy),
as has Joe O Reilly (does he have a github account?)
There's also the keyonic example app from @TommyJ1994 https://github.com/TommyJ1994/keyonic-v2.

I think Ionic might be a better choice if we're to choose a ui framework (and js framework in angular) in terms of popularity and familiarity.

@wtrocki
Copy link
Contributor Author

wtrocki commented Mar 6, 2018

Great. Going to move that PR to ionic. I do not have problem with adding ionic. It was just that it's quite heavy framework and requires devs to actually know Ionic. While JQuery mobile is dead simple.

@wtrocki wtrocki changed the title Add JQuery mobile GUI Add GUI for Cordova Mar 6, 2018
@wtrocki wtrocki requested a review from darahayes March 6, 2018 11:23
@wtrocki
Copy link
Contributor Author

wtrocki commented Mar 6, 2018

@david-martin @wei-lee @pb82
Generated ionic application has no default cordova structure. I have tried to test that with plain cordova plugins but they do not work properly. It it's heavily customized and not longer using actual cordova plugins. After using ionic our example will no longer be vanilla Cordova application - it will be ionic application with heavily customized cordova plugins that are imported from @ionic-native organization on npm.

Could we bring JQuery mobile for this sprint and post question to the list if we should have Ionic app or plain Cordova app? For plain Cordova app we could use anything that will give us UI like http://www.material-ui.com or even bootstrap css. I have picked JQuery mobile for the moment as it's really stable and hassle free solution. I guess having ionic example could be cool for user facing example?
I would love to collect opinions on the list and get this one in till that is done.

Target here was to make sure that both examples look good for the demo and developers will not need to think about it when working on actual SDK. Changing only UI framework is still an option and it should be trivial task, but I would personally like to have something in master that will not enforce some specific style or derive a lot from original Cordova.

WDYT?

@darahayes
Copy link
Contributor

The nice thing about jQuery mobile is the initial simplicity. It's easy to show off the raw usage of the SDKs with minimal scaffolding. That being said, I think Ionic probably adds a lot more value because it shows 'real world examples' in the context of an Ionic app (i.e. one of the most popular cordova based frameworks). I don't think the same can be said about jQuery mobile anymore.

Additionally, I think an Ionic example would scale better (within the team) when it comes to adding new usage examples of the SDKs over time. (as the SDKs mature)

My concern is that if we start off with a very simple jQuery mobile app, the code becomes hard to read and maintain over time. I think we've all seen this happen with jQuery.

@tomjackman
Copy link
Contributor

It's still possible to use standard cordova plugins with Ionic v3 as I have done some work recently with both of these, but very much agree with @wtrocki in that its not as user friendly anymore as in Ionic v1. The Ionic native plugins are much better and easier to use and this is the way Ionic are going from now on it seems.

We could use Ionic v1/Angular 1, but Ionic 3/Angular 4/Typescript would have been nicer if the plugin problem wasn't an issue.

@tomjackman
Copy link
Contributor

Another option that I played with years ago was Onsen UI - https://onsen.io Its pretty similar to Ionic

@wtrocki
Copy link
Contributor Author

wtrocki commented Mar 6, 2018

Onsen UI will be much better choice as it is just mobile UI frameworks and can base on large set of popular js frameworks like Angular or React

@wei-lee
Copy link
Contributor

wei-lee commented Mar 6, 2018

Onsen UI looks pretty good. Especially you can use either Angular or React or Vue.js which is very nice. Agreed that for this example app we go with a vanilla Cordova app. Onsen UI is a good fit as it is just a UI framework.

Given how much Ionic is now different from a standard Cordova app, we probably will need an example app for it anyway. I think we can use the security template app for it.

@wtrocki
Copy link
Contributor Author

wtrocki commented Mar 6, 2018

Like suggestions. As we all agreed that JQuery mobile is not the best option - I'm going to close this PR and get some agreement on the list on what we should implement.

@wtrocki wtrocki closed this Mar 6, 2018
@wtrocki wtrocki deleted the example-cordova-ui branch March 6, 2018 15:51
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants