3 ms·
I may just be an old school Node.js developer but I don't like using frameworks like NestJS and Prisma. Like you said they don't give you very much flexibility
by NathanKP 5y ago
I may just be an old school Node.js developer but I don't like using frameworks like NestJS and Prisma. Like you said they don't give you very much flexibility outside of the "chosen path".
I think in order for students to learn they should be using lower level packages directly. So something like Express or Koa + the SQL driver directly. Learning the core concepts underneath is more valuable to students than learning a specific ORM or framework that abstracts all the details away.
Learning how to deal with dependencies is a similar thing. I don't think any course would be complete if it teaches Node without also teaching how to build a Dockerfile to package up your application and the snapshot of it's NPM dependencies as a container image.
Building a compiled binary with Rust or Go is one language specific way to solve the problem of packaging dependencies, but you have an opportunity to also teach students a general purpose tool like Docker container images, which can be used to solve lots of different dependency packaging and distribution problems, not just for NPM, but also your static files, your specific runtime binary versions, any system packages you might need, etc.
- marcus_cemes 5y agoYes, I completely see your point. I really enjoyed using Koa on its own (still in production), and have recently come to respect Fastify after listening to a JS Party podcast with the author. I'm seriously considering going with a lightweight library, as satisfying as annotating routes with decorators is, I'm not sure the benefits out outweight the problems its caused. But I'm also a fan of not having to re-invent the wheel every time I want to make an application... There's nothing wrong with old-school, but I do feel a dagger going through me when I see `var Protocol = module.exports = function () {` as a function declaration in a modern codebase. My TS code looks very similar to Rust or Go code. The fact that such syntax is possible is paretly why I want to move away, even if it does show just how versatile JS really is. I'm a bit more worried about dropping an ORM. I've also tried knex + objection for my own website, but still feel it's not quite there. Pure SQL scares me, especially with TypeScript. It feels like a lot of boilerplate for different entities and very little safety in case of mispelt SQL queries, but I respect the power and simplicity of SQL. I'm not sure Docker gets much love outside of the cloud. Writing a Dockerfile is wonderful, actually reploying and running them is a whole different story... It's a very practical tool, but I'm not sure it can live up to the academic status needed to teach it. Valuable to students, yes. But it all requires solid reasoning and justification, and that's perhaps harder for a student :D