hanami/FEATURES.md

276 lines
10 KiB
Markdown
Raw Permalink Normal View History

2016-01-20 16:06:26 +00:00
# Hanami
2022-07-18 09:07:55 +00:00
2016-01-22 18:14:00 +00:00
### The web, with simplicity.
2015-03-22 15:56:02 +00:00
## Features
2022-07-18 09:07:55 +00:00
## v2.0.0.beta1 - 2021-07-20
- Generate new apps using `app/` directory
## v2.0.0.alpha8 - 2021-05-19
## v2.0.0.alpha7.1 - 2021-03-09
## v2.0.0.alpha7 - 2021-03-08
## v2.0.0.alpha6 - 2021-02-10
## v2.0.0.alpha5 - 2021-01-12
## v2.0.0.alpha4 - 2021-12-07
## v2.0.0.alpha3 - 2021-11-09
## v2.0.0.alpha2 - 2021-05-04
2019-01-29 13:23:01 +00:00
## v2.0.0.alpha1 - 2019-01-30
2019-09-19 09:13:44 +00:00
## v1.3.3 - 2019-09-20
- Standardize file loading for `.env` files (see: https://github.com/bkeepers/dotenv#what-other-env-files-can-i-use)
2019-07-26 06:38:46 +00:00
## v1.3.2 - 2019-07-26
2019-01-18 17:39:11 +00:00
## v1.3.1 - 2019-01-18
2018-10-23 07:29:08 +00:00
## v1.3.0 - 2018-10-24
- Default testing framework is RSpec
- Introduced `Hanami::Middleware::BodyParser` Rack middleware
- Log payload (body) for non-GET HTTP requests coming from body parsers
- Added support for `reply_to` in mailers
- Variadic arguments for `hanami-cli`
- Array as argument or option for `hanami-cli`
2018-04-12 08:46:55 +00:00
2018-04-10 09:30:05 +00:00
## v1.2.0 - 2018-04-11
2018-03-23 11:13:56 +00:00
- HTTP/2 Early Hints
- Unobtrusive JavaScript (UJS) (via `hanami-ujs` gem)
- Interactive console for development error page (via `hanami-webconsole` gem)
2018-04-10 09:30:05 +00:00
- CLI: register callbacks for `hanami` commands (`Hanami::CLI.after("db migrate", MyCallback.new)` or `Hanami::CLI.after("db migrate") { ... }`)
2020-03-10 20:49:07 +00:00
- Project level Rack middleware stack (`Hanami.configure { middleware.use MyRackMiddleware }`)
2018-03-23 11:13:56 +00:00
- Plugins can hook into project configuration (`Hanami.plugin { middleware.use AnotherRackMiddleware }`)
2018-04-10 09:30:05 +00:00
- Custom repository commands
- Coloured logging
2018-03-23 11:13:56 +00:00
2018-02-27 14:32:38 +00:00
## v1.1.1 - 2018-02-27
## v1.1.0 - 2017-10-25
2017-08-11 14:37:56 +00:00
- One-To-Many association (aka `belongs_to`)
- One-To-One association (aka `has_one`)
- Many-To-Many association (aka `has_many :through`)
- Allow third-party developers to register commands for CLI (eg `hanami generate webpack`)
2017-10-03 16:12:10 +00:00
- Initial support for plugins via `:plugins` group in `Gemfile`
2017-10-03 17:17:04 +00:00
- CLI: `hanami db rollback` to rollback database migrations
2017-08-11 14:37:56 +00:00
- Introduced new extra behaviors for entity manual schema: `:schema` (default), `:strict`, `:weak`, and `:permissive`
- Custom logger for `Hanami.logger`
- Selectively boot apps via `HANAMI_APPS=web` env var
- Log payload (params) for non-GET HTTP requests
- Filter sensitive data in logs
2017-04-05 09:42:43 +00:00
### v1.0.0 - 2017-04-06
2017-03-31 07:13:57 +00:00
- Logger rotation
2017-03-01 15:38:58 +00:00
- Added: `Action#unsafe_send_file` to send files outside of the public directory
2017-02-08 17:07:16 +00:00
- CLI: `hanami generate model` now also generates a migration
- Project logger `Hanami.logger`
- Automatic logging of HTTP requests, migrations, and SQL queries
### v0.9.2 - 2016-12-19
2016-12-19 15:47:39 +00:00
### v0.9.1 - 2016-11-18
2016-12-19 15:47:39 +00:00
### v0.9.0 - 2016-11-15
2016-11-11 17:45:23 +00:00
- Experimental repositories associations (only "has many")
- Database automapping for SQL databases
- Entities schema
- Immutable entities
- Removed dirty tracking for entities
- Repositories CRUD operations can accept both entities and/or data
- Removed Memory and File System adapters
- SQLite is the default adapter for new projects
- Native support for PostgreSQL types
- CLI: `hanami secret` to generate and print a new session secret for a single Hanami app
### v0.8.0 - 2016-07-22
2016-07-19 13:03:41 +00:00
- New validation syntax based on predicates
- Custom and shared predicates for validations
- High level rules for validations
- Validations error messages with I18n support (via optional `i18n` gem)
- Mount applications in subdomains
- Added support for Content Security Policy 1.1 and 2.0
- Subresurce Integrity
- Include `X-Content-Type-Options` and `X-XSS-Protection` in default response headers
- Support for several JSON engines (via optional `multi_json` gem)
- JSON Logging for production
- Per environment logging levels, stream (file, stdout), formatters
- Introduced `#local` for views, layouts and templates to safely access locals by avoiding `nil` values
- Added `datalist` form helper
- CC and BCC support for mailers
- Experimental code reloading via `entr(1)`
- CLI: `hanami new` can be used with `--template` argument to generate a new project with (`erb`/`haml`/`slim`) templates
### v0.7.3 - 2016-05-23
2016-07-19 13:03:41 +00:00
### v0.7.2 - 2016-02-09
2016-07-19 13:03:41 +00:00
### v0.7.1 - 2016-02-05
2016-07-19 13:03:41 +00:00
### v0.7.0 - 2016-01-22
2016-01-22 18:14:00 +00:00
2016-07-19 13:03:41 +00:00
- Renamed from Lotus to Hanami
### v0.6.1 - 2016-01-19
2016-01-19 09:44:29 +00:00
### v0.6.0 - 2016-01-12
2015-12-22 10:09:20 +00:00
2016-01-11 17:39:00 +00:00
- Assets preprocessors support (eg. Sass, ES6, Opal, Less, CoffeScript..)
- Assets compressors (eg. YUI, UglifyJS2, Google Closure Compiler, Sass..)
2015-12-22 10:09:20 +00:00
- Assets helpers:
2022-07-18 09:07:55 +00:00
- `javascript`
- `stylesheet`
- `favicon`
- `image`
- `video`
- `audio`
- `asset_path`
- `asset_url`
2015-12-22 10:09:20 +00:00
- Content Delivery Network (CDN) support for static assets (CDN mode)
- Checksum suffix for static assets in production mode (Digest mode)
2016-01-22 18:14:00 +00:00
- Support for third party gems as assets distribution channel (eg. `lotus-jquery`)
- CLI: `lotus assets` command `precompile`: preprocess, minify and append checksum suffix
- CLI: `lotus destroy` destroy apps, models, actions, migrations and mailers
2015-12-22 10:09:20 +00:00
- Custom initializers (`apps/web/config/initializers`)
- Rake tasks `:preload` and `:environment`
### v0.5.0 - 2015-09-30
2015-09-22 09:34:14 +00:00
2015-09-29 08:47:09 +00:00
- Mailers
2016-01-22 18:14:00 +00:00
- CLI: `lotus generate mailer`
2015-09-22 09:34:14 +00:00
- SQL joins
- Custom coercers for data mapper
### v0.4.1 - 2015-07-10
2015-07-10 17:10:29 +00:00
### v0.4.0 - 2015-06-23
2015-06-22 12:56:20 +00:00
- Application architecture
- Database migrations
2016-01-22 18:14:00 +00:00
- CLI: `lotus db` commands: `create`, `drop`, `prepare`, `migrate`, `version`, `apply`.
2015-06-22 12:56:20 +00:00
- HTML5 Form helpers
- Cross Site Request Forgery (CSRF) protection
- Force SSL
- Number formatting helper
### v0.3.2 - 2015-05-22
2015-06-03 10:13:48 +00:00
- Automatic secure cookies
- Routing helpers for actions
- Send files from actions
2016-01-22 18:14:00 +00:00
- `Lotus.root` returns top level directory of the project.
2015-06-03 10:13:48 +00:00
### v0.3.1 - 2015-05-15
2015-05-15 12:30:14 +00:00
2016-01-22 18:14:00 +00:00
- CLI: `lotus generate app admin` creates a new application (`apps/admin`).
- CLI: `lotus generate model user`. It generates entity, repository and related unit test files.
- `Lotus.env` and `Lotus.env?` for current environment introspection (eg. `Lotus.env?(:test)` or `Lotus.env?(:staging, :production)`)
2015-05-15 12:30:14 +00:00
- Allow repositories to execute raw query/commands against database
- Automatic timestamps update for entities
2022-07-18 09:07:55 +00:00
Dirty Tracking for entities (via `Lotus::Entity::DirtyTracking`)
2015-05-15 12:30:14 +00:00
- Nested RESTful resource(s)
- String pluralization and singularization
### v0.3.0 - 2015-03-23
2015-03-22 15:56:02 +00:00
2016-01-22 18:14:00 +00:00
- CLI: `lotus generate action web dashboard#index`. It generates an action, a view, a template, a route and related unit test files.
- CLI: `lotus db console`. It starts a database REPL.
2015-03-22 15:56:02 +00:00
- Full featured HTML5 markup generator for views (Eg. `html.div { p "Hello World" }`)
- Routing helpers in views and templates (Eg. `routes.home_path`).
2016-01-22 18:14:00 +00:00
- `lotus new` supports `--database` (Eg. `lotus new bookshelf --database=postgresql`).
2015-03-22 15:56:02 +00:00
- Initialize a Git repository when generate a new application
2015-03-23 17:28:54 +00:00
- Security: XSS (Cross Site Scripting) protections
- Security: Clickhijacking protection
2015-03-22 15:56:02 +00:00
- Security: Cookies are set as `HttpOnly` by default.
- Security: enable by default `X-Frame-Options` and `Content-Security-Policy` HTTP headers for new generated applications.
- Security: auto-escape output of presenters.
- Security: auto-escape output of virtual an concrete view methods.
- Security: view and template helpers for HTML, HTML attributes and URL escape. It's based on OWASP/ESAPI recommendations.
- Access nested action params with a safe API (`params.get('address.city')`).
- Interactors (aka Service Objects)
- Database transactions
### v0.2.1 - 2015-02-06
2015-03-22 15:56:02 +00:00
- Allow entities to include validations.
2016-01-22 18:14:00 +00:00
- `lotus new .` to generate a Lotus project for an existing code base (Eg. a gem that needs a web UI).
- `lotus new` supports `--path` (for destination directory), `--test` (to generate Minitest or RSpec boilerplate).
- Lotus logger
2015-03-22 15:56:02 +00:00
### v0.2.0 - 2014-12-23
2015-03-22 15:56:02 +00:00
- Support Minitest as default testing framework (`bundle exec rake` runs the entire test suite of an application).
- Support for _Method Override_ technique.
- Custom templates for non successful responses (Eg. `404.html.erb`).
2016-01-22 18:14:00 +00:00
- Support distinct `.env` files for each Lotus environment.
- Allow to configure multiple applications and handle Lotus environments accordingly.
2015-03-22 15:56:02 +00:00
- Allow to configure middleware stack, routes, database mapping and adapter for each application.
- Show a welcome page with instructions for new generated apps.
2016-01-22 18:14:00 +00:00
- CLI: `lotus routes`. It prints all the routes available for all the applications.
- CLI: `lotus new`. It generates a new application which can run multiple Lotus applications (_Container_ architecture).
- CLI: `lotus console`. It starts a Ruby REPL. It supports IRB (default), Pry and Ripl.
- CLI: `lotus server`. It starts a web server that supports code reloading. It supports all the Rack web servers (default: WEBRick).
2015-03-22 15:56:02 +00:00
- Database adapters: File system (default for new apps)
- Allow to share code for all the views and actions of an application
- Reusable validations framework (mixin). It supports: coercions and presence, format, acceptance, size, inclusion, exclusion, confirmation validations.
- Default Content-Type and Charset for responses
- Whitelist accepted MIME Types
- Custom exception handlers for actions
- Unique identifier for incoming HTTP requests
- Nested action params
- Action params _indifferent access_, whitelisting, validations and coercions
- HTTP caching (`Cache-Control`, `Last-Modified`, ETAG, Conditional GET, expires)
- JSON body parser for non-GET HTTP requests
- Routes inspector for CLI
### v0.1.0 - 2014-06-23
2015-03-22 15:56:02 +00:00
2016-01-22 18:14:00 +00:00
- Run multiple Lotus applications in the same Ruby process
2015-03-22 15:56:02 +00:00
- Serve static files
- Render default pages for non successful responses (404, 500, etc.)
2016-01-22 18:14:00 +00:00
- Support multiple Lotus environments (development, test and production)
2015-03-22 15:56:02 +00:00
- Full stack applications
- Data mapper
- Database adapters: Memory and SQL
- Reusable scopes for repositories
- Repositories
- Entities
- Custom rendering implementation via `#render` override in views
- Render partials and templates
- Presenters
- Layouts
- Views are able to handle multiple MIME Types according to the defined templates
- Support for all the most common template engines for Ruby. Including ERb, Slim, HAML, etc.
- Basic view rendering with templates
- Bypass rendering by setting a response body in actions (`self.body = "Hello"`)
- Single actions are able to mount Rack middleware
- Automatic MIME Type handling for request and responses
- HTTP sessions
- HTTP cookies
- HTTP redirect
- Action before/after callbacks
- Handle exceptions with HTTP statuses
- Action exposures, to expose a payload to pass to the other application layers
- Actions compatible with Rack
- Mount Rack applications
- Nested route namespaces
- RESTful resource(s), including collection and member actions
- Named routes, routes constraints, variables, catch-all
2016-01-22 18:14:00 +00:00
- Compatibility with Lotus::Controller
2015-03-22 15:56:02 +00:00
- HTTP redirect from the router
2015-03-23 17:28:54 +00:00
- HTTP routing compatible with Rack
- Thread safety