Logo
  • PHP
    • HipHop / HHVM
    • Modern PHP
    • PHPStorm
    • LAMP
    • Laravel
    • Composer
    • PDO
  • JavaScript
    • node.js
    • AngularJS
  • CSS
    • SASS
    • “CSS4” (CSS level 4)
  • HTML
  • Git
  • LAMP
  • Vagrant
  • UI / UX
  • Architecture of …
  • Off-Topic
With ♥ from Berlin
November 9, 2013
Chris
Local Development, mini, MVC, PHP
2

New project: Building a naked PHP skeleton / boilerplate application from scratch

PreviousNext

[This post is from November 2013. In the meantime (I’m writing this in November 2014) the project has changed its name and the idea behind. You can find the new script, called MINI, here on Github or on www.php-mini.com]

I’ve just pushed the first commits of my new project to Github. Beware: What you see is only a few days old. The final release will be in 2014.

https://github.com/panique/php-mvc/

This repo aims to be an extremely reduced, extremely easy to understand and as-easy-as-possible-to-setup naked PHP application. You might ask: “Well, there are hundreds of frameworks, why do we need this ?”. Good question. But the thing is, most frameworks are frameworks, full of features, full of highly complex code, full of files. This project is not a framework, it’s just a barebone application, something like a naked structure to start with.

Basic views, a basic model and basic controllers are already integrated. There’s demo data, pretty URL rewriting, controller/action behaviour, clean PDO handling, a clean config and an extremely simple index.php ! Application logic and public files (css, js, images) are seperated. The idea of going on with Composer is also there, we have a “vendor” folder and an autoloader for Composer dependencies (totally optional, sure).

 

“How do I build an application ?”

One of the biggest question in the PHP world is “How do I build an application ?”. It’s hard to find a good base, a good file structure and useful information on that, but at the same time there are masses of frameworks that might be really good, but hard to understand, hard to use and extremely complex. This project tries to be some kind of naked skeleton bare-bone for quick application building, especially for beginners and not-so-advanced coder (like me) who just want to get things started rather than reading deeply into framework documentations.

 

Goals of this project

  • giving beginners (?) a useful tool to create PHP apps without messing things up
  • promote PSR 1/2 coding guidelines
  • promote usage of PDO
  • promote the usage of Composer, in exactly the way it should be used
  • make people use a more or less clean folder/file structure
  • promote developing with max. error reporting

 

What you can do

Feel free to have a look, watch or fork this, create issue tickets and improve things if you like. And please keep in mind: This is not a framework!

 

 

 

This article was written quite a while ago (9 years), please keep this in mind when using the information written here. Links, code and commands might be outdated or broken.

Random articles

  • MINI2, an extremely simple barebone PHP application on top of SlimMINI2, an extremely simple barebone PHP application on top of Slim
  • Install MINI in 30 seconds inside Ubuntu 14.04 LTSInstall MINI in 30 seconds inside Ubuntu 14.04 LTS
  • MINI, an extremely simple barebone PHP applicationMINI, an extremely simple barebone PHP application
  • Preview-release of (my) “php-mvc” project (a simple php mvc barebone)Preview-release of (my) “php-mvc” project (a simple php mvc barebone)
  • The first micro framework written in Hack is there: hack-mvc !The first micro framework written in Hack is there: hack-mvc !
  • SensioLabs, creator of Symfony and Silex PHP frameworks, gets $7 million capitalSensioLabs, creator of Symfony and Silex PHP frameworks, gets $7 million capital
  • PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)
  • What’s new in PHPStorm 9What’s new in PHPStorm 9
  • Experimenting with HHVM at Etsy (Link)Experimenting with HHVM at Etsy (Link)
bareboneframeworkMVCnakedPHPphp-mvcskeleton
Share this

2 Comments

  • Florian Goussin
    November 11, 2014 11:29 pm

    Thanks a lot! I found your website and all your other projects via the php-login project. This project and the php-login are really great!

    Reply
  • Mihail
    February 24, 2014 10:19 am

    Thank you for creating this simple MVC framework… really, THANK YOU.
    It’s exactly what I needed as a PHP beginner to get started after I learned the PHP syntax.

    Reply

Leave A Comment Cancel reply

css3-chrome-font

[Link] Retinafy your Site / Device by Nijiko Yonskai

A simple one-page Gist with all the information you need to make your sites retina-ready: Nijiko Yonskai – Retinafy your

vagrant

A super-simple Vagrant LAMP stack bootstrap (installable with one command)

As I have to setup servers inside Vagrant quite often, sometimes 10 times per day, I started to use provisioning:

PHPStorm: 42 Tips and Tricks (47min video talk by Mikhail Vink at Dutch PHP Conference 2015)

To be honest I’ve not seen the clip yet, but it sounds so awesome and everybody is upvoting it. Have

php

How to use the PHP 5.5 password hashing functions

PHP 5.5 introduced some very interesting password hashing functions that will make your life much much easier, the web much

O’Reilly sells EVERY ebook for -50% right now!

A good chance to grab some IT books: O’Reilly sells every single book in their portfolio with a -50% discount

cheap cloud server php

DigitalOcean rolls out interesting feature: Transfering server snapshots directly to the client’s account

Today DigitalOcean has rolled out a quite interesting new feature: You are now able to transfer a server snapshot (which

sass

New features in SASS 3.3 (a talk by SASS-creator Chris Eppstein)

A very interesting conference talk by Chris Eppstein, creator of SASS itself, showing some of the new features in SASS

css3-chrome-font

Google rolls out Chrome 37, finally fixes horrible font-rendering

Google has rolled out Chrome 37 today, a legendary milestone that fixes one of the most annoying “bugs” in frontend

php

How to install sqlite driver for PHP in Ubuntu & Debian

It’s easy to install sqlite (for usage with PHP): sudo apt-get install php5-sqlite This will also restart apache (on modern

How to show memory usage (Ubuntu)

Always very useful: A simple command to show memory usage (Ubuntu / linux distros). cat /proc/meminfo   This article was

1/4

Categories

Search

This picture shows the icon of blindness
How blind people use websites (video with Sina Bahram, blind accessibility researcher)
hack-php
The first micro framework written in Hack is there: hack-mvc !
php
How the PHP session garbage collector really works
forbes 30 under 30
Need motivation ? Check out these 2 awesome “FORBES 30 under 30” lists (web, UI, games)
Experimenting with HHVM at Etsy (Link)
microsoft-windows-azure-cloud-hosting
Microsoft’s Azure platform gives away high money prizes for “testing out” their cloud services
How Snapchat wants to earn money (by establishing vertical videos)
times-new-roman
The Times talks about Times New Roman (3min video)
hearthbleed-ssl-bug
A quick guideline on how to fix the Hearthbleed bug (and update OpenSSL) on Ubuntu
Install MINI in 30 seconds inside Ubuntu 14.04 LTS
cheap cloud server php
DigitalOcean rolls out interesting feature: Transfering server snapshots directly to the client’s account
css3-chrome-font
[Link] Retinafy your Site / Device by Nijiko Yonskai
github-logo-octocat
GitHub rolls out .PSD diff and viewing
java
Interesting: code of the same application in PHP, Python, Ruby, Closure, node.js, Java and Go
First look on Gitter, the chat for GitHub

Tags

apache bash centos composer conference coupon CSS debian fonts framework git GitHub hack HHVM HipHop HTML HTML5 IDE JavaScript JS LAMP laravel linux mod_rewrite MVC MySQL Nginx optimization PHP PHP 5.5 PHP 5.6 phpmyadmin PHPStorm security server SSD Ubuntu UI UX vagrant video virtual machine voucher VPS wordpress
Side-Project: Wordle-Solver:
www.wordle-helper.info

Pages

  • Privacy Policy
 
We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
Do not sell my personal information.
Cookie SettingsAccept
Manage consent

Privacy Overview

This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
Necessary
Always Enabled
Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
CookieDurationDescription
cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
Functional
Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
Performance
Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
Analytics
Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
Advertisement
Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
Others
Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
SAVE & ACCEPT