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 (10 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

The New Era of JavaScript (28min conference talk, Jack Franklin, 2013)

This article was written quite a while ago (9 years), please keep this in mind when using the information written

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

composer

Composer problems ? Try full reset !

Some small Composer commands that might solve your problems: I’ve taken them directly from Jordi Boggiano‘s (Composer co-creator) “In Depth

How to get a single table out of a massive MySQL .sql database backup file (mysql dump splitter)

Imagine the following situation: Somebody backs up an entire MySQL database – a very large one – with common tools.

Compare 250+ cloud server plans with Cloud Cost Calculator

How cool is that ? The Cloud Cost Calculator compares more than 250 cloud server plans of Amazon, Rackspace, DigitalOcean,

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

php

How to prevent PHP sessions being shared between different apache vhosts / different applications

When you run multiple applications on one server, you might run into the session-sharing problem: All your applications share the

php

New GitHub repo: simple php-long-polling for creating real-time apps

Mornin’ ! I’ve just pushed a sweet little new project into GitHub: A very simple and totally reduced PHP long-polling

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

A quick history of Comic Sans, the most wrongly used font ever

Excellent 10min presentation every frontend developer should see. Yes, even if you never touched Photoshop and never chose a font,

1/4

Categories

Search

git-php-deployment
Extremely simple deployment with PHPloy
How to show memory usage (Ubuntu)
angular js
Learn AngularJS in 20 (or 90) minutes with Dan Wahlin
css3-chrome-font
Google rolls out Chrome 37, finally fixes horrible font-rendering
Increase your HTML / CSS coding speed with EMMET
php
How to use the PHP 5.5 password hashing functions
Material Design – How Google designed Android L (7min video)
hearthbleed-ssl-bug
A quick guideline on how to fix the Hearthbleed bug (and update OpenSSL) on Ubuntu
ubuntu-14-04-lts lamp
How to install/setup a basic LAMP stack (Linux, Apache, MySQL, PHP) on Ubuntu 12.04 or Debian 7.0/7.1
What’s new in PHPStorm 10 (Official promo video)
organizing css
Jonathan Snook – CSS is a Mess – How to organize CSS in big projects (54min video talk)
phpstorm-github-code-color-syntax-theme
Get Github’s syntax highlighting colors in PHPStorm
hiphop php
PHP’s HipHop outperforms PHP 5.5 with Zend OPCache and Nginx by 15-20 times
hiphop php
HipHop VM reaches 100% green Unit Tests in Laravel, Drupal, Slim, CodeIgniter etc.
Frontend Ops Conf 2014 – Paul Irish: Delivering The Goods In Under 1000ms (40min video)

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