News for hackers. Stuff that matters.
Re:Using Neutrino to jump-start modern JavaScript development by gens on Friday February 24, 2017 @09:59AM (#13724185)
Does anybody just write plain JS ?
Re:Using Neutrino to jump-start modern JavaScript development by madhadron on Friday February 24, 2017 @11:54AM (#13725348)
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 stable releases of Chrome and Firefox in the next month, and, if you have no legacy browser requirements as I happen not to, web application development becomes somewhat reasonable for the first time since I began doing it in the '90's.

Admittedly, when I started trying to build a library out of this (https://github.com/madhadron/allorryll), I put it in TypeScript, but I'm also the guy who did serial port and Firewire camera control in Haskell.

Obviously this doesn't apply to writing documents on the web, where JavaScript should only be added as part of a structure that will gracefully degrade.

Re:Using Neutrino to jump-start modern JavaScript development by olavgg on Friday February 24, 2017 @03:51PM (#13727781)
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 by ojr on Friday February 24, 2017 @02:41PM (#13727001)
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 by bastawhiz on Friday February 24, 2017 @12:36PM (#13725711)
> 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.

Re:Using Neutrino to jump-start modern JavaScript development by gens on Friday February 24, 2017 @04:24PM (#13728042)
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 by sp4ke on Friday February 24, 2017 @07:49PM (#13729323)
I did frontend for around 5 years. Started with Angular before it was cool and went through all the node/npm hype. I'm getting out of frontend now because of the ridiculous state of frameworks and libraries. In the mean time for my side projects I now do almost everything in pure JS and use only specific functions from libraries if there is no way around.

The irony with all these frameworks, in many cases especially for small projetcs, it will be more efficient to code it from scratch than dealing with the whole stack thing. So much for not reinventing the wheel ...

Re:Using Neutrino to jump-start modern JavaScript development by Buetol on Friday February 24, 2017 @11:02AM (#13724809)
I write plain js for simple pages and load webpack-compiled js for complex pages, you can do both.
Re:Using Neutrino to jump-start modern JavaScript development by warent on Friday February 24, 2017 @10:04AM (#13724241)
I did recently for a very simple Cordova app used by sales reps for marketing purposes. A framework or external libraries was overkill to the extreme, so by sticking with just vanilla I kept the app size to a minimum.
Re:Using Neutrino to jump-start modern JavaScript development by DCoder on Friday February 24, 2017 @11:35AM (#13725131)
Yes. I just wrote a Chrome extension this week, using plain ES6. There was not enough code in it to require TypeScript or Webpack.