Crowdhailer

Crowdhailer

Creator of Raxx

Raxx.Kit - Micro framework for web applications

From release (0.4.3) install is simplified by using hex.pm.

$ mix archive.install hex raxx_kit
$ mix raxx.kit my_app
...
Get started:

    cd my_app
    iex -S mix

View on http://localhost:8080
View on https://localhost:8443 (uses a self signed certificate)

Project includes

  • Live reloading with ExSync
  • HTTP/2 support (for https endpoint)
  • Static content using Raxx.Static middleware
  • Logging middleware
  • Generated Dockerfile (use --docker)
  • JavaScript bundling with npm (use --node-assets)
  • APIBlueprint routing DSL with Raxx.ApiBlueprint (use --apib)

Showing Posts 1 to 10

AstonJ

AstonJ

Hi Peter, couldn’t find this in the docs and I guess many others will be wondering the same, so a few questions for you:

  • How does this differ from Phoenix?
  • When would you recommend people use this instead of Phoenix?
  • Can this be used in multiple layers of an Elixir app, like Phoenix can?
  • What does it have that Phoenix doesn’t?
  • What doesn’t it have that Phoenix does?
  • How does performance compare to Phoenix?
  • Have you got any URLs of sites using this in production?
Crowdhailer

Crowdhailer OP

Creator of Raxx

Hi, Your right maybe it would be helpful to make a few comments about this in the readme. The resources I would point you too are

peerreynders

peerreynders

I think in any case it’s worthwhile to spend ~30 min watching ElixirDaze 2018 - Purify your web development.

  • Raxx is a different abstraction than Plug. Phoenix is built around Plug. From what I’ve seen the Raxx abstraction aligns more closely with the HTTP protocol.
  • Ace is used instead of Cowboy.

From a full stack perspective someone gravitating in front end matters to Vue.js in the “Vue.js vs React” discussion would likely gravitate towards Phoenix - until the Plug abstraction gets in the way.

Raxx seems more for control enthusiasts who don’t mind assembling their own framework in order to have “not a shred of bloat” in their system and prefer an abstraction more closely aligned with HTTP.

I especially liked how the streaming upload looked like a short-lived process handler.

Crowdhailer

Crowdhailer OP

Creator of Raxx

For the moment I wouldn’t disagree with this. However there is no reason an opinionated batteries included framework couldn’t exist on top of Raxx. In exactly the same way phoenix extends plug.

The important thing to me is the abstraction. That is why I have decided to focus on making Raxx rock solid over developing a framework.

Crowdhailer

Crowdhailer OP

Creator of Raxx

Automatic code reloading works with JavaScript and CSS 0.4.4

Using the latest update to ExSync any changes to .js or .css files in the project are automatically available of saving the file

Crowdhailer

Crowdhailer OP

Creator of Raxx

Fix default ports for tutorial in 0.5.2

Building a distributed chatroom with Raxx.Kit tutorial did not work due to bug with default ports. This latest release fixes that.

Crowdhailer

Crowdhailer OP

Creator of Raxx

Documentation improvements and favicon in 0.5.3

  • Moduledoc added to mix task
  • Explicit link to favicon in template
Crowdhailer

Crowdhailer OP

Creator of Raxx

A bit delayed in response but I will try make some comments

Phoenix is MVC by default. Raxx.Kit makes no assumptions about the model layer. I consider this good practice after reading about hexagonal/onion/clean architecture

If you value referential transparency in your runtime program then try Raxx. If you aren’t sure why functional programmers are so bothered with that then stay with phoenix.
I have found it easier to wrap typespecs around a Raxx program that a Phoenix one because more of the behaviour of the system is exposed through args and return values of a function.

yes

In fact I would recommend just using Raxx documentation directly which explains how to add it to an existing project.

Dialyzer as part of the CI test suite

Presence. Though Phoenix.Presence is a nicely extracted library you can use that with a Raxx project.

:man_shrugging:

Crowdhailer

Crowdhailer OP

Creator of Raxx

Generated projects include Template layer and JavaScript interpolation.

Raxx.Kit 0.5.5 released.

Recent release of Raxx, added the Raxx.View and Raxx.Layout modules.
These are used in generated project and templates include example of interpolating server variables into HTML and JavaScript.

Action Handler

defmodule MyApp.WWW.HomePage do
  use Raxx.Server
  use MyApp.WWW.Layout, arguments: [:title]

  @impl Raxx.Server
  def handle_request(_request = %{method: :GET}, _state) do
    title = "Raxx.Kit"

    response(:ok)
    |> render(title)
  end

  def handle_request(request = %{method: :POST}, _state) do
    case URI.decode_query(request.body) do
      %{"name" => name} ->
        greeting = "Hello, #{name}!"

        response(:ok)
        |> render(greeting)

      _ ->
        response(:bad_request)
        |> render("Bad Request")
    end
  end
end

Template

<main class="centered">
  <section class="accent">
    <h1><%= title %></h1>
    <form action="/" method="post">
      <label>
        <span>tell us your name</span>
        <input type="text" name="name" value="" autofocus>
      </label>
      <button type="submit">Submit</button>
    </form>
    <h2>Find out more</h2>
    <nav>
      <a href="https://github.com/CrowdHailer/raxx">SOURCE CODE</a>
      <a href="https://elixir-lang.slack.com/messages/C56H3TBH8/">CHAT</a>
    </nav>
    <%= javascript_variables title: title %>
    <script type="text/javascript">
      document.addEventListener('DOMContentLoaded', function () {
        app.show(title)
      })
    </script>
  </section>
</main>

p.s. is there any way to get .eex syntax highlighting?

Crowdhailer

Crowdhailer OP

Creator of Raxx

Project generator updated to use Raxx 0.17.0 and Ace 0.18.0.

The latest versions of these projects introduces a separate behaviour for simple servers, Ones where a complete request is transformed to a complete response; and streaming servers.

See the Raxx CHANGELOG for details.

Where Next? Top

Trending in Announcing Top

type1fool
WebAuthnLiveComponent WebAuthnComponents See this post about renaming the package. Passwordless authentication for Phoenix LiveView app...
New
GenericJam
Edit: 2026 May 15 - This post is archived. Mob is alive!! Main docs: mob v0.7.11 — Documentation A bit of explanation for the slightly c...
New
woylie
I released Doggo, a collection of unstyled Phoenix components. https://github.com/woylie/doggo Features Unstyled Phoenix components....
New
ahamez
Hi everyone, I’ve been working on this protobuf library for 3 years. We use it in the company I work for, EasyMile, to communicate with ...
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
kip
I’ll shortly be launching Text, a nascent text analysis library. Current functionality In this early version (not ready for prime time) ...
New
kip
Following on from my CLDR lbraries I started work on Unicode transforms. But like everything related to CLDR there is a lot of yak-shavin...
New

Other Trending Topics Top

mudasobwa
I am happy to introduce the very α version of the new programming language compiled to BEAM. Welcome Cure. It has literally three kille...
New
budgie
A little off-topic, but I feel like people here have a good head on their shoulders. I used to be quite good at making software. Was luc...
New
KristerV
Hey. Is there anyone here who creates agents in their apps? Not talking about using agents, but creating them. I’m finding it pretty diff...
New
webofbits
With AI doing more of the implementation work, I’ve been wondering how much coding I should deliberately keep doing myself. My main conc...
#ai
New
budgie
I love Elixir. It’s one of 2 programming languages I’ve ever fallen in love with. But I don’t use it anymore. Serverless was the promis...
New
Null-logic-0
What IDE or editor are you using for Elixir development? Personally, I use Zed, and I really like it, but sometimes I wish there were a ...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews