[PHP] Re: php5 / php4 - MySQL/SQLite

2005-11-09 Thread Oliver Grätz
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



[PHP] Re: php5 / php4 - MySQL/SQLite

2005-11-08 Thread Petr Smith

Danny wrote:

Hi,
 Let me open a discussion about php5 / php4
 Why upgrade? It worth? Benefits? Code programming changes?
 Is there and end-of-life for php4, in the near/medium future?
 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...
Let´s start
--
dpc



Why don't you use Windows 3.1? It's mostly good idea to install new 
version of software when it's available. Bug fixes, improvements, new 
ideas. It's the same with PHP. Why to annoy with php4 if there's new, 
stable, working, better php5 (php5.1!)? I would use PHP5 just for 
"file_put_contents" function :). There is no reason to stay with PHP4 so 
why to talk about it? Yes, we can discuss if it's worth to move to java 
or .net or ruby or python, it could be interesting discussion, but I 
think it's waste of time to discuss php4/5 differences.


Similar problem is with your second question. What can I say about 
future of MySQL and SQLite related to php? Both could be used with php 
and you should select which one to use according to your needs. There 
are other databases too...


Again - I don't know what are you expecting from these two questions. 
They cannot be discussed at all.


Petr

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