I submitted today a React component to Foreman so that we can start
testing some javascript, albeit with the intent of moving components
like this to a react-patternfly repo.
I know some people may be concerned React components may not play well
with Katello angular but I don't think that's the case. React components
are exclusively views, no data binding or anything like that. You can
even render React components in Angular like this
I'd be glad to answer any questions about React in Foreman/Katello
either on the PR or here.
I see discussions around this related to making a react-patternfly. Can you clarify the reasons to consider react over angular, especially given that katello brings angular in and angular-patternfly already exists?
Will deface continue to work in a react app? That was a major hurdle in the angular discussions from a couple years ago.
···
----- Original Message -----
> Hi devs,
>
> I submitted today a React component to Foreman so that we can start
> testing some javascript, albeit with the intent of moving components
> like this to a react-patternfly repo.
>
> https://github.com/theforeman/foreman/pull/3128
>
> I know some people may be concerned React components may not play well
> with Katello angular but I don't think that's the case. React components
> are exclusively *views*, no data binding or anything like that. You can
> even render React components in Angular like this
> https://github.com/ngReact/ngReact
>
> I'd be glad to answer any questions about React in Foreman/Katello
> either on the PR or here.
>
> Best,
>
> --
> Daniel Lobato Garcia
>
> @dLobatog
> blog.daniellobato.me
> daniellobato.me
>
> GPG: http://keys.gnupg.net/pks/lookup?op=get&search=0x7A92D6DD38D6DE30
> Keybase: https://keybase.io/elobato
>
> --
> You received this message because you are subscribed to the Google Groups
> "foreman-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to foreman-dev+unsubscribe@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>
> I see discussions around this related to making a react-patternfly. Can you clarify the reasons to consider react over angular, especially given that katello brings angular in and angular-patternfly already exists?
Angular and React have little to do with each other other than they're
javascript. React strictly deals with the presentation layer, no data
involved. It can be just the JS of the 'V' in MVC.
The reasons I made the POC with React were these:
Components are easy to share - and only deal with view logic
Learning curve is much better for React, this affects the whole team
and new contributors
Angular 2.0 is expected not to be backwards compatible
Angular deals too much with models, and data (opinion, not fact), and
I wanted to refactor just the UI, and not deal with data models.
Easy to write tests for it without understanding much
Easy to package and integrate in Rails
Angular is much more sophisticated when it comes to dealing with a whole
application, but for the purpose I want it, which is refactoring the
complex part of the current UI into components, it was too much IMO.
Again, most of these are opinions and not facts so feel free to
refute them. The whole dicussion though, stems from the false dichotomy
that you should use X or Y, but really you can use both.
> Will deface continue to work in a react app? That was a major hurdle in the angular discussions from a couple years ago.
>
> > I see discussions around this related to making a react-patternfly. Can you
> > clarify the reasons to consider react over angular, especially given that
> > katello brings angular in and angular-patternfly already exists?
>
> Angular and React have little to do with each other other than they're
> javascript. React strictly deals with the presentation layer, no data
> involved. It can be just the JS of the 'V' in MVC.
>
> The reasons I made the POC with React were these:
>
> * Components are easy to share - and only deal with view logic
> * Learning curve is much better for React, this affects the whole team
> and new contributors
> * Angular 2.0 is expected not to be backwards compatible
> * Angular deals too much with models, and data (opinion, not fact), and
> I wanted to refactor just the UI, and not deal with data models.
> * Easy to write tests for it without understanding much
> * Easy to package and integrate in Rails
>
> Angular is much more sophisticated when it comes to dealing with a whole
> application, but for the purpose I want it, which is refactoring the
> complex part of the current UI into components, it was too much IMO.
>
> Again, most of these are opinions and not facts so feel free to
> refute them. The whole dicussion though, stems from the false dichotomy
> that you should use X or Y, but really you can use both.
So the proposal for react is more an advocation for using both?
As a concrete example, if we were to agree to make the Subnets page look and act like a katello list page, this would be done using the existing angular javascript infrastructure. Then if the Subnets Details page needed, for example, a donut graph that component could potentially be written in react. Is that what you are thinking?
Or are you thinking that if we agree to make the Subnets page look and act like a katello list page, this would be done using new react infrastructure.
The later is my concern, in case that's not obvious. It has been my "issue" surrounding UI from the start of foreman and katello joining forces: No leveraging of existing shared resources, skill sets, and infrastructure. To be honest, if react is the better choice then let's all agree to using that and we can convert the katello pages. I would just hope that all of the developers for both foreman and katello are fully involved in the decision.
I'm very much looking forward to the day when the UI is a seamless experience! Thanks for investigating react.js.
···
----- Original Message -----
> On 02/24, Tom McKay wrote:
Will deface continue to work in a react app? That was a major hurdle in the
angular discussions from a couple years ago.