Saturday, August 18, 2007

New Host! New Home!

Friday NightMy new setup is quite comfortable. Hosting by Joyent running on a Shared Accelerator using Mongrel proxyied through Apache to run a Rails application known as SimpleLog with a green inspired simple style theme created by Myself using a new CSS framework called Blueprint.

From the time my DNS change went through it took only about an hour to get the whole thing up and running. Although while typing this I am still waiting for a Mongrel port, running Mongrel by hand works just fine.

The setup was good timing because Andrea is working late and I am still trying to wrap my head around all the upcoming decisions needed to be made about wayne.edu. I am now the Interim Web Manager in the Marketing Department. With the new position comes some new goals and I am currently putting them together and hope to bring my experience with high load shared server environments in some upcoming articles.

Eventually all my old archived articles from my blogger account will get moved over, I just need the motivation to do it.

New Blog URL: nickdenardis.com

Wednesday, August 15, 2007

Planning a Future

Making Connections. Helping Out. Advancing. Upgrading. Living.

Life is too short to sit and let it pass you by, get noticed and stand out.

It will be worth it, don't look back while moving forward.

Tuesday, August 14, 2007

Bumps Road Moving to TextDrive

So I thought moving was easy... I thought wrong. Yesterday I decided although my new site was not fully complete in development that I would sign up for TextDrive (Joyent) hosting and get everything setup so in the next week I would be all ready to launch the new site. I picked my plan, put in my CC info and then waited... three minutes to be exact, and I was not surprised to see a large "Opps something went wrong" page. After checking my email I noticed that I did get an email saying my CC was charged but what was odd was their was no invoice number. Fearing I would be double charged I didn't resubmit my CC info and clicked their friendly Help link. I submitted a ticket outlining all my steps and intentions and waited...

My current host (not blogger) but for my client work always respond within 30 minutes with at least a We see the issue and we will get someone working on it. But every hosting company is different so I thought I would just wait it out. Well it is 24 hours later and still no response. All that has changed was it was assigned to a "Chris Morris". So I put in a response confirming that 24 hours have gone by and asking if they had an estimated time frame for responding to issues. That was three hours ago and still no response.

So I am trying my best to keep it positive but if this is the way a hosting company treats its potential customers they better have some damn good servers and uptime.

Sunday, August 05, 2007

Working with Blueprint: A CSS Framework

SimpleLog base installSo I decided to change my blogging software, from no software (Blogger) to SimpleLog. I setup everything up in my dev environment and it was by far the easiest setup I have seen so far. Took about 10 minutes including setting up the virtual hosts.

While getting super interested in my blog again I was looking for some nice examples of css blogs to get inspired I stumbled upon Blueprint, which is a css framework so I decided to give it a whirl.

First impressions it is super lightweight and non-intrusive, just two lines that have to be added. to the head which includes the style sheets. My only gripe so far was that they just include one grid option which is 14 columns, its not a big deal all that I think it needs is a few other background images to show the options of columns from the grid. Like 7 columns, 3x8x3 and so forth.

nickdenardis.com in progressSo I hit up Photoshop and came up with a basic color scheme and outline for the new blog. Took about a day of going back and forth on how much I wanted to add to the site but being inspired by rails iterative approach to programming I decided to stick with the simple and expand from there.

Back to Blueprint, with my design it ended up being very easy to implement in blueprint. It doesn't have anything nested tho which I was really interested in since it looked to handle nesting very gracefully. I tried as hard as I could to make this design fit into a 14 column grid but I made the design decision to keep the width at 780 instead of Blueprints default of 960. But not to fear we are just working with css here all I did was just override two of their default widths in my screen.css to keep the integrity of their files in case I decided to upgrade them in the future it will be fully degradable.

Their reset.css worked great, I am use to using Eric Meyers reset.css and then creating everything from there. But Blueprint had an unexpected typography.css which setup quite a bit of the default typography. Which was a huge time saver, because Eric's just leaves you out in the cold to setup everything on your own which is totally cool if your project warrants it but sometimes there are elements that get introduced and have no control over.

SimpleLog + Blueprint BaseSo setting up a new template in SimpleLog was easy and I started editing the site.rhtml layout to use the naming conventions per Blueprint. Just a few class changes and I removed some default SimpleLog items that I didn't include in my final design and boom! We have an outline!

Fast forward through time, 26 css declarations and 3 images later and my homepage was almost done. Time in total was about 2 hours to copy and setup an entire new template with SimpleLog and Blueprint. I was amazed, usually I hate when things try to be "smart" and assume they know what options and action you are going to preform but Blueprint didn't get in my way at all. Since everything for the base elements was already setup I just used my ID's and Classes to extend the base and life was good.

Although I was just concentrating on the homepage today flipping through all the other pages they didn't look that bad by default. SimpleLog uses a lot of the same css names and conventions throughout their pages meshed with Blueprints base styles and my overrides the only things left to do were the specifics of the page.

Initial design for nickdenardis.com

Last but not least, my current host is not very Rails friendly so I am looking for a new host for my blog. While doing that I will continue to update here and work on the new version on my dev server. So far:

SimpleLog: A+
  • Ton of features and rock solid. Easy install and great documentation. I have not looked into any extensions or plugins yet but there are a few areas where I can see a few more helper functions. But for getting a blog up quick and painless SimpleLog is the way to go.
  • SimpleLog Website

Blueprint: A-
  • For just being at 0.3 release it is a huge time saver, its not just the resets for cross browser compatibility but it also includes a good typography and print styles which I have always been looking to create. I hate going through and trying to think of all the HTML elements a client could potentially use and make sure they are set accordingly. Blueprint defiantly has a future in my web development life and releasing it to the community will only make it better.
  • Blueprint CSS Framework Website

Tuesday, July 24, 2007

Dial Up North

Dialup sucks, everyone knows it, but it is cheap, free in most cases. Recently MichNet cut all its subscribers off of their dial up internet service which Wayne State was part of so we were in the market for a dial up service to connect to the net upnorth. I decided on NetZero mainly because it was free. My review of the software is that it Sucks. I have used dialup for a while now upnorth but this service is the pits, the free one installs a toolbar on IE, for a while I could not get any other application to connect to the net besides IE which is a real bummer if you need to use SSH or an IM client. But eventually like magic applications began to come online, I cannot explain it but it made me happy.

It really put things into perspective for me again on how a lot of people still view the net. It was so slow at some times that I eventually disabled images and then things were flying quite well, but it really showed off which developers have the skill to accommodate this slow pace world. Some things I noticed that really helped were:
  • Using a background-color approximately the same color as an image background. This way if the image background does not load then the text on top still have a background color to contrast against.
  • Combining images and use background positioning to put them in place. This dramatically reduces the number of images to load. Like I mentioned before images were the real killer of speed when using dial up. Better yet if you can use background colors instead of images it really speeds things up without loosing design points.
  • Combining Javascript files and using a compressor. This is a no brainier it take almost no effort and helps with slow and fast connections. JS files can get large and they don't have to be, I recommend using an automated compression tool called Minify. Really easy to use and
  • AJAX. It is odd but it really kept me on sites with AJAX for a longer period of time because the site seemed snappier and I didn't have to wait for the whole page to load over and over again.
  • If you have image/flash ads on your site really sit back and think if slowing down the information on your site to a portion of internet users is really worth the few cents you may get from them clicking on the ads. Content is king, if a dial up user cannot get to your content because of a large flash or image ad on your site they will more than likely go someplace else that is dial up friendly.
Slowing things down really puts the little things into perspective. And it is the little things that matter in life.

Tuesday, July 17, 2007

IP Changed :-?

So we have had cable internet for probably 12 years now, it first started out with Excite@Home and which got bought out by Comcast. Well in those 12 years I have only had two IP's, one for Excite which was pretty much static 24.*.*.* Those were the good old days when there were no limits and they did not try to control everything. And one for Comcast which is essentially dynamic but i have had to reset my router a few times and it has always come up with the same IP 68.*.*.* Well all of a sudden yesterday of all days they decide to change my IP randomly, without me even renewing it from the router. They changed the whole IP even, doesn't even start with the same A class 69.*.*.*! Now it is more complicated and I have to change all my hosts files on my machines to match :-/ What a hassle, im done venting...

Blogged with Flock

Monday, July 16, 2007

PHPSimpl 0.8.2 Feature Update

Just keep adding features
So after some time working with the current release we noticed some areas where improvement was needed. So what did we do? We improved in all the wonderful ways below:
  • Added a debug.log file to debug a live site in real time, best used with "tail -f"
  • Added the ErrorMessages() function to summarize a forms errors, similar to Rails.
  • Added the SetConditions() function so querying for >, <, <=, LIKE and OR's are all possible now.
  • Added a Get and Set Folder name functions in the Folder Class.
  • DisplayList() now uses the options of a field to display in the list.
  • RowsAffected() now works like it should.
  • Fixed the Debug Query to work again.
Its a Recommended Update
Questions or Comments? Feel free to leave them in the PHPSimpl Group. There is always someone to help available. By the way we love feature requests, keep them coming.

Sunday, July 15, 2007

Getting Things Done.

Time has been flying. We have under a year now till the wedding and I have really been trying to get alot of things out of the way and on the right track.

First is getting rid of a ton of junk that has been collecting over the years. I threw away all my old computer stuff, just left a few parts which were actually worth some money. And am down to two computers and a laptop.

I have been putting things up on eBay randomly. Right now I have two old phones and a bluetooth adapter. My mindset is if i have not used something in three months to get rid of it. I have really been trying to minimize the clutter in my life.

I have been using Ruby on Rails more and more and it has grown on me, it is simple, straight to the point and a real enjoyable experience.

I have also started jogging every day. I got to a point where my appearance really started to bother me and I needed to do something about it. I really have been enjoying jogging and it actually has given me alot more energy.

I recommend for anyone else who really needs a push into productivity to read both Getting Real and Bit Literacy.

Blogged with Flock

Monday, July 09, 2007

Understanding Rails Partial's

Partial's are great, i really wish there was something as straight forward in Smarty. With Smarty it would require a loop and an include, but partials roll that all into one. It great when you are displaying a list of items, especially if that list can be used in multiple pages in many contexts.

With PHP you would have to:
{include file='links.tpl' title='Newest links' links=$link_array}
Then in links.tpl do the loop:
<div id="box">
<h3>{$title}{/h3>
<ul>
{foreach from=$links item=l}
.. do stuff ...
</foreach}
</ul>
</div>
But Rails on the other hand if you pass a collection to a partial it automatically treats each item in the collection as an individual item and there is no need to create a loop it is done inheritly.

Rails:
<%= render :partial => 'list_item', :collection => @customers %>
_list_item.rhtml:
<tr class="<%= cycle('odd','even') %>">
  <td><%= link_to list_item.last_name,
  :controller => 'customer',
  :action => 'show',
  :id => list_item.id %></td>
  <td><%= list_item.first_name %></td>
  <td><%= list_item.city %>, <%= list_item.state %></td>
</tr>
You may be thinking that it is really not much less work but writing loops all day long can get tiring especially when they are look the same and do the same thing. Partials take it to the next level and add a real intuitiveness to the loop because it is not just an array of items you are looping through it is actual objects a template is being rendered with.

Partials can also be used without the collection in just a basic include of a sub template the syntax is below. Useful but I have not found it as much fun.
<%= render :partial => "account", :locals => { :account => @buyer } %>

Blogged with Flock

Sunday, July 08, 2007

Starting a Rails Life

My rails life seems to be starting out similar to my php life. It all began with an internal application for my dad. He has a music instrument sales, rental and repair business and he initially did everything on paper to keep track of customers, instruments and billing. I took it upon myself to create a web based application for him to keep track of all of it. It was my first php application written in php3 and run on a small server here in the house. It is amazing that it is still running and he still uses it.

That was 7 years ago and looking back at the code now I cringe. Sometime in between there and now it was upgraded to php4 and it looks like that was a hack of a job. But since then my php life has expanded to the point of it no longer being a challenge. So what else would be a better way to start my Rails life than to revisit my dads billing application and recreate it with rails. Of course fixing all the issues with the current billing process and adding some additional features to make life easier.

To the right is a screen shot of the current functionality and design. I am currently just working on getting the layout squared away so functionality can be added without having to stop and think how it should look.  So far only 56 lines of code have been written and about 4 hours have been spent on the project, 2.5 being spent coming up with a design and 1 hour spent implementing and tweaking it. So far rails has been a dream come true.

Coming from php which is mainly mirrored from C++ I have always been use to the long hand conditionals. One thing that rails offers is the "unless" command. Compacting an if statement into one line that can be read without much difficulty. Here is an example of its use, probably not the most efficient but I am sure it will get tweaked once more come into play.
<%= ' class="selected"' unless controller.controller_name != 'customer' %>

Blogged with Flock

Friday, July 06, 2007

Making web development fun again

Web Development is a passion and like all passions they can become stale after a while unless you continuously look for a new technique to keep it fresh. I have become officially bored with PHP, dont get me wrong it is a great language but after developing in it for over 8 years you start to look for something new and exciting to get that same rush that you get when you learn and implement some new functionality.

Of course PHPSimpl has been a good release for me, it has really given me an outlet to expand my knowledge and take pride in building something that benefits more than just my development life. I am not stopping development on PHPSimpl, actually I think my additions and bug fixes will get increasingly quicker and better. I cannot leave PHP behind because the web is currently pretty much glued together with it.

I have fallen in love with Rails. After using a ton of PHP frameworks none of them really seamed to be straightforward and seamless. Rails on the other hand is not as get up and go as php it has all the requirements I have been looking for in a framework. Some of the excitement is from getting to learn a new language and the structure of a Rails app just make sense.

My dream has come true, No More Slop! PHP is like a blank piece of paper and a pencil, the graphite stays on the paper but it can go in any direction at any time. Its great for when you are feeling creative but horrible when you have to read someone else's paper, it might as well be in a different language. I have always tried to create some structure from PHPSimpl since I lead a team of three developers and we maintain 160+ sites.

I played around with Rails about 9 months ago while reading Agile Development with Rails and it really got me thinking about what else is out there. At that time I didn't take it too serious since I was already deep in a redevelopment which needed it badly. After a few months of PHP development on a large application that was not mine initially I was burned out. This past week I picked up Build Your Own Ruby on Rails Web Applications and read the whole thing, wow 400 pages I know... but the book was well written and went through the basics all the way to deployment. I recommend it for any developer looking for a change, even if you don't start developing in Rails it gives great insite on how the web should be and can be applied to any language. Agile Development with Rails is a little more intence and is a definite follow up read.

My Current Rails Envy:
  • MVC with a real structured generator
  • Database Migrations
  • Templating engine built in
  • Testing built in
  • Plugins
  • One line Scaffold for those quick apps
  • Fixtures
  • Simplicity of WEBrick
  • Logging like a mad man
I am in the process of changing to a more Rails friendly host and I will most certainly be writing my Rails entries. Its like starting my web development life all over again, its refreshing.

Blogged with Flock

Wednesday, June 27, 2007

Stress testing a site with Apache's ab tool, part 1

Apache's AB tool is a great way to really put stress on a server. I have compiled a list of the parameters I use to test my sites and applications.

First we have to make sure AB can hit the desired page and get the desired results. The most basic page is the homepage of a site, use the command below to send as many single requests as it can in 1 second
ab http://example.com/
But that is great and dandy but what happens if we want to try to stress a page that hits the database and has to do some actual dynamic work
ab http://example.com/search.php?q=Trees
Last but not least what if the site is behind a login that is an http form and not an htaccess form? That is where POST variables come into play, it is a little trickier but doable. Here is the command I use to hit a page behind a login.
ab -p ~/Documents/post.txt -T application/x-www-form-urlencoded -e http://example.com/manager/
Here is what my post.txt file contains:
email=test@domain.com&password=testing&submit=Login
Next we need to get these results to a file so we can work with them and have a record of progress as we tweak our site. It can be done with the "-e" parameter. An example is below:
ab http://example.com/search.php?q=Trees -e ~/Documents/results1.csv
What that does is hits the search page and puts the results in the results1.csv file. It is useful to put the file at the end of the command since you will want to change the filename on each run to keep a history of your results.

The csv file is separated into two columns. The first is the percentage complete and the second is the time in ms that it took to get to that percentage.

The first thing you want to look at is the zero percent. This is your latency, it is the amount of time it takes to fulfill the first request. You want this number to be as low as possible. I am running my site on a development server on my local network so the times will be lower but at the end I will show the results from the testing server.
ab -p ~/Documents/aci_post.txt -T application/x-www-form-urlencoded -e ~/Documents/aci_output.csv -kc 10 -t 10 http://aci/manager/makes.php
Hold tight, more coming soon...

PHPSimpl 0.8.1 Maintenance Update

Cleaning up after a release.
Thanks to everyone who has been using and testing PHPSimpl. After our first official release we wanted to squash some bugs, here is a list of the updates in 0.8.1:
  • Slightly Updated Example
  • Fixed the form label "?:" issue
  • Better support for tables without a primary key
  • Fixed the SimpleFormat to display values properly and renamed it to Nice()
  • Change DB now counted as a query
  • View() now goes off the default field display first
  • Security Updates related to SQL injection
Its a Recommended Update
Questions or Comments? Feel free to leave them in the PHPSimpl Group. There is always someone to help available. By the way we love feature requests, keep them coming.

Friday, May 11, 2007

PHPSimpl 0.8.0 Final Released

Everybody Dance! PHPSimpl has reached its 0.8 release!
We have been working hard the last few weeks to get PHPSimpl release worthy and the day is finally here! Included in the release are:
  • SetOption now accepts objects
  • Compressed the JS and CSS for the calendar
  • Change the time fields to human readable format
  • Fixed issue with Save() and display_order
  • Minor bug fixes
  • A more robust example
  • Full documentation for the classes with final API's
Want to try it out?
Questions or Comments? Feel free to leave them in the PHPSimpl Group. There is always someone to help available. By the way we love feature requests, keep them coming.

Thursday, April 26, 2007

PHPSimpl 0.8.0 RC1 Released

PHPSimpl 0.8.0 is feature complete and is posted on Google Code. The release candidate will be up for about a week and we will not be adding any more features or API changes. We are only concerted with bug fixed and security issues. Please download it if you are interested in giving it a try and let us know what you think. The final will be out in about a week and we are hoping to have a more feature complete example in it.

The Links
Please submit any bugs to the Issue List.

Wednesday, April 18, 2007

PHPSimpl 0.8.0 Beta 1 Released

The first beta PHPSimpl has been released to the public. You may be wondering why we decided to start at 0.8, well we have put together a Version History in the wiki and also a short Road Map. We have been using some form of a DbTemplate at WSU for a while now it just has not been public. Over the past two years it has continued to grow and strengthen. After submitting it to google code initially we knew it still needed some work and we took on the challenge of creating a solid framework that could be easily implemented and rapidly create applications with minimal configuration.

The Links
Remember this is just a beta, there is still some polishing to do. Although it is working this is still considered Beta software. Please submit any bugs to the Issue List.

Tuesday, April 17, 2007

Multiplication

The MultiForm() function is here. It allows an entire form or just one form field to be displayed with the [] brackets on the end of the input name. This allows the form to have multiple copies of the same fields in the same form without anything getting overwritten or any additional setup.

Here is how it is used:
// Create the Address
$myAddress = new Address;

// Get a list of all their addresses
$myAddress->SetValue('customer_id', $myCustomer->GetPrimary());
$myAddress->GetList();

// Display all their current addresses
if (count($myAddress->results) > 0){
foreach($myAddress->results as $address){
$myAddress->ResetValues();
$myAddress->SetValues($address);
$myAddress->MultiForm();
}
}
Here is the output:

Sunday, April 08, 2007

A More Centered API

Its been a while but we have been working hard on an API that is going to withstand the test of time. This will make Simpl more expendable and not require as many application code level changes in the future.

These function have been added to the Form() Class:
SetDisplay($fields) -> Boolean
SetHidden($fields) -> Boolean
SetOmit($fields) -> Boolean
SetOptions($options) -> Boolean
SetConfig($config) -> Boolean
They can make the DbTemplate and Form classes a lot easier to work with. Here is an example of how to declare a class with these new functions:
class RSVP extends DbTemplate {
/**
* Class Constuctor
*
* @param $data array
* @return null
*/
function __construct($data=''){
// Setup the required fields
$required = array('first_name', 'last_name', 'email', 'phone', 'is_attending');
// Setup their labels
$labels = array('first_name' => 'First Name', 'last_name' => 'Last Name', 'email' => 'E-Mail', 'is_attending' => 'Attending');
// Setup the examples
$examples = array('email' => 'name@domain.com');

// Call the Parent Constructor
$this->DbTemplate($data, $required, $labels, $examples, 'rsvp', '', 'my_database');

// Set the Display
$display = array('first_name', 'last_name', 'email', 'phone', 'is_attending');
$this->SetDisplay($display);

// Add a validation Type
$this->Set('validate','homepage', 'url');

// Set the defaults
$defaults = array('is_attending' => 1);
$this->SetDefaults($defaults);

// Set the Options
$options = array('is_attending' => array('1' => 'Yes', '0' => 'No'));
$this->SetOptions($options);

// Set the Config
$config = array('is_attending'=>'radio');
$this->SetConfig($config);
}
}
Now the display and the config information follow the class where ever it is used. Also the default values can be used to set up the form before the user enters any information.

Example of this being used on the page:
// Create an RSVP Instance
$myRSVP = new RSVP;

// Display the form
echo '<form>';
$myRSVP->Form();
echo '<input name="submit" value="Save" type="submit">';
echo '</form>';

Saturday, March 10, 2007

PHP Sessions in a Load Balanced Environment

One thing that we struggle with in our server environment as many others do is doing load balancing and being able to sync session data between all the machines. Having one dedicated session space or server can be an option but that can get a little messy or expensive. So we added MySQL Sessions to the Simpl framework and it is easy as pie to use.

Originally adopted from Joseph Crawford but implemented completely in Simpl. Josephs was great except it seemed to be connected to a larger whole. The bits and pieces were there for the session but they just needed to be combined with a framework. Below is a fully featured example working and usable.

Prerequisits:
  • PHPSimpl
  • MySQL Database Connection
  • "session" Table
    CREATE TABLE `session` (
    `ses_id` varchar(32) NOT NULL,
    `last_access` int(12) unsigned NOT NULL,
    `ses_start` int(12) unsigned NOT NULL,
    `ses_value` text NOT NULL,
    PRIMARY KEY (`ses_id`)
    ) ENGINE=InnoDB DEFAULT CHARSET=latin1 COMMENT='Used to store the sessions data';
Usage Steps:
  1. Download and copy Simpl to the web server.
  2. Define some base items
    // Directories
    // Always Include trailing slash "/" in Direcories
    define('DIR_ABS', '/usr/local/www/');
    define('FS_SIMPL', DIR_ABS . 'simpl/');
    define('FS_CACHE', DIR_ABS . 'cache/');

    // Enable Database Sessions
    define('DB_SESSIONS', true);

    // Database Connection Options
    define('DB_USER', 'username');
    define('DB_HOST', 'localhost');
    define('DB_PASS', 'password');
    define('DB_DEFAULT', 'site_data');
  3. Include the framework
    // Simpl Framework
    include_once(FS_SIMPL . 'simpl.php');
  4. Connect to the database
    // Make the DB Connection
    $db = new DB;
    $db->Connect();
  5. Use the $_SESSION super global just as you normally would and PHPSimpl does all the work for you.
The only modification may be the page cannot close the database connection since the _SESSION variable has to be written after the page is completely loaded and thus must still have the connection available.

Simpl and the $db object to all the hard work of redirecting the session data and pulling it from the database. No need to call a session_start() or even interact with the session table.

If you are interested in what the Session class looks like here is the source code:
Session.php

Sunday, February 18, 2007

Simpl API Documentation

So we started to document the Simpl API, which is quite a large task since we did not start the documentation process tilll the API was almost complete. Although Simpl has almost full JavaDoc documentation throughout the source it is a pain to open up the source every time you need to look up the parameters to a function call. So we started to document all the classes, functions, examples of their use and return values at the projects homepage wiki. Most of the classes are in there now and more will be added shortly. If you would like to contribute to the documentation effort just let me know and I can add you to the list.

Wiki:
http://code.google.com/p/phpsimpl/w/list

Base Classes:
http://code.google.com/p/phpsimpl/wiki/BaseClasses

New Simpl caching system

It has been a little bit but a few things have happened in the past month or so. We implemented a new caching system that will speed up the saving and retrieving of table cache to the filesystem. There is no change in the API, the only thing that you will notice is that the cache now has a "table_*.cache.php" naming format. This was changed to distinguish it from the other caches that have been implemented in the past month.

The other caching that has been implemented is the query cache. This is a simple system that is enabled by a boolean define named "QUERY_CACHE", if it is set to true every time a "SELECT" query comes through $qb->Query() it saves its results to a file. So next time the same query comes around there is no need to re-query the database for the same information it is already available in the cache. This query will stay in cache till $db->Perform() is called which at that time all the query caches are cleared out. We have found this is a significant increase in performance for large queries that require a few joins and sorting.

This also brings up the situation where possibly all the queries on the page are found in cache and we got to thinking why even bother connecting to the database unless we really need to. So Simpl now will not connect to the database until the first query comes by that could not be found in cache. We have found that this also improves performance especially if the database is on a separate machine. There is only one downside to this addition, when calling $db->Connect() it will always return true since it just stores the database information and waits for the first query, you will no longer be able to check on connect if the database is available or not, it will always look available.

The last functionality that was added was the deprecation of the "CLEAR_CACHE" define. Currently it is still working for backwards compatibility but will soon be removed. It has been replaced by the use of a GET variable that can be used on any page. There are two that will be able to clear specific caches and one that will clear all the caches.
page.php?clear -> Clears all the caches (table and query)
page.php?clear_query -> Clears just the query cache
page.php?clear_table -> Clears just the table cache
You can call these GET variables on any page that creates the "mySimpl" class and the cache will be cleared.