NodeBB + ReactJS
-
@julian this post is the reason I didn't use nodebb when I was evaluating frameworks last year, and I've linked other people to it.
This is a bad design decision with graybeard logic. DX is always the main pain point and driver of third party contributions, not premature optimization.
React, for example, has eaten the world and birthed many alternatives with similar ergonomics, smaller footprints and faster renders. Meanwhile nodebb is using... jQuery and BenchpressJS? Oof.
Lastly, I was also "trained in an era when client-side frameworks did not exist"; it is not a flex to refuse to grow with the times. This is like saying you were raised in a barn so don't know how to shower. These architectural decisions have surely been a deterrent for adoption for many others.
-
Thanks for commenting!
@Henryk said in NodeBB + ReactJS:
React, for example, has eaten the world and birthed many alternatives with similar ergonomics, smaller footprints and faster renders.
I'm going to have to ask for citations there.
Saying react is small footprint or faster than handwritten js and benchpress is ... a laudable claim. I'd love to see it backed up.
-
@Henryk said in NodeBB + ReactJS:
it is not a flex to refuse to grow with the times. This is like saying you were raised in a barn so don't know how to shower.
Never said this was a positive thing. Just stating facts. It provides context as to why I believe what I say, even if erroneously.
All of my justifications could even be the case because they were applied ex post facto
-
@Henryk said in NodeBB + ReactJS:
React, for example, has eaten the world and birthed many alternatives with similar ergonomics, smaller footprints and faster renders. Meanwhile nodebb is using... jQuery and BenchpressJS? Oof.
I mean, NodeBB is slowly moving away from jQuery, but the issue is the plugin ecosystem - removing jQuery would be a very breaking change, much, much bigger than the move from less to scss (since most plugins would still at least work even with their css broken, and most of the time the transition didn't actually require rewriting anything unless one was using more advanced features). I suspect it'll end up moving to something like cash at some point.
And I suspect you're confusing Benchpress with some other templating engine, since (which has both positive and negative aspects) it's basically used only by NodeBB and tailored towards it. It's a tiny and from what I've seen fairly well optimized templating engine - I suspect it'd be faster than react for templates just because it's significantly less complex.
I honestly imagine that if NodeBB was written, or fully rewritten, now it'd be using some framework, likely React/Preact. But the issue is that when you have a long-lived codebase with existing ecosystem the benefits need to be much larger than for the initial choice. Because even with diminishing returns on smaller improvements, the required amount of work makes it hard for a rewrite to beat them, much more so if the changes will require more changes by third party developers too. And you still have to ask yourself if working on DX and performance is worth the opportunity cost, or maybe it's "good enough" and you should focus your efforts elsewhere.
It's annoying, and if I had the time and will to develop forum software from scratch my tech stack would look different than NodeBB, but as with many things it's only easy on the surface and I still prefer the way NodeBB is built to php of Flarum (also - they're an example of an early framework bet that didn't work out ecosystem-wise, since mithril ended with a far smaller community than React and has gone through a few periods when it had years between new releases) or the weirdly dockerized Ruby on Rails w/ ember.js that Discourse uses.
I may not be a big fan of jQuery, but at least even when writing for core I have the choice of just not using it and going with modern JS instead. -
-
@crazycells I have the desire, but I need a lot of time to make it a separate plugin, now everything is strongly tied to the theme. Alas no free time right now
but someday I think I'll do it -
Are nodebb + nextjs compatible?
When developing nodebb custom plugin or custom theme, is there a way to make nextjs compatible?
reactjs is client side rendering, and nextjs is SSR, so when considering seo, it must be developed with SSR.
These days, many of the web developers being hired use nextjs as a basis for development, so we are also developing web using nextjs.Of course, I know how to use bootstrap + jquery tpl express. But these days, people who are beginners in web development are more familiar with nextjs.
-
@루루 said in NodeBB + ReactJS:
Are nodebb + nextjs compatible?
Is anything Nextjs compatible? lol
Unless Nextjs has changed in the last 3 months, it is super complicated to work with. Even then you have to use it on Vercel to have any hope of it working, as using Nextjs on another host is even more problematic.I'm waiting for someone to tell me my past experiences are no longer valid?
On the wider-point of de-couplement, then yes, modularity is a good principle to aim for. Im not a CSS fan so a year ago I did try making a pure js front end using nodebb API as a backend!
Unfortunately that project went by the wayside as it was a lot of work! -
@eeeee Did you fail while trying to deploy nodebb on vercel?
=> You used only the backend function of nodebb, but is there a reason why it failed in the end?
I tried to do that (nodebb backend + nextjs 13). So, I would appreciate it if you could tell me why it failed.https://vercel.com/guides/using-express-with-vercel
I understand that deploying a general nodejs application such as express in a vercel environment is not easy. Functions that require allocating IO for a certain period of time, such as [websocket, database connection], require special processing suitable for serverless functions.
Since edge function-serverless functions have all of these characteristics, I know that it is not easy for developers to develop them.
I'm also using strapi, but I couldn't distribute it on vercel.The site I am currently running is made with nextjs 13, and is distributed using [google cloud run for the API server and aws amplify for nextjs].
Nextjs Logic is not being developed to handle complex server logic such as API logic.We are still considering exactly what to do with nodebb, but we plan to use nodebb hosting or self-hosting using google cloud run.
-
I think you answered my point, by agreeing there are issues.
I didn't even attempt to deploy nodebb, I had problems with much smaller projects!
Nextjs routing was going through a change of design at the time, so perhaps that is less confusing now, but there were multiple other headaches. I would get build errors and issues with package management.