Hi all, does anyone know of a site which I can download all of the code, etc that has been built pretty much entirely using OOP? I understand the basics of OOP but struggle in deciding what needs to be, what functions to create, etc.
For example I’m making an e-commerce site; I have a cart class but then on the product page itself, I don’t know what I would need, maybe a class function to calculate the VAT but the product image, description, etc seems to be more logical to do in a procedural fashion. Any help would be really appreciated, struggling to get my head around this!!
Hi dude, cheers for the reply, yeah sure I get your gist, probably best not to confuse me anymore lol! I guess things such as this will come in time…fingers crossed
I think there is where you’re setting yourself up for trouble; by setting that constraint, you’re looking for something where someone is forcing OOP to work in situations where it wouldn’t normally be used - which isn’t what you’re trying to learn.
Hi StarLion, thanks for your reply. Yes, I think your right, maybe OOP isn’t always the right way to go and doing it for the sake of it probably isn’t a wise idea. Thanks for the help
Hi Anthony… I’m trying to become a PHP God myself now
Can you please please post me to relevant topics that discuss this issue? I’ve been all over the OpenCart forums. A couple of posters who gave suggestions and feedback about the code structure were beheaded by Mr. Kerr He loves his app very much, and so the discussions have not been too fruitful.
I’ve tried searching Sitepoint with Google for keywords “Opencart” and “Opencart Design”… and there were only a couple of threads that have vague reference to the apparent awfulness of OC… but no in-depth analysis.
Now, it is most unfair to expect you to post a blow-by-blow of description of everything that is wrong with OC - that’s a journey best left for me to go through - but if you could just drop a few high level hints, I will be grateful. I will probably have no idea what you’re talking about But reading your answer, learning stuff to make sense of it, and then reading through OC code and wait for the blinding light to turn on is an immensely enjoyable experience… Thanks in advance if you choose to reply
I’m always shocked how Magento is hardly ever mentioned on these boards, I haven’t worked with a TON of php software, however it seems to be by far the best designed I have worked with. Many who come from an actual software engineering standpoint, to web, have a lot of respect for Magento since it shows a lot of things they had never seen done with PHP. Unfortunately, learning how to work with it is quite the task, it’s ~300 database tables and has a crazy file count/folder structure.
They don’t care for you if you don’t have InnoDB. Shared Hosts don’t allow InnoDB. Tough luck.
It’s slow. I downloaded it and ran it on my local wamp, and it was SLOW. Wow. I mean if something Drupal can be built to be lightning fast and light enough to run on shared servers, Magento - a narrow, specific functionality app - has no excuse to be so slow. And oh yes, there is a solution - some groovy company that makes a plugin that makes Magento work faster! And we have to pay $$$ for that! Why?!
However, Magento is the most comprehensive PHP cart solution out there. It would be imperative to go through it and understand what’s going on… thanks for reminding me about it I think I’ll start today…