Giter Club home page Giter Club logo

altaform-core's Introduction

Altaform

Build Status

About

Altaform is a small, simple, lightweight micro-framework for PHP web applications. Altaform handles HTML templates, database connectivity, $_GET/$_POST reading, URL routing, error logging, and more automatically. Altaform strives to be a zero-boilerplate framework focusing entirely on allowing developers to jump in to create simplistic and clean PHP code without worrying about what classes need to be inherited or what methods need overwritten. Altaform allows for traditional minimalistic procedural PHP programming while still having many of the same benefits of a modern PHP framework.

License

This software library is licensed under the BSD 2-clause license, and may be freely used in any project (commercial, freelance, hobby, or otherwise) which is compatible with this license. See LICENSE for more details.

Compatibility

Altaform is actively tested and used in production on PHP 7.2 and HHVM 3.24.

Altaform should work as far back as PHP 5.4, but this is no longer actively used in production. Altaform heavily relies upon new features introduced in PHP 5.4, therefor will NOT work on any version of PHP prior to 5.4.

Altaform may work on versions of HHVM prior to 3.12, but it is highly discouraged. During Altaform development, a countless number of bugs have been discovered and reported in the HHVM interpreter that directly affected this project. As such, Altaform is not guaranteed to function properly on earlier versions of HHVM prior to 3.24.

Modules

Path Library Usage
_altaform Altaform Core URL router, user access
_getvar GetVar Handler for $_GET/$_POST data
_pudl PHP Universal Database Library (PUDL) DB connection and SQL query generator/processor
_tbx TinyButExtreme (TBX) HTML5 template processor

Global Variables

Name Library Usage Documentation
$af Altaform Core & TBX Instance of the altaform class, inherits tbx class Documentation
$afurl Altaform Core Instance of the afUrl class
$router Altaform Core Instance of the afRouter class
$user Altaform Core Instance of the afUser class
$get GetVar Instance of the getvar class Documentation
$db PUDL Instance of one of the pudl classes (depends on database type) Documentation

Getting Started

These instructions assume a basic LAMP stack (Linux + Apache + MySQL + PHP), however in production we actively have variations of each of these in use. Altaform has been tested on Linux, FreeBSD and SmartOS for the operating system, Apache, Nginx, and Lighttpd for the web server, MySQL, MariaDB, and SQLite for the database, and PHP 5.x, PHP 7, and HHVM for the interpreter. These examples listed below have been tested and work with the TurnKey Linux LAMP appliance running under VMWare vSphere, but should be the same on any LAMP stack setup with mod_rewrite enabled and the document root in /var/www.

By default, TurnKey LAMP has some problematic modules enabled, and required modules disabled. Our first task is to correct these issues. Negotiation causes URL rewriting conflicts, and rewrite is needed to support a single PHP entry point.

cd /etc/apache2/mods-enabled/
rm negotiation.*
ln -s ../mods-available/rewrite.load
service apache2 restart

By default, TurnKey LAMP does not include root certificates to validate HTTPS connections made by git. These need to be added to the system.

apt-get install ca-certificates

By default, TurnKey LAMP installs a bunch of cruft into /var/www, so we need to empty the folder.

cd /var/www
rm -R *

Next we need to clone the Altaform code from GitHub.

git clone https://github.com/darkain/altaform.git .

Now we need to clone all of the sub-modules from GitHub.

sh _scripts/submodules.sh

altaform-core's People

Contributors

darkain 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.