Live data from Hacker News

Why Is Front-End Development So Unstable?

breck-mckye.com

171–180 of 366 posts

Re: Why Is Front-End Development So Unstable?

#171

Web frameworks are churn-y because they are incredibly leaky abstractions covering really awkward impedance mismatches. This means that they are never quite satisfactory - and that just to use one, you need to be capable of building a new one yourself. Think of a typical web app. Your data exists: 1. As rows in a database, accessed via SQL 2. As model objects on the server, accessed via method calls and attributes 3.…

All of this is why, in the end, more and more... I do things "the hard way". If I'm using a dynamic language WTF do I need an ORM for, if I understand enough to write an SQL command, and use a library for that DB that does parameterized queries?

On the front end, I tend to lean towards abstractions that work together... I really like React and the material-ui library's switch to JSS. It's relatively clean, and useful. Even then, it's only a mild syntax adjustment, not a full on abstraction. React is more of an abstraction, but that comes with functional paradigms that aid in testing, and predictive behaviors.

It really depends though. One can always do just JS/HTML/CSS, and there's something to be said for that. There are lighter tools that are similar to JQuery to smooth over a few of the rough edges. There's really an ala cart of available options.

The problem is that people assume that the PFM (pure fucking magic) will solve it all for them. You can use the cleanest or simplest abstractions, and then still write layers of incomprehensible spaghetti in between.

Re: Why Is Front-End Development So Unstable?

#172

Earlier quoted context omitted.

It doesn't help that most developers are language fanboys who have no idea what actual programming means.

I ask this in the most serious of ways, could you explain what actual programming is?

The minimum ability someone needs to have for me to consider them a programmer is the being able to write a parser using yacc or something equivalent. Anything a person with that ability does is programming because they know enough to realise when switching to putting legos together it more efficient.

Re: Why Is Front-End Development So Unstable?

#173
post #119

Calling out Vue.js as a possible solution is hilarious. Selling a trending technology as a silver bullet is exactly the problem he complains about in the article. Comparing the development methodology of Facebook - the company behind React - and this mindset is illuminating. Facebook famously rewrote PHP and added extensions like XHP rather than start their codebase from scratch. React follows a similar philosphy. It…

Yes, I still don't get th Vue hype.

Angular 1 developers going back to something similar (my 2 cents).

Re: Why Is Front-End Development So Unstable?

#174

Sorry but I find font-end development pretty stable. Having to learn a new library every 3-4 years (because of a new job, generally) is it really a big deal? In my career I also had to learn Java, PHP, C#, Node.js, bash, batch, Python… Build apps with Spring, CakePHP, Symfony 1 & 2, ASP.NET MVC 3 & 4… Query database with Hibernate, Entity Framework, Linq SQL… Handle dependencies with Maven, Nugget… Store data in Post…

I think the title is referring to the ecosystem and not the technology. • How many frameworks for Java, Python, Bash, etc did you have to learn? • Did you switch from Redis to X because the former was deprecated N months later? • Are OVH, Heroku, AWS updates getting in the way of your development process? Learning a technology by itself like Node.js is not a problem, the problem is that front-end development nowadays…

I've only seen one issue in React that affected me.. when they started requiring PascalCase for component names with JSX. Everything else has been really nice. I glommed onto Redux and thunks pretty early on, and have been wrapping around fetch about as long. I used Bootstrap for a long time, and progressed to material-ui with very little disconnect. Those have been my personal preferences for several years, and they haven't changed THAT much in terms of usage.

Now that's nothing like I've seen with say Angular, Angular2-6 (including the long, painful Angular 2 beta cycle). I've also seen tooling evolve, and some of that painful... Webpack and Babel have changed a lot. create-react-app doesn't solve it all, but helps abstract some of it.

Node has had growing pains and is finally fairly stable for those developing/adapting native code to run in node.

I haven't really had to re-learn anything for a project as it's progressed any more than I did 15 years ago on the backend.

Re: Why Is Front-End Development So Unstable?

#175
post #119

Earlier quoted context omitted.

Yes, I still don't get th Vue hype.

Angular 1 developers going back to something similar (my 2 cents).

I will say that Vue feels like an evolution like a cousin to Angular 1, without trying to do so much in the box. I still prefer React, but can see the appeal. Similarly, I can see the appeal of WebComponents.

Re: Why Is Front-End Development So Unstable?

#177

Earlier quoted context omitted.

>In my experience the app tends to evolve around jQuery selectors and event handlers, rather than having a well defined structure What does that even mean?

CSS selectors are highly dependent on the structure of your HTML. If you refactor your HTML then you’ll be required to rewrite many of your CSS selectors. None of that is surprising at all, but jQuery makes it hard to abstract the use of CSS selectors away from the rest of your UI code. Compare with Angular2+ where the logical separation of Components and the HTML of the template is rigidly enforced making refactorin…

Now evolve that to say React, where your components aren't separated by a DSL from your component code. ;-)

Not to dig on Angular too much, I think it's fine, but I'd much rather use Vue if I was going for small, or React if I'm going for larger interactions/components/applications. Angular does have a lot in the box, but when it takes 4 guys to lift that box, there's a lot less value than 4 smaller boxes.

Re: Why Is Front-End Development So Unstable?

#178

Earlier quoted context omitted.

Bad jQuery apps follow the pattern: When “.x” is clicked, show “.x .y”, add className “xyz” to “.z”, and fire off an XHR to “/api”. This defines what the developer wants to happen, but is brittle and hard to test. Frameworks would typically break this into actions or methods that modify state and a UI that updates when the state changes, so that the parts can be effectively unit tested and the UI can be changed witho…

> Bad jQuery apps follow the pattern: When “.x” is clicked, show “.x .y”, add className “xyz” to “.z”, and fire off an XHR to “/api”. This defines what the developer wants to happen, Yes, it does. All in one place, in about 10 easy to understand, easy to debug lines of code. >but is brittle and hard to test. I don't see how it's brittle, or hard to test. You click the button, and verify that it does what it's suppose…

Scale that to a VERY large application. There are lots of applications where class names and even hierarchies get re-used by other teams working on another portion of an application. In practice, CSS blows up, other portions of the app stop working correctly. Yes, you CAN use discipline in order to create good applications with jquery and others.

In the end, I'll take my single state tree (source of truth) and one-way rendering path, and find it much more sane, without weird state and interaction bugs that show up.

Re: Why Is Front-End Development So Unstable?

#179

Earlier quoted context omitted.

You can test conditional logic, state mutation, and any function without side effects. It takes very little time and definitely improves the codebase. Testing is very dependent on the culture of your team and company though.

>You can test conditional logic, state mutation, and any function without side effects. It takes very little time and definitely improves the codebase. Testing is very dependent on the culture of your team and company though. For sure. We have a team of people dedicated to testing. Compared to developers, they're easier and cheaper to hire. Our developers, who are very brilliant and very expensive, mainly write code…

functional code is VERY maintainable... If you built it to be thrown away, or replaced, that tends to make it more maintainable. Making something testable, even if you don't write tests, leads to better code.

Re: Why Is Front-End Development So Unstable?

#180
post #45

Earlier quoted context omitted.

> but it seems many developers frown upon it these days This is sadly very true. jQuery is almost used as an insult these days. Having code be called "jQuery Spaghetti" is about the worst epithet that can be hurled at a javascript codebase these days.

I am one of those people. It isn't that I don't understand it's purpose. What I hate is when people like my boss, who haven't read a text book on the subject for 13 years pull Jquery out automatically and force it into everyones face before any actual purpose for doing that is established. It really winds me up.

Favorite development manager quote that I ever heard a manager say.

    "Why are you guys talking about JavaScript?
    Can't you just use jQuery?"
Post reply on HN