Hacker News new | past | comments | ask | show | jobs | submit login

I am so glad I read that. I feel like I stumbled upon a blog post that perfectly encapsulates many of my own thoughts on web frameworks. The author has managed to articulate criticisms that I’ve long held but struggled to express. I felt compelled to share my own experiences and viewpoints, as someone deeply committed to building user interfaces that are rooted in the foundational elements of the web—HTML, JavaScript, and CSS.

The Pitfalls of React and Other Frameworks

What I’ve disliked about frameworks like React is that they don’t fully respect HTML syntax. React offers something that looks like HTML but isn’t quite it. This forces you to juggle two parallel but distinct systems in your mind—HTML and JSX. This dissonance disrupts what could be an organic understanding of the operational principles of HTML.

Philosophy of Building User Interfaces

My approach to building UI is deeply influenced by a philosophy that leans toward artistic or sculptural expression. I believe in cleaving close to the ‘material,’ by which I mean HTML, JavaScript, and CSS—the core components of the web platform. I reject the use of domain-specific languages and avoid CSS processors. I strive for an approach that harmonizes with the given components rather than complicates them, even as I stay up-to-date with new features like async-await.

Ergonomics and Developer Experience

Of course, developer experience is highly subjective. What feels right for me won’t necessarily be right for you. But my goal goes beyond creating a tool that is merely comfortable; I believe there is a right and a wrong way to build frameworks. That’s why it was refreshing to read a perspective that aligns so closely with my own.

Key Takeaways from the Blog Post

The author mentions two vital points that resonate with me:

1. Respect the platform: This is a core tenet I’ve followed throughout my career. I utilize HTML syntax for templating and JavaScript template syntax. For scoped styles, I leverage the encapsulation provided by the Shadow DOM.

2. Minimize introduced complexity while embracing inherent complexity: This point beautifully encapsulates the essence of what it means to build ergonomic tools for UI development. We should aim to write minimal ‘glue code’ that ties the given web platform features into a coherent whole.

Final Thoughts and My Work

Although I think my own framework (good.html) has room for improvement, I’m happy enough to use it daily. I’ve shared my code for anyone interested in a different approach to web UI development. Check it out on GitHub: https://github.com/00000o1/good.html

Also if you want to see lots of code that utilizes this in real production, see: https://github.com/BrowserBox/BrowserBox/tree/boss/src/publi...




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: