glassfish Posted October 26, 2014 Share Posted October 26, 2014 I have looked around. And what I came across was not necessarily what I was looking for. I was wondering if somebody can recommend a good tutorial for building a blog in PHP OOP? Also, I was wondering if somebody perhaps knows a good blog app written in PHP OOP, where I could be learning from the script files? Quote Link to comment https://forums.phpfreaks.com/topic/292069-a-blog-with-php-oop/ Share on other sites More sharing options...
glassfish Posted October 28, 2014 Author Share Posted October 28, 2014 Well I found a good tutorial series on YouTube out of those multiple ones which are there. And I haven gotten into OOP and bind parameters ("PDO"). And I am quite liking it, it looks like that one is indeed typing less and one has set up a blog ("CRUD") quite quickly. Before that I have had also suspected the less amount of code with OOP, I was not quite sure when it comes to this, I thought maybe the request calls are written a bit shorter and that may be it when it comes to this. I feel like I could be learning from "full" blog web apps written with OOP and bind parameters, yet I also feel a bit sad about it, that I am not coming across a bunch of scripts on the internet. I will look a bit later on Themeforest for this. I still would appreciate suggestions on this. I am really looking to know OOP with bind parameters better. Quote Link to comment https://forums.phpfreaks.com/topic/292069-a-blog-with-php-oop/#findComment-1495005 Share on other sites More sharing options...
KevinM1 Posted October 28, 2014 Share Posted October 28, 2014 PDO isn't 'bind parameters'. It's a database abstraction layer. The point of PDO is that it allows one to write database queries without caring about the actual database you're using. PDO code should be able to be used in a MySQL database, PostgreSQL database, SQLite database, etc. with little to no modification. That's the whole point behind it. It makes code modular, and separate from the underlying mechanisms, which is one of the major reasons why people write OO code. Prepared statements are a separate nicety. Useful, to be sure, but not why PDO exists. Regarding the size of OOP code, it tends to be a bit overkill for small projects. There's generally a lot of overhead in creating/moving objects around, which makes it not worth it. OOP is built for complexity. But, yeah... 'bind parameters' isn't a thing to keep harping on. It's a secondary, rudimentary mechanism. Like I said in the other thread, it's like going "Oooh, arrays!" Potential employers will look at you funny if you gush/brag about them. In professional settings, existing libraries and frameworks (like Doctrine) take care of that (prepared statements, binding parameters) for you anyway. 1 Quote Link to comment https://forums.phpfreaks.com/topic/292069-a-blog-with-php-oop/#findComment-1495030 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.