But Calon you don't really code anything special so why would you bring OOP into it? You basically code usersystems?
But Calon you don't really code anything special so why would you bring OOP into it? You basically code usersystems?
Back for a while.
I use OOP for my whole script.. You'll struggle to find any procedural code in my whole script.
Also how do you mean by: "Just seeing your name i'd know you'd come up with some crap."? Why don't you think about what you are saying before resulting to immature insults?
As to why? Check out this great link:
http://letmegooglethatforyou.com/?q=oop+advantages
Fair play, but tell me what's wrong with having different "function" pages instead of classes, why do you use a class instead of an ordinary page of functions.
Just seeing your name i'd know you'd come up with some crap.
Same question as I asked Jackboy
So tell me what you using OOP for in your scripts etc
"So before you go off on your rant you might like to check your facts."
Why do I need to check my facts to give an opinion?
http://www.phpguru.org/article/classes-vs-functions
To be honest, I just followed it as the other coders seemed to use it, then I was told it's a more advanced way, and now I've just found out that it's faster.
Read a few comments, they're also interesting - at least you aren't in the argumentative move like Tomm ... scares me
&@Tomm Your script is some user system and basically using static instances, database.. continue
Btw, googling advantages @ OOP not OOP in PHP, im stating that OOP in PHP is stupid
I'll give you an advantage with a database class coded with the construct in this fashion (multi instances)
Thats the advantage i see with that class but do you connect to two databases or even create two instances of a class?PHP Code:$mysql = new MySQL( 'host', 'user', 'pass' );
$mysql->connect();
$mysql2 = new MySQL( 'host2', 'user2', 'pass2' );
$mysql2->connect();
Last edited by Protege; 12-12-2008 at 10:14 PM.
Hi, names James. I am a web developer.
Lmao sorry i'm slow to reply.
OOP is so much easier.
For instance using MVC. You cannot do that with just plain functions
Ahh gotta love OOP. Tomm is a brilliant programmer. He has advanced since his radio panel days![]()
Hah! You think I just make UserSystems? You clearly have no idea...
If you really would like I know the kinds of thing I currently do, which i'd like to point out I no longer bother talking about on HxF, then I am more than happy to tell you.
Without sounding big-headed or whatever I am more experienced and advanced at PHP than you are and most likely will ever be with your current views.
Your example you gave with the MySQL connector is well crap. I find it hard to think of a real world situation where you would want to connect to two diffrent server. In my projects I normally use a singleton pattern database abstract layer class. This gives me a number of advantages. Mainly the ability to get the current instance anywhere in the script (No globals or passing the object from class to class) and allowing me to transparently change my database engine.
Last edited by Tomm; 12-12-2008 at 10:28 PM.
Say you have this chat room you've produced and instead of using your own user database you want to use your forums, so you connect to that database but in your chat room you want to keep different information, say the users styles in chat (fonts, size, colour) so you use your own database for that (and for the other things in your chat room) - you'd need to connect to two databases.Hah! You think I just make UserSystems? You clearly have no idea...
If you really would like I know the kinds of thing I currently do, which i'd like to point out I no longer bother talking about on HxF, then I am more than happy to tell you.
Without sounding big-headed or whatever I am more experienced and advanced at PHP than you are and most likely will ever be with your current views.
Your example you gave with the MySQL connector is well crap. I find it hard to think of a real world situation where you would want to connect to two diffrent databases. In my projects I normally use a singleton pattern database abstract layer class. This gives me a number of advantages. Mainly the ability to get the current instance anywhere in the script (No globals or passing the object from class to class) and allowing me to transparently change my database engine.
So if you wanted to advance and do that, how could you do that with a singleton database class?
Another one is, You want your customers forum login and billing login to always stay the same etc.
Last edited by Protege; 12-12-2008 at 10:27 PM.
Hi, names James. I am a web developer.
Your example showed connecting to two different servers completely. My mistake in my post with the use of `database`.
Say you have this chat room you've produced and instead of using your own user database you want to use your forums, so you connect to that database but in your chat room you want to keep different information, say the users styles in chat (fonts, size, colour) so you use your own database for that (and for the other things in your chat room) - you'd need to connect to two databases.
So if you wanted to advance and do that, how could you do that with a singleton database class?
Another one is, You want your customers forum login and billing login to always stay the same etc.
I don't see how social networking scripts are just user systems. (Next version I'm coding of Nivade)
I don't see how an order system is a user system (Sold, freelance work)
You call Nivade a social networking script? Lol! And an order system is nothing but someone submitting and order, it going through a member of staff who checks it, charges the person and sets up the account. BAM.
Back for a while.
Order script actually uses the paypal API - thanks.
Social networking script - Yes, because I created it, and it's a script, it's a social networking script shall I define this for you or just break it down?
Want to hide these adverts? Register an account for free!