Built on top of immature overhyped tech (nestjs, prisma, etc...) with lots of issues. Something very common in the JS/NPM that always gives you headaches down the road. There's an arms race to sell hosting through immature buggy magical frameworks in the JS world, so this is to be expected.
I'll take the one/two days to set up node, express, postgres with libs for now. What takes up the majority of the time is domain modeling anyway.
I've been developing web apps in Node for a couple years and I'm done with it - I'm all in on Django + DRF now.
I only made the switch a couple months ago and it's amazing how cozy I am with it: everything feels mature, stable and reliable. I reach out for 3rd party packages as needed but it doesn't feel like I'm gluing a Frankenstein together, or that I'm rolling out a bunch of code I don't want to own, or that I'm overthinking for the umpteenth time how I should structure my app. I think after a couple months with Django I'm nearly as productive as I ever was Node.js. Granted that many web dev concepts just carry over, but the feeling is uncanny regardless.
Also, the "language context switch penalty" is a complete myth. I picked up Django by reading two books in 2-3 days, and didn't need to even bother front-loading Python - I just picked it up as I went. I now switch between Python and JS/React seamlessly; I enjoy writing both and I really like the variety (though as dynamic, duck-typed languages maybe they're not that dissimilar). Every thousand characters I type in Python I'll make a silly mistake where I write some JS syntax and that's it - hardly what I'd a call a cognitive penalty.
As it stands, I'd only develop something in Node.js if I really needed its performance characteristics (and then, I may be able to get close to them with Python's asyncio - though I haven't researched this avenue yet so there may be pitfalls I'm not aware of).
All in all, I find it baffling that in over a decade of existence Node.js hasn't produced a web framework that even comes close to Django or Rails.
I do wish OP, Nest, Prisma and all the devs in the Node ecosystem the best of luck nevertheless. I love JavaScript and if someone produces a web framework that really emphasizes developer productivity and happiness I would consider coming back in the future.
NestJS is pretty close to the best web framework I’ve found for node.
Now if only it came with all batteries included, and the DI wouldn’t be so funky, it would be even better, but it’s still lightyears ahead of express for building a comolicated application.
I've never been unhappy in any web framework in any language except for Plone. The NodeJS ecosystem is not without its problems, but you can absolutely write great software in it.
Comparing Django to NodeJS itself is a bit of an apples to oranges comparison though. Even something like Express or Koa will come without an ORM. Django will certainly hold your hand a lot more through the process.
It seems like the biggest issue with the NodeJS ecosystem is that everyone wants to roll their own thing, rather than using the renowned incumbent which works perfectly well. In some ways, this is actually an indication of how deceptively easy it is to work with NodeJS — people really believe they can replace something that has hundreds of years of man hours behind it in a month.
I must second this. I've always viewed frameworks as a joy to my work, as long as there is no magic involved. I develop quite a few mini apps and I find less opinionated frameworks like Express for Node or Flask for Python an absolute dream. The packages on Node can get unwieldy but nothing bad enough to warrant a long term negative outlook.
I wouldn't question this for a second. Nor that some people may be extremely happy with it. But me personally, for my most common use case (end-to-end monolithic web apps, complete with client and back-end) it feels like it places a higher cognitive burden than the alternatives, due to all the things we're mentioning (eg, lack of an established ORM)
> Comparing Django to NodeJS itself is a bit of an apples to oranges comparison
Well, yea, but that's the point of my whole comment - Node could have a Django or Rails equivalent after ten years, don't you think?
> It seems like the biggest issue with the NodeJS ecosystem is that everyone wants to roll their own thing
Completely agree - it's almost an ethos thing. Though I'm not sure if it's a conscious "ethos" or rather having to due with the ecosystem and developer population being disparate and disjointed - anarchical, maybe?
Again, not questioning that there are some really good devs out there that are deliberate and successful in rolling out their own thing. I also think however there's a group of devs who think that they want to roll their own thing, until they have to face the consequences down the road and wish they hadn't.
> how deceptively easy it is to work with NodeJS
Yes, that's a big point in my comment. To add: I have a formal education in software engineering but like many others had to pick up web dev on my own. I bought into the Node.js "one language to rule them all" hype, only to find a much steeper learning curve than I would have had otherwise (mainly due to the async model and the lack of a batteries-included framework), without much of a payoff for it.
I feel no regrets, my path has been what it's been, I've learned a lot and I'm glad to have Node.js as an option in my toolbelt since it's so prevalent and there are good use cases for it. But if I had to recommend a young dev where to start I'd probably point them elsewhere.
As for me going forward I see myself sticking to Django and exploring things like Elixir/Phoenix, Swift, Go or F#, and only coming back to Node if the situation really calls for it or maybe, like I said previously, if there's a batteries-included framework that reaches maturity.
> Well, yea, but that's the point of my whole comment - Node could have a Django or Rails equivalent after ten years, don't you think?
It's not that such a thing hasn't been developed, but that by the time such a thing gets developed (for example: [0]), NodeJS devs have already decided they don't like gulp (even though just last week gulp was the new thing vs. grunt), they like webpack; they don't like AngularJS, they like React (or VueJS now); etc.
Almost feels like the JS ecosystem is plagued by people who want to rise to dev stardom by making the next big framework, and they spend a LOT of time trying to convince people their thing is the next best thing since sliced bread. I've seen grown up devs abandon stacks that were perfectly fine to spend years migrating to the new thing — granted this happens more at larger companies where resume building sometimes overtakes business needs.
Five years ago I might have agreed with you. I think it's pretty telling though that the techs you just listed have now been around for longer than Angular or Gulp were ever popular (at least according to my recollection). Seems to me that the churn has slowed significantly; people are generally happier with React and Webpack than their predecessors.
I'm inclined to agree. This is nothing against the OP but I never reach for boilerplate generators, even ones like `create-react-app`.
Here's a great example of why: I do a bunch of research before I started my project (https://listifi.app - for anyone curious) and decided to go with prisma.js. It looked like it was exactly what I wanted for a REST API built with koa.
I've dumped probably a month fulltime on the project and now that I have enough experience using prisma, I realized it really doesn't do what I want it to do and is actually making my life more difficult as a result.
So now I'm in the process of switching from prisma to knex. Having the glue hidden from me would really affect my willingness to switch technologies and increase my frustrations with any platform.
For any reasonably complex application, you will eventually need to eject.
I want to see how everything is pieced together. Even these js builders like parcel that "do everything for you" eventually don't work.
I'll take a couple of days to set things up the way I want them to over something that tries to do it all for me while only accommodating the happy path.
Again I want to say that this is my personal preference when building any project. I pick a few barebones libraries to help me build what I want and get out of my way.
I like Active Record + Arel (from Rails) a lot, and have found Knex relatively unpleasant in comparison, offhand Prisma has looked more pleasant/usable to me...
I’m not a fan of ActiveRecord or ORMs in general. I’d much rather write raw sql queries with a little help to improve reusability.
I found Prisma to be super basic. Anything complex like joins or a composition of where’s and ors and it didn’t work.
It also nests related objects where for my purposes I wanted everything to be flat. So if a list has a user associated with it, I want to flatten it like: { list, user }.
I also didn’t like how Prisma has a generate cli to integrate end developer models that must be integrated into your build step to deploy if you’re using typescript.
Its schema cli command worked but in weird ways that I didn’t like. Sharing Prisma types with the client was not automatic. For example, Prisma coverts datetime columns into dates, which sounds nice, but when I send that data as an api response it turns into a string. Now I can’t use their interfaces without plucking the date times and converting it to a string. It just wasn’t as useful as I had hoped.
Knex does exactly what I want and nothing more. All of my raw sql queries were easily converted and worked perfectly. I build the interfaces and knex uses them. There’s no special command that converts their schema format into something I can kind of use.
Their typing was nice once I got it working however, and for simple things it worked fine. I just noticed I had to write a lot of raw sql.
Sounds sort of like Active Record without Arel. The things that you're mentioning do sound irritating, not being able to do joins easily, etc., seems lousy. (I think Arel is a bit overlooked, but it's actually very pleasant to build complex/composable queries with it IMO.)
Regarding types, the more I've used JS the more I've come to hate JS's native types for numbers and dates/times, so not terribly shocked by that, kind of think its native types being really obnoxious is part of why typescript is relatively popular.
I am a bit curious - the piece of ORM-style solutions that I like is that they create a clear pattern for organizing certain kinds of application logic - for example, if there's a rule that value X meets certain conditions, usually there are tools or conventions with ORMs to make it not easy to write something that skips the rule without doing so intentionally. Whereas in codebases that don't use some sort of frameworky-ORM-y solution I often find myself thinking there aren't clear patterns of responsibility for such things, leading to bugs or poor DRY practices.
It works fine, but the typescript types that prisma generates says that type is a date, not a string. So I can't directly use that as the API response type, I have to modify the prisma type to get it to work correctly on the FE.
Can you describe the problems you've encountered with Prisma? I'm in the process of choosing an ORM myself, and Prisma seems to be the best option of those I've tested.
I’m not a fan of ActiveRecord or ORMs in general. I’d much rather write raw sql queries with a little help to improve reusability.
I found Prisma to be super basic. Anything complex like joins or a composition of where’s and ors and it didn’t work.
It also nests related objects where for my purposes I wanted everything to be flat. So if a list has a user associated with it, I want to flatten it like: { list, user }.
I also didn’t like how Prisma has a generate cli to integrate end developer models that must be integrated into your build step to deploy if you’re using typescript.
Its schema cli command worked but in weird ways that I didn’t like. Sharing Prisma types with the client was not automatic. For example, Prisma coverts datetime columns into dates, which sounds nice, but when I send that data as an api response it turns into a string. Now I can’t use their interfaces without plucking the date times and converting it to a string. It just wasn’t as useful as I had hoped.
Knex does exactly what I want and nothing more. All of my raw sql queries were easily converted and worked perfectly. I build the interfaces and knex uses them. There’s no special command that converts their schema format into something I can kind of use.
Their typing was nice once I got it working however, and for simple things it worked fine. I just noticed I had to write a lot of raw sql.
A lot of people like it so don’t let me critique shy you away from using it. It probably works best if you are using graphql since it automatically nests the models which I would imagine works well with query resolvers.
Every time I look at one of these I get anxieties...
At first because they look so easy, clean and productive (just 5min!), but then because I try to get specific answers, like: what drives the schema? Can I use websockets with this? What problems does it solve that others don't? Why does a simple CRUD application need GraphQL integration? Why are there emojis everywhere? Why does it feel like their intentions are unclear?
Then I close the tab and leave with an empty feeling.
dgb23, I will do my best to answer all your questions... I hope the experience this time will be better than the previous ones:
what drives the schema?
We provide you with an intuitive UI to create the schema. Later down the road, we plan to add a CLI for easier integration with scripts and other tools.
Can I use websockets with this?
Since we provide you with a generated Node.js source code you can build on top of it with whatever you want and expand your application with any missing capabilities.
Websocket is also on our list, but to be honest the list is long. We are looking forward to getting more contributors to be able to expedite the releases.
What problems does it solve that others don't?
We are focusing on saving time for Node.js developers and provide them with a set of tools for all the repetitive tasks they usually face.
Why does a simple CRUD application need GraphQL integration?
We initially generate the app with CRUD operations (both with REST and GraphQL). The idea is that developers will keep adding on top of that all the more complex APIs and operations relevant to their business domain - Currently with code, and soon with more tools to expedite some of the boilerplate.
Why are there emojis everywhere?
We love emojis, more precisely we love beautiful UI. Once the CLI is out you will be able to avoid the emojis :-)
Why does it feel like their intentions are unclear?
I would love to provide details on every question you may have about our intentions. Generally speaking, we hope in the future to create a sustainable business around the open-source project, while keeping the service free for 99% of the users. The project is open-source so anyone can host a server locally and get all the benefits of Amplication with no string attached.
Looking forward we have a strong belief in both NestJS and Prisma. They are great technologies on there way up (and in many ways, they are already there)
I'll take the one/two days to set up node, express, postgres with libs for now. What takes up the majority of the time is domain modeling anyway.