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

wojtekmach
Hey everyone! Req is an HTTP client for Elixir that I’ve been working on for quite some time. There is already a lot of HTTP clients out...
New
handnot2
Samly can be used to enable SAML 2.0 Single Sign On in a Plug/Phoenix application. This library uses Erlang esaml to provide plug enabl...
New
woylie
Flop is an Elixir library that applies filtering, ordering and pagination parameters to your Ecto queries. offset-based pagination with...
New
restlessronin
The repo is at GitHub - cyberchitta/openai_ex: Community maintained Elixir library for OpenAI API · GitHub. Docs are at OpenaiEx User Gu...
152 11030 135
New
garrison
Hobbes is a low-level distributed database for the Elixir programming language. Hobbes provides a simple, safe, and scalable storage lay...
New
fuelen
Hi all! I want to present a small library which provides a mix task for generating an Entity-Relationship Diagram for Ecto schemas. You...
New
anuaralfetahe
Hello Published a new library - ProcessHub! ProcessHub is a library designed to manage process distribution within the Elixir cluster. ...
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
mudasobwa
I am seeing a lot of aplications of Argumentum ad Vericundiam in software discussions. They do link some piece of writing and point us to...
New
bartblast
Hey folks, I just published a post about Hologram’s funding and where the project goes next - the short version: Curiosum as Main Spons...
New
AstonJ
This showed up on my feed.. anyone heard of it? Just hype? Ox Alpha is a reasoning model designed for coding, sustained ag...
New
sorenone
Today we’re releasing Oban for Python. Not an Oban client in Python. Not a pythonx wrapper embedded in Elixir. Nope, it’s a fully operati...
New
sergio
It’s not that it’s vocabulary is too advanced. It’s something worse. I get lost trying to follow even a paragraph written by Claude. It’...
New

We're in Beta

About us Mission Statement

Options

Thread Display Mode




Thread Preview

Skip Thread Previews