🕰️ Chapters
- Objectives & Project Familiarity
- What Are Fat Controllers?
- Fat Controllers & Services with Static Methods
- Completing Our Fat Controller Store Method
- Testing Our Store Method
- Fat Controller Pros/Cons
- Switching To Services
- Non-Static Service Methods
- Services & Dependency Injection (DI)
- The Service Approach
- Completing Our Service Store Method
- Splitting Out Sub-Tasks with Services
- Testing Our Service Store Method
- Service Approach Pros/Cons
- Services & Circular Dependencies
- Switching To Actions
- What Is An Action?
- The Action Approach
- Completing Our Action Store Class
- Splitting Out Sub-Tasks with Actions
- Testing Our Action Store Class
- Action Approach Pros/Cons
- Wrapping Up & Other Potential Options
Three Approaches for Organizing your AdonisJS Business Logic Operations
In this lesson, we'll dive deep into three different ways we can organize our code; fat controllers, services, and actions. We'll also discuss circular dependencies, static and non-static service methods, and dependency injection.
- Author
- Tom Gobich
- Published
- Jul 22
- Duration
- 28m 8s
![Tom Gobich](/img/1/profile/avatar_1703713552864.jpg)
Developer, dog lover, and burrito eater. Currently teaching AdonisJS, a fully featured NodeJS framework, and running Adocasts where I post new lessons weekly. Professionally, I work with JavaScript, .Net C#, and SQL Server.
Adocasts
Burlington, KY
-
1.0AdonisJS Authentication in 15 Minutes16m 7s
-
2.0How To Do Multi Model Authentication with AdonisJS and Lucid ORM18m 29s
-
3.0AdonisJS User Role Authentication in 15 Minutes15m 43s
-
4.0AdonisJS 5 API & Nuxt 3 SSR Authentication in 15 Minutes13m 58s
-
5.0AdonisJS 6 Session Authentication in 15 Minutes15m 18s
-
6.0AdonisJS 6 Access Token Authentication in 20 Minutes20m 8s
-
7.0Three Approaches for Organizing your AdonisJS Business Logic Operations28m 8s
-
8.0How To Make A Simple AdonisJS 6 Package25m 24s
Join The Discussion! (0 Comments)
Please sign in or sign up for free to join in on the dicussion.
Be the first to Comment!