Jump to content



Photo

OOP object oriented programing - web development


  • Please log in to reply
13 replies to this topic

#1 NoUserName

NoUserName

    No Title

  • Joined: 10-May 09
  • Location: No

Posted 04 January 2013 - 21:38

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).


#2 EddieF

EddieF

    Neowinian

  • Joined: 04-November 02
  • Location: Ohio/Michigan border
  • OS: Win 7
  • Phone: Droid Razr

Posted 04 January 2013 - 21:47

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.

#3 +Phouchg

Phouchg

    Resident Misanthrope

  • Tech Issues Solved: 9
  • Joined: 28-March 11
  • Location: Neowin Detainment Camp

Posted 04 January 2013 - 21:56

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.

#4 Shadrack

Shadrack

    Neowinian Senior

  • Tech Issues Solved: 3
  • Joined: 20-December 01

Posted 04 January 2013 - 21:58

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

#5 EddieF

EddieF

    Neowinian

  • Joined: 04-November 02
  • Location: Ohio/Michigan border
  • OS: Win 7
  • Phone: Droid Razr

Posted 04 January 2013 - 22:00

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.

#6 OP NoUserName

NoUserName

    No Title

  • Joined: 10-May 09
  • Location: No

Posted 04 January 2013 - 22:08

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?

#7 OP NoUserName

NoUserName

    No Title

  • Joined: 10-May 09
  • Location: No

Posted 04 January 2013 - 22:19

last reply edited and updated.

#8 +Phouchg

Phouchg

    Resident Misanthrope

  • Tech Issues Solved: 9
  • Joined: 28-March 11
  • Location: Neowin Detainment Camp

Posted 04 January 2013 - 22:41

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

#9 pes2013

pes2013

    Neowinian

  • Joined: 24-September 12

Posted 04 January 2013 - 22:57

Have you done standalone OOP? I HIGHLY suggestion you start with, for example, C# a OOP language then once you get concepts (variables, loops, functions, etc), start moving on up to web development.

#10 OP NoUserName

NoUserName

    No Title

  • Joined: 10-May 09
  • Location: No

Posted 05 January 2013 - 00:40

You mean I should learn c++ 1st ?

#11 Ambroos

Ambroos

    Neowinian Senior

  • Tech Issues Solved: 7
  • Joined: 16-January 06
  • Location: Belgium
  • OS: Windows 7 + 8.1
  • Phone: Sony Xperia Z2

Posted 05 January 2013 - 00:54

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.

#12 pes2013

pes2013

    Neowinian

  • Joined: 24-September 12

Posted 05 January 2013 - 00:59

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.

#13 Andre S.

Andre S.

    Asik

  • Tech Issues Solved: 11
  • Joined: 26-October 05

Posted 05 January 2013 - 01:03

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.

#14 brianshapiro

brianshapiro

    Neowinian Senior

  • Tech Issues Solved: 1
  • Joined: 10-January 02
  • Location: Encino, CA

Posted 05 January 2013 - 01:36

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.