• 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

    • Chrome is Google's commercial web browser product; it consists of their proprietary features (Googlified everything including profile sync) plus their chromium project barebones web browser. Google developers control the chromium project. The chromium project is the "core" for the web browser product from other vendors including Microsoft Edge (their own proprietary features), Opera (their own features), Brave (their own features), etc... The "downstream" teams at Microsoft, Opera, Brave, etc., can either integrate their original MV2-supporting code into future builds, or they can integrate chromium wholesale and simply add-on their own features/functionalities -- their 'current' build pipeline, so to speak. THIS is why changes at the chromium project affect so many products besides only Google's commercial Chrome browser. -- Edit to add: The chromium project is open-source, and is the piece that's Google's code contribution to the W3C and world wide web at large; there are no licensing fees for others to use the code in their own products... which is what they do. Other browser engines do exist (Firefox's for example) but it's nearly impossible to have both engines bundled into the same 1 browser product.
    • You're comparing settler colonies to colonized war torn nations. It's easy to become the richest by coming in and stealing other people's land, culture and resources.
    • ABP has become "old news" when MV3 started rolling out. They've gone downhill and is now simply irrelevant..... in my experience.
    • About two years ago, I switched to Brave and haven't looked back.
    • FWIW StatCounter has been trash for over 25+ years! Back in the day (circa 2000 and GeoCities pre-Blogger era), it was useful to paste a number on your webpage indicating how many visitors you had. In the ensuing 25+ years, they've grown in reputation and changed their ways... but their overall consumer value has remained abysmal. Serious marketing agencies only cite StatCounter when there's literally no other sources available to support any marketing claims! They are the absolute lowest threshold serious companies use to push any sort of narrative about this-or-that happening. Besides their credibility being what it is, they are forever subject to quality issues. They're so bad that my DNS-level ad-filter prevents me from even viewing their main website! HA!
  • 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
      531
    2. 2
      PsYcHoKiLLa
      231
    3. 3
      +Edouard
      131
    4. 4
      ATLien_0
      88
    5. 5
      Steven P.
      81
  • Tell a friend

    Love Neowin? Tell a friend!