using Astralis; using Invercargill; using Invercargill.DataStructures; using Inversion; using Spry; /** * EcosystemPage - Overview of the framework ecosystem * * Showcases Astralis, Inversion, and Spry working together */ public class EcosystemPage : PageComponent { public const string ROUTE = "/ecosystem"; public override string markup { get { return """
Three powerful libraries working together to make web development in Vala a joy
The high-performance web server foundation. Astralis provides the HTTP server, routing, compression, and static file serving that powers Spry applications.
var app = new WebApplication(8080);
app.use_compression();
app.add_endpoint(
new EndpointRoute("/api")
);
app.run();
A lightweight dependency injection container. Inversion manages your services, stores, and component lifecycles with elegant IoC patterns.
// Register services
container.add_singleton();
container.add_scoped();
container.add_transient();
// Inject anywhere
var db = inject();
The component-based web framework. Spry brings reactive templates, HTMX integration, and a delightful developer experience to Vala web development.
class MyComponent : Component {
public override string markup {
owned get {
return "
";
}
}
}
The three libraries form a complete stack for building web applications:
Receives requests, routes them to the right handler, and sends responses with compression.
Creates and injects services, stores, and components with the right lifecycle.
Components handle requests, render templates, and respond with HTML for HTMX.
┌─────────────────────────────────────────────────────────────┐
│ Browser │
│ (HTMX + HTML) │
└─────────────────────────┬───────────────────────────────────┘
│ HTTP Request
▼
┌─────────────────────────────────────────────────────────────┐
│ Astralis │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Server │→ │ Router │→ │ Compression │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
└─────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Inversion │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Container │→ │ Factories │→ │ Scopes │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ ↓ inject() into components │
└─────────────────────────┬───────────────────────────────────┘
│
▼
┌─────────────────────────────────────────────────────────────┐
│ Spry │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐ │
│ │ Components │→ │ Templates │→ │ Actions │ │
│ └─────────────┘ └─────────────┘ └─────────────┘ │
│ ↓ HTML Response with HTMX attributes │
└─────────────────────────────────────────────────────────────┘
See the ecosystem in action with our interactive demo.