Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I have a hard time believing that you built a non-trivial SPA that you consider easy to maintain without an abstraction beyond jQuery.

There's just inherent complexity in software, so it's like suggesting that you built an application without ever writing code outside of main() (functions are for hipsters).



I mean, you're welcome to have a look at it https://github.com/IEMLdev/Intlekt-editor

An example of how I put together a component is here https://github.com/IEMLdev/Intlekt-editor/blob/master/src/sc...

- My "view" function takes a template string and replaces the node's content whenever "render" is triggered.

- I create a "model" object which triggers a "render" event anytime it changes. You can also give the model object methods which act as Redux-style reducers.

- The controller method is a shorthand for registering multiple jQuery events at once.

That's pretty much all you need for a complex app. It's the entire React-Redux architecture à la jQuery + ES6.


That's quite a complicated, embedded framework.

If that's "just jQuery", then React is "just ES6". I don't understand the distinction. Every abstraction is built on the layer below. You just rolled your own bespoke one instead of using one that already existed.

> I don't see what React offers beyond what you get with a templating language like Handlebars, and a few lines of jQuery for initializing components.

You say that like that's all your framework does, but I see more than that.

Seems you're mistaking different trade-offs for objective improvements, something that almost rarely exists in software despite what you read in HN comments.


The idea behind React is pretty cool, that all DOM transformations happen in the template. But that's all it is.

There's no need for a vdom for the most part, template strings and innerHTML are fast enough on their own.

I just find React to be an overly complicated way to achieve its goals.

   var model = { text: '' }

   var component = $( '.component' ).on( 'render', function() {
       $(this).html( `<div>${ model.text }</div>` )
   })

   update( 'text', 'Hello world' )

   function update( key, val ) {
       model[ key ] = val;
       component.trigger( 'render' )
   }
That's React in 8 lines of jQuery. My framework is just a minor extension to this concept.


> That's React in 8 lines of jQuery

No sir, that doesn't include server side rendering or diff rendering either (meaning changing a bit on the top component would re render all markup, not just what has changed)

Stop trying to over-simplify. The problem being discussed here is not React vs jQuery. It's what we do and the decisions we make as engineers to provide a good experience based on performance which is OUR side of UX.


I mean, you can use either the of the morphdom or setdom libraries to do the diffing if you don't want to replace all the HTML, but the concept remains the same.

I'm not convinced by arguments such as "when you're a large team it's necessary". Scaling teams has more to do with project structure than what rendering library you use.

Likewise, it's much easier to tweak performance when you aren't depending on a monolith like React or Angular.


I'm sorry bigmanwalter but you're working on a team of 3 people, not 100+ engineers working in the same codebase.

And you've created your own abstraction beyond "jquery bits for each component".

This is proper vanillaJS engineering, I do the same, it's just not what you're selling here.


Well of course I've created my own abstraction... that's what programming is.

I prefer to keep my abstractions simple and light, and preferably built using lower level libraries. If I can build a powerful component system in 150 lines of jQuery (and it would be barely more in vanilla js), I much rather do that than than import a 30kb + library.

There are plenty of 4kb react alternatives to choose from. Most with vastly simpler APIs. Choo.js or Mithril come to mind :)




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: