Catégorie: "b2evolution"

Quelques rendez-vous pour 2007 :)

Quelques rendez-vous pour 2007 :)

Hello! Bonne Année tout le monde! :D

Côté IT, l'année commence cette semaine avec deux évènements majeurs; lesquels vont probablement donner le ton pour, au moins, le premier semestre 2007:

Tout d'abord la 40ième édition du Consumer Electronics Show de Las Vegas. (Au passage, vous en connaissez beaucoup des salons qui durent depuis 40 ans? Surtout dans le domaine technologique! ;) ) Des milliers d'exposants, des écrans plats plus grand, des portables plus petits et plus légers, des GPS polyvalents, des téléphones Skype, des PCs multimédia sous Vista, etc...

Toute une profusion de nouveaux produits... et de gadgets dont l'utilité me parait, année après année, de plus en plus douteuse... Mais je n'ai pas encore réussi à déterminer si c'est parce que je vieillis, parce que je deviens moins geek que je ne l'ai été, ou bien encore si c'est vraiment parce que, comme diraient certains, "les gens ne savent plus quoi inventer!" |-|

Quoi qu'il en soit, le CES c'est toute cette semaine, à la TV, IPTV, podcasts et autres sites web spécialisés... Vous pouvez difficilement le rater!

Ensuite, l'autre grand évènement, c'est MacWorld Expo, cette semaine à San Francisco. Et le point d'orgue, c'est bien évidemment la keynote d'ouverture de Steve Jobs!

Ironiquement, c'est Bill Gates qui fait la keynote d'ouverture du CES, mais celle là, elle déclenche beaucoup moins les passions...

Steve Jobs, donc, c'est ce matin à San Francisco, c-a-d ce soir en France. La vidéo sera probablement visible en streaming Quicktime demain sur le site de Apple (mieux vaut essayer de s'y connecter pendant que les américains dorment).

La grande question, bien évidemment, c'est: Apple va-t-il annoncer un "iPhone" ou non?

Si vous êtes impatients de savoir, rendez-vous sur les blogs "temps réel" en direct de la conférence ce soir vers 18h ;)

Bon... et en cas de déception grave, si vous ne trouvez rien d'excitant, ni au CES, ni à MacWorld... vous pourrez toujours réserver votre enthousiasme à un évènement probablement encore plus important (mais si!): b2evolution version 2.0 qui sortira, lui aussi, en cette première moitié 2007...

New feature: send message to author

Okay, I just put up this new feature from b2evolution/Phoenix on my blog: next to every post and every comment, you'll see a little envelope. When you click on it, you're offered to send a message to the author.

The message gets sent by email, but you never see the email address... for (quite) obvious spam defeating reasons.

I'm not sure though if that's enough. The form itself might become a (comment) spam target and I'll get twice as much comment spam as usual.

Worse, the commenters might get some of it too... Humm... :roll: I just want to run this for a few days and see how it works before I take it down... :-/

Anyway, let me know how you feel about it. Thanks.

PS: there may be some other bugs due to software upgrade. Please let me know and I'll correct asap.

The illusion of DataBase Abstraction Layers or Classes

Many people think that DB abstraction is cool. I get emails about this topic all the time. People suggesting we add a DB abstraction layer to b2evolution, or offering to do so themselves.

So why haven't we added one yet? Well, simply because DB abstraction doesn't work! :!:

DB abstraction layers will mostly hide the specific interface semantics between the application and the database. Thus you don't have to worry about the specific system call to connect to each particular DB. OK nice. So what? That's only the easiest part in porting an app from a DBMS to another... (BTW, we use a class (/evocore/db.class) in b2evolution for this too. You just have to slighlty alter this class if you want to connect to another DBMS than MySQL).

More sophisticated layers will also translate between different datatypes from one DBMS to another. But since datatypes tend to standardize among all popular DBMSes this is getting less of an issue as time passes by...

Finally, we get to the point where it hurts: the SQL syntax! There are vitually no two DBMSes that share the exact same SQL syntax, except for the most basic SELECT, INSERT, UPDATE and DELETE statements! >:-[ And it doesn't seem to be standardizing really... some still won't support even the minimalistic SQL 92 standard! >:XX

Just check it out with your 2 favorite DBMSes:

  • How do you perform a LEFT OUTER JOIN?
  • How do you concatenate columns into a single result string?
  • How do you limit results in the WHERE clause to a regular expression?
  • How do you handle the fact that when you INSERT and the primary key already exists, you want to UPDATE instead? (MySQL's REPLACE INTO syntax...)?

These are just a few common examples, but they're probably already enough to show you why you DB abstraction layer won't magically translate from you first favorite DBMS to your second... You'll have to rewrite many queries too... and sometimes you won't find equivalent functionnality (subqueries?) and you'll have to write extra application code...

Not to mention triggers and stored procedures where you wouldn't even dare to dream about some kind of compatibility.

The most advanced DB abstraction I have ever worked with was ODBC. Yes that thing actually did SQL syntax translation! But it depended on specific drivers to implement translation against a standardized syntax defined by Microsoft.

So today when I see some open source library pretending to perform DB abstraction and I can't find anything closely related to SQL syntax translation, I won't even consider it... It's useless to me. The real difficulty with handling multiple DBs is rewriting the SQL queries, triggers and stored procedures... it's not connecting to yet another fancy DBMS and SELECT 'hello'... |-|

There's more than the code...

Oh well... I think it's been too long since I last read some great wisdom like the one on Joel on Software.

I read this really insightful peace today about all the important things beyond just the actual software code.

Here's a funny quote:

Human emotions can be really, really superficial. In particular people ridiculously overvalue aesthetics and beauty when evaluating products. It's one of the reasons iPods, and, for that matter, Keanu Reeves, are so successful.

...but the whole article is definitely a must read!

Of course, this so much applies to b2evolution as well... :-/

Using PHP 4.3.8 with MySQL 4.1

Running an app under PHP 4.3.8 and trying to connect to a MySQL 4.1 database can be pretty frustrating. By default it gives you a message like this:

"Client does not support authentication protocol requested by server; consider upgrading MySQL client".

The problem is that by default PHP's MySQL module is compiled with an older MySQL client library. MySQL has a manual page about this.

I use the OLD_PASSWORD method. I connect to MySQL under root with MySQL Query Browser and I issue the following command:

set password for 'demouser' = old_password('demopass');

in MySQL 5:

set password for demouser@localhost = old_password('demopass');