Archive for the ‘PHP’ Category

iFrame Features

Tuesday, May 22nd, 2007

iFrame Logo

In the previous post I introduced my new PHP framemwork - iFrame. It had the reasons why you should not use the framework. In these post, I will talk of the advantages you get if you use my framemwork. But remember - do not use my framework.

No routing - Fully file based

There are no complicated routing rules - the URL should specify which file should be used. For example…

http://www.example.com/user/create.php

Here, ‘user’ is the controller and ‘create’ is the action.

Folder Structure

Like many other framemworks, iFrame has a rigid folder structure.

/
+-commen.php
+-configeration.php
+-/includes/  #System files
+-index.php
+-/user/
	+-index.php
	+-create.php
+-/templates/
	+-index.php
	+-/user/
		+-index.php
		+–create.php
+-/js/
	+-/user/
		+–create.php
+-/css/
	+-/user/
		+–create.php

Auto inclustion of CSS/JS files

The system will auto include the CSS/JS files with the same file name as the current file - the files colored colored in green in the above ‘Folder Structure’ will be included automatically when ever the create.php(red color) file is called.

Library for Paging/Tagging

These two classes are great time savers. Unfortunatly they have no documentation - yet.

Small/Managable Files

The framemwork forces the code to be broken down into smaller parts. In this framemwork, one action is one file - instead of one controller per file as in other framemworks. I find this easier to manage than the other approch.

Uses OOPs only when it is required

I only use Object Orinted Programming only if there is a clear need to use it. This step made the system much simpler.

Three Layers

This framemwork tries to follow both MVC(server side 3 layer) and Content/Behaviour/Presentation(client side 3 layer) approches.

iFrame - My PHP Framework

Friday, May 18th, 2007

iFrame Logo

I have created a number of Web Applications - Nexty and Jus5 are just a few examples. I used a common code base when creating these sites - but I did not consider it a full fledged framework. However, now the code base has evolved enough to be called a framework. So, I called it a framework - the iFrame framework. I know, lame joke - geek humor ;-)

Before moving further, a word of warning - Do not use this framework for your project. There are plenty of great PHP frameworks out there - use one of those. For example…

These are professional, enterprise level frameworks. They are secure, well designed and documented. Use any of those when creating your site - do not use mine. There are no legal restrictions - the code for iFrame is under BSD License. These are the reasons why you should not use my framework…

Disadvantages

Documentation
Many Users of frameworks complain that there is not enough documentation. My framework has no such problems - it has no documentation whatsoever . They only way to find what a function is supposed to do, is to read the code.
Bugs
This system is developed, used and tested by just one person - me. So, there are many yet undiscovered bugs.
No ORM
Those who are in love with ORM will be disappointed when using iFrame - I have not implemented ORM.
Currently, only MySQL is supported
There is a database abstraction layer - but as of yet, only MySQL is supported.
And a lot more other reasons
The reasons why you should not use this framework is too numerous to list here.

Advantages

Despite all the given disadvantages, I will use this framework - these are the reasons for that…

Lightweight
This is the most lightweight framework that I have ever seen.
Helpful functions that reduce coding time

All my PHP functions are available in the framework - If you know how to use them, these functions save a lot of time. For example…

Encourages clean code
iFrame is an MVC framework(although the ‘Model’ is a bit limited for now). By default, each controller has its own folder and each action has its own file. This will greatly increase the number of files - but will reduce the number of lines in each file. Some might find it hard to use - but I find it more manageable this way.
A lot of cool features
I will talk about these ‘cool features’ in the next post.

Code

What good is a framework without the code…

View the iFrame code online

You can get the code from my subversion server - use this command…

svn checkout http://www.bin-co.com/php/scripts/iframe/code/ iframe

Jus5 - Light Weight CMS

Monday, May 7th, 2007

As promised in my previous post about the release of Nexty, I want to announce my new project - Jus5. It is not exactly ‘new’ - I have been working on it for a couple of weeks. Jus5 is a light weight CMS. It is also a total failure :-(

Download Jus5 (Updated)

See Jus5 In Action

What is Jus5?

Jus5 is perhaps the smallest Content Management System. The system only requires 9 files(less than 100KB) - without the editor. The entire system can be compressed into just 2 files - but my conscience is not letting me do that.

Features

Jus5 is a Lightweight CMS that can be used to create and manage smaller sites. It includes only the most essential features of a CMS tool.

  • Customizable Themes
  • Add/Edit/Delete Pages
  • Add/Edit/Delete Categories
  • mod_rewrite support(User Friendly URLs)
  • Client/Admin Model
  • Single Admin
  • WYSIWYG Editor Support(TinyMCE)
  • Easy to Install/Use
  • And More…

Purpose

The purpose of this software is to let people set up micro sites with the least amount of troubles. My aim is this - the web master copies the files over to the server and calls up the location in the browser and the system is in place. No configuration - no editing config files - no going through wizards to set up this software(ideally).

A good example for this is sourceforge sites - ie. the web hosting support that sourceforge site provides for open source projects. I have some OSS projects in sourceforge - and each of them have a site - nexty and bdir. The problems with this is, the site is too limited to use a professional CMS tool like Drupal or Mambo. The only other options is to manage it manually. This is what I have been doing so far - and it is getting a bit tedious.

Enter Jus5 - just upload the necessary files to the server - and you have the system running!

At least that was the plan.

Problems

If you have been in the Web development field for some time, you will immediately spot the problem when I said that I want the program to have zero configuration. You will know that at the very least, the user have to provide the database connection details.

But there is one method that can be used to overcome this limitation - SQLite. I used this method to create the entire application. The problem is not all servers have SQLite support in PHP. SourceForge don’t!

As a result, I have added MySQL driver support to this system - but now the user must configure the system before running it. Not what I wanted.

With that change I am releasing a ‘working’ version of Jus5. Please remember that this is a beta release - expect broken stuff. Don’t use it in a production system.

PHP Session issue in SourceForge Hosting

Thursday, May 3rd, 2007

If you are using sourceforge to host your project, be careful when using the web hosting provided by them - it’s session handler for PHP is broken. I learned this the hard way when I tried to set up a demo for my latest project.

Many other have found this problem as well. You you have actually gone through the SourceForge documentation, you will find that this issue is documented.

Nexty had this problem as well - but back then, I thought it was a problem with sourceforge’s caching mechanism. Now I know that it is an issue with their session management.

Just an FYI

Nexty 1.0 Released

Monday, April 30th, 2007

Nexty Logo

Remember Nexty, the easy to use to-Do list manager using GTD principles? Well, that is ready for public release.

Nexty is a easy to use GTD tool created in PHP. It can be installed in a local server or in a online web server. The core idea behind this software is simplicity. I wanted to make a GTD tool that is the most easy to use.

Nexty Links

The next project is ready - watch this space for its announcement.

Subscribe to Feed