You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cordova.apache.org by Chris Brody <ch...@gmail.com> on 2018/09/21 01:41:35 UTC

[ann] phonegap-native-demo (experimental wip)

I started working on a native UI plugin in:
https://github.com/phonegap-native-demo/cordova-plugin-syr-core-experimental

with demo at: https://github.com/phonegap-native-demo/cordova-native-demo

This plugin is based on Syr.js, which is a very lightweight React
Native alternative under development.

A major limitation is that the JavaScript has to be served from a
local server, which I hope to fix in the near future.

I hope to continue improving this project to provide a true native UI
option for Cordova/PhoneGap, cannot make any promises. Sponsorship or
part-time work could really help me make this happen.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: [ann] phonegap-native-demo (experimental wip)

Posted by Chris Brody <ch...@gmail.com>.
> What is the actual native part?

What you see is the actual native GUI part. Yes I know, not the most
exciting. I already made the disclaimer that I am not a real designer.

I am starting to wonder if it would make more sense to do something like
"React Native in parts", kinda like someone did "JQuery in parts" some
years ago (<https://github.com/mythz/jquip>). Also wondering if it would
make more sense to target Capacitor, which has some nice advantages and
shares MIT license.

Re: [ann] phonegap-native-demo (experimental wip)

Posted by Jan Piotrowski <pi...@gmail.com>.
New name is much clearer.

Ionic and Co. use webpack as well, but create a finished bundle later
that is included in the Cordova app then. (`ionic serve` that runs a
local webserver vs. `ionic build` that just creates the files into
`www`). Probably also possible with Syr.js.

Do you have any demo for _native_ UI?
The calculator looks like any random interface that is possible to
build with React, Ionic, Framework7, whatever. What is the actual
native part?

-J

2018-09-21 21:45 GMT+02:00 Chris Brody <ch...@gmail.com>:
>> Why not put these repos under your own brodybits user?
>
> Done
>
>> React and React Native both solve
>> this problem effectively already,
>
> Agreed, will address below.
>
>> > Can you provide some screenshots (or include in the demo README) so
>> > one can see how it looks?
>
> https://github.com/brodybits/cordova-native-demo/blob/dev/README.md#screenshots
>
> Please keep in mind that I am a cross-platform *developer*, **not** a designer.
>
>> What does webpack and the local webserver do - build Syr.js into a
>> package that can be used in the Cordova app?
>
> Webpack is used to convert the JavaScript (which is JSX) into a
> JavaScript bundle that can be run on the WebView.
>
> The local webserver basically serves the JavaScript bundle that can be
> run on the emulator. This is very similar to how React Native works
> during development. I think the most important TODO item is to get rid
> of the local webserver and just run JavaScript from the www assets.
>
>> > How does it work? I see it is based on a "fork" of Syr.js that adds a
>> > Cordova plugin?
>
> Yes I basically wrapped the existing Syr.js core into a Cordova plugin.
>
>> > What does webpack and the local webserver do - build Syr.js into a
>> > package that can be used in the Cordova app?
>
> Webpack is used to convert the JavaScript (which is JSX) into a
> JavaScript bundle that can be run on the WebView.
>
> The local webserver basically serves the JavaScript bundle that can be
> run on the emulator. This is very similar to how React Native works
> during development. I think the most important TODO item is to get rid
> of the local webserver and just run JavaScript from the www assets.
>
> Here are some more general notes:
>
> This plugin can definitely be considered an experimental proof of
> concept, very far from pre-alpha quality. Future ideas include
> splitting the native part into smaller parts and making it work with
> Capacitor framework as well.
>
> Here are the major benefits I think this idea can demonstrate with
> respect to React Native:
>
> * Ability for a team to start with well-known Cordova framework, no
> need for special talent, and transition to native GUI views in a
> gradual manner
>
> * Smaller size
>
> Most of the native part seems to be view management, would be nice to
> make it more generic somehow.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: [ann] phonegap-native-demo (experimental wip)

Posted by Chris Brody <ch...@gmail.com>.
> Why not put these repos under your own brodybits user?

Done

> React and React Native both solve
> this problem effectively already,

Agreed, will address below.

> > Can you provide some screenshots (or include in the demo README) so
> > one can see how it looks?

https://github.com/brodybits/cordova-native-demo/blob/dev/README.md#screenshots

Please keep in mind that I am a cross-platform *developer*, **not** a designer.

> What does webpack and the local webserver do - build Syr.js into a
> package that can be used in the Cordova app?

Webpack is used to convert the JavaScript (which is JSX) into a
JavaScript bundle that can be run on the WebView.

The local webserver basically serves the JavaScript bundle that can be
run on the emulator. This is very similar to how React Native works
during development. I think the most important TODO item is to get rid
of the local webserver and just run JavaScript from the www assets.

> > How does it work? I see it is based on a "fork" of Syr.js that adds a
> > Cordova plugin?

Yes I basically wrapped the existing Syr.js core into a Cordova plugin.

> > What does webpack and the local webserver do - build Syr.js into a
> > package that can be used in the Cordova app?

Webpack is used to convert the JavaScript (which is JSX) into a
JavaScript bundle that can be run on the WebView.

The local webserver basically serves the JavaScript bundle that can be
run on the emulator. This is very similar to how React Native works
during development. I think the most important TODO item is to get rid
of the local webserver and just run JavaScript from the www assets.

Here are some more general notes:

This plugin can definitely be considered an experimental proof of
concept, very far from pre-alpha quality. Future ideas include
splitting the native part into smaller parts and making it work with
Capacitor framework as well.

Here are the major benefits I think this idea can demonstrate with
respect to React Native:

* Ability for a team to start with well-known Cordova framework, no
need for special talent, and transition to native GUI views in a
gradual manner

* Smaller size

Most of the native part seems to be view management, would be nice to
make it more generic somehow.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: [ann] phonegap-native-demo (experimental wip)

Posted by Jesse <pu...@gmail.com>.
Why did you create a github user called 'phonegap-native-demo'?  That seems
like a very odd use of the PhoneGap trademark.  Adobe has allowed
developers to name their products ( plugins usually ) with phonegap in
their name to indicate that they work 'with' PhoneGap, but it always needs
to be clear that no-one is implying that Adobe supports, reviews, endorses,
or even is aware of the product.
Why not put these repos under your own brodybits user?

Personally I don't see syr going far. React and React Native both solve
this problem effectively already, and I don't think anyone will want to
learn a new thing that does the same thing. That said, I haven't even
kicked the tires ... it is just perhaps my jaded opinion. From what I have
seen, I don't get it.  Happy to be proven wrong.

@purplecabbage
risingj.com


On Fri, Sep 21, 2018 at 1:52 AM Jan Piotrowski <pi...@gmail.com> wrote:

> Looks interesting.
>
> Can you provide some screenshots (or include in the demo README) so
> one can see how it looks?
> How does it work? I see it is based on a "fork" of Syr.js that adds a
> Cordova plugin?
> What does webpack and the local webserver do - build Syr.js into a
> package that can be used in the Cordova app?
>
> -J
>
> 2018-09-21 10:07 GMT+02:00 Jan Piotrowski <pi...@gmail.com>:
> > What is the connection to Phonegap (which is Adobe product)?
> >
> > 2018-09-21 3:41 GMT+02:00 Chris Brody <ch...@gmail.com>:
> >> I started working on a native UI plugin in:
> >>
> https://github.com/phonegap-native-demo/cordova-plugin-syr-core-experimental
> >>
> >> with demo at:
> https://github.com/phonegap-native-demo/cordova-native-demo
> >>
> >> This plugin is based on Syr.js, which is a very lightweight React
> >> Native alternative under development.
> >>
> >> A major limitation is that the JavaScript has to be served from a
> >> local server, which I hope to fix in the near future.
> >>
> >> I hope to continue improving this project to provide a true native UI
> >> option for Cordova/PhoneGap, cannot make any promises. Sponsorship or
> >> part-time work could really help me make this happen.
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> >> For additional commands, e-mail: dev-help@cordova.apache.org
> >>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>
>

Re: [ann] phonegap-native-demo (experimental wip)

Posted by Jan Piotrowski <pi...@gmail.com>.
Looks interesting.

Can you provide some screenshots (or include in the demo README) so
one can see how it looks?
How does it work? I see it is based on a "fork" of Syr.js that adds a
Cordova plugin?
What does webpack and the local webserver do - build Syr.js into a
package that can be used in the Cordova app?

-J

2018-09-21 10:07 GMT+02:00 Jan Piotrowski <pi...@gmail.com>:
> What is the connection to Phonegap (which is Adobe product)?
>
> 2018-09-21 3:41 GMT+02:00 Chris Brody <ch...@gmail.com>:
>> I started working on a native UI plugin in:
>> https://github.com/phonegap-native-demo/cordova-plugin-syr-core-experimental
>>
>> with demo at: https://github.com/phonegap-native-demo/cordova-native-demo
>>
>> This plugin is based on Syr.js, which is a very lightweight React
>> Native alternative under development.
>>
>> A major limitation is that the JavaScript has to be served from a
>> local server, which I hope to fix in the near future.
>>
>> I hope to continue improving this project to provide a true native UI
>> option for Cordova/PhoneGap, cannot make any promises. Sponsorship or
>> part-time work could really help me make this happen.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
>> For additional commands, e-mail: dev-help@cordova.apache.org
>>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org


Re: [ann] phonegap-native-demo (experimental wip)

Posted by Jan Piotrowski <pi...@gmail.com>.
What is the connection to Phonegap (which is Adobe product)?

2018-09-21 3:41 GMT+02:00 Chris Brody <ch...@gmail.com>:
> I started working on a native UI plugin in:
> https://github.com/phonegap-native-demo/cordova-plugin-syr-core-experimental
>
> with demo at: https://github.com/phonegap-native-demo/cordova-native-demo
>
> This plugin is based on Syr.js, which is a very lightweight React
> Native alternative under development.
>
> A major limitation is that the JavaScript has to be served from a
> local server, which I hope to fix in the near future.
>
> I hope to continue improving this project to provide a true native UI
> option for Cordova/PhoneGap, cannot make any promises. Sponsorship or
> part-time work could really help me make this happen.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
> For additional commands, e-mail: dev-help@cordova.apache.org
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@cordova.apache.org
For additional commands, e-mail: dev-help@cordova.apache.org