Code Monkey home page Code Monkey logo

ash's Introduction

Logo Elixir CI License: MIT Hex version badge

Documentation

All documentation is contained in the generated hex documentation located here. Head there for installation and usage information. What follows is only a brief introduction to Ash.

Beta NOTICE

Ash is in beta. The package version is 1.0.0+, and most of the time that means stable, but in this case it does not. The 2.0 release will be the stable release.

With that said, we are getting closer and closer to a non-beta release. The primary things that are being worked on to that end are documentation, some additional testing, and various interface improvements that are very likely to be backwards compatible. Ash is being used in production currently. We simply hold the project to a high standard when it comes to taking it out of beta.

Dependency

def deps do
  [
    {:ash, "~> 1.29.0-rc0"}
  ]
end

Links

Guides

Extensions

APIs

Authorizers

Datalayers

Introduction

Traditional MVC Frameworks (Rails, Django, .Net, Phoenix, etc) leave it up to the user to build the glue between requests for data (HTTP requests in various forms as well as server-side domain logic) and their respective ORMs. In that space, there is an incredible amount of boilerplate code that must get written from scratch for each application (authentication, authorization, sorting, filtering, sideloading relationships, serialization, etc).

Ash is an opinionated yet configurable framework designed to reduce boilerplate in an Elixir application. Ash does this by providing a layer of abstraction over your system's data layer(s) with Resources. It is designed to be used in conjunction with a phoenix application, or on its own.

To riff on a famous JRR Tolkien quote, a Resource is "One Interface to rule them all, One Interface to find them" and will become an indispensable place to define contracts for interacting with data throughout your application.

To start using Ash, first declare your Resources using the Ash Resource DSL. You could technically stop there, and just leverage the Ash Elixir API to avoid writing boilerplate. More likely, you would use extensions like Ash.JsonApi or Ash.GraphQL with Phoenix to add external interfaces to those resources without having to write any extra code at all.

Ash is an open-source project and draws inspiration from similar ideas in other frameworks and concepts. The goal of Ash is to lower the barrier to adopting and using Elixir and Phoenix, and in doing so help these amazing communities attract new developers, projects, and companies.

Example Resource

defmodule Post do
  use Ash.Resource

  actions do
    read :read

    create :create
  end

  attributes do
    attribute :name, :string
  end

  relationships do
    belongs_to :author, Author
  end
end

See the Getting Started Tutorial for more information.

For those looking to add Ash extensions:

  • see Ash.Dsl.Extension for adding configuration.
  • If you are looking to write a new data source, also see the Ash.DataLayer documentation.
  • If you are looking to write a new authorizer, see Ash.Authorizer
  • If you are looking to write a "front end", something powered by Ash resources, a guide on building those kinds of tools is in the works.

Creating a new release of Ash

  • check out the repository locally
  • run mix git_ops.release (see git_ops documentation for more information)
  • check the changelog/new release number
  • push (with tags) and CI will automatically deploy the hex package

Contributors

Ash is made possible by its excellent community!

zachdanielandrewcallahanzimt28totaltrashaxelsonvbrazo

mario-mazovherr2TheFirstAvengerkernel-iokingshalaby1frankdugan3

mangeptionmichaelstsavishalexfreskaChristianTovardkuku

doawoofloriankjanpieperelbow-jasonmaartenvanvlietflorius0

WolfDanmhussa

ash's People

Contributors

alexfreska avatar andrewcallahan avatar axelson avatar christiantovar avatar dkuku avatar doawoo avatar dvic avatar elbow-jason avatar ergodic1 avatar floriank avatar florius0 avatar frankdugan3 avatar janpieper avatar joshprice avatar kernel-io avatar kingshalaby1 avatar maartenvanvliet avatar mangeption avatar mario-mazo avatar michaelst avatar savish avatar smt116 avatar thefirstavenger avatar tlietz avatar totaltrash avatar vbrazo avatar vherr2 avatar wolfdan avatar zachdaniel avatar zimt28 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.