Archive for the 'Replies' Category

MySQL, PHP, Replies

Bye bye MySQL?

Sun will be bought by Oracle. Will this be the beginning of the end of MySQL?

MySQL has a serious market share. For that oracle has already tried to buy MySQL back in 2006. In an interview responding to the offer in 2006, MySQL chief Marten Mickos told that the reason for declining was that they wanted to keep MySQL an independent product. From that I assume that oracle wanted to merge Oracle DB and MySQL technology. Even though MySQL will be part of a major merger for which the rules aren’t yet clear, you might think that Oracle hasn’t changed their ideas about what they want with MySQL in the last 3 years.

Won’t MySQL just lose most of its market share if it become something else. Other databases like PostgreSQL have been making mayor steps and are in many expects better than MySQL. MySQL has remained to be the only serious open-source RDBMS in respects of market share though. I believe this is mainly because MySQL is known, tried and tested. This might be a fragile thing though.

Based on Oracle’s decision, I might just take a more serious look at PostgreSQL. Changing is usually not so nice, but change often is.

Any thoughts? Leave a comment or trackback.

Erlang, Javeline / Ajax.org, Life as a hoster, MySQL, PHP, Replies

An alternative way of EAV modelling

I was reading this month’s php|architect. It has a nice article about EAV modeling. I had seen this db structure in other project, but didn’t know that it was called EAV. For those who don’t read php|architect, EAV describes a method of saving a large set of attributes, only some of which apply to an individual entity. Normally you would create a table, with a row for each entity and save each attribute in a column. With EAV you save each attribute as a row.

This makes selecting the data quite tedious. If you can life with some constraints, there is an easier way to do this.
Continue Reading »

MySQL, PHP, Replies

Submit a form with AJAX using TelePort

This is a re-post of an article I wrote in back in August. We’re getting ready to release a new release of Javeline PlatForm at the end of this month. This release will be XForms compliant and has a lot of other new features as well. Before I start writing about that, I would like to put some attention on the communication layer aka Javeline TelePort.


PHPBuilder posted an article about sending a form using AJAX. This article shows how to post a simple form. But looking closely at the example, you can also see what the problem is using the plain XMLHttpRequest object and writing an implementation yourself.

First of all you to write some rather difficult javascript code. Next you need to completely rewrite your page, looking nor working like a normal HTML form. Last and most important, the function fetches values using getElementById(). This is not really very flexible, because you will need not only the form, but the function as well when you add a field.

Using an AJAX library can really help you here. Javeline TelePort has got a brand new method, which automatically creates a HTTP post request of a form and sends it to the server.
Continue Reading »

Replies

RE: How to choose an Ajax Framework

This is a reaction to article (or is it a commercial) ‘How to choose an Ajax Framework’.

The idea behind client side only AJAX is that you don’t have to do a lot of complicated javascript work yourself. The difficult stuff is done by the lib and you only have to call it upon HTML event.
Since the code is actually executed on the client, having client-side code, makes the code base simpler. The lines of code will most likely be less than with a server side solution. The only drawback is that you do need to program some javascript. This might be a new language to you and therefor uncomfortable.

There is a third key of AJAX framework not discussed in this articled. These framework are usually described as RIA (Rich Internet Application) platforms. These frameworks parse XML much like how XHTML is parsed by the browser. The XML contains a lot more nodes types than HTML and is usually extendable. So instead of only having having an <input> tag, you will have things like <tree> and <datagrid>.
Ajax calls are also represented as XML and neat things like databinding is also supported.

RIA frameworks:
 Abode Flex
 Javeline PlatForm
 Dojo Dijit
 OpenLaszlo

If you’re working on a web based application and not at a website RIA platforms are certainly worth having a look at. OpenLaszlo has got a good screencast, which is representative for all of these frameworks.

Life as a hoster, PHP, Replies

Wrong PHP prediction: you don’t need to patch PHP to run multiple versions

I read an article on Michael Kimsals blog about how he is waiting for a patch to run different PHP versions on the same Apache server. I think he is misinformed and I highly doubt than someone will write that patch. The solution is here already.

You simple can’t have PHP4 and PHP5 both run as Apache2 module in the same process, because they use a lot of the same internal symbols (variables, function names, etc). If you would change that, nobody would be able to write any extensions which run both on PHP4 and PHP5. However you can run multiple PHP versions as CGI modules and there is no patch required for that.
Continue Reading »

PHP, Replies

A better token algorithm with PHP

Maxim Chernyak posted an article on his blog about creating an authentication token using PHP. I wouldn’t recommend using this method to do that though. Even if the pattern looks quite complex, a computer will figure out the pattern using a hand full of valid keys. It’s very difficult to come up with an algorithm which is difficult to hack.

If you can keep information from the user, which Maxims article assumes as well, you can use MD5 to generate keys. Simply add a string you keep secret to each key.
Continue Reading »

Javeline / Ajax.org, PHP, Replies

Submit a form with AJAX using TelePort

Yesterday, PHPBuilder posted an article about sending a form using AJAX. This article shows how to post a simple form. But looking closely at the example, you can also see what the problem is using the plain XMLHttpRequest object and writing an implementation yourself.

First of all you to write some rather difficult javascript code. Next you need to completely rewrite your page, looking nor working like a normal HTML form. Last and most important, the function fetches values using getElementById(). This is not really very flexible, because you will need not only the form, but the function as well when you add a field.

Using an AJAX library can really help you here. Javeline TelePort has got a brand new method, which automatically creates a HTTP post request of a form and sends it to the server.
Continue Reading »