Swiftlet 3.0

Posted on January 26, 2012

Three years ago I released an early version of Swiftlet, a light-weight PHP framework built for speed and security. Over time however, a lot of functionality was added and started to suffer from feature creep. My original intention of creating a maintainable framework that was easy to pick up was a bit lost.

Last Sunday I had a spur of inspiration and decided to start over. With a slightly different vision, a better understanding of MVC and experience gained with the project I managed to finish it the same day. The result is about 150kB of code including documentation.

If you’re unfamiliar with the model-view-controller approach to programming Swiftlet might be a good starting point. The code is quite simple and hopefully the documentation makes the concept understandable.

Source code

Swiftlet on GitHub

Swiftlet is released under the GNU Public License.

Scroll to top

Object Oriented CSS

Posted on May 16, 2009

Okay, there is no such thing as object oriented CSS. But there are advantages in OO programming that we can use in CSS.

1
2
3
4
5
6
7
p {
    margin: 0;
}
 
#content p {
    margin: 1em 0;
}

In this example p would be a class and #content p would be an instance of that class. Let’s say the margin set in p is a method and we got the basic concepts of OOP.

Read more…

Scroll to top

Swiftlet — light-weight PHP framework

Posted on April 25, 2009

Swiftlet logoI just released an early alpha version of Swiftlet, an Open Source, light-weight PHP framework released under the GPL license.

It’s targeted at developers who want to built simple websites that don’t require large and complex frameworks, but do want a solid base to work from. Swiftlet provides basic security features such as user input sanitizing, is highly extensible thanks to the deeply integrated hook system, completely Object Oriented and separates logic from design (MVC).

Even the most basic features such as connecting to a database and output buffering are implemented as plug-ins. This means they can be modified, extended and removed without hacking into the core code.

Website: http://swiftlet.org

Scroll to top

PHP: How not to pollute the global scope

Posted on March 28, 2009

An emerging trend in JavaScript is to wrap entire programs in a single object to prevent conflicts with other scripts. The same can be done with PHP, something I haven’t seen done very often.

Read more…

Scroll to top

Fork me on GitHub