Dec
04
2008
0

PHP does what now?

So another session I visited yesterday was given by a hydrodynamical engineer (if I recall correctly) that used PHP to help him generate floodmodels. At first this didn’t sound like a task you would consider PHP to be good for but then he explained how he used it.

He has written a library that ‘glues’ all the seperate FORTRAN / C programs together using PHP so he can input raw data at the beginning and at the end it comes out the way he wants to without the need for him to input-output-input-outpunt-etc all the data into every seperate program. In between he uses MySQL and flat text files to save the intermediate data.

After all the processing is finished he then takes PHP with the GD extension and creates charts, animations and even small animated flooding movies from the data he has stored in the database.

The actual work, even though impressive, wasn’t that interesting to me, the interesting thing is that this engineer took PHP to do a job that it was good at, glueing components together. Utilising it strengths and acknowledging it’s weaknesses allowed the engineer to make his life easier. This should be a good lessen for all of you.

Written by Robert van der Linde in: random thoughts | Tags: ,
Dec
04
2008
0

On DOJO and Dijits

I attended a session on Dojo yesterday and I can’t say I’m impressed. The speaker was good and enthousiastic but it just felt like another general purpose ajax-enabled javascript framework. Especially the remarks that DOJO is inherently slow and includes 40 other .js files for one request if you include all the features were adding to my suspicion that I was right in never giving it a go.

The thing that really struck me though was that you can circumvent the 40+ include problem by, here it comes, recompiling dojo with a custom made built script that is read by java which will output a compressed dojo package that you can use.

IMHO, if you need a java packager for a javascript framework you might want to rethink your approach.

Written by Robert van der Linde in: code | Tags: , ,
Dec
02
2008
0

Google Hackathon part II

The second workshops of google’s hackathon centered around opensourcing mapping applications. None of the top 4 mapping providers, Google, Microsoft, Yahoo and Mapquest, have opensourced their mapping applications. So if you want to develop open source geographically aware applications you need to use open source alternatives like Openstreetmap in combination with OSMA render.

If you want to be able to abstract your map coding from the data provider and / or the tile renderer you can use either OpenLayers, which is an open source JS/UI that works together with open source data providers and tile renderers to create map that can be used within your applicaition, or MapStraction, which is an abstraction layer for other javascript UI’s like Googles or Microsofts mapping applications.

A fun fact was that OpenLayer is often used in combination with Google Maps because it provides better event hooks than the Google API.

Written by admin in: random thoughts |
Dec
01
2008
0

Google Hackathon

OSDC 2008 started today with the Google Hackathon, an all day hackfest based around google technologies and specifically geared towards the open source crowd.

It started with an overview of Google’s OpenSocial technology, a standardized API for creating social networking ‘gadgets’ (not widgets, not sprockets, not wadgets, etc). The technique is centered around XML specifications that contain the HTML, CSS and JS neccesary to run your gadget within a OpenSocial container.

This OpenSocial container contains the ’social’ information that makes a application social like friendslists, if the current viewer is the owner or just a viewer, relationships etc.

After you’ve finished writing your XML file you upload it to a publicly availble URL and add it to your OpenSocial enabled social network to make your app work.

The link to the hackathon site (and from there to the opensocial tutorials) is: tinyurl.com/osdchackathon

Written by admin in: random thoughts |
Nov
02
2008
0

Logging intrusions with PHP-IDS

If you’ve been tinkering with PHP-IDS and like to log your intrusions you’ve probably been looking at PHP-IDS logging features. I will show you today how you can log your intrusions to mysql using PHP-IDS’s built-in logging features.
(more…)

Written by Robert van der Linde in: code | Tags: , ,
Oct
30
2008
0

PHP 5, MySQL, Windows & Stored procedures

For people like me who develop on and for windows (at times) and who like to use MySQL’s stored procedures here’s a quick tip.
Some PHP versions give the following warning when you call stored procedures in PDO.

(more…)

Written by admin in: code | Tags: , , ,
Oct
30
2008
4

Finding geographical distances between two points in MySQL 5

For a project I’m working on I needed to find the distances between two points to be able to let users ask the application questions like: “How many points of type X (coworkers, jobs, gas stations, donutshops) are within a radius of point y (my home, my office, my previous donut shop). Or what is the nearest point x from point y.

I solved this problem with a stored procedure. Below the click are two stored procedures that achieve the same goal.

(more…)

Written by admin in: code | Tags: , , , ,
Oct
18
2008
0

ZendCon evaluations are in!

I just received an email from my soon to be countryman Cal Evans with the compiled results from the ZendCon evaluations forms. The results weren’t as bad as I feared but not as good as I hoped either. In summary, Most of the people were pleasantly suprised by my presentation, liked my humor and would like to see me again. The comments did show the inherent problem with making jokes during a presentation, which is that not everybody is bound to like your kind of humor or your humor to information ration.

Detailed info below.

(more…)

Written by admin in: zendcon08 | Tags:
Oct
07
2008
0

Why most Google Maps enabled websites aren’t accessible enough

For a project for the PHP expertise group at Sogeti that I’m doing I’ve started to work with jQuery and the Google Maps API, something I should’ve done way earlier but I just didn’t get around to it. First of all let me say that both jQuery and the GMaps API are excellent pieces of software*,  they are both easy to implement and use and there’s tons of documentation available (something that we can’t say for all public API’s…. Yes, I’m looking at you hyves).

(more…)

Written by admin in: random thoughts | Tags: , , , ,
Sep
18
2008
0

Zendcon Day 2 – Scaling techniques

The “High performance PHP & MySQL scaling techniques” was given by Eli White and he showed a couple of need tricks to help you scale your website.

The simplest solution is adding a loadbalancer and a couple of PHP server for the frontend and a MySQL master with a couple of slaves for the backend. Remember, hardware is cheap! Another easy solution is installing APC (alternative PHP cache) because by default, PHP recompiles every request and by caching the compiled code you can save up to 50% in time. Interestingly enough APC will ship by default in future versions of PHP. The drawback is that in rare cases, APC can get confused by nested dynamical includes but as Eli said, if you do that you need to rewrite your code anyways.

(more…)

Written by admin in: zendcon08 | Tags:

Powered by WordPress | Aeros Theme | TheBuckmaker.com WordPress Themes