Under the Code

PHP

The Codereck Model Generator

by Ryan Zec on Sep.02, 2009, under Codereck PHP, General Programming, PHP

I am up a little later than normal reworking my model generation code in the new version of my Codereck PHP framework. While all the back-end work flow is still the same, I have reworked the way I use XML in order to make the XML a lot smaller and easier to read.  I will post some code up later (once I figure out how to get a code highlighter with Wordpress working) but instead of using a bunch of tags, I have been able to compress the code by using attributes and in all honesty, I should have been using attributes from the beginning.  Changing this has reduced the number of lines in the XML file generated from an example database (with only 11 tables) from 750 lines to 135 lines (also note that I only needed to write about 15 lines manually and the rest was auto generated by the framework) which is 5X+ smaller in line count (file size is probably closer 2X smaller).  I imagine that the line count will range from 6X to 9X smaller with more tables.  While the file size reduction is not as dramatic as the line count reduction, the XML in none the less a lot easier to read.

1 Comment :, , more...

Looking for something?

Use the form below to search the site:

Still not finding what you're looking for? Drop a comment on a post or contact us so we can take care of it!

Visit our friends!

A few highly recommended friends...

Archives

All entries, chronologically...