Development Information

February 17, 2011

MiniMVC 1.0.1 → 1.0.2

Filed under: Updates — judda @ 12:15 am

Thanks to Salathe, the .htaccess file may actually make sense.  A minor update was also made for the URI helper.

December 31, 2010

Mini MVC – Form Builder 1.0.8 → 1.0.9

Filed under: Updates — judda @ 10:14 pm

Updated the Form Builder for the following two input types:

  • Checkbox – the value will which is set will now enable and disable the checked value rather than set the ‘value’ attribute of the input element.  The value which should be passed in should be a boolean (TRUE/FALSE).  The posted value will also be returned as TRUE if the checkbox was posted checked.
  • File – the element in the value array will now contain information about the actual uploaded file rather than not be present

December 21, 2010

Mini MVC – Form Builder 1.0.7 → 1.0.8

Filed under: Updates — judda @ 7:20 pm

Tiny update but huge effect.  As was pointed out by Xylogeist, the setValue function for forms wasn’t working at all.  This has now been fixed.  Goal for next year will be to add Unit Tests so that slight of keys don’t show up any more and break the application :).

Thanks Xylogeist for pointing it out!

November 28, 2010

Potential Database Class Rewrite

Filed under: Updates — judda @ 4:51 pm

Hey guys,

Within the next few weeks I’m going to go into a complete recode for my database class. Because of this, I want to know if you guys can think of anything else which would make it even more powerful / that you would like to see implemented with it.

A few of the changes that I am thinking of are as follows:

i) Adding the ability to specify a location for a parameter to bind to – i.e. if I have a query where I am binding the same variable several times, i.e.

SELECT `username` FROM `trades` WHERE `ownerId` = %u OR `offerOwnerId` = %u

Where we are looking for everything from a single user (i.e. ownerId or offerOwnerId is one user’s user id). Currently you would have to bind it as:

$db -> query ( 'SELECT `username` FROM `trades` WHERE `ownerId` = %u OR `offerOwnerId` = %u', $userId, $userId );

I’m thinking of changing it so that you only need to provide the query function with $userId once. So now the structure of the query would be as follows:

SELECT `username` FROM `trades` WHERE `ownerId` = {0:u} OR `offerOwnerId` = {0:u}

Where the 0 is the element it will bind to the query (i.e. 0 is the first parameter, 1 would be the second and so on) then you could bind to the query like:

$db -> query ( 'SELECT `username` FROM `trades` WHERE `ownerId` =  {0:u} OR `offerOwnerId` = {0:u}', $userId );

ii) Change the parameter binding away from the use of the percent signs (i.e. %u) to using the curly braces (i.e. {u}). I could deprecate the use of the percent sign so anyone with the code written in the original format would receive deprecated warnings throughout their code when their queries are still running using the old syntax.

iii) Change all error messages to provide E_NOTICE when you have invalid parameters.

That is all I can think of for now. Anyone else have any suggestions on improvements?  If you do, please post them within the comments.

Thanks,
Andrew

November 20, 2010

Mini MVC – Form Builder 1.0.5 → 1.0.6 → 1.0.7

Filed under: Updates — judda @ 1:24 pm

Version 1.0.6:

  • Fixed a minor inconsistency where the names and ids were being generated in different orders.

Version 1.0.7:

  • Changed the form’s value array so that it only contains checkboxes if the box has been checked (i.e. similar to the way that $_POST does it)
  • Validated the HTML being emitted

November 7, 2010

Mini MVC – Form Builder 1.0.4 → 1.0.5

Filed under: Updates — judda @ 5:54 pm

Small update:

  • Added a ‘value’ array to the form object so instead of accessing information through either the $_POST/$_GET array, you will grab it through $form -> value
  • Added getElementId function – takes in the field name you want the id of and returns the unique id which is generated for the field

October 30, 2010

Mini MVC – Form Builder 1.0.3 → 1.0.4

Filed under: Updates — judda @ 9:58 am
  • Added in a setValue function to the Form Builder Object in case you don’t know what the value is when you create the new element.
  • Updated the documentation

October 24, 2010

Links Update

Filed under: Site Update — judda @ 5:17 pm

I noticed that the list of links was getting relatively long, so instead of adding more on the side bar, I have created a page for all of the previous versions of the applications I have made.

Mini MVC – Form Builder 1.0.2 → 1.0.3

Filed under: Mini MVC Information,Updates — judda @ 3:38 pm

After the previous update to the Form Builder, it was mentioned to me that the placing of each element in it’s own div was no longer required. This update removes those divs and just causes the straight HTML to be returned from the toHTML functions.

October 3, 2010

Mini MVC – Form Builder 1.0.1 → 1.0.2

Filed under: Mini MVC Information,Updates — judda @ 2:07 pm

After using the Form Builder, I realized that one part of how it was originally implemented made it extremely hard to use. This has now been fixed.

Instead of returning a string of the output from the actual object, the output is split into two sections:

  • FormBuilder::HTML – The HTML for the actual input element
  • FormBuilder::LABEL – If a label is present, the label part of the input field
« Newer PostsOlder Posts »

Powered by WordPress