Live data from Hacker News

Using Neutrino to jump-start modern JavaScript development

hacks.mozilla.org

51–60 of 68 posts

Re: Using Neutrino to jump-start modern JavaScript development

#51
post #48

Is there a simple example of how to add something like react-router, redux and bootstrap as to presets to neutrino. My problem with CRA is that while very helpful(!) I am often faced with having to add those kinds of components.

I'm not part of the React ecosystem so please excuse my ignorance, but why would adding a library require changing a build? Wouldn't you just npm/yarn install those things and use them?

Yes you are right. Redux or react router have nothing to do with build config. They are parts of the app

Re: Using Neutrino to jump-start modern JavaScript development

#52
post #49

Maybe it's just me, but I didn't find it all that difficult to get started with webpack after a few tutorials and samples. This seems like it hides away something that people should probably understand, which isn't all that difficult to get started with. Also when you start combining different packages in webpack (or encounter an error (or want to make some decisions in the config script)), the standard copy/paste bo…

I didn't find it all that difficult to get started with webpack after a few tutorials and samples Neither did I until one day I tried to do something slightly outside those tutorials and the whole thing kind of stopped working for reasons I could never fully understand. That being said I'm still using webpack, but it's not really an enjoyable experience.

And this is why I have stuck to using grunt like a neanderthal. Grunt is primitive and slow but I understand everything that it does and I am able to extend it to do my bidding. Webpack etc. are probably more efficient but also limiting.

Re: Using Neutrino to jump-start modern JavaScript development

#53
post #18

Earlier quoted context omitted.

A Hello World GUI app, which is a fairly important distinction. Also one that runs on any machine with a web browser.

But creating and running a Hello World GUI app for iOS only takes a few seconds, even when running it on your live device.

The latest Xcode to support the latest iOS version is 17gb, it might take more than a few seconds to get it running properly, and you need to set up a developer license key and have all the certificates up-to-date just to run on the device, iOS tooling is more complex hands down

Re: Using Neutrino to jump-start modern JavaScript development

#54
post #20

Does anybody just write plain JS ?

Yes, actually. As soon as you recognize that the DOM API is rich and fast and you understand how MVC works, you actually get much cleaner code by not mixing HTML and JavaScript. My original explorations of doing this are at https://github.com/madhadron/mvc_for_the_web . When you understand this, React's shadow DOM and JSX are completely unnecessary. Combine it with the fact that grid layout is expected to be in the s…

I am able to bring the React patterns on the web and use the same patterns and code to make native iOS and android apps. Until there is a solution that can work cross-platform like this, I don't feel React and JSX is unnecessary

Re: Using Neutrino to jump-start modern JavaScript development

#55
post #42

Earlier quoted context omitted.

Boilerplate framework?

Personally, I'm looking forward to five more of these projects springing up, after which someone can great a meta boilerplate framework for abstracting all the boilerplate frameworks. It can have its own meta preset format that translates into the six other preset formats so you, the lucky developer, can pick your open boilerplate generator and rely on this boilerplate generator generator to hide everything behind a…

Well played. It's the abstract factory, factory ... factory paradigm all over again.

Re: Using Neutrino to jump-start modern JavaScript development

#56
post #44

Earlier quoted context omitted.

After just reading the title, I assumed the same thing, but actually this is exactly what web development needs. create-react-app is a great example of a project that abstracts away all the complexities of a JavaScript build process and dev environment, but customization inevitably requires you to 'eject' and reintroduce that complexity to your project. This tool goes one step further and supports customization witho…

What complexities of build processes?! Building Javascript files with modules and deps is a solved problem. We've built all sorts of other file types and compiled them and linked them before with tools like Make, SCons and other tools. It's ridiculous to think that JavaScript is a unique language that needs its own build tools. It does not. We went down the wrong path years ago when we decided that whenever we use a…

I hear you. Node.js made my Ant tasks for running jshint and qunit totally redundant :(

Re: Using Neutrino to jump-start modern JavaScript development

#57
One thing that seems to be missing from these SPA app utilities is an automatic way of pointing your root HTML file at an expirable root JS file. In development it's ok to point at `application.js` but in production NGINX/S3/Apache/Cloudfront should be serving something like md5-digest-of-app-bundle.js such that when the bundle content changes you invalidate the cache. If you're using a CDN you'll also need to have a prefix step to change the root url for assets.

Re: Using Neutrino to jump-start modern JavaScript development

#58
post #20

Does anybody just write plain JS ?

Yes, actually. As soon as you recognize that the DOM API is rich and fast and you understand how MVC works, you actually get much cleaner code by not mixing HTML and JavaScript. My original explorations of doing this are at https://github.com/madhadron/mvc_for_the_web . When you understand this, React's shadow DOM and JSX are completely unnecessary. Combine it with the fact that grid layout is expected to be in the s…

Nice to hear! I also use a MVC framework (Grails) with plain old Javascript for DOM manipulations. I have no need for complex bloated frameworks like Angular and React. I do more complex UI with canvas too(where zooming and panning is required).

I agree that web development has never been more fun that it is today, except for Safari with buggy flex implementation and iOS that set position: fixed to absolute and refuse to properly scale the "document" when you want to type some text. Every time I get a bug report these days it is Safari or iOS that doesnt follow the standard. Chrome, Firefox, Edge works great most of the time.

Re: Using Neutrino to jump-start modern JavaScript development

#59
post #20

Does anybody just write plain JS ?

> plain JS ES2016 is "plain JS". If by "plain JS" you mean "jQuery plus ES5", I encourage you to learn what's happened in the last half a decade.

I see. I meant it as "things implemented in the browser", without any of the million and a half libraries.

Re: Using Neutrino to jump-start modern JavaScript development

#60
post #57

One thing that seems to be missing from these SPA app utilities is an automatic way of pointing your root HTML file at an expirable root JS file. In development it's ok to point at `application.js` but in production NGINX/S3/Apache/Cloudfront should be serving something like md5-digest-of-app-bundle.js such that when the bundle content changes you invalidate the cache. If you're using a CDN you'll also need to have a…

Use an env var
Post reply on HN