Live data from Hacker News

The case for frameworks

seldo.com

81–90 of 91 posts

Re: The case for frameworks

#81
post #2

I've said it before and I'll say it again. The main reason we need bloated convoluted web frameworks with giant learning curves and a jillion gotcha's is because businesses want desktop-like GUI's and HTML/DOM/CSS/JS is ill-suited to emulate such, and perhaps stuck that way because fixing it will likely break backward compatibility. Web is either missing or has screwed up too many common and expected GUI idioms: http…

Web frameworks are complicated. But frameworks like QT are no less complicated.

I have never seen a QT application making chunks of text disappear somewhere between my keyboard and my screen, but the front page of google keeps randomly doing it to this day.

If google can't get basic text input right on the web, there's something very broken there.

Re: The case for frameworks

#82

Earlier quoted context omitted.

Let's look at it from a different perspective. Web wasn't meant to be an application platform. It accidentally became one, due to events that had nothing to do with technological merit, but were social in nature. For instance, technologically, Flash is a much better platform for applications than HTML+JavaScript combo will ever be. But, it failed due to Adobe's bad market strategy. But Flash, too, was a band-aid on t…

> For instance, technologically, Flash is a much better platform for applications than HTML+JavaScript combo will ever be Flash was very nice for some use-cases, but it leaked memory. It is not a good fit for long-running apps (probably why Flex/Adobe Air failed, too).

That's a very bold claim about technology in general... Did every version of Flash player ever leak memory? -- I seriously doubt that. For practical purposes, even if there were leaks, Flash applications weren't supposed to run for more than few days on end, at least not until AIR came along and Flash expanded into the desktop world. The longest-running applications were browser MMO games which some gamer fanatics would play for several weeks in a single session. Even in this context, some other problems would prevent users from experiencing the adverse effects of memory leaks (usually, the game would crash due to some programming errors of the game developers, not because of the player).

Anyways, suppose for a moment that every Flash player since ever had a leak... well, Adobe's Flash is a relatively small C program, so more Valgrind tooling and more work would eventually had that fixed. It's not a flaw of technology in general, just a particular implementation. (There used to be GNash, and there's still Lightspark implementing the same technology).

> long-running apps (probably why Flex/Adobe Air failed, too).

I happen to have a bit of an insider insight here. I was on Adobe's CAB for about a year before they handed Flex over to Apache.

Long-running apps weren't a problem. Not enough to be ever mentioned in that context. The problem was in how the product was managed, in the misunderstanding of how to derive value from it.

Adobe wanted to sell two things:

1. Development environment (Flex Builder later renamed Flash Builder).

2. Services in development of Flash-based applications to enterprise users. (Think of VSphere Web console or some hospital interface etc.)

In both instances they made a bet on Flex. This was also the biggest argument in favor of buying Macromedia when Adobe bought it. Flash was hugely popular and growing and especially due to Flex which was a lot more appealing to developers than previous authoring tools.

What Adobe failed to realize is that the thing that made the technology popular ware these characteristics:

1. A tool for creating hand-made animations.

2. Very light-weight baseline components.

3. Video streaming.

The first two enabled indie game developers and small-scale e-commerce developers to create appealing products. And these were the absolute majority of the users of technology.

Adobe didn't do anything for their largest user group. They were working on a framework that grew slower and heavier by the day, and was, in its core, designed to mimic WindowsForms. They, essentially, were making a Web version of WindowsForms. The tool that they were trying to sell didn't support direct editing of animation, didn't even have a concept of timeline, no drawing tools etc. You were supposed to make your animations elsewhere and bring them pre-compiled into this tool. The code editing was so-so... an Eclipse-based heavy-weight plugin very much constrained by the abilities of the host. They tried to make "designer" view, similar to one that exist in MSVS, but that project failed due to lack of demand on the user side and lack of attention on the developers' side...

Adobe didn't allocate enough efforts to maintain the open-source code they had. At some point there was literally no one maintaining the MXMLC code. And then they made repository read-only and stopped accepting merge requests from community (there weren't many anyways). On the community part there was a growing disappointment that part of the toolchain always remained proprietary and that cheaper automation that could be run on Linux was always broken.

And then Adobe decided to dedicate the remaining development effort to the product you probably never heard of: Flash Catalyst. It was supposed to be a kind of an extension to Flash Builder, more geared towards animations and... mobile :D At that point, Flash was already on its last legs, and Apple dealt it final blow by completely disallowing it on its devices. Catalyst was scrapped. Adobe allocated the bare minimum of development effort to keep patching the player with security patches and hastily arranged for Flex to be handed to Apache.

I don't think that even after all that happened they learned about the reasons of the failure. Guess, most were bitter about Apple, but that's about it. They never realized that they failed to understand who their community was and how much it was important to support their community if they wanted their technology to live. They took the community for granted and tried to capitalize on popularity, but popularity disappeared because they took their community for granted.

Re: The case for frameworks

#83
post #61

Earlier quoted context omitted.

This argument reminds me of people who confuse market success with product quality. I.e. some people believe that if the product sells well, then it must be a good product. You don't need to try hard to convince yourself that there's no causal link between the two (eg. fast food sells well, but isn't good food, high-end goods usually don't sell well because buyers aren't willing to pay extra for marginal improvements…

Exactly, the point of frameworks like React is to patch over issues with html, css, javascript and the DOM. Dropping React (the framework) will just make you deal with those issues in particular ways that only you understand, but it won't make them disappear.

Aaaand... this doesn't make React good. It makes HTML+CSS+JavaScript bad. Here's the problem. These three need fixing. Or, rather, replacing altogether if you want a platform for distributing applications. While any strategy for replacement right now seems impractical, the opposite of it is not good either. Not being able to do the right thing doesn't make the least wrong thing the right thing.

Re: The case for frameworks

#84
the framework/bespoke complexity/effort graph in this article is one of the most brazenly untrue graphs I've ever seen.

frameworks are all low-effort fun until you need to do some Hard Problem that they can't handle well, then suddenly the effort shoots up massively, because now you're trying to figure out how to do your hard problem within the structure and using the primitives of the framework.

bespoke solutions start off high-effort because you have to reinvent the proverbial wheel, but then as you keep rolling, it gets easier, and you have something that is better-architected for your exact problem. when the same kind of Hard Problem arises, you can solve it much more easily, because you're unburdened by trying to shoehorn the solution into the structure and primitives of someone else's framework.

Re: The case for frameworks

#85
post #61

Earlier quoted context omitted.

Exactly, the point of frameworks like React is to patch over issues with html, css, javascript and the DOM. Dropping React (the framework) will just make you deal with those issues in particular ways that only you understand, but it won't make them disappear.

Aaaand... this doesn't make React good. It makes HTML+CSS+JavaScript bad. Here's the problem. These three need fixing. Or, rather, replacing altogether if you want a platform for distributing applications. While any strategy for replacement right now seems impractical, the opposite of it is not good either. Not being able to do the right thing doesn't make the least wrong thing the right thing.

Yes, but as you said the web is a broken platform for applications. Painting a picture where we lived in a perfect world until React introduced some problems is a wrong analysis. React solved some (not all) problems of the web as a platform for GUIs, and introduced a new set of problems. People make their choice and choose which set of problems they prefer to work with.

The web works well for displaying static pages with links between them (if you are ok with some ugly things while the page loads), but once you introduce Forms or any sort of interactivity with the user all hell breaks loose and you will have to choose what you patch over, and what sacrifices you make.

Re: The case for frameworks

#86

Earlier quoted context omitted.

> For instance, technologically, Flash is a much better platform for applications than HTML+JavaScript combo will ever be Flash was very nice for some use-cases, but it leaked memory. It is not a good fit for long-running apps (probably why Flex/Adobe Air failed, too).

IIRC it also wasn't good for screen readers and accessibility.

Yeah, that's true. Flex, however, dedicated some efforts to accessibility. But, developers didn't want the components Flex had to offer. Custom stuff almost never implemented accessibility interfaces.

This also impacted how search worked. At the time of the sale of Flash to Adobe, either Macromedia before the sale, or Adobe right after the sale donated a "headless" version of Flash player to Google in hopes that they'll make something of it, something that'd help with searching within Flash applets... I don't know the details, but I know that the project essentially failed to even start. That player never received any updates, and Google wouldn't search inside Flash. I think, the real reason was that it was just way too hard to search inside Flash due to the very dynamic nature of these applets. Pieces of text would often appear in very small chunks, random order, impossible to tell if visible or not etc.

With HTML and JavaScript, eventually Google faced the same problem, and that's how they came up with Chrome. For some reason they decided not to make their own player.

Re: The case for frameworks

#87

Earlier quoted context omitted.

> For instance, technologically, Flash is a much better platform for applications than HTML+JavaScript combo will ever be Flash was very nice for some use-cases, but it leaked memory. It is not a good fit for long-running apps (probably why Flex/Adobe Air failed, too).

That's a very bold claim about technology in general... Did every version of Flash player ever leak memory? -- I seriously doubt that. For practical purposes, even if there were leaks, Flash applications weren't supposed to run for more than few days on end, at least not until AIR came along and Flash expanded into the desktop world. The longest-running applications were browser MMO games which some gamer fanatics wo…

> at least not until AIR came along and Flash expanded into the desktop world.

Sorry if it sounded arrogant. At the time I was developing a display application for hospitals (showing what is in each floor, etc. on screens), and our prototype was running 2 instances of it, and killing one and switching to the other to keep this memory leaks in check (horrible hack, I know). It was nothing too fancy, and it was still causing memory leaks when run for a long time.

I believe these were already the Air times.

Maybe it was not on each Flash player version. I found a couple here as an example:

https://blog.gskinner.com/archives/2005/10/major_flash_pla.h...

https://www.reddit.com/r/RotMG/comments/19kc4u/memory_leaks_...

Re: The case for frameworks

#88
post #66
post #64

Earlier quoted context omitted.

Some of us still remember the golden years of doing the same but with jQuery snippets spread through hundreds of files with zero logical connection between them except in the developer's mind.

I have no issues with frameworks and libs but the fact I know I’m on site built with react because everything gets laggy and my laptops fans start spinning is not a great selling point.

I've literally never experienced this with react. This sounds like an infinite loop of some sort.

Re: The case for frameworks

#89

Earlier quoted context omitted.

That's a very bold claim about technology in general... Did every version of Flash player ever leak memory? -- I seriously doubt that. For practical purposes, even if there were leaks, Flash applications weren't supposed to run for more than few days on end, at least not until AIR came along and Flash expanded into the desktop world. The longest-running applications were browser MMO games which some gamer fanatics wo…

> at least not until AIR came along and Flash expanded into the desktop world. Sorry if it sounded arrogant. At the time I was developing a display application for hospitals (showing what is in each floor, etc. on screens), and our prototype was running 2 instances of it, and killing one and switching to the other to keep this memory leaks in check (horrible hack, I know). It was nothing too fancy, and it was still c…

I worked on a browser MMO game TimeZero. It used to be the second most popular game in Russia in early 2000's. Had about 5000 online users and ten times that much of active accounts. We had a lot of different problems with Flash player, but memory leaks weren't a thing.

Grant Skinner was a... popular person in Flash community... but, you also need to understand that Flash community, almost entirely, was amateur programmers. Looking back at those days, I feel the same kind of light embarrassment like when I thought I'd discovered some new fundamental theorem in algebra when I was in mid school only to later learn that it's something we'd learn about a year later.

So, what he discovered can be summed up as "works as intended". It's not a memory leak. His mistake was literally:

> function variables are transitory – they should only exist during execution of the function.

He's both confused between variables and values, and believes that common behavior is the only possible one. It's easy to make this mistake if you never work with entities like, eg. sockets or threads and similar system resources that have to be explicitly released by the program because the system that created them doesn't track their lifetime.

In other words, that's not a memory leak. A memory leak would be something like if BitmapData.dispose() didn't actually free memory.

I believe that the reason for this kind of behavior was that BitmapData would be also implicitly used by the player's own rendering layer which had to be explicitly instructed to remove it, if the program no longer needed it.

Re: The case for frameworks

#90
post #5

Earlier quoted context omitted.

> Frameworks and plug-ins exist to allow this to be all plug and play Too many are buggy and/or poorly documented and take lots of trial and error to get working as intended. And you create a dependency mess by including lots of pluggins/libraries. It may be quick up front, but can jack maintenance after say 5-ish years. Multi-K-lines-of-code libraries "rot" as environments change. If you can write a shop-tuned versi…

> shop-tuned version in say 300 lines But if that was the case, you would do that, resorting to other tools for something that tiny is silly and only really done by beginners. Something that tiny would also unlikely have bug or documentation issues. There are some great tools that are poorly documented/buggy, yes, but they are quite rare and it's much easier to use them and fork the repo (if inactive) than to build f…

> This idea that you avoid creating a dependency mess by writing more of your own work, isn't the entire truth. The dependency is just internal

The point is that it's better to depend on something simple and quickly fixable than something convoluted. Vendors/sponsors can and do go away.

If you have a skilled API builder, they know how to do KISS. If a specific need requires something that's not KISS-able, such builders will be honest about it and recommend a pluggin. But every shop and domain is different such there are indeed cases where throwing libraries at the problem is the right tool for that particular job.

Post reply on HN