base/base

There is no license information available for the latest version (dev-master) of this package.

Maintainers

Details

github.com/taniele/base

Source

Issues

Installs: 2 047

Dependents: 0

Suggesters: 0

Security: 0

Stars: 2

Watchers: 3

Forks: 1

Language:Hack

dev-master 2018-07-05 08:49 UTC

This package is not auto-updated.

Last update: 2024-04-05 19:00:31 UTC


README

Base is a framework built specifically for HHVM/Hack. It does not run on PHP. We wanted to make Base simple to understand, configure and use, and possibly performant.

Base is the ideal RAD framework, but it is also powering production apps.

Highlights

  • Small and simple (for real). This means few files, almost zero dependencies, little configuration, but everything to get you going. With a small set of APIs that just make sense, you can get started right after you clone this repo.
  • Atomic controllers. A route maps to one controller, and one controller can handle one action only.
  • MWC (Model-Widget-Controller). Templating has never been so easy. Write XHP layouts and widgets for a super-fluent syntax and full XSS protection.
  • Not-so-opinionated. Don't like our templating? Sure, use Handlebars. Don't like our ORM? Plug Doctrine in. We love difference.

Features

  • Built-in XHP localisation via :t and :t tags
  • Layouts and widgets: :base:layout and :base:widget, built on top of XHP, too.
  • Built-in workers and message queue: supports Redis for async communication with external web services and APIs
  • Event bus: ApiRunner::addEventListener and ApiRunner::fireEvent allows you to extend Base by creating custom hooks
  • Built-in MongoDB ODM. Strongly type your documents using BaseModel. Link documents and automatically resolve references using BaseRef.
  • Route parameters. Specify a route map and link parameters. Reference routes by their names, not their URLs. Create route aliases (one controller, multiple routes).
  • Request parameter validation and casting. Specify which parameter your controller must accept, and Base performs validation, sanitisation and type casting accordingly. Everything else is discarded.

Contribute

Ever wanted to drive a new framework to widespread popularity? Base is the right chance. There are specific areas in which you can make an impact:

  • Ship new features. Base is so new that every new feature is a great idea. PR are always welcome.
  • Test. We would like to build our custom test framework, and increase our test coverage.
  • Discussions. Let's crystallise Base's design principles and grow from there.
  • Go strict. We want Base to run on strict only on the long run. Currently, we are using gradual typing and arrays, but we want to be more specific on that.
  • Documentation. Although you should be able to understand what Base is doing by simply looking at its code, it would be great to have tutorials and documentation to help people build great apps.

License

MIT