/framework

Framework for lazy developers

Primary LanguagePHPMIT LicenseMIT

Damn Stupid Simple PHP Framework

Version Build Total Downloads composer.lock License Made In

Damn Stupid Simple is a micro framework built for lazy developers. Suitable for those who used to develop vanilla projects, while following today's set of standard. The core is very small in size, yet it contains most of the functions required to rapidly start developing a project. The name itself is obvious.

New programmers have to take extra effort to learn everything about modern PHP frameworks like Laravel and Symphony. Most of the time were spent on documentations rather than the actual codes. This leads to the development of Damn Stupid Simple, as the surface of every terminologies, and the entry level to modern day needs. Damn Stupid Simple is hybrid, and it's all you need to start grasping modern framework styles. It is everything you need to run from small to large-scale projects.

Latest Version

Release 0.1.0

Table of Contents

No Title
1 Why Damn Stupid Simple?
2 Technical Features
3 How to Install
4 Basic Application
5 API Documentation

Why Damn Stupid Simple

  • No nonsense
  • Follow your own style
  • Extremely extensible
  • Small in size
  • Lightning fast (<20 ms)

[back to top]

Technical Features

  • Lazy Routing - Route urls according to file names. Your /home will be redirected to home.php and so on. You can also route on specific uri, and/or forward them to a controller.
  • Simple Templating Process - Copy and paste any templates you downloaded to the root directory, and viola, it's up and ready. However, you can still manage template them however that suits your likings.
  • Integrated with Composer - Download thousands of packages available straight to your project.
  • Integrated with Eloquent ORM - Manage database records with no hassles.
  • Dependency Injection - Minimize coupling and dependant on a single project. And provides easy access to objects and variables.
  • Out-of-the-Box Error Handler - We integrated the framework with Whoops, error handler in a less painful way.

[back to top]

Installation

Damn Stupid Simple requires PHP at least 5.6 to run (with PHPUnit).

1. Install via Composer; or

If you do not have Composer installed, please follow this link for Windows, or this link for Mac Os X and Linux.

As soon as you have installed the Composer already, type this on the Command Prompt (or Terminal)

$ composer create-project damnstupidsimple/framework myproject
2. Install via Zip/Tarball File:

Simply go to the Releases page to download .zip or .tar file for Damn Stupid Simple framework.

[back to top]

Basic Application

<?php
// All of the core classes are in this namespace
namespace Core;

// Define the root directory
define('DSS_PATH', __DIR__ . '/');

// Require Composer's fantastic autoloader to load 3rd party packages
require_once(DSS_PATH.'app/autoloader.php');

// Lazy routing
Router::get('/(:any)', function() {
	Viewer::file('home.php');
});

// Dispatch the router and done
Router::dispatch();
?>

[back to top]

API Documentation

Table of contents

No Class Contents
1 Core\Router
2 Core\Viewer
3 Core\App
4 Core\Sharer
5 Core\Database
6 Core\Cache
7 Core\Debugger

[back to top]

Development

Want to contribute? Great! Please do not hesitate to contribute to the framework development.

[back to top]

License

MIT

[back to top]

Todo

This is a work in progress. The README.md will be expanded from time to time.

[back to top]