using Spry; using Inversion; /** * HomePage - Documentation landing page for the Spry framework * * Clean, minimal design focused on helping developers get started * with Spry quickly. */ public class HomePage : PageComponent { public const string ROUTE = "/"; private ComponentFactory factory = inject(); public override string markup { get { return """

Spry

A component-based web framework for Vala

Spry is a web framework that lets you build dynamic, interactive web applications using Vala. It features HTMX integration for reactive UIs, dependency injection for clean architecture, and a component model that keeps markup and logic together.

Whether you're building a simple web service or a complex interactive application, Spry provides the tools you need with full type safety and native performance.

Documentation

Get Started

Here's a minimal "Hello World" Spry application to get you started:

Why Spry?

  • Type-Safe — Full Vala type safety catches errors at compile time, not runtime.
  • Component-Based — Build encapsulated, reusable components with markup and logic in one place.
  • HTMX Integration — Create dynamic interfaces without writing JavaScript. HTMX handles the complexity.
  • Dependency Injection — Clean architecture with Inversion of Control for services and stores.
  • Native Performance — Compiled to native code for maximum throughput and minimal resource usage.
  • Free & Open Source — Released under a permissive license, free to use for any project.
"""; }} public override async void prepare() throws Error { var helloCode = get_component_child("hello-code"); helloCode.language = "Vala"; helloCode.code = "public class HelloPage : PageComponent {\n" + " public override string markup { get {\n" + " return \"\"\"\n" + "\n" + "\n" + "

Hello, Spry!

\n" + "\n" + "\"\"\";\n" + " }}\n" + "}\n\n" + "// In Main.vala\n" + "spry_cfg.add_page(new EndpointRoute(\"/\"));"; } }