PHP Development

Zend Framework - Mysqli - Socket Connections

I found my first real dislike / flaw in the Zend framework; it was easily fixed thanks to a write-up that I found online, but still annoying.

It appears that in the database adapter for mysqli within the ZF the use of a socket for your connection rather than directly from host was not permitted. There is an simple solution that I found at This website, and after making these adjustments to the zend library everything works fine.

The fix is as simple as adding $socket to an array that is then passed to the ZF connection protocol. I am very curious as to why the ZF team left out socket from the connection string for mysqli and not for other database adapters.

PHP Development

Zend Framework - Smarty or not to Smarty

I have immersed myself in the Zend Framework for the past 30 days; spending that time learning the ins-and-outs. I’ve started writing my first application utilizing the framework, and must say so far I am pretty happy with it’s flexibility. The learning curve is a bit higher than I had expected, but I attribute this to the vast amount of complexity involved in trying to make the application flexible.

In the development of the front end of my application I found myself at dilemma to Smarty or not to Smarty (or a derivative there of). I started researching the history of Smarty and other types of similar formated coding standards if you will, to better understand the real concept for using such a format. The classic and consistent argument is separation of application code from display code, in this instance the separation of php from html code. Which only brought forth further questions; from my perspective with a properly designed MVC application utilizing models to translate object code to visual representations, Smarty did not appear to be needed.

A quick and rough example. Your application returns you an array of data; lets say

$data = array('firstname'=>'nick', 'lastname' => 'white');

If I wanted to display the name in a table within my html, traditionally you would begin your html table tags, foreach loop through the array adding your table data tags as needed and end your php code and respectively your table.

Using what I consider to be a properly formated MVC environment, I would apply a data model within the action controller of my application, formatting the “mynametable” prior to the rendering layer and assigning the model to a variable. Using this layout within my application allows me to need no more than the standard echo variablename to display the table and it’s data.

So I guess my question is, if you utilize your model’s within your MVC environment to handle display data structure, do you really need a Smarty system to display the data….

Leave comments… I want to see your thoughts.

Vexed Daily

Rev. 12 Book of Nick - Religion?

If you know me… you know my views on religion, so at work today an interesting conversation about the validity of regions came up.  To my surprise this did not spawn the ever popular argument of who is right or wrong, but prompted myself and one other to attack the problem with crude math and linear time-lines….. ya.. we were a bit bored today.

This mostly spawned from one of my co-workers trying his hardest to explain to me how dinosaurs fit into “God” creating the world and all known things in 7 days.  The brief synopsis of his ….. we’ll call it “description” is as follows.

God created the world and all known things in 7 days,… but these are not human days.. these are God days, and being God is a creature of the 5th dimension he views time from a linear perspective as he is outside of our human 4-dimension existence… (considering time to be the 4th dimension). 

(Also, this is the same person who tried to convince me that carbon dating is not accurate by any means and most carbon dated items are incorrectly dated by an unknown amount of time… but that is a different discussion.)

 So utilizing his logic in time calculations, we determined that each one of “Gods” days are approx. 350,000 to 3,000,000 human years.  Allowing him to create dinosaurs on the 2nd day… (Please see diagram,. large dot above the number 2 on the time line.)  According to our friends description… humans being created on the 7 day… (please note large red dot above the number 7 on the time-line. 

Which can only lead to one thing… we are all currently living somewhere in the 8th or 9th day of gods time table.

 ok.. next weeks post will be about this same friends explanation of how Adam and Eve spawned the entire population of our planet.

Book Of Nick

Notes:

  • Yes Revolation is spelled incorrectly on the board for a reason.
  • The stick figure at the top is “God” our creature of the 5 dimension.
  • Gods 7 days actually is 1-650,000 million years ago…
  • No this entire post is not an exaggeration, this is how it was explained to me.. I just applied the ridiculous math figures.

PHP Development

Soap Server…. here we go again…

more to come.. I wrote a long post… and this damn blog thing crashed…

« Prev - Next »