4 ms·
Templating engines are far less powerful and extensible than client side frameworks. FWIW, there are many JS templating engines as well that work with NodeJS t
by bern4444 5y ago
Templating engines are far less powerful and extensible than client side frameworks.
FWIW, there are many JS templating engines as well that work with NodeJS too. There are pretty obvious downsides to templating engines that libraries like React and Vue improve upon.
Using flat files as a backend database is great, but not scalable. Does everything need to scale, not always, but it's a lot nicer to have that option and to build it that way from the beginning. It's also ridiculously easy to do so today.
You'd probably be blown away how quickly someone can get a full stack website set up complete with user authentication/accounts management (including reset flows, magic links etc), database integration, front end system, CMS, component design system, and any other goodies.
All this is easily doable in relatively short amounts of time, and makes working with other teams - designers, product owners, marketing teams - so much easier.
Not to mention being able to do everything in a single language. That's a huge win. Engineers can hop around easily and have access to the same dependency management system, language features, etc.
- iJohnDoe 5y ago@bernn4444 > You'd probably be blown away how quickly someone can get a full stack website set up complete with user authentication/accounts management (including reset flows, magic links etc), database integration, front end system, CMS, component design system, and any other goodies. > Not to mention being able to do everything in a single language. I’m interested in learning more about this, especially user authentication and and account management. Also, the single language appealing is appealing. I’m from the PHP world of things and need to get experience with what the modern stuff you’re describing. Are there platforms or projects that provide the foundation of what you’re describing?
- capableweb 5y ago> I’m from the PHP world of things and need to get experience with what the modern stuff you’re describing. Are there platforms or projects that provide the foundation of what you’re describing? Clojure and ClojureScript is probably the best real-world and actually practical example of this in the wild. .cljc files can be loaded by any Clojure runtime, while .clj files are for Clojure and .cljs are for ClojureScript. Many of the libraries in the ecosystem all use .cljc, so you can use the same libraries both in the backend and in the frontend.
- pull_my_finger 5y agoI've always felt the "one language" sell was fake news. The amount of difference between JS in the browser and Node.js is much larger than the similarity. The DOM and Node.js APIs are big and vastly different in scope and what they accomplish. Add to this all the weird incompatibilities like Node not having fetch, or the multiple accepted module patterns etc it's such a mess. Then you get people telling you JSX is "just JS" also, which is also not true. You have to make all kinds of goofy adjustments to even make it function as HTML. I do agree that you can pump out sites quickly with a modern JS stack, but I definitely think there is room for improvement and it should be idolized as "good" or the way it _should_ be.
- bern4444 5y agoIt’s very possible and easy to get everything working the same way on the client and server but I agree the whole import vs require support is frustrating. I set my stuff up to always use import syntax over require now which is what typescript works best with. Of course the APIs in node vs DOM are very different. They do very different things but the benefit comes from having the same language support, syntax, type system, and methods. Types can be shared across the client and server so changes on one side are immediately detected on the other. It is annoying there’s no native fetch in Node but there’s a east npm package to support isomorphic fetch (node-fetch) JSX is “just js” in that they are compiled down to simple function calls (React.createElement), there’s just a nicer syntax but there are systems (hyperscript I think) that just export functions like h1(), div() etc that do the same thing.
- bern4444 5y agoFor authentication I believe passportJS is still the go to library for integrating with oauth providers like twitter, LinkedIn, Facebook etc (or setting up your own username and pwd system). I’m sure there are several other libraries as well. In terms of learning that and anything else, the best thing to do is have a project you can work on that supports these and other features. Pick a database (either sql or nosql), a login mechanism (maybe via GitHub to start if you’re building something aimed at developers), and build a simple todo app to start or something else you’re interested in. The documentation for open source JS libraries tend to be excellent. There are many blog posts and articles as well. Just go slowly. There’s a lot to learn on both sides (front end and back end) so don’t try to learn everything at once. If you want to focus on the front end find client side libraries that maybe don’t need a server (googles firebase comes to mind). If you want to do back end work, don’t focus on the front end tooling as much and just get enough running to hit your server and see data.