• Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
v3.5.2 Latest
Buy Hosting

User Guide

Scheduled Pinned Locked Moved Unsolved General Discussion
17 Posts 4 Posters 284 Views
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • mschwartzM Offline
    mschwartzM Offline
    mschwartz
    wrote on last edited by
    #4

    Also, if I had any one gripe, it’s that the code is very old style (I can hack on it if need be though) and the rebuild is kind of a painful step to have to do. Just a restart would be better 🙂

    I think I saw some mentions of a TypeScript port in the repo, but I don’t know how far that’s coming along.

    Still, the software as-is is really really good.

    julianJ 1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    replied to mschwartz on last edited by
    #5

    @mschwartz hey, are you saying we should be a bunch of hooligans? 😆

    Joking aside, what is old about our code? We try to keep it up to date.

    1 Reply Last reply
    0
  • mschwartzM Offline
    mschwartzM Offline
    mschwartz
    wrote on last edited by
    #6

    Not typescript, uses grunt, not using React or Svelte or another modern framework. I see it looks like jQuery is used?

    I can work with the code, and I really appreciate it for how it works for administrators and users and there are a good number of plugins (3rd party support).

    1 Reply Last reply
    0
  • mschwartzM Offline
    mschwartzM Offline
    mschwartz
    wrote on last edited by
    #7

    Also, I did find this:

    http://openwis.github.io/openwis-documentation/assets/TC201703-NodebbNotes.pdf

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #8

    Fwiw react was a year old when NodeBB began. Svelte and Vue are newer, which means these architectural decisions were already made and it is an order of magnitude more difficult to switch and adopt.

    We try not to jump on the latest new thing (which is ironic since the first data store we supported is redis), because we don't know whether it will be around in several years time.

    jQuery we're slowly preparing to drop, but no firm commitment there.

    When we started NodeBB, AngularJS was the hot new thing and you were an idiot if you didn't use it.

    Angular.

    Angular 1.

    We all know how that ended up.

    1 Reply Last reply
    1
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by julian
    #9

    Also, you can totally call me old fashioned here, but I prefer not to use monolithic frameworks for front end logic. There are lots of benefits but I feel that there are lots of hidden overhead costs that you cannot take into account until you are already well-invested in it.

    Many of these frameworks are highly opinionated, which is both a strength and a weakness.

    One time early in my career I went all in on this cool framework called MooTools. I got burned when jQuery won out and I discovered I didn't know jack squat about writing actual javascript.

    Fool me once shame on me. Fool me twice you... :think: ... you.. can't get fooled again... 😄

    1 Reply Last reply
    2
  • mschwartzM Offline
    mschwartzM Offline
    mschwartz
    wrote on last edited by mschwartz
    #10

    I’m not trying to be critical of the product. It’s just my observation. You asked why I thought was old stuff and I answered!

    I never ever used angular or wanted to. WebComponents always looked like the ideal to me.

    At this point, React and NextJS are mature enough. I’m really into Svelte these days.

    FWIW, I used to work for Sencha as a framework engineer. I worked on the ExtJS and Sencha Touch frameworks.

    Those were basically killed by React.

    Edit: Twitter Bootstrap is a framework, with opinions on the components it provides. The major version releases weren’t that compatible with previous versions.

    Cheers

    1 Reply Last reply
    1
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by julian
    #11

    Sorry, you're right, I bristled when you pointed out that we used old tech. It happens a lot from people who really just think we should be using the latest js framework.

    There's a lot of really cool things that came of age in the past decade. Webpack being one of them. We'd love to try them all, but we sadly don't have the time and energy to do it 😁

    1 Reply Last reply
    1
  • mschwartzM Offline
    mschwartzM Offline
    mschwartz
    wrote on last edited by
    #12

    It might be a good start to modify the existing code base to TypeScript and switch to Vite for development (HMR) and module bundling.

    This wouldn’t be big breaking changes, IMO.

    oplik0O J 2 Replies Last reply
    0
  • oplik0O Offline
    oplik0O Offline
    oplik0 Plugin & Theme Dev Community Rep
    replied to mschwartz on last edited by
    #13

    @mschwartz one of the issues with migration to TS is the plugin system. NodeBB is using some of the flexibility of CommonJS that becomes a liability when adding server-side builds. Plugins use require.main.require, and I'm honestly not sure how well this works with TypeScript - it definitely doesn't work with IntelliSense (so plugins wouldn't even get the typing by default unfortunately), but I don't remember if I was testing tsc when I looked into using ES6 imports and building server-side code...

    It'd be relatively simple to go Svelte way and use JSDoc for type checking with TS but without compilation though, just some work on adding the types and fixing issues found that way 🙂 Still, one would need some more work for it to help plugin developers and not just core.

    mschwartzM 1 Reply Last reply
    1
  • mschwartzM Offline
    mschwartzM Offline
    mschwartz
    replied to oplik0 on last edited by
    #14

    @oplik0 said in User Guide:

    @mschwartz one of the issues with migration to TS is the plugin system. NodeBB is using some of the flexibility of CommonJS that becomes a liability when adding server-side builds. Plugins use require.main.require, and I'm honestly not sure how well this works with TypeScript - it definitely doesn't work with IntelliSense (so plugins wouldn't even get the typing by default unfortunately), but I don't remember if I was testing tsc when I looked into using ES6 imports and building server-side code...

    It'd be relatively simple to go Svelte way and use JSDoc for type checking with TS but without compilation though, just some work on adding the types and fixing issues found that way 🙂 Still, one would need some more work for it to help plugin developers and not just core.

    I’ve been doing some significant development using Svelte. I really like it a lot.

    FWIW, I was a framework engineer for Sencha. I worked on ExtJS and Sencha Touch frameworks (many many pull requests I did were merged).

    The thing about plugins…. Typescript and JavaScript are interoperable. I don’t see why you can’t interact with the current plugin scheme from a Typescript port of NodeBB. And you could also allow plugins to be in Typescript or JavaScript.

    Maybe the big deal is transpiling the code from .ts to .js, but NodeBB already has a rebuild requirement when adding things via admincp.

    1 Reply Last reply
    0
  • J Offline
    J Offline
    josef Translator
    replied to mschwartz on last edited by josef
    #15

    @mschwartz Switching to Vite sounds like an easy thing (and very tempting, the construction time will be incredibly shortened!), but he says to switch from CommonJS to ESModules, which means a lot of work in adjusting the dependencies and apparently breaking all the existing plugins...

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #16

    @mschwartz @josef sometimes I pine for the days before we wrote ./nodebb build. Back in those days, we actually had NodeBB build all the assets during the startup phase... there just wasn't that much that needed to be compiled, modules linked, etc. 😄

    ./nodebb start would bring you a fully functional NodeBB with fresh assets in under a second.

    Such is progress, no? Still, I miss it.

    1 Reply Last reply
    0
  • julianJ Offline
    julianJ Offline
    julian GNU/Linux
    wrote on last edited by
    #17

    Secondly, as @PitaJ will attest to, @baris and I are a bunch of old dogs. We've been at this nearly ten years, and while that's not a lot of time in the real world, in tech it means we're dinosaurs 😆

    He had to drag us kicking and screaming to implement ESLint, and we're all the better for it.

    Maybe @baris isn't an old dog, he dragged my ass kicking and screaming to Bootstrap5/webpack, so 🤷 miracles can happen.

    1 Reply Last reply
    0

Copyright © 2023 NodeBB | Contributors
  • Login

  • Don't have an account? Register

  • Login or register to search.
Powered by NodeBB Contributors
  • First post
    Last post
0
  • Home
  • Categories
  • Recent
  • Popular
  • Top
  • Tags
  • Users
  • Groups
  • Documentation
    • Home
    • Read API
    • Write API
    • Plugin Development