Click to See Complete Forum and Search --> : PHP5 - Start using now, or wait a while?
tunage
05-27-2003, 12:07 PM
Hi all, ive half finished a system in php4 and about to start finishing it off now. When i first started using php (about 8 months ago) i wasnt really that clued up on programming, so pretty much just did what the books told me to. Ive now got quite a bit of Java experience too and thinking I should revamp my system to use classes and generally more OO. Ive never used them in php before but after reading a few articles they appear quite straightforward, but it looks like theyre going to be quite different in php5 - inheritance, exceptions, private/protected etc....
So, i was thinking about just starting using php5 now and see how it goes, rather than having to change it from php4 after its released. Has anyone been using it, if so how stable is it and is it likely to change much in the final release?
Shall i just revamp it using the classes in php4, or start using php5 now - any ideas?
jllydgnt
05-27-2003, 12:54 PM
This is more of a "should you bother with OOP at all" reply, not PHP4 vs. PHP5. I think it depends on your system. If this system is something that will constantly be changing (and especially if it will be maintained by more than just one person) you might want to consider "revamping" using an object-oriented approach. But if any changes will be minimal, why bother recoding (and taking the slight performance hit that comes along with OOP) if you have it working now. Unless you just want the practice with OOP.
Bunkermaster
05-27-2003, 01:00 PM
It's a good time to start using APACHE 2 MySQL 4 and PHP5 (I do)
Training takes a while and things go fast (even if fast now mneans slow as snail compared to 2 years ago's standards)
tunage
05-27-2003, 01:13 PM
Its not that big a system - its a order processing/stock management thing, that i made for my final year project at uni - so its half done and works well, but theres still quite a lot more that needs doing to it - reports/despatch notes/searching facility etc.
At the moment theres loads of functions and basically a bit of a mess and nightmare to navigate for anyone else to look at. Once ive finished it, ill be supporting it, but further down the line itll be who im doing it for who may need to expand it and they also want to enable online ordering in the future. So i thought giving it an OO revamp would make it a lot easier for others to maintain it and also give me chance to better my php skills.
So Bunkermaster, Im using apache2 and mysql4 already so would you recommend taking the plunge and start using php5? Ive got a couple of months to finish it anyway, so not in any great rush.
If so, can I just upgrade from 4 to 5 or uninstall/reinstall from scratch - are their any installers for 5 yet ive not looked into it (im using win XP)
Also do you know of any good tutorials/articles about using classes in php5 - ive seen a few but theyre not very detailed.
Cheers.
Bunkermaster
05-28-2003, 02:13 PM
upgrade manually BUT be aware that it is not a release but just a snap.
check out the PHP5 thread here (http://www.phpbuilder.com/board/showthread.php?threadid=10239735)
tunage
05-28-2003, 04:30 PM
Well ive upgraded and it worked first time, which must be a record for me :D
Not encountered any problems with it yet, the old system works fine on php5 which is encouraging, just need to figure these classes out now.
Found an interesting website called phppatterns (http://www.phppatterns.com/index.php/article/archive/1/) which might give some people ideas for structuring classes. i just spent the last semester at uni doing these in Java and they seem to make sense, so may as well put theory into practice! Maybe...
PHP Builder
Copyright Internet.com Inc. All Rights Reserved.