Tag: General
All the articles with the tag "General".
-
Back from winter vacation!
No posts last week: I was on a ski vacation to Pitztal, Austria. Found a cheap (and good!) hotel over there, Pension Haid, which offered me breakfast and dinner for 36 EUR per night. I've been skiing on Rifflsee and the Pitztaler Gletscher, which offers great slopes (and also good weather conditions last week). Après-ski was offered by Siglu, which offered great Kaiser Pilsner! Back to reality (and work) now, problem with all vacations is: they are too short!
-
MyGeneration template for Zend_Db_Table
In my article on NHibernate, I mentioned MyGeneration, a tool which creates database classes / ORM classes from your database tables. Since MyGeneration uses templates to generate classes, and PHP is underrepresented, I decided to create a PHP Zend_Db_Table template, which creates the necessary Zend_Db_Table overloads for every table in your application built using the Zend Framework. Downloads and updates can be found on the MyGeneration template library: http://www.mygenerationsoftware.com/TemplateLibrary/Template/?id=be41c1ec-07e2-489c-ab6e-13f42f07adda
-
PHP for Microsoft AJAX Library
Something really interesting has just been released on CodePlex: PHP for Microsoft AJAX Library. The code you have to use in your scripts is clean and easy, providing a full-featured PHP backend to the Microsoft AJAX Library. The Microsoft AJAX Library is a pure-JavaScript library that's used by ASP.NET AJAX but is also available as a separate download. Because it's pure JavaScript, it's not tied to ASP.NET on the backend. PHP for MS AJAX is code to help you make use of the Microsoft AJAX Library from PHP applications. This PHP script simply exposes PHP classes as AJAX-enabled web services, just like ASP.NET applications would do.
-
PHP code performance tweaks
Thanks to Sam Cooper's testing, some scalability issues came up in my SpreadSheet classes. Seems PHP has some odd internal quirks, which cause performance loss that can be severe on large amounts of data. These strange things are probably caused by PHP because it uses multiple C functions in order to perform something a single C function can handle. Here's an example I discovered in my own code: When you have a large array, say $aNames, in_array('Maarten', $aNames) is really slow."Flipping" the array, making keys values, and values keys, and then using isset() seems to be roughly 3 times faster!So, when you need to check if an element is contained by an array, use the following code:$aFlipped = array_flip($aNames);if (isset($aFlipped['Maarten'])) { ... }
-
Excel2007 in PHP - Project status
After a month of development, I think it's time for a status update on my PHP Excel2007 classes. 16 december 2007, I started working on these classes as a test to check how hard it could be to create Excel2007 files using PHP5. The story about Excel2007 and PHP, got picked up by a few websites, and it seems my set of classes has been downloaded quite a number of times. This made me continue developing the basic "Hello World" example, to a set of classes which can produce Excel files like this one: Turns out my test-case is growing into something bigger. I'll keep adding some features, and keep you informed. The latest version can be found on CodePlex.
-
DataBindable Business Objects in .NET
Checkout Emmanuel Nuyttens' article on DataBindable Business Objects. It's an interesting article, focussing on the other side of data binding that I wrote an article on myself for .NET magazine.
-
Article in .NET magazine
The new .NET magazine Belgium/Netherlands has been distributed to all subscribers. For the latest edition, #15, I've written an article on the basic principles and usage of NHibernate, an ORM-mapper for the .NET platform. It's written in Dutch, so I must disappoint my English blog readers... A PDF version and example code can be downloaded on the .NET magazine #15 homepage. Comments can be posted on this blog post.
-
Office 2007 SpreadsheetML classes in PHP
In my evening hours, I've been working on a set of PHP classes to create Offixe 2007 SpreasheetML documents (.xlsx files). I finished my first goals (some basic XLSX writing), and I want to share this set of classes to the community. Currently, the following features are supported: Each cell supports the following data formats: string, number, formula, boolean. Visual formatting is not implemented, but I'll get to that later. An example of what can be achieved, can be found in this example XLSX file. A download of my class set can be found here. Class documentation is included.Please note that I am releasing this under GPL license.
-
Zend Framework custom route
Today, I was once again testing the Zed Framework. One of the things I was trying to do, is creating URL's in different languages. What I did was creating a controller 'user', with the action 'edit' (i.e. www.example.com/user/edit). Now, I want this to be available in Dutch too (i.e. www.example.com/gebruiker/bewerken). The trick is to add custom routes, which map back to the real controller and action. In my case, adding the following in my index.php did the job: Only bad thing is that you should add this for all your actions, otherwise not all routes succeed.Another important note is that routes are matched in reverse order. Make sure your most generic routes are defined first, and more specific routes last.
-
Bart Online
One of my former classmates, Bart Dekeersmaeker, has just created his own blog. He will be posting news from Chennai, India, where he currently resides for work. He is outsourced to KBC, and they asked him to go to India. Good luck on your mission, Bart!