• 0

OOP object oriented programing - web development


Question

I do not know much about programing but it seems that it will be my career in the next years for some reasons.

I read that OOP is a plus before start programing.

Goggle make it difficult due to zillions of search result.

I'd like to know what OOP part I should know if I am gonna dig into web development (php based).

13 answers to this question

Recommended Posts

  • 0

There isn't a "part" of OOP that you should know, you need to know the whole concept. Think of OOP as a programming theory or "law." Its a concept that was designed to make programs easier to write and manage by creating reusable code, and many modern languages implement it or force it (Java.)

I would recommend learning the basics of programming/PHP before diving into OOP concepts. I.E. Learn about variables, loops, functions, etc.. (if you haven't already)

A good book after you know a good deal about how PHP works, "PHP Object-Oriented Solutions" by David Powers.

  • 0

PHP is one of the worst languages to wrap your head around OOP and programming in general. There's too much inconsistencies and structure problems. Of course, one can dream to make it all right by making one's own layer on top of it (which mostly everyone at least attempts to do, with variable degrees of success), but I wouldn't start with it. Stay away from PHP as a learner.

  • 0

PHP is one of the worst languages to wrap your head around OOP and programming in general. There's too much inconsistencies and structure problems. Of course, one can dream to make it all right by making one's own layer on top of it (which mostly everyone at least attempts to do, with variable degrees of success), but I wouldn't start with it. Stay away from PHP as a learner.

I couldn't agree more. PHP is the go to language for web development, but learning OOP with it is a nightmare. However, PHP 4.4 and 4.5 have made good strides. Learning a language like Java first, would give you a very strong foundation of OOP.

  • 0

There isn't a "part" of OOP that you should know Thanks for the tip.

you need to know the whole concept. hum ... please more details about this statement :)

Think of OOP as a programming theory or "law." Its a concept that was designed to make programs easier to write and manage by creating reusable code, and many modern languages implement it or force it (Java.) Please I do not understand completely :)

I would recommend learning the basics of programming/PHP before diving into OOP concepts. I.E. Learn about variables, loops, functions, etc.. (if you haven't already) I did tried to study php but found terms such these you already mentioned that I do not understand and when I goggled for it more I've found many mentioned that it is part of the OOP and this is the reason for my post here.

A good book after you know a good deal about how PHP works, "PHP Object-Oriented Solutions" by David Powers. Ok, I will goggle for it. But please I have a problem with learning php.

PHP is one of the worst languages to wrap your head around OOP and programming in general. Please more information about this statement too because I've found that most CMS nowadays like Drupal, Joomla, Wordpress are using php.

There's too much inconsistencies and structure problems. I think this is a ibit advanced for me to understand.

Of course, one can dream to make it all right by making one's own layer on top of it (which mostly everyone at least attempts to do, with variable degrees of success), Adavced too.

but I wouldn't start with it. Stay away from PHP as a learner. Please advise what shall I do then?

It is probably best to understand the basics of procedural programming. Until you've fought with that, learning OOP might be lost on you.

I read this excellent book years ago on OOP in PHP 5: PHP 5 Objects, Patterns, and Practice

Ok, I will check it also and read it :)
I couldn't agree more. PHP is the go to language for web development, but learning OOP with it is a nightmare. However, PHP 4.4 and 4.5 have made good strides. Learning a language like Java first, would give you a very strong foundation of OOP.

And will it be logically to go for java 1st then php?
  • 0

Inconsistencies of PHP:

* OOP is not fully realized, big part is still procedural, so it's a mixed bag

* Procedural part has many naming conventions - something that OOP is supposed to fix

* Returned values mean one thing for this function and another thing for other function

* Parameter order is ambiguous for some functions, of the same group

* In attempt to go OOP now there's too many ways to do the same thing

Different clients (browsers), different web-servers, different settings, different PHP versions - it all takes the toll. Also, security is of utmost importance and is often neglected.

Most web content management systems are more or less structured collections of wrappers around all these troubles of PHP. They do it for you. And also troubles of XHTML and Javascript (and jQuery), so you don't have to bother. You can use them to build sites right away - it's meant to be easy. But sooner or later you'll have to fix something underneath and, therefore, understand what's underneath, too.

If you just want to take a stab at it, some might argue that understanding OOP isn't even necessary - in most cases all code ends up being unmaintainable clusterfsck, anyway, so just go with it.

If you do want to understand OOP, perhaps consider Ruby. It's a kind of a hipster language, that, but at least it has OOP principles at its core.

Other options are Java and C#. They are universal, more robust than any single web-oriented thingamajig will ever be.

Go Java if you lean towards Android, for example. Go C# if you lean towards larger wallet *cough*

And in any case, I'd suggest Code Complete: http://www.amazon.co...n/dp/0735619670

  • 0

I'd start with Java, it's an easy language that gets you going with Object-Oriented Programming pretty fast.

In September 2011 I started my uni course in software development, the first thing we did was Object-Oriented Programming in Java. It's a great way to learn to program, and after you know OOP you probably wouldn't want to do anything else. I'm sure I don't.

We've now been doing OO PHP and whlie it was awkward at first you get used to it.

  • 0

You mean I should learn c++ 1st ?

No. C#. C++ is problably one of the best languages but requires a steep learning curve while C# doesn't (note that you might lose some things along the way...)

I'd start with Java, it's an easy language that gets you going with Object-Oriented Programming pretty fast.

I completely disagree and its people like you that keep putting these ****ty programmers out (Its not against you personally Ambroos as I understand you just want to help the OP)

Java needs to die. Its one of the worst languages in the world. Id recommend C++'s steep learning curve before Java.

  • 0

Object-oriented programming and web development are orthogonal concepts. The web is a platform (like Windows or Android) with its set of tools, languages and rules. Object-orientation is a general programming technique that revolves around types. You can learn one without the other.

The biggest two web programming languages, Javascript and PHP, don't lend themselves to OOP very well however. If you want to properly learn OOP you should learn a classical OO language such as C#, Java or Python. These are general-purpose languages that are used for web development but not exclusively.

C++ would be a poor choice as it's not typically used for web development and is not a good example of an OOP language. It has all sorts of quirks that no other language has like multiple inheritance, private/protected/virtual inheritance, static polymorphism, etc.

  • 0

You're all making this sound more complicated than it is.

The most important thing to know is: coding isn't as hard as people make it out to be. Don't be intimidated. Once you know one language, its easy to learn another. Its easy to go from C# to PHP to JavaScript to VB. May take learning a few extra things to get C++ but that won't take long either.

OOP isn't a complicated theory or philosophy or paradigm or methodology whatever else, it just means coding using objects. Objects meaning representations of information, just like you'd expect it to mean.

The reason OOP makes things easier is because it structures your code, instead of being one big long mess, that's all. Just like you'd expect -- representations of information organize them versus leaving them organized.

In choosing a language to start learning, just choose a language that is more pleasant to use, over one that's more useful. PHP is useful for web development, it isn't the most pleasant to use, that's all. C# or Java. Universities will teach in Java over C# mainly because its cross-platform and they don't want to use proprietary tech, that's all. I think C# is better.

This topic is now closed to further replies.
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Posts

    • My Mac will run it, not sure if I will bother for a while. Nothing really there that will make a difference for me.
    • It's literally a local account with the ability to do a password reset, anything beyond that is optional. Doesn't mean you can't login without a live internet connection, doesn't mean you have to use OneDrive, doesn't mean you have to use Bitlocker, doesn't mean the telemetry is more or less, doesn't mean you have to use O365 subscriptions. Sure you *can* do all those things, but they're optional. But like I say, it's entirely up to you Not picking on you specifically, but I've asked this before out of genuine interest into what everyone gets so up in arms about and it always comes back to OneDrive or Bitlocker which aren't directly related to Microsoft Accounts anyway, or Microsoft 'spying on me' and I wonder how much of the outrange is based on internet hearsay vs actual fact.
    • Does your Mac support the latest macOS? Here is the macOS 27 Golden Gate compatibility list by Aditya Tiwari Apple's official keynote for WWDC 2026 was a bit different this time. The iPhone-maker prioritized Siri AI and new Apple Intelligence features so much that the keynote didn't have dedicated sections for macOS 27 and other software updates. That said, macOS 27 Golden Gate is coming later this year. The freshly-baked update is now available in developer beta for the following Mac models: MacBook Pro (2020 and later) MacBook Air (2020 and later) MacBook Neo (2026) iMac (2021 and later) Mac mini (2020 and later) Mac Studio (2022 and later) Mac Pro (2023) It's interesting to note that macOS 27 Golden Gate has dropped support for Intel-based Macs altogether. All of the supported Mac models in the list are powered by different Apple Silicon chips. MacBook Neo, which is the most repairable MacBook in years, is the latest of them and draws its power from an iPhone chip. Apple supported some Intel-based Macs on last year's macOS 26, but noted that not all features were available on these devices. The list of devices not getting the latest update includes the Mac Pro (2019), 16-inch MacBook Pro (2019), 27-inch iMac (2020), and 13-inch MacBook Pro (2020). To get the developer beta on your supported Mac, go to Settings > General > Software Updates. Here, click on the "i" button next to Beta Updates, then select "macOS Golden Gate 27 Developer Beta" from the drop-down menu. Make sure that you back up your data before starting the update, just in case things go south. Also, it goes without saying that you know what you're doing because developer betas can be unstable and behave in unexpected ways. Apple will release the public beta sometime next month, which will be comparatively stable. If you have an appetite for unstable test builds, you can try out the new features Apple has been baking for macOS 27. For starters, an upgraded version of Siri, with a dedicated Siri AI app coming later this year, enables cross-platform AI chat within the Apple ecosystem. Apple's changes to the Liquid Glass design language have trickled down to macOS as well. Now, there is a slider to change the intensity from ultra-clear to fully tinted. The system animations are smoother, content loads faster, and the window corner radius is now the same across all apps. In addition to macOS 27, you can try the developer beta versions of iOS 27, iPadOS 27, watchOS 27, tvOS 27, and HomePod software 27 on your supported devices.
  • Recent Achievements

    • Week One Done
      rubentuben8 earned a badge
      Week One Done
    • Week One Done
      ARaclen earned a badge
      Week One Done
    • One Year In
      jojodbn earned a badge
      One Year In
    • One Month Later
      jojodbn earned a badge
      One Month Later
    • Week One Done
      jojodbn earned a badge
      Week One Done
  • Popular Contributors

    1. 1
      +primortal
      525
    2. 2
      PsYcHoKiLLa
      232
    3. 3
      +Edouard
      132
    4. 4
      ATLien_0
      88
    5. 5
      Steven P.
      81
  • Tell a friend

    Love Neowin? Tell a friend!