Marten 0.3 has been officially released!

Marten 0.3 has been officially released! 🚀

TL;DR

Marten is a Crystal web framework that makes building web applications easy, productive, and fun. The latest 0.3 release of the framework introduces significant enhancements, such as streaming capabilities, caching, JSON fields, duration fields, and more. You can check out the full changelog for a comprehensive overview of all the new features and changes included in this release.

Main new features and highlights

  • Caching - Marten now lets you interact with a global cache store that allows interacting with an underlying cache system and performing basic operations such as fetching cached entries, writing new entries, etc. Marten's caching leverages a cache store mechanism and other third-party stores can be installed depending on your caching requirements (eg. Memcached, Redis).
  • Streaming - It is now possible to generate streaming responses as part of handlers.
  • JSON fields for models and schemas - Marten now provides the ability to define json fields in models and schemas. These fields allow you to easily persist valid JSON structures (including JSON::Serializable objects) to the database.
  • Duration fields for models and schemas - It is now possible to define duration fields in models and schemas. These fields allow you to easily persist valid durations (that map to Time::Span objects in Crystal) in your models but also to expect valid durations in data validated through the use of schemas.
  • Deployment guides - New deployment guides were added for deploying Marten projects on Heroku and Fly.io

What’s next?

The Marten framework is in its early stages, and I'm actively seeking feedback from individuals interested in experimenting with it or utilizing it in their projects. If you find a bug or if you want to contribute and share ideas regarding the framework, don’t hesitate to open an issue/discussion in the project’s issue tracker on GitHub or chat with us in our Discord. Any help will be greatly appreciated!

If you are new to Marten, here are a few ideas on how you can get started:

Marten 0.2 has been released!

Marten 0.2 has been released! 🚀

TL;DR

Marten is a Crystal web framework that makes building web applications easy, productive, and fun. The 0.2 release adds key features to the framework such as authentication, email sending, raw SQL query capabilities, ... You can check out the full changelog for an overview of all the new features and changes that are part of this release.

Main new features

  • Email sending - Marten now allows the definition of emails that can be fully customized (properties, header values, etc) and whose bodies (HTML and/or text) are rendered by leveraging templates.
  • Authentication - The framework now provides the ability to generate projects with a built-in authentication system that handles basic user management needs: signing in/out users, resetting passwords, etc. This can be achieved through the use of the --with-auth option of the new management command.
  • Raw SQL capabilities - Query sets now provide the ability to perform raw SQL queries that are mapped to actual model instances.
  • Email field for models and schemas - It is now possible to define email fields in models and schemas. These allow you to easily persist valid email addresses in your models but also to expect valid email addresses in data sets validated through the use of schemas.
  • Transaction callbacks - Models now support the definition of transaction callbacks by using the #after_commit and #after_rollback macros.

What’s next?

The Marten framework is still young, and as such, any feedback from people who would like to play with it and/or leverage it in simple projects would be greatly appreciated!

If you find a bug or if you want to contribute and share ideas regarding the framework, don’t hesitate to open an issue/discussion in the project’s issue tracker on GitHub or chat with us in our Discord.

And if you are new to Marten, here are a few ideas on how you can get started:

Marten - The pragmatic web framework

Repository: https://github.com/martenframework/marten

Documentation: https://martenframework.com/docs

Marten is a Crystal Web framework that enables pragmatic development and rapid prototyping. It provides a consistent and extensible set of tools that developers can leverage to build web applications without reinventing the wheel.

Marten is...

🎯 Simple

Marten's syntax is inherited from the slickness and simplicity of the Crystal programming language. On top of that, the framework tries to be KISS and DRY compliant as much as possible in order to reduce time-to-market.

⚡ Fast

Marten gives you the ability to build full-featured web applications by leveraging the bare metal performances of the Crystal programming language. It also makes a moderate use of macros and tries to optimize for decent compile times.

🧳 Full-featured

Marten adheres to the "batteries included" philosopy. Out of the box, it provides the tools and features that are commonly required by web applications: ORM, migrations, translations, templating engine, sessions, etc.

🔧 Extensible

Marten gives you the ability to contribute extra functionalities to the framework easily. Things like custom model field implementations, new route parameter types, session stores, etc... can be registered to the framework easily.

💠 App-oriented

Marten allows to separate projects into a set of logical "apps". These apps can also be extracted in order to contribute features and behaviours to other Marten projects. The goal here is to allow the creation of a powerful apps ecosystem over time.

🛡️ Secure

Marten comes with security mechanisms out of the box. Things like cross-site request forgeries, clickjacking, or SQL injections are taken care of by the framework to avoid common security issues.