News for hackers. Stuff that matters.
Re:Front-end design, React, and a bridge over the great divide by pjmlp on Friday July 19, 2019 @04:18AM (#20476992)
JSX feels like PHP and ASP all over again.

Apparently they aren't that bad after all.

Re:Front-end design, React, and a bridge over the great divide by Marazan on Friday July 19, 2019 @07:22AM (#20477664)
I hesitate to tell people. They are doing it wrong but if you write JSX like how we all wrote PHP back in the day then you are doing it wrong.
Re:Front-end design, React, and a bridge over the great divide by pjmlp on Friday July 19, 2019 @09:41AM (#20478544)
So how do you modularize content in separate files?
Re:Front-end design, React, and a bridge over the great divide by efdee on Friday July 19, 2019 @07:09AM (#20477613)
How can you say that? PHP and ASP were dumb text template processors. JSX creates object graphs. They are almost nothing alike at all.
Re:Front-end design, React, and a bridge over the great divide by pjmlp on Friday July 19, 2019 @09:40AM (#20478532)
Mixed content on the same file, looks pretty much the same, regardless how it is implemented.
Re:Front-end design, React, and a bridge over the great divide by efdee on Saturday July 20, 2019 @07:16AM (#20485163)
The problem with ASP/PHP (or at least, the one we are addressing here) always mixing presentational logic with business logic. Something you still shouldn't do, and React doesn't advocate doing so at all.
Re:Front-end design, React, and a bridge over the great divide by arvinsim on Friday July 19, 2019 @12:25PM (#20479986)
I totally disagree. VueJS and AngularJS feel like PHP/ASP but I never got that feeling from JSX.
Re:Front-end design, React, and a bridge over the great divide by pjmlp on Friday July 19, 2019 @12:41PM (#20480177)
I fail to see how proper component based frameworks, with clean separation of concerns, provide such experience.

JSX is the one mixing echo like statements with proper JavaScript.

Re:Front-end design, React, and a bridge over the great divide by TomMarius on Saturday July 27, 2019 @08:16AM (#20541670)
That is pretty impossible since JSX is just JavaScript, including all of its scope separation. It might be that you're not well versed in using it.
Re:Front-end design, React, and a bridge over the great divide by ngrilly on Saturday July 20, 2019 @09:43AM (#20485707)
JSX let's us define components, usable with the usual HTML syntax. PHP does not. That's why Facebook developed XHP (XML fragments in PHP), which inspired JSX.