Giter VIP home page Giter VIP logo

docs's Introduction

Introduction

Amber is a web development framework written in the Crystal programming language. The framework implements the server-side MVC pattern using the object-oriented paradigm. Many of Amber's components and concepts will be familiar for developers with experience with other web frameworks like Phoenix, Ruby on Rails or Python's Django.

Amber Framework

Amber aims to deliver developer happiness, productivity, and bare metal performance. The Crystal language is heavily inspired by Ruby, delivering familiarity, productivity, and a low learning curve for experienced Ruby developers. Meanwhile, Crystal also has some modern features like macros, first class concurrency, union types, C bindings, and a built in dependency manager. Amber takes advantage of all these features providing you an opinionated structure to develop a web application.

Amber offers a variety of familiar tools such as generators, database management, CLI, deployment tools, docker support, encrypted secrets, websockets, and more for fast prototyping and developing enterprise-grade web applications. If you come from a Ruby on Rails background you will feel right at home, but, be aware Amber is not Rails! Amber is type-safe, compiled, and embraces the best features from many different frameworks for example pipes for routing which is more similar to the Phoenix framework.

The aim of this introductory guide is to present a high-level overview of Amber Framework and the layers underneath that support it.

Getting Help

If you’re stuck, there are a number of places you can get help.

  • Gitter for quick questions.
  • Stack Overflow for questions about the Crystal Language and Amber Framework.
  • Github for getting acquainted with source code, current issues and progress.
  • Online Guides for getting down and dirty working with Amber.
  • Twitter to see latest news and announcements about Amber Framework.

Contributing

Contributing to Amber can be a rewarding way to learn, teach, and build experience in just about any skill you can imagine. You don’t have to become a lifelong contributor to enjoy participating in Amber.

Amber is a community effort and we want You to be part of ours Join Amber Community!

First Steps

Learning a new framework can be intimidating and exciting at the same time. To help you along, we have created a cookbook packed with examples and recipes to get the common tasks completed.

If you are new, you should start off with the guides.

If you want a step by step tutorial try the quick start.

Happy developing!

docs's People

Contributors

acoustep avatar adacosta avatar aquaflamingo avatar avitkauskas avatar conradwt avatar crimson-knight avatar damianham avatar damireh avatar drujensen avatar eliasjpr avatar elorest avatar faustinoaguilar2 avatar faustinoaq avatar fridgerator avatar gitbook-bot avatar jaydorsey avatar jaysneg avatar katafrakt avatar lady-elorest avatar lucis-fluxum avatar marksiemers avatar mofumofu3n avatar orelsokolov avatar robacarp avatar robikovacs avatar sathishvc avatar saturn-network avatar seanwatters avatar ulayer-bot avatar westonganger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

docs's Issues

Missing Documentation Content

Amber guides are showing a message for missing documentation

DNF

I think this error message is better than nothing

Documentation for i18n

Hello ! Seems that i18n is not documented at all, from configuration (config/i18n.cf has good comments though) to view helpers (I got lucky by trying = t("some_stuff")).

`date_time` is no longer valid

Hi everyone,

I was going through the docs trying to get my first Amber app off the ground. On trying to do a migration, I realized the suggested date_time alongside datetime are not valid options for DB fields in Amber. I used timestamp and this worked.

I think the docs should be updated to reflect this.

09:29 $ amber -v
Amber CLI (amberframework.org) - v0.9.0
Crystal 0.26.1 (2018-08-27)

LLVM: 6.0.1
Default target: x86_64-apple-macosx

Proof Read and Improve Amber Docs

Our guides have come a long ways but I still find grammatical and spelling mistakes when I read through them.

Review and improve Amber Docs and Checkoff:

GETTING STARTED

  • Quick Start

GUIDES

  • Overview
  • Installation
  • Directory Structure
  • Configuration
  • Routing
  • Controllers
  • Models
  • Views
  • Mailers
  • Websockets

TESTING

  • System Tests
  • Controller Tests
  • Integration Tests
  • Model Testing

DEPLOYMENT

  • Deploying To Heroku
  • Deploying To Digital Ocean

COMMAND LINE INTERFACE

  • Amber CLI
  • New
  • Generate
  • Database
  • Exec
  • Deploy
  • Encrypt
  • Routes
  • Watch

EXAMPLES

  • Amber Auth Example
  • VS Code Debugging
  • Crecto ORM

Obsolete doc for Jennifer

Hi.
I am new to Crystal and Amber - coming from Rails world ... so I don't know how to fix that... but following doc for Jennifer leads to not working environment

 crystal sam.cr -- generate:migration CreateUser
Error: unknown command: sam.cr

I manage to run sam.cr by moving it from src/ to ./ and fixing paths

  • but it leads to errors like
Error in src/sam.cr:3: undefined local variable or method '​'

fixed by jumping to next line and press del until it jumps to above line - then enter to move it to new line ... there are some strange characters in code taken from doc ...

  • i am very lazy from Ruby and Rails and this not working guerrilla environment makes me frustrated ...
    Jennifer is open gate for people like me and we will not try some experimental ORM which are default and are not able to manage things way I am accustomed from ActiveRecord ... I thing that default should be Jennifer for smooth transition ;) to try Crystal and Amber. And if somebody is not satisfied with AR - they he can try some new ...

Halt! docs misleading/incorrect

For example, the docs show the controller:

 class UserController < ApplicationController
  def index
    halt!(403, "Forbidden") if params[:user_id].nil?
    render "index.slang"
  end
end

and says

A status code of 403 was returned, and the content in render will not be delivered to the client.

which is not true. What really happens is that the client receives a response with the status of 403 but the content of the template. The core misunderstanding seems to be from a line further down that says

Unlike other frameworks Amber redirect_to stops the current execution of the request and performs the redirection at that given time...Since redirect_to uses the halt! method in the background.

I think there was a misunderstanding that calling halt! does something to immediately return from whatever it's called in. Maybe it was envisioned to raise an exception? This was never the case, though. The only thing it does is set the content value on the context and the route macro checks that value before running before_filters and the action https://github.com/amberframework/amber/blob/58eea3e147ba384fe4cb7c5f0a63da61b357e356/src/amber/dsl/router.cr#L14-L15

Routing breaks when the scaffold/resource contains "end" in the name

Hello team,
I just found out that, when you create a scaffold/resource/route that contains "end" in the name, then the parsing of the routing file will fail next time. Basically, it will assume it is the "end" of the routes :web do section.

REPRODUCING THE BUG
amber g scaffold gender name:string

After this, try adding any other scaffold, the action will fail with:
"syntax error in './config/routes.cr:138:14': unexpected token: DELIMITER_START"
When checking the routes.cr file it is broken at the resources line for "gender" like this:
resources "g
---new scaffold here---
enders", GenderController

Thanks,

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.