๐ฏ Why Choose Bazario?
๐ Synchronous & Asynchronous Support
Most libraries require choosing between synchronous or asynchronous processing, limiting flexibility.
โจ Bazario's Solution:
The bazario.asyncio
package supports both synchronous and asynchronous handling, giving you complete freedom in your application architecture.
๐ฎ IoC Container Control
Traditional libraries handle IoC containers internally, leading to bugs and side effects, reducing performance with multiple parallel containers.
โจ Bazario's Solution:
Bazario allows the client to control the IoC container and scope creation, giving full control over the containerโs lifecycle and preventing performance issues or side effects caused by redundant container instances.
๐งฉ Enhanced Modularity
In other libraries, integrating different DI frameworks is challenging without rewriting significant portions of the logic.
โจ Bazario's Solution:
Bazario solves this problem by utilizing a modular resolvers system, allowing easy integration with any DI framework. This provides the ability to use Bazario in different environments without being tied to a specific DI framework.
โก SOLID Principles Adherence
Some libraries do not fully adhere to SOLID principles, making the code more complex and harder to maintain.
โจ Bazario's Solution:
Bazario fully adheres to SOLID principles, particularly ISP (Interface Segregation Principle). For example, instead of tightly coupling everything to a Dispatcher, Bazario separates responsibilities by introducing the Publisher protocol for event publication and the Sender protocol for sending requests, leading to better responsibility separation and reduced unnecessary dependencies.
๐ฑ Dependency Separation
Traditional controllers handle both request parsing and handler resolution, increasing complexity and reducing testability.
โจ Bazario's Solution:
Bazario addresses this by delegating all handler routing responsibilities to Bazario, allowing controllers to focus solely on parsing requests. This improves responsibility separation and makes controller code cleaner and more testable.
๐ Advanced Pipeline System
Many libraries lack effective ways to implement cross-cutting concerns like logging, validation, or error handling.
โจ Bazario's Solution:
Bazario addresses this by offering a sophisticated behavior pipeline system that allows developers to:
- ๐ Middleware without handler modifications
- ๐งฉ Reusable components
- โ๏ธ Flexible request/notification chains
- ๐ Centralized monitoring
- ๐ Unified logging
- โ Consistent error handling
This powerful pipeline system allows developers to manage complex workflows efficiently and with minimal code duplication.
โ๏ธ Flexible Processing Control
Developers face challenges when introducing new processing requirements, especially when they require changing existing handler logic.
โจ Bazario's Solution:
Bazario offers flexible control over how requests and notifications are processed through:
- ๐ฏ Type-specific pipeline behaviors
- ๐ Global behavior configuration
- ๐ Configurable execution order
- ๐ Non-intrusive requirement integration