I disagree. My team has written a medium size web app ( ~30 pages) without JSX and the API works pretty well. You get used to it if the whole project uses it (just like any API).
create-react-app
I disagree. It is clearly intended as a quick start, people can customize or opt out in one command (and remove whatever they want).
It is very functional and engineers get a production ready layout and build system in < 1 minute.
It doesn't force you to use it, use it if you want.
--
Finally your example doesn't look much better or clearer than using the React API directly..
I haven't tried React without JSX, but I do find that switching over to the functional style interface I'm writing a lot less JSX. It's still there, and it's still the natural way to write the base-level components (divs and spans).
But at the next level up, it becomes really clear that <Foo x={1}/> is just syntactic sugar for Foo({x:1}), since Foo is just a function.
A lot of my code starts life as some chunk of a complicated render that gets refactored into a function. Then that function quickly becomes a React function component.
Next clean-sheet project I may try react without JSX. But I still rely heavily on newer ES features, so there may still be a cross-compile stage of the setup. While create-react-app is depressingly heavyweight, it is really fast and new JSX projects go up in a minute.
The software environment was very locked for security reasons, no internet and etc.
You mean the development environment you worked in or is this referring to production?
I can't imagine working without internet as a programmer.
Just felt it was simpler to not use JSX and to deploy with scp ;-)
Tools like babel don't get shipped to production. They are part of the development build tools which gets stripped out. You can run a single build command on your laptop and SCP the result.
In fact every dependency was manually downloaded and put on a vendored folder of the project. It was added as a dependency by adding a HTML tag.
You can lock the dependency versions so your production code would have the same code.
You can commit node modules along with your code.
You could use zero installs by yarn which compresses node modules to make it easier to push them to version control.
You mean the development environment you worked in or is this referring to production?
I worked in. Is fairly normal to work without internet in some industries / environments (including my current one)
Tools like babel don't get shipped to production. They are part of the development build tools which gets stripped out. You can run a single build command on your laptop and SCP the result.
The Visual Effects industry in my case. Reason is unreleased content, for example, the new iPhone commercial or a new Marvel movie that hasn't been announced yet.
Did you have to audit all the vendor code? If so, how much time was spent on that?
Yes, from days to weeks. It was a separate department.
Do you think this kind of practices actually improve any security?
Yes, if your computers do not touch the internet and you do not have physical access to the device then you cannot easily leak content.
I am sure someone could take their phones outs and picture every screen of what they were working on.. but it is a bigger barrier.
If there is no internet, how do you search for a solution to an immediate problem or look up documentation?
We had a separate computer (a windows box served through guacamole) that we could search things.
How is the testing culture like in these orgs?
Nothing too different from others, the only real big difference is that you cannot reach to the internet from where you're developing software.
If there is no internet, how do you search for a solution to an immediate problem or look up documentation?
Several DoE labs in the US were attacked around 2010. Jefferson Lab was cut off from the internet for several months (or maybe over a year?), and the only on-site access to the internet as a whole was a limited set of machines which weren't on the rest of the network. If you needed to look something up you'd go use one of those machines instead.
Comments
I disagree. My team has written a medium size web app ( ~30 pages) without JSX and the API works pretty well. You get used to it if the whole project uses it (just like any API).
I disagree. It is clearly intended as a quick start, people can customize or opt out in one command (and remove whatever they want).
It is very functional and engineers get a production ready layout and build system in < 1 minute.
It doesn't force you to use it, use it if you want.
--
Finally your example doesn't look much better or clearer than using the React API directly..
I haven't tried React without JSX, but I do find that switching over to the functional style interface I'm writing a lot less JSX. It's still there, and it's still the natural way to write the base-level components (divs and spans).
But at the next level up, it becomes really clear that <Foo x={1}/> is just syntactic sugar for Foo({x:1}), since Foo is just a function.
A lot of my code starts life as some chunk of a complicated render that gets refactored into a function. Then that function quickly becomes a React function component.
Next clean-sheet project I may try react without JSX. But I still rely heavily on newer ES features, so there may still be a cross-compile stage of the setup. While create-react-app is depressingly heavyweight, it is really fast and new JSX projects go up in a minute.
What was your motivation behind not using JSX?
The software environment was very locked for security reasons, no internet and etc.
Just felt it was simpler to not use JSX and to deploy with scp ;-)
In fact every dependency was manually downloaded and put on a vendored folder of the project. It was added as a dependency by adding a HTML tag.
All of it works surprisingly well..
You mean the development environment you worked in or is this referring to production?
I can't imagine working without internet as a programmer.
Tools like babel don't get shipped to production. They are part of the development build tools which gets stripped out. You can run a single build command on your laptop and SCP the result.
You can lock the dependency versions so your production code would have the same code.
You can commit node modules along with your code.
You could use zero installs by yarn which compresses node modules to make it easier to push them to version control.
Why manual?
I worked in. Is fairly normal to work without internet in some industries / environments (including my current one)
I know. But I had no build environment.
And I know to your last reply too.
Interesting to know. Thanks for replying.
Curious which ones?
Did you have to audit all the vendor code? If so, how much time was spent on that?
Do you think this kind of practices actually improve any security?
If there is no internet, how do you search for a solution to an immediate problem or look up documentation?
How is the testing culture like in these orgs?
The Visual Effects industry in my case. Reason is unreleased content, for example, the new iPhone commercial or a new Marvel movie that hasn't been announced yet.
Yes, from days to weeks. It was a separate department.
Yes, if your computers do not touch the internet and you do not have physical access to the device then you cannot easily leak content.
I am sure someone could take their phones outs and picture every screen of what they were working on.. but it is a bigger barrier.
We had a separate computer (a windows box served through guacamole) that we could search things.
Nothing too different from others, the only real big difference is that you cannot reach to the internet from where you're developing software.
Several DoE labs in the US were attacked around 2010. Jefferson Lab was cut off from the internet for several months (or maybe over a year?), and the only on-site access to the internet as a whole was a limited set of machines which weren't on the rest of the network. If you needed to look something up you'd go use one of those machines instead.