Jump to content
xisto Community
Sign in to follow this  
signatureimage

PHP: Experiences With Project Management A Project Management tool written in PHP

Recommended Posts

On a suggestion from M^E, I went to the site of Andreas Norman

at subzane.com in Sweden.

 

A number of PHP applications can be downloaded from that site.

 

One of the applications was of interest to M^E, so I selected

the SZProjectManager.

 

Simply unzipping the SZProjectMngr.zip into its own folder

on the Apache web-structure was not sufficient to run the application.

 

A second visit to subzane.com was needed to obtain the packages:

- MySQLHandler

- BlobHandler

- ImageHandler

 

These packages are the "helper" packages, that offer a number

of additional PHP functions, needed by the SZProjectManager application.

 

Here are the steps needed to prepare the four packages:

 

(1) First, from the package MySQLHandler, modifications are to be done

in the PHP file: MySQLHandler.class.php

 

This file contains the code that prepares a number of PHP variables,

with the values that are specific for a given installation.

We are talking here about the 4 values that need to be set in every

application that makes use of a mySQL database:

 

$SERVER = "__";$USERNAME = "__";$PASSWORD = "__";$DATABASE = "__";

So, I changed the 4 values to the ones that are specific for my home test-server.

 

(2) Next, I noticed that the packages BlobHandler and ImageHandler both came with

a PHP file: header.inc.php

 

Because the content was different, but the usage of the files were similar, I opted to merge the content

of both files, and store the combined result on the Apache web-structure.

 

<?require('MySQLHandler.class.php');require('BlobHandler.class.php');require('ImageHandler.class.php');$sql = new MySQLHandler();$sql->Init();$BlobHandler = new BlobHandler($sql);$ImageHandler = new ImageHandler($sql);//----------------------------------------------// 2005/04/24 MERGED:// BlobHandler/header.inc.php// ImageHandler/header.inc.php//----------------------------------------------?>

(3) Now it was time to investigate the options of my home test-server PHP installation.

Some versions of PHP - even some sub-versions - differ in the handling of PHP statements and functions.

For example, the SZProjectMngr applications makes use of the PHP function file_get_contents() which is a PHP 4.3.0 function.

So, it was time to update my home test-server PHP compiler.

 

(4) Another option that is specific to a given PHP installation is the register globals setting.

For those not familiar with PHP register globals, here is a short intriduction:

 

When the PHP option register globals has the value ON, all the HTML FORM variables that

arrive from the surfer's browser - via HTTP - in the PHP engine, will automatically become

PHP variables, immediately available for your PHP code.

Easy, but also dangerous.

 

So, the latest default setting is: register globals OFF

 

What does this mean?

Well, your PHP now needs to specifically request the content of the HTML FORM variables

by using the $_GET['varname'] or the $_POST['varname'] constructions.

 

A more general modification of older PHP code can be obtained with

the quicker extract($_GET) or extract($_POST) function.

 

This is what I inserted into each PHP program from subzane.

 

 

(5) So, after the inspection of the downloaded PHP code,

it was time to look at the mySQL database definitions.

 

The SQL to create the tables that are required by the SZProjectMngr application, and the tables

that are required by the 3 helper packages were provided in the download.

 

So, up with the browser, and quickly surfing to the home test-server myPHPadmin pages.

 

First we had to create a new database - whose name is to be reflected in the

$DATABASE = "__"; statement of the PHP file: MySQLHandler.class.php -

and I selected SZProjectMngr

 

Then with the myPHPadmin

the BlobHandler.sql ,

the ImageHandler.sql , and

the SZProjectMngr.sql

were run, which resulted in the creation of the

empty mySQL tables needed by the application.

 

The BlobHandler Table:

CREATE TABLE blobs (  id bigint(14) unsigned NOT NULL auto_increment,  file_name varchar(50) NOT NULL default '',  data longblob NOT NULL,  file_size varchar(10) NOT NULL default '',  mimetype varchar(30) NOT NULL default '0',  extension varchar(4) NOT NULL default '',  checksum varchar(10) NOT NULL default '',  PRIMARY KEY  (id),  KEY id (id)) TYPE=MyISAM;

The ImageHandler Tables:

CREATE TABLE db_images (   id bigint(14) unsigned DEFAULT '0' NOT NULL auto_increment,   image longblob NOT NULL,   file_size varchar(10) NOT NULL,   width int(4) unsigned DEFAULT '0' NOT NULL,   height int(4) unsigned DEFAULT '0' NOT NULL,   extension varchar(4) NOT NULL,   PRIMARY KEY (id),   KEY id (id)) TYPE=MyISAM;CREATE TABLE db_thumbs (  id bigint(14) unsigned NOT NULL auto_increment,  thumb longblob NOT NULL,  file_size varchar(10) NOT NULL default '',  width int(4) unsigned NOT NULL default '0',  height int(4) unsigned NOT NULL default '0',  PRIMARY KEY  (id),  KEY id (id)) TYPE=MyISAM;CREATE TABLE db_image_mapping (  id bigint(14) unsigned NOT NULL auto_increment,  image_id bigint(14) unsigned NOT NULL default '0',  thumb_id bigint(14) unsigned NOT NULL default '0',  PRIMARY KEY  (id),  KEY image_id (image_id,thumb_id)) TYPE=MyISAM;

The SZProjectMngr tables:

## Table structure for table `project_categories`#CREATE TABLE project_categories (  id int(11) unsigned NOT NULL auto_increment,  category varchar(30) NOT NULL default '',  description text NOT NULL,  PRIMARY KEY  (id)) TYPE=MyISAM;# --------------------------------------------------------## Table structure for table `project_dependencies`#CREATE TABLE project_dependencies (  project_id int(11) unsigned NOT NULL default '0',  dependent_on_id int(11) unsigned NOT NULL default '0',  KEY project_id (project_id,dependent_on_id)) TYPE=MyISAM;# --------------------------------------------------------## Table structure for table `project_history`#CREATE TABLE project_history (  id int(11) unsigned NOT NULL auto_increment,  project_id int(11) unsigned NOT NULL default '0',  version varchar(5) NOT NULL default '',  body text NOT NULL,  PRIMARY KEY  (id),  KEY project_id (project_id)) TYPE=MyISAM;# --------------------------------------------------------## Table structure for table `project_screenshots`#CREATE TABLE project_screenshots (  id int(11) unsigned NOT NULL auto_increment,  image_id int(11) unsigned NOT NULL default '0',  project_id int(11) unsigned NOT NULL default '0',  name varchar(50) NOT NULL default '',  description text NOT NULL,  PRIMARY KEY  (id),  KEY image_id (image_id,project_id)) TYPE=MyISAM;# --------------------------------------------------------## Table structure for table `projects`#CREATE TABLE projects (  id int(11) unsigned NOT NULL auto_increment,  date bigint(14) unsigned NOT NULL default '0',  last_update bigint(14) unsigned NOT NULL default '0',  source_blob_id int(11) unsigned NOT NULL default '0',  example_blob_id int(11) unsigned NOT NULL default '0',  binary_blob_id int(11) unsigned NOT NULL default '0',  category_id int(11) unsigned NOT NULL default '0',  name varchar(30) NOT NULL default '',  short_description varchar(255) NOT NULL default '',  description text NOT NULL,  price varchar(50) default NULL,  platforms varchar(20) NOT NULL default '',  version varchar(5) NOT NULL default '',  forum_topic_link varchar(255) NOT NULL default '',  demo_link varchar(200) NOT NULL default '',  downloads int(10) unsigned NOT NULL default '0',  PRIMARY KEY  (id),  KEY source_blob_id (source_blob_id,example_blob_id),  KEY binary_blob_id (binary_blob_id),  KEY category_id (category_id)) TYPE=MyISAM;

 

 

SZProjectMngr:

 

(6) So far, so good. Time to start the SZProjectMngr application.

 

 

First, an explanation.

What is this SZ Project Manager?

What is the target audiance?

 

Well, there are 2 types of users for the SZ Project Manager application:

 

First there are the people who offer the results of a project.

Their web application starts with project.list.php

 

Then there are the people who consume the results of a project.

Their web application starts with page.php

 

 

The first thing that has to be done by the offerers - or project owners - is the declaration of

a number of project categories like Gaming, Tools, Utilities, Imaging, Office, Compression, and so.

 

Then it is time to add the projects,

- place them into one of the Categories,

- specify the OS Platform it is written for,

- give the Version of the project,

- and upload the 3 possible project files:

--- a binary file

--- a source file

--- a sample file

 

As a supplement, screen-shots and history information can be added.

 

As could be deducted from the database tables created, these

project files will be stored inside the mySQL database as BLOBs

(Binary Large OBjects)

 

 

 

Evaluation:

 

My evaluation of the SZProjectMngr package:

 

This package is aimed at presenting to the consumers of your projects

the files that can be downloaded from your web site.

 

It is therefore not a Project Management application that can be used

during the life-cycle of your project, where the persons that participate

in a project collaborate together on the same repository of files that comprise a project.

 

And this is generally more than 1 executable, 1 source and 1 sample.

 

Besides the sources of the programs that will eventually result in a finished project,

other files are to be stored, with their versions and modifications.

 

Like project plans, project time-sheets, project meetings-notes, project test-data,

project resource-estimations, and more.

 

An application that can manage this kind of information is what M^E was

looking for, I thought.

 

SZProjectMngr is not that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.