Hey everyone!
I’m still working hard on Gland, and after a lot of refactoring and R&D, I’m excited to share some of the new developments. Gland is getting closer to its final syntax, and I’ve decided to make it fully event-driven (EDS-based), inspired by frameworks like NestJS and Angular.
It means:
- DI system: Similar to NestJS, for easy dependency injection.
- Controller, Import, Export: Just like NestJS, but with a twist—Channels replace traditional providers.
- Channels instead of Providers: Channels handle logic, making your app more modular and scalable.
- Pure and lightweight: Built from the ground up with minimal dependencies, no unnecessary packages—everything is kept lean and efficient.
Why EDS? (Event-Driven System)
Instead of returning data directly from controllers, everything in Gland is driven by events. This makes the app more modular, scalable, and flexible. Events trigger actions and responses, making the whole flow smoother and more intuitive.
Example:
@Controller('users')
class UserController {
@Get('/:id')
getUser(ctx: Context) {
const result = ctx.emit('read:server', ctx);
try {
throw Error('Hello world');
} catch (error) {
return ctx.emit('read:server:error', { error, result });
}
}
}
Here, ctx.emit('read:server', ctx) sends an event called users:read:server, and a Channel listens for it:
@Channel('users')
class UserChannel {
@On('read:server')
get(ctx: Context) {
return 10;
}
}
Now the entire data flow is event-driven
What’s Next?
Right now, Gland is still under development, and the ideas are evolving. The core concepts are being implemented, and I'm exploring new ways to make event-driven architecture more intuitive for web development.
Contribute or Share Your Ideas!
Gland is under active development, and the idea is still evolving. If you support the project, feel free to star it, open issues, submit pull requests, or share your ideas on GitHub. Whether you spot a bug or have a new feature in mind, your feedback is incredibly valuable.
I’d love to hear your thoughts—does this event-driven approach feel more flexible and modular compared to the traditional patterns? Or do you see potential challenges? Let’s start a conversation!






























Do we really need another new web framework?