Large scale AdonisJS application


#1

Sometimes an controller becames fat. Like Laravel, make simple apps is easy, but when it is a large application with more than 50 models, or a controller has complex code, that is the time we start to choke on our own code base.

I have found this good article designed to Laravel. Is there some video or article to adonis that has a discussion about this issue?


#2

I moved from PHP/Laravel to Node/AdonisJS because the company I work for has adopted a micro-service/decoupled approach. The idea of building a huge monolith with 50+ models is not an option.


#3

Same here. My company used to be on a monolithic framework (Rails) and we’ve been moving away to microservices architecture as well. We have several AdonisJS project repositories for each of the microservices we’re building with corresponding Docker images. I think our largest API has ~ 14 controller classes and 22 models. Other microservices only have 1-2 controllers and even some without models (some data are queried directly to Cassandra database).


#4

@jacksoncharles @bbrodriguez

So I just learned this and I’d thought I’d spread the word. As flexible as Adonis is, it’s not entirely decoupled. For instance, we wanted to switch out Lucid for TypeOrm, but learned that Lucid is tightly coupled with many features of the framework.

Not a huge deal, because I think Lucid is still a pretty solid ORM, but it’s something to consider.


#5

@twigs67

That’s not the Adonis goal. If you want to plug and play to each piece, I suggest using express or koa.


#6

I much prefer an opinionated solution so that peeps are not reinventing the wheel. That’s why I prefer Adonis over Express for example. Merely a matter of personal preference. And when I talk about “decoupled solutions” I am not referring to Adonis but our larger software architecture. We have adopted Node and Go on the AWS platform moving forward and Adonis has been a shining-light in the mind-bending eco-system that is Javascript.


#7

@jacksoncharles I totally agree. I’ve worked with micro frameworks and know firsthand the problems that stem from having too many decisions to make.

@virk apologies, after re-reading the FAQ about Adonis being a monolithic app, I realize I misinterpreted it.