Live data from Hacker News

JavaScript development is not fun for me anymore

medium.com

91–100 of 123 posts

Re: JavaScript development is not fun for me anymore

#91
post #63

Earlier quoted context omitted.

I feel the same way... web development was hard, until I've learned about es6/babel, webpack, redux and react (I'm using morphdom as react replacement, but idea is the same). Now web dev is easy and fun. I have state, components, events and routes. That's it. Update the state and stay calm. The idea to concisely manage the state together with dom diffing, are my personal favorite game changers.

Can you provide some guidance/links to a backend Java developer who wants to learn & use a quality long-term, front-end tech stack? Is there a kickstart example project for your preferred stack? Note that I prefer to avoid nodeJS for any back-end production use but am ok with it as part of the dev toolchain, if required. Thank you.

Stick to https://github.com/facebookincubator/create-react-app/ and you'll be golden. If you need more config later, you can "eject", but this is a one-command-and-go kind of thing that is well maintained and works great.

Re: JavaScript development is not fun for me anymore

#92

But JS dev has never been fun. Web dev is fun because the browser is a freaking awesome plateform. However, it is _despite_ of JS. There's not a single characteristic of this language that makes it better than any other mainstream high level language out there. We use it because we have no reasonable alternative on the browser. It has always been a pain to use, requiring: - avoiding part of the language that is badly…

First-class functions are the star feature of JS. It's what makes it a great language for making UIs (like on the web) and single-threaded web servers (like with Node). If you don't like the language, that's fine. There's no shortage of languages out there.

That is a pretty ordinary feature for scripting languages.

Re: JavaScript development is not fun for me anymore

#93
To put a finer point on his argument; I'm working on an Angular project at the moment. Every time I refresh the page I have to wait 10 seconds before I see any of my changes while Angular compiles everything. I calculated that, given the number of times I have to refresh to test my changes, all of those 10 second compilations is costing my client tens of thousands of dollars every year in wasted productivity. So I can't help but wonder how Angular and their ilk are better?

Re: JavaScript development is not fun for me anymore

#94
post #36
post #31

Earlier quoted context omitted.

The problem is that everybody publishes bugfixes alongside new features. This practice should be stopped, because it leads to dependency hell.

Open-source maintainers should totally leverage this opportunity to make their projects sustainable. Sell your backports. Enterprises want them.

[deleted]

Re: JavaScript development is not fun for me anymore

#95
post #60
post #42

Earlier quoted context omitted.

That actually sounds like an interesting business model. What form would the transaction take?

Yes, and how would maintainers know which versions of their software are actually still used?

You mark releases as "Stable and supported" and have corporations subscribe against releases. If you are subscribed to a release, you get bug fixes for that release. If someone does not have a subscription to a release, it does not get updated, and if there is no current subscription for that release, you don't accept new ones.

You always allow people to move forward their subscriptions, but never backwards. You provide migration paths for each supported release.

People will pay for it.

Re: JavaScript development is not fun for me anymore

#96
Please try TypeScript. It's the only tech I will actively promote as 'not a fad' but a very useful thing. So useful, I stopped writing JS the first day I tried TS.

For anyone with a background in classical software, it makes JS 'feel more real'.

I can't imagine writing more than 50 lines of JS anymore.

Re: JavaScript development is not fun for me anymore

#97
post #63

Earlier quoted context omitted.

I feel the same way... web development was hard, until I've learned about es6/babel, webpack, redux and react (I'm using morphdom as react replacement, but idea is the same). Now web dev is easy and fun. I have state, components, events and routes. That's it. Update the state and stay calm. The idea to concisely manage the state together with dom diffing, are my personal favorite game changers.

Can you provide some guidance/links to a backend Java developer who wants to learn & use a quality long-term, front-end tech stack? Is there a kickstart example project for your preferred stack? Note that I prefer to avoid nodeJS for any back-end production use but am ok with it as part of the dev toolchain, if required. Thank you.

I would say just start with the React tutorial and use the react-create-app (uses webpack etc in the background and is a npm package) that they use in it. Then after the tutorial I would go into the docs and read through them and maybe test some.

After that I would pick the state management tool I want. Either Redux or Mobx as both are popular and have their advantages and disadvantages. I think it is worth going through both their official tutorials as they are pretty good.

https://facebook.github.io/react/tutorial/tutorial.html

http://redux.js.org

https://mobx.js.org

There are of course tons of videos but I think the official tutorials are a great start and using react-create-app instead of trying to dig into webpack and all that is really good at the beginning.

Re: JavaScript development is not fun for me anymore

#98

Earlier quoted context omitted.

But Angular isn't simply "a router/nav, a wrapper around XHR/an API, some rendering to HTML, and some buttons to do things". That's JQuery you're describing. Angular determines the shape of the extensions you can build for it, and general, standard components don't fit its philosophy out of the box. With the cnc, you can pick parts and modules from a much bigger pool, then cut your enclosure to match. A widgetized, s…

I can't say I agree that a library any easier to use within or outside of a framework. No matter what if you are using 3rd party libraries you will be writing some "glue". You will need to hook into their API and have it work in your application. Yes frameworks tend to enforce a structure on what that API has to look like (at least from a macro view), but that's a pro of them, not a con, and it's almost never "requir…

If you're having trouble integrating a library into your framework, then the library is probably the one that's poorly designed. I say this as the 'maintainer' for ng2-dragula (glue code for dragula), which is equally great and terrible.

Great: the dragula library handles lots of common drag/drop patterns.

Not great: it relies 100% on the jQuery model of 'truth in the DOM', and the glue code makes a feeble attempt at flipping that around. When you drag, it literally moves the element and notifies you that it has done so. If you want to customize it, you reply to callbacks that give you the literal elements, and maybe read a data-attr off them. The glue code can automatically mutate an array to match what happened in the DOM, which has been an unmitigated disaster judging by the hundreds of GitHub issues mostly about this one thing.

The problem isn't the restrictive framework that doesn't let you do what you want, it's the API that's not designed for rendering from a non-DOM data model. If you ask 'would it be easier with vanillaJS?' the answer is no – it would still be a stupid way to write drag and drop code, unless you were coding your vanillaJS in an equally abhorrent way.

Re: JavaScript development is not fun for me anymore

#100

I teach a course at upenn on intro to javascript. Perhaps the most useful advice I give to my students is that often the simplest tools will get the job done i.e. you don't need React, Redux frontend stack because for most cases jquery will get the job done much quicker. Only worry about the frontend libraries when you feel it's getting out of hand, otherwise, the simple, straightforward tools will suffice.

I haven't coded much JS since ES5. With the improvements to vanilla JS, are there still a lot of things that jQuery provides that vanilla JS does not?

Yeah vanilla js still is a pain to access the Dom with.
Post reply on HN