The launch of Rwf, a new comprehensive web framework for Rust, has ignited discussions within the developer community about the role of opinionated frameworks and architectural patterns in modern web development. While Rust already has several web frameworks like Axum, Rocket, and Actix, Rwf aims to fill a gap by providing a more batteries-included approach similar to Ruby on Rails or Django.
The Framework Wars Continue
The debate centers around several key aspects of web development:
MVC and Business Logic Organization
A significant portion of the discussion revolves around where business logic should reside in modern web applications. While some developers advocate for keeping business logic in the model layer following the Fat Model, Skinny Controller pattern, others argue for a separate service layer to handle complex business operations.
The community seems divided on the use of callbacks and hooks, with many developers warning about the debugging challenges they can introduce. As one developer noted, similar issues have been observed with Django signals and Symfony events, suggesting this is a pattern that requires careful consideration.
Framework Philosophy
Rwf positions itself as a comprehensive solution, contrasting with Go's approach of relying primarily on the standard library. This has sparked debate about the merits of both approaches:
- Batteries Included : Rwf provides built-in support for ORM, authentication, sessions, templates, and background jobs
- Migration Support : Uniquely offers WSGI server compatibility for gradual migration from Python applications
- Template Engine : Includes its own template language similar to ERB (Ruby)
Technical Considerations
Several technical aspects have drawn attention:
- ORM Choice : The decision to create a new ORM instead of using existing solutions like Diesel has been discussed, with the author citing flexibility and ergonomics as key factors
- Template System : While some question the need for a new template language, the author argues that its similarity to ERB makes it familiar to Rails developers
- Performance Implications : The inclusion of WSGI compatibility has raised concerns about production deployment, with SREs recommending the use of reverse proxies in production environments
Looking Forward
The framework is currently in early development and not yet ready for production use. However, it has generated interest particularly among developers looking to migrate from Python/Ruby frameworks to Rust while maintaining familiar development patterns.
The project welcomes contributions and includes a roadmap for future features, including improved documentation and additional functionality.
Current Status
- Early development phase
- Documentation is being actively improved
- Growing community interest, particularly from Python/Ruby developers
- Active discussion about architectural decisions and best practices
The emergence of Rwf adds to the ongoing evolution of Rust's web development ecosystem, particularly in the space of full-featured frameworks that aim to provide a more guided, opinionated development experience.