Ideas for the next version #4828
alex-cailler
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
I’m contacting you to share a few ideas for the next major version of Adonis, which I believe are essential for competing with other frameworks like Laravel or NestJS, which have seriously pulled ahead. However, I don’t like their approach, which is why I chose this framework for developing an app.
That said, while I find Adonis complete for basic concepts, it doesn’t go very far once you step outside of what’s considered “basic.”
Here we are in 2024, and I find it unfortunate that we don’t have a truly top-notch JavaScript framework comparable to Laravel. Even Laravel is missing some cool features.
Here are the ideas for Adonis:
Swagger for Adonis. There are packages available, such as this one (https://github.com/ad-on-is/adonis-autoswagger), and I’ve read several threads on this topic where Adonis contributors direct people to external packages. I find that disappointing because I want this to be part of the AdonisJS ecosystem. In 2024, not having Swagger integrated into such a stylish framework as Adonis leaves me puzzled.
Composite primary keys! I’ve also read multiple threads on this topic. They mention that you can work around this by using a single primary key and putting the rest of the columns under a unique constraint. This feels a bit hacky, especially since I can create composite keys in the database with Lucid, but can’t actually use them in the models. Having a workaround is like sweeping the dust under the rug.
BaseModel for pivot tables doesn’t work. When creating data in pivot tables (which I must do because composite key management doesn’t exist), it requires an ID to be returned. In version 4, there was mention of this step: https://legacy.adonisjs.com/docs/4.0/relationships#_pivotmodel, but PivotModels seem to be non-existent now.
Policies are not bound to each request. We must call a Bouncer method in each controller’s request. In Laravel, everything is handled without needing to make a single call.
An equivalent to Spatie Query Builder, https://spatie.be/docs/laravel-query-builder/v5/introduction. A native JS implementation of this library would be incredible for the Adonis ecosystem! To go even further: https://docs.directus.io/reference/filter-rules.html
Polymorphic relation: https://github.com/orgs/adonisjs/discussions/4661
Test with Japa: Run the seed, and pass the HTTP client into the setup function. I’m not sure how this is possible since the documentation doesn’t explain how to do it. I’ve looked at some parts of the source code.
Adonis is a framework where the user experience is unparalleled compared to other frameworks I know. You’re doing an amazing job! I’d love to see more features that can really compete with NestJS, which I find too complex to use.
Have a great day, I hope to hear back from you soon :)
Beta Was this translation helpful? Give feedback.
All reactions