Re: php5 / php4 - MySQL/SQLite

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Danny schrieb:

>  Let me open a discussion about php5 / php4
Fine. Let's keep it short ;-)

>  Why upgrade?
Because you want support for proper OOP.
Most of the other changes can be like SQLite can also be used with PHP4.

> It worth?
If you see the benefits of interfaces, object overloading, autoloaders,
interceptors and/or exceptions: yes. If you want to do some simple
stuff:no. If you are starting to implement a large project: big yes.

> Benefits?
Example: I have a simple object-layer for my databases and relations. If
I have a table MEETING and a table USER and I have a reference table for
the USERS_IN_MEETING, then I can now

  $m=new DB_Meeting(12); // simply by id, other criteria possible
  foreach ($m->allAttendees as $user)
  {
    mail($user['email'],'Invitation','Meeting: '.$m['description']);
  }

That's it! No queries, no nothing. And thanks to interceptors I could
implement this in very few lines of code.

> Code programming changes?
I doubt any of my new PHP5 code can be backported or properly simulated
in PHP4. If you really get into it, there are big changes on the
horizon. But if you want to keep programming the way you did: Nobody
keeps you from continuing this way with PHP5.

>  Is there and end-of-life for php4, in the near/medium future?
I don't believe in that. There will certainly be no new features for the
PHP4 branch, but it will get security updates for quite some time and
hosting companies will continue to feature it for years to come.

>  What about MySQL and SQLite. What is the future of both? I would like to
> open a discussion about the future of both related to php no matter the
> version of it...
SQLite: This is no comparison to MySQL because I think it fits totally
different problems. It's easier to use than MySQL because you don't have
to connect to a server. You can simply deploy the database as a file
with your application. But it is not as good when it comes to high
concurrency (meaning a lot of visitors). So:

- SQLite for small projects that are used by few users.
- MySQL for big web sites.

MySQL: Even if you stay with PHP4, please consider switching to the
mysqli objects. One benefit: They are more like the SQLite API so you
can get some synergy when learning both of them.

For PHP5: PHP5.1 will feature the first final version of PDO. PDO allows
to use MySQL and SQLite via one interface.

OLLi

____________
Kajiggers!

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux