Live data from Hacker News

Ask HN: How does one build large front end apps without a framework like React?

news.ycombinator.com

171–180 of 197 posts

Re: Ask HN: How does one build large front end apps without a framework like React?

#171
post #132

Earlier quoted context omitted.

> Electron is a framework in a very different sense than the "JS frameworks" op is asking about. The OP doesn't have a good understanding of what they're asking about, and that's okay. That's why they asked the question. The linked thread is titled "What framework did the developer use to create Obsidian desktop application?". It's not asking about a web application and specifically referencing a desktop framework wi…

I mean, you're correct that Obsidian doesn't run on the browser. But it's built on web technologies. As a result, I would argue that the overlap between the skillset and work needed to build an app like Obsidian overlaps more with most web applications than most desktop and mobile applications. You're also correct that Electron provides APIs beyond those available in the browser, such as access to the native filesyst…

I developed my note-taking app Daino Notes[1], which has a block editor (like Notion) and is written in C++ and QML using Qt. I wrote extensively about its development in my blog: https://rubymamistvalove.com/block-editor

[1] get-notes.com

Re: Ask HN: How does one build large front end apps without a framework like React?

#172
I've written and re-written many toy and throwaway UI frameworks. It's fun! My current pet project is built on SFML, which is basically a thin wrapper around OpenGL.

If I had infinite time I'd probably do most of my UI work at this level. I enjoy the process of "how can I do x? I don't have a feature close to x, so let's go build it!".

I think this mostly stems from the trauma of dealing with winforms/wpf/uwp and from having seen JavaScript once before. I feel like I'm restoring sanity in the universe by stacking rectangles in a not-crazy way.

Frameworks don't have to be complex and all-encompassing. When I'm "done" with a project, its UI layer generally only supports exactly what the application needs and not much more.

The reason the big frameworks are so gnarly is that they try to do everything and thus do no one thing particularly well.

You should absolutely build your own UI framework or try laying out a UI from GL primitives. It's like the assembly of UI design. Not for everyone, sure, but I find it peaceful

Re: Ask HN: How does one build large front end apps without a framework like React?

#173

Earlier quoted context omitted.

None of these are problems taken separately, but put together they're pretty frustrating. Hooks being 5 years old and being the predominant tool for certain tasks shows that the community only figured out how to solve a particular problem 5 years ago. Compare that, in terms of stability, to Python having coming up with the idea of packages a long time ago, and packages are now a stable part of the ecosystem (packag i…

> None of these are problems taken separately, but put together they're pretty frustrating. Hooks being 5 years old and being the predominant tool for certain tasks shows that the community only figured out how to solve a particular problem 5 years ago. Hooks are ~~7~~ 6 years+8months old, almost 7 years. This may not seem like a significant difference, but IMO it puts them 75% of the way back in time to when react t…

While we're keeping score, document.getElementById came out in 2000 [1] and XmlHttpRequest was standardized by mid-2000s [2]

[1] https://en.wikipedia.org/wiki/Document_Object_Model

[2] https://en.wikipedia.org/wiki/XMLHttpRequest

Re: Ask HN: How does one build large front end apps without a framework like React?

#174
post #169

Draw.io is quite good, and it is made without using any frameworks. Alas, the source code is not open to learn from. https://www.quora.com/What-is-the-tools-and-languages-used-i... >

> source code is not open What about this: https://github.com/jgraph/drawio

> What about this: https://github.com/jgraph/drawio

That repository only contains the minified code, not the original source.

Re: Ask HN: How does one build large front end apps without a framework like React?

#175
post #174

Earlier quoted context omitted.

> source code is not open What about this: https://github.com/jgraph/drawio

> What about this: https://github.com/jgraph/drawio That repository only contains the minified code, not the original source.

Holy shit dude, all those years I was dead sure it was open source and all.

Like a "proof that open source is working", a show case of a good quality, open source project.

Oh well, time to strike that one off the list.

Re: Ask HN: How does one build large front end apps without a framework like React?

#176

Earlier quoted context omitted.

> What are you talking about with this talk of implosion? It sounds like boogieman nonsense from small children scared of the dark. I prefer to use vanilla JS when writing large SPAs and it works just fine. It’s absolutely not and it absolutely doesn’t. Inheriting a VanillaJS project is often a nightmare because it screams “inexperienced developer” not to use a framework, so the code quality and build processes are o…

The complete irrational fear about writing original code is either autism or low intelligence. You wouldn’t be so reliant on a framework if writing in C, Rust, Zig, or most other languages. Developers are reliant on frameworks in JavaScript because they cannot program and the barrier of entry is low enough that anybody can do it.

You come across as an asshole for professing this opinion “everyone else is autistic or dumb”, and also wrong. I would never want to work with you on a team; you seem like the type to flaunt existing best practices at any opportunity.

Re: Ask HN: How does one build large front end apps without a framework like React?

#177

The reasons I avoid large frameworks like React, Angular, Vue, and even jQuery is that they are aren't necessary. They are code decoration that slows things down. Here is what you can expect without these: * greater flexibility * faster execution, My current application produces a large single page application that fully renders visually and executes state restoration in about 105ms localhost or under 200ms across a…

> To solve for the web browser just include the browser code into your Node application using ES6 module import.

I don't follow. How do you include the browser code without the compiling step?

Re: Ask HN: How does one build large front end apps without a framework like React?

#178
post #23

MDN has your answer, built into the browser, ready to go: https://developer.mozilla.org/docs/Web/API/Web_components If that's not enough, Lit enhances it a bit such that either LitElement and/or litHtml can accommodate whichever style you want: https://lit.dev/

this is the answer. should be ranked higher. WebComponents with lit+html is much better than React or any other framework.

Re: Ask HN: How does one build large front end apps without a framework like React?

#179

Earlier quoted context omitted.

model is html view is css controller is js that's why there's 3.

er... no. html+css is view, js is model and controller. Maybe, if by html we are saying html+dom+webAPIs (indexeddb, localstorage, sessionstorage, cache API), then yeah, you'd be right.

huh I guess abstractions can lead to a break in consensus. You sound as confident as I feel on the matter but we're at different places.

Maybe that's all that "good design" is ... surely there's other systems and architectures where we can confidently reach the same conclusion independently.

For instance, here, I thought we have a well-done separation of concerns that is a bit exotic and people refuse to understand it.

However, as I explored how I disagreed with you, I realized that there's obviously messy concepts that I map differently than you do. So in truth we have an ambiguous design! I'll have to think about this some more.

Maybe usability issues arise not from tools that are "difficult" to use but tools that don't afford a clear mental model on their fit and purpose.

Re: Ask HN: How does one build large front end apps without a framework like React?

#180

Earlier quoted context omitted.

The complete irrational fear about writing original code is either autism or low intelligence. You wouldn’t be so reliant on a framework if writing in C, Rust, Zig, or most other languages. Developers are reliant on frameworks in JavaScript because they cannot program and the barrier of entry is low enough that anybody can do it.

You come across as an asshole for professing this opinion “everyone else is autistic or dumb”, and also wrong. I would never want to work with you on a team; you seem like the type to flaunt existing best practices at any opportunity.

First of all I said people who claim to be programmers and cannot write original code are either autistic or low intelligence. The emphasis there is on original code. Secondly, I know something about autism, because I have a child with autism.

Look at the comments in this thread. A guy asked a question about vanilla JavaScript, a completely valid question on a site about comments upon programming links, and yet notice all the comments that are instead not about that.

There are so many comments about writing React, which is not what this thread is about. There are so many comments from people talking about themselves instead of actually about programming, much less anything about vanilla JavaScript. There are also comments like yours that are instantly hostility towards anything about original code, a subject that you seem to find horrifying.

Yes, this is incredibly autistic. Some common traits of autism, among many more that each autistic person may or may not have:

* low social intelligence, which in this context displays when developers are only thinking about themselves, what's easiest for them, and cannot think about anything else such as users or business owners

* fragile ego, which in this context results in hostility at subjects that expose a developers shallow capabilities and results in false displays of high confidence to mask deeply felt insecurity

I got tired of working with immature people who, in a technical capacity, could only do a little more that copy/paste template code and were otherwise generally hostile because of high insecurity. I am now in a different line of work where I don't have babysit people.

Writing original code or writing applications without a giant framework isn't challenging, but the subject certainly feels like the world is caving in for a great many people who call themselves seniors or engineers.

Post reply on HN