02
Jun
Interesting thread with Melih Birim on OO Inheritance
Ravi Gehlot I like PHP way more than ColdFusion. If you know how to program in PHP, you can gain speed(performance) that you would only get it with ColdFusion if you were to get down to JAVA. Also, PHP is more OO.Il y a environ une heure ·
Ravi Gehlot :))Il y a environ une heure ·
Melih Birim I realized that I hate OOP(it is complex, it is not scalable, it is not organizable, it is bull shit when not maintained well).Il y a 58 minutes ·
Ravi Gehlot true. OOP is not for everyone. It’s like school. School isn’t for everybody. It takes years of experience to master it. You have to have knowledge of framework to kind of program OOP in an “organized” way. But I do like it though. I am getting used to it. I will have you look at some of my OO code later.Il y a 57 minutes ·
Ravi Gehlot But you can get work done in Procedural programming as well. Nothing wrong with that. they are 2 different styles of programming. But with languages like JAVA, I can’t see anybody trying procedural. JAVA is OO to the guts man.Il y a 56 minutes ·
Melih Birim I still don’t understand real usage of “Inheritance”. Lets think scripting languages, fe Python, it is both OO and Proce. but you can write your modules and can use it later. Why I need another object has same attributes but different behaviours like the inherited one. If I need an object, with different behaviours I prefer Compositon DP over inheritance. Since in Java you allowed only one inherited class but you can set different behaviours…Il y a 50 minutes ·
Ravi Gehlot In OO you always think real world events. So lets take for instance that your parents want you to inherit their possessions. Well, you can either leave everything that you worked for your entire life for what your parents want to give you or you can just take what your parents gave you and adapt(add) to what you already have. You would inherited their possessions and still kept yours. They are just one inseparable unit after that. You could try to buy a new house of your own and then not accept your parent’s house or you can buy your house and keep theirs. But their house has its own characteristics while yours has its own. The whole purpose of OO is to separate logic.Il y a 45 minutes ·
Melih Birim well thats my point, I know how to use OO and how to delegate login behind it but why I need to separate the behaviours. Probably it is not the best thing to write everything in an object but as I said, this does not mean the software can not be modular. Moduler systems also means separation of concerns, but not every moduler system is OO, and not every OO project is moduler. My concern : Is project scalable? And is it modular?Il y a 39 minutes ·
Ravi Gehlot think of the object as the union of code and data. the object is the MODULAR unit for application development and code reuse. Inheritance has to do with code re-usability. You inherit because it’s the same thing. You just don’t want to have to re-write code. Also, by doing that, all inherited code fetches from one main root. That root(parent class) delegates the other classes. So all you got to change is 1 class. Not all.Il y a 36 minutes ·
Ravi Gehlot It is scalable if you are working on a big project. If you are working on a small project, I would go procedural with functions. OO is good for medium-large size projects.Il y a 34 minutes ·
Melih Birim I know it is scalable, but it is not easy to implement and construct a scalable project. And if it is not constructed well, it means nothing, and means that project will demolish your life and your company, and you will need another project which for the place of current one, and than you start with high expectations another 4 year project… :-)Il y a 29 minutes · · 1 personne
Ravi Gehlot Scalability means that a project is able to keep up with growth. It’s somewhat easy to write classes that inherit from other classes. You already have the prototype in hands but now you just want to scale the application to accommodate growth. Sometimes they even have an interface that you have to use. So all you go to do is write those same methods prefaced in the interface and then inherit the methods/properties from the base class and go from that point on. That’s scalable because it makes it for quick code writing and enables you to move on quick. The thing with OO is that you have got to have some knowledge of frameworks or you will be all over the place with it.Il y a 28 minutes ·
Melih Birim if, mechanical/civil engineers used OOD think about world how could it be? :PIl y a 27 minutes ·
Ravi Gehlot right. I agree with you. That’s why I told you that some framework knowledge is necessary. OO gives you the power to come up with your own framework. So with OO, you do not need a third party framework because you are the framework builder. That’s why they say that it takes a lot of planning to build a successful OO app. You also gotta document your code. That’s why most people choose to adopt an existing framework and use what had been previously developed.Il y a 26 minutes · · 1 personne
Melih Birim seems we are talking about different ways, I am talking about pm side of how OO changes(ruins) your life, at the other side(developer) it is very nice thing to know, your system is OO and it might(!) be scalable and maintainable… But not allow you to design again.Il y a 25 minutes ·
Ravi Gehlot oh I see. You mean, you would have to stick with the original idea. But wouldn’t that apply to procedural programming as well?Il y a 23 minutes ·
Ravi Gehlot With Procedural, after you wrote your hundreds of functions then it makes it hard to change the idea of doing the project a different way. You can’t really change the design unless you were to change the entire project.Il y a 22 minutes ·
Melih Birim think about functional programming, fe, D or Earlang, it is well used by Facebook, Ericssonn and Nortel. You combine similar functions in a module. And can use it later on. just like jars. But the things is java is using functions(methods) as well as other programming languages. and also in functional programming design is not something you want change everyday, the flow of the project might change, so that you can easily write another flow that fits your need. :)Il y a 16 minutes ·
Ravi Gehlot That’s the thing ;) You don’t want to have to change things around too much. Think about your car. Your car is a great example of it. Why you would want to change the design of it when regardless of what you do, the car will continue to run the same methods. It will accelerate and stop. That what cars do. I am not going to try to get under the hood and put an airplane engine there. I could…but I wouldn’t ;) If I were to install an airplane engine on it, it wouldn’t make sense.Il y a 12 minutes ·