Hello, I learned Java few years back, and later learned PHP and built a website/application using php.
my website had a database and 98% of the code was not in OO (the other 2% I copy pasted fromt he internet)..
when I needed to display some data I made a query in my db and echo'ed it..
I had no use in using OO php while I was programming my website and now I'm having trouble making the connection between using PHP and OO..
why would I need to use OO? from java I know what OO means, but I never had the chance to apply it in something real (unlike some little homework code). if objects are used to store data..wouldn't it be better to use a DB for that?
let's say I want to save and use 2 persons' data, as I see it I either create a tblPerson in my db and enter 2 records, or I create a class called Person and then create 2 instances of that class, but the moment I stop running my code the instances disappear..so my question is where does OO fits in when creating real (not homework crap), big websites with a DB?
arcticM
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.