ayok Posted September 4, 2009 Share Posted September 4, 2009 Hi, I have some questions about using class and framework. I do understand PHP and I can make a simple php application such as guestbook with database connection, and I also understand about functions. However, I do not understand about how to create objects, class nor framework. Some day I need to make a complete CMS for a client. So I made it myself on my php level. It works fine, but there is no class or framework structure in my CMS. As long as it's work, in my opinion, client would like it. However, I am not really confident if a programmer looks at my codes. My questions are, do I need to learn making class and framework? I always had a problem to add or develop someone else's codes, if I used free CMS or framework. Is it bad if I keep my coding style (without class) instead using class or frameworks? Sometimes i see class is more complicated than just functions. Rgds, ayok Quote Link to comment https://forums.phpfreaks.com/topic/173156-no-class-no-framework/ Share on other sites More sharing options...
Daniel0 Posted September 4, 2009 Share Posted September 4, 2009 OOP is not just using "classes". OOP is about objects and how these naturally interact with each other. Each object has a state represented by it's internal properties, and they can be manipulated using the public methods they expose (also called the interface). You need to think about objects not classes. A class is merely a blueprint for an object, so to speak. You needn't use OOP if you don't want to. You can use procedural programming. You just need to know that OOP and procedural are not the same thing even though they're both part of the imperative paradigm. Quote Link to comment https://forums.phpfreaks.com/topic/173156-no-class-no-framework/#findComment-912744 Share on other sites More sharing options...
ayok Posted September 5, 2009 Author Share Posted September 5, 2009 Thank you Daniel0. Your reply make me more confident. But how a good php programmer will think if he/she looks at a CMS with procedural programming? Will they think that I'd better use OOP or it's okay? Are the most php programmers using OOP or just a procedural programming? Quote Link to comment https://forums.phpfreaks.com/topic/173156-no-class-no-framework/#findComment-913140 Share on other sites More sharing options...
Daniel0 Posted September 5, 2009 Share Posted September 5, 2009 Personally, I prefer OOP over procedural any time. I simply think it's much better suited for especially larger applications. It's much easier to structure your code, encapsulate things and extend things. In PHP I virtually never write procedurally unless it's a small test snippet I'm writing. Quote Link to comment https://forums.phpfreaks.com/topic/173156-no-class-no-framework/#findComment-913143 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.