3 ms·
There is a good solution. It's actually a great solution: Write everything in plain JavaScript. You get a great language to develop in. All your problems will g
by aktuel 2y ago
There is a good solution. It's actually a great solution: Write everything in plain JavaScript. You get a great language to develop in. All your problems will go away. No dependency hell. Excellent load times and performance. Superb compatibility.
- mablopoule 2y agoThis. In one of my previous job, the main product was 100% pure Javascript (using AngularJS), with a few (vendored) third-party scripts, and it was very nice to work on it. No package.json, no dependency issues, and above else, the workload we had was always related to business, and almost never related to external technical constraint such as a depreciated dependency.
- RUnconcerned 2y agoI... don't think that AngularJS + third-party scripts was what OP meant by plain Javascript.
- leosanchez 2y agoAnd I wouldn't say AngularJS v1 is nice to work with either
- mablopoule 2y agoIn general I would agree, but this project managed to avoid the main gotcha of AngularJS (the performance issues & the possibly messy data-flow), so it was holding out suprisingly strong, even pas the maintenance date of AngularJS. The lack of pre-processing steps, combined with good CSS and a well-formed DOM made it one of the rare project in my work history that didn't create any rewrite-envy. AngularJS or not, the main point is that avoiding piling layers of tooling that might force you to an upgrade for purely technical reasons was a nice experience.
- skinkestek 2y ago> You get a great language to develop in Every single footgun from PHP but wrapped in a nice syntax so people don't understand they are in danger. I'm deeply impressed by the Javascript community. What they have managed to create using a that language is amazing. But please people, do yourself and everyone who ever has to touch your code base a favor and use TypeScript.
- spiderfarmer 2y agoWhy are you dragging PHP into this?
- skinkestek 2y agoBecause people know they are supposed to dislike PHP. So I am just taking advantage of that to help spread awareness about the JS problems.
- spiderfarmer 2y agoThe people who disliked PHP are the ones who created the gargantuan JS mess. Meanwhile, PHP became the only sane development environment.
- withinboredom 2y agoWe're supposed to dislike PHP? Have you tried it in the last 5-6 years?
- turnsout 2y ago…and all of a sudden you have a build step. This is how it starts.
- em-bee 2y agoyou can use fully featured frontend frameworks without a build step. while that may sound ingenious because you are effectively using a prebuilt version of the framework (so there is a build step somewhere) you are not suffering the problems that come with building it yourself. instead your code is used and stored in a way that it will work directly in the browser as long as browsers support javascript.
- thrance 2y agoMaintaining a large typescript codebase with many developers is already a nightmare, I can't imagine what it would be like if intellisense was clueless about the parameters a given function takes.
- cies 2y ago> Write everything in plain JavaScript. If you are one programmer it may work, but many of us work in teams. JS is horrible for that as you need a lot of discipline (which often does not carry over well from team to team) in order to write "good JS". We use Elm now. Elm translates well to JS (quick to compile and Elm is designed to map well to JS). We use Elm libs, but not nearly as much as in the unholy React+jQuery (yes, that's a bad idea) code it replaces. All is compiled into one bundle. For the browsers the result is much less to download. For us devs it is a very different development flow: once the compile errors (shown in the IDE) are gone, it just works. Compared to the loads runtime bugs in JS, we are confident this is a huge step forward and a good foundation to build on top of.