star uml, the best free open source uml flow charting software May 27, 2009
Posted by chris in : software , 3commentsA few months ago I was rummaging around my office for a copy of MS Visio, my favorite diagramming tool. Unfortunately I had misplaced it and did not feel like buying a new copy or swiping a pirated version. The free alternatives that I knew of at the time were lacking. My general opinion of most open source desktop software is not that high. The open source community has done great with web apps and server side software, but office tools aren’t really there yet.
Dia is aesthetically appalling and is prone to crashing and umlet is cumbersome and not much better looking. Enter Star UML. Star UML might even be better than Visio. Some of my favorite star uml features are the code generator (supports many languages including PHP), the documentation generator (exports to Word), and the ER diagram. Star UML supports UML diagraming with activity diagrams, use-case models, class diagrams, and many more. Additional extensions give you support for ER database diagrams as well.
I’ll actually write a decent-sized article this time since I feel many of the awesome features in Star UML are unfortunately poorly documented.
PHP Code Generator
The Code generator supports many languages by default, but you will have to download the plugin from the star uml website to get PHP support. Once the plugin is installed (done by simply dropping some files in a plugin folder). Click Tools, then StarUML Generator. In the select the checkbox to the left of “PHP 5 Code Generator v1.0″ and then click Next. Follow the remaining steps are your class diagrams will be converted into wonderful PHP 5 classes. The more time you spend following UML standards, the better the generated code will be.
ER Diagram
This is another plugin that can be downloaded from the Star UML project website. This one took some discovery to get working and unfortunately there isn’t a MySQL code generator for this yet. However the tool works pretty well. Once the plugin has been placed in the right directory and is installed (follow the directions on the project website) you can begin using it.
Open a new project. Select the default option. In your Model Explorer to the right you will see the name of your Model, probably called Untitled with a cube to the left of it. Right-click, select Add, then select Model. Name your model something, how about ER Diagram. Now right click ER Diagram and click Add Diagram, then select ER(IE) Diagram. Now to the left you will see some options for adding a table and linking tables through relations.
Lets add a table, name it anything. By default the table will not be what you want. I named by table “tbl_yo” which now appears in the model explorer. Select the table in the model explorer. In the tables properties (located just below the model explorer) there will be a value called Stereotype. Click the button to the right that has three dots. The stereotype you want to select is called table (ERD). Your table should look a bit different now (the table title is located just above the yellow square. Now add a column called yo_id. This can be done by double-clicking the table and clicking the greenish button. In the model explorer you will see yo_id below tbl_yo. Right click yo_id and select Tagged Values. Checking the PK box will make this a primary key and checking the FK box makes it a foreign key. Selecting either of these will change the logo next to yo_id in the ER view.
That’s all for now, more later. Post if you have any questions.
aptana php development environment 1.0 released December 12, 2008
Posted by chris in : software , add a commentYahoo News and the Aptana Blog are reporting that version 1.0 of the Aptana PHP Development Environment has been released. I’ve been using Aptana since it was in pretty early beta. It’s been fairly buggy in its syntax highlighting and lackluster in its PHP support. I’ve been disappointed in the ease of use of its Ajax library support as well (specifically for mootools which I do 90% of my JavaScript development in).

Aptana is based off eclipse, which does a decent job with Java (though most Java developers I know prefer Net Beans). Zend released version 6 of its PHP IDE using eclipse which I’ve been using on my desktop and I feel it took a step back in many areas. I’m not totally sold on eclipse. Nonetheless if Aptana is any where comparable to Zend IDE 6.0 then it might hurt Zend in the IDE industry.
Now that Aptana has officially matured IMO to a 1.0 web development environment I’ll be using it a bit more, check back in the coming weeks for my Aptana rant.
browser wars: uTest finds bugs in all browsers December 11, 2008
Posted by chris in : software , add a commentuTest, the open source software testing community, tested the newest beta versions of Internet Explorer 8, FireFox 3, and the Google Chrome browser. Chrome took the cake for having the most bugs 297, next was FireFox with 207, and Internet Explorer had the fewest with 168 bugs indentified.
So what does this mean? Not much really, just some news for nerds. We won’t be seeing any of these browsers for a few months and I’m confident that from a usability prospective they will work just fine.
convert php object to an array April 8, 2008
Posted by chris in : php, software , 2commentsI’m really surprised that PHP 5 does not have built-in functionality for converting objects into arrays. Basically I had an Ajax function sending me a javascript object in JSON format to my PHP method. My method was already setup to handle an array, so after decoding the JSON into a PHP object and passed the object into this function.
function objectToArray($object)
{
$array=array();
foreach($object as $member=>$data)
{
$array[$member]=$data;
}
return $array;
}
The problem with this method is that it will only move public variables into the array. Anything that is private cannot be accessed. You can try type casting your PHP 5 object to an array.
$array = (array) $this;
When I did this I got some really strange characters in the array. It does not seem that there is an easy way to convert a PHP 5 object to an array. Your best bet is to write a custom function that either converts your objects variables into array elements or if you are connecting to a database, just return the result set that builds the object in array form.
ajax im March 28, 2008
Posted by chris in : software , add a commentIs sweet http://www.ajaxim.com
Google Charts December 6, 2007
Posted by chris in : software , add a commentGoogle has created an API of sorts for making graphical charts. Its KIS.