Furthering my education in OOP - where/how can one learn professional skills?
Furthering my education in OOP - where/how can one learn professional skills?
am 07.11.2007 15:11:39 von firewoodtim
I need some help in furthering my education in OOP. I have developed
a set of PHP scripts that I use in a fairly sophisticated database
driven website, but I am not proud of the rather amateurish
programming that I used to create the functionality. Although I use
classes and objects to organize my data and their related functions,
it seems to be only marginally better than plain procedural
programming. For example, I do not use inheritance, much less
polymorphism.
The next step, it seems to me, is to become much more skilled in
analyzing a program from an OOP point of view and learning the
techniques for organizing the structure of the scripts and how to
implement them in a website. In other words, I want to move from
amateur to pro in terms of both career and technique.
Can someone point me in the direction of the right schools(online),
books, websites, example code, or other assets that I can use to
learn?
Also, is PHP the best language to use to learn and implement the full
power of OOP? If not, any suggestions?
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 07.11.2007 16:36:02 von Rob
On Nov 7, 2:11 pm, firewood...@yahoo.com wrote:
> I need some help in furthering my education in OOP. I have developed
> a set of PHP scripts that I use in a fairly sophisticated database
> driven website, but I am not proud of the rather amateurish
> programming that I used to create the functionality. Although I use
> classes and objects to organize my data and their related functions,
> it seems to be only marginally better than plain procedural
> programming. For example, I do not use inheritance, much less
> polymorphism.
>
> The next step, it seems to me, is to become much more skilled in
> analyzing a program from an OOP point of view and learning the
> techniques for organizing the structure of the scripts and how to
> implement them in a website. In other words, I want to move from
> amateur to pro in terms of both career and technique.
>
> Can someone point me in the direction of the right schools(online),
> books, websites, example code, or other assets that I can use to
> learn?
>
> Also, is PHP the best language to use to learn and implement the full
> power of OOP? If not, any suggestions?
Although I hate to say it, C#.Net is probably the best way to learn
OOP at the moment, as it pretty much forces you to write code in
the .Net way.
Personally, I couldn't get on with it at all. You needed 20 lines of
code where PHP requires just one. But, all the accomplished .Net
programmers I've worked with say it's the best thing since sliced
bread.
As far as professional certificates go, a lot of people seem to go for
the Zend courses, but I'm not sure if you can do them from home.
Rob.
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 07.11.2007 18:39:57 von luiheidsgoeroe
On Wed, 07 Nov 2007 16:36:02 +0100, Rob wrote:
> On Nov 7, 2:11 pm, firewood...@yahoo.com wrote:
>> I need some help in furthering my education in OOP. I have developed
>> a set of PHP scripts that I use in a fairly sophisticated database
>> driven website, but I am not proud of the rather amateurish
>> programming that I used to create the functionality. Although I use
>> classes and objects to organize my data and their related functions,
>> it seems to be only marginally better than plain procedural
>> programming. For example, I do not use inheritance, much less
>> polymorphism.
>>
>> The next step, it seems to me, is to become much more skilled in
>> analyzing a program from an OOP point of view and learning the
>> techniques for organizing the structure of the scripts and how to
>> implement them in a website. In other words, I want to move from
>> amateur to pro in terms of both career and technique.
>>
>> Can someone point me in the direction of the right schools(online),
>> books, websites, example code, or other assets that I can use to
>> learn?
>>
>> Also, is PHP the best language to use to learn and implement the full
>> power of OOP? If not, any suggestions?
>
> Although I hate to say it, C#.Net is probably the best way to learn
> OOP at the moment, as it pretty much forces you to write code in
> the .Net way.
My mother thaught me to stay away from sharp objects :P
> Personally, I couldn't get on with it at all. You needed 20 lines of
> code where PHP requires just one. But, all the accomplished .Net
> programmers I've worked with say it's the best thing since sliced
> bread.
Every tool at a developers exposal has its place. A multiuser,
rightscontrolled projectmanagment tool might very well benifit from some
OO. A simple contact form on your webpage hardly requires an a total MVC
framework. .Net is hardly my thing, though it has its uses. Creating an
intranet environment generating files/templates for MSOffice is a lot
easier for instance.
> As far as professional certificates go, a lot of people seem to go for
> the Zend courses, but I'm not sure if you can do them from home.
I'm not sure what courses Zend offers, there may . Rest assure that Zend
certification is totally useless though. I have yet to meet a possible
employer or client who has heard of it, never mind asks for it. The level
of skill required to get the certificate as low as it is
--
Rik Wasmus
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 07.11.2007 20:47:54 von darko
On Nov 7, 4:36 pm, Rob wrote:
> On Nov 7, 2:11 pm, firewood...@yahoo.com wrote:
>
>
>
> > I need some help in furthering my education in OOP. I have developed
> > a set of PHP scripts that I use in a fairly sophisticated database
> > driven website, but I am not proud of the rather amateurish
> > programming that I used to create the functionality. Although I use
> > classes and objects to organize my data and their related functions,
> > it seems to be only marginally better than plain procedural
> > programming. For example, I do not use inheritance, much less
> > polymorphism.
>
> > The next step, it seems to me, is to become much more skilled in
> > analyzing a program from an OOP point of view and learning the
> > techniques for organizing the structure of the scripts and how to
> > implement them in a website. In other words, I want to move from
> > amateur to pro in terms of both career and technique.
>
> > Can someone point me in the direction of the right schools(online),
> > books, websites, example code, or other assets that I can use to
> > learn?
>
> > Also, is PHP the best language to use to learn and implement the full
> > power of OOP? If not, any suggestions?
>
> Although I hate to say it, C#.Net is probably the best way to learn
> OOP at the moment, as it pretty much forces you to write code in
> the .Net way.
If you hate to say it, then don't say it :) I know it is an expected
behaviour here
at comp.lang.php to go around saying how Microsoft's products are bad
and how all the
rest is great, but I'm not trying to do that since I try not to be
emotionally related to
something I consider only my job.
But I had some experience with C#.NET in web programming, and I must
say it only distanced me
from real programming. Like Wasmus already mentioned intranets, that
was exactly what I was working
with, and maybe because I'm "I have to know how it works in details"
fan, I hated it. The thing I was
working with most of the time was Visual Studio's design environment,
clicking on objects and
setting its properties, creating SQL connections as they call it,
relating them with data views etc.
since they try to make non-programmers programmers. I really don't see
a problem typing a few lines of
code for sake of knowing where my bug can happen to be, instead of
drawing in Visual Studio expecting it
to do most of the work for me. OK, then you enter the source and meet
those famous "phases" (I don't remember
exactly how they called them) through which the page gets until
finally parsed on the screen, where you
have to be REALLY aware what you may and what you must not put in each
"phase", which is all mentioned
in very detailed MSDN's "documentation" and is the #1 source of
bugs .NET-wise.
So, if the topic starter needs to be _forced_ to make all in classes,
then he/she can use Java. I don't
really see the reason for that since, like Wasmus said already, it is
a little bit silly to make
contact forms or other small pages with objects. There is place and
time for everything, so that's exactly
PHP (and C++, for example) philosophy - use OOP if you need it, don't
use it if you don't need it. It is
only an important thing to be able to notice that you need it, which
is another story.
I think PHP is quite enough to learn OOP, though e.g. I learned it
from C++, then Java, then PHP.
As for schools, etc. I don't know how old topic starter is, but if
they haven't outgrown college, this
is probably the best place for it. As for out of college schools,
online, tutorials etc. then it's probably
reading other people codes + experience + everything else. I don't
remember I've seen lately any good documents
online that teach *good* and involve practicing various OOP techniques
etc, except for various Design patterns
tutorials which you must make sure you've read.
http://en.wikipedia.org/wiki/Design_Patterns
http://www.csis.pace.edu/~bergin/patterns/ppoop.html
http://www.phpkitchen.com/index.php?/archives/173-OOP-Explan ation-of-the-Factory-Design-Pattern.html
etc.
Re: Furthering my education in OOP - where/how can one learn professionalskills?
am 07.11.2007 20:58:27 von Jerry Stuckle
firewoodtim@yahoo.com wrote:
> I need some help in furthering my education in OOP. I have developed
> a set of PHP scripts that I use in a fairly sophisticated database
> driven website, but I am not proud of the rather amateurish
> programming that I used to create the functionality. Although I use
> classes and objects to organize my data and their related functions,
> it seems to be only marginally better than plain procedural
> programming. For example, I do not use inheritance, much less
> polymorphism.
>
OK, so you've been doing object-based programming (instead of object
oriented programming). It's a good start, and where most people begin.
> The next step, it seems to me, is to become much more skilled in
> analyzing a program from an OOP point of view and learning the
> techniques for organizing the structure of the scripts and how to
> implement them in a website. In other words, I want to move from
> amateur to pro in terms of both career and technique.
>
That in itself requires years of work to become really adept. Even the
basics can get overwhelming at times. But it's easier if you start out
on small projects and work your way up.
Some of the things, like the organizing of scripts, are not really part
of OO (true OO designs are language-independent). But common sense
generally prevails here.
> Can someone point me in the direction of the right schools(online),
> books, websites, example code, or other assets that I can use to
> learn?
>
I haven't checked lately, but you might search amazon.com for books on
UML. There are several listed with good reviews. It's the most common
OO design technique used today amongst professionals.
But bear in mind you don't necessarily have to do a complete UML design
on everything. Many things will eventually come more naturally.
> Also, is PHP the best language to use to learn and implement the full
> power of OOP? If not, any suggestions?
>
My recommendation would be Java. It forces you into an OO framework and
supports all of the features of OO. Other languages like C++ support
OO, but allow you to write non-OO code, also. And it's easy for a
beginner to fall back into the using structured programming techniques.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 08.11.2007 00:24:07 von nc
On Nov 7, 6:11 am, firewood...@yahoo.com wrote:
>
> I need some help in furthering my education in OOP.
> I have developed a set of PHP scripts that I use in
> a fairly sophisticated database driven website, but
> I am not proud of the rather amateurish programming
> that I used to create the functionality. Although
> I use classes and objects to organize my data and
> their related functions, it seems to be only marginally
> better than plain procedural programming.
In fact, it is probably worse than procedural programming; using OOP
creates substantial overhead (initializing objects requires CPU cycles
and memory that would not be used if the code were procedural).
> The next step, it seems to me, is to become much more skilled in
> analyzing a program from an OOP point of view and learning the
> techniques for organizing the structure of the scripts and how to
> implement them in a website. In other words, I want to move from
> amateur to pro in terms of both career and technique.
If you want to do it in PHP, you need to start by learning the limits
of OOP. PHP developers often face a trade-off between development
time and application performance; code developed quickly (usually,
using an object-oriented framework) requires more system resources to
run, while code that runs fast has to stay away from all kinds of
abstraction, including OOP.
> Can someone point me in the direction of the right schools(online),
> books, websites, example code, or other assets that I can use to
> learn?
Read up on patterns. Note, however, that these days, most books on
patterns are written with Java in mind.
> Also, is PHP the best language to use to learn and implement
> the full power of OOP?
Definitely not. PHP is the best language to learn deficiencies of
OOP. :)
> If not, any suggestions?
C++ and Java.
Cheers,
NC
Re: Furthering my education in OOP - where/how can one learn professionalskills?
am 08.11.2007 05:29:08 von Jerry Stuckle
NC wrote:
> On Nov 7, 6:11 am, firewood...@yahoo.com wrote:
>> I need some help in furthering my education in OOP.
>> I have developed a set of PHP scripts that I use in
>> a fairly sophisticated database driven website, but
>> I am not proud of the rather amateurish programming
>> that I used to create the functionality. Although
>> I use classes and objects to organize my data and
>> their related functions, it seems to be only marginally
>> better than plain procedural programming.
>
> In fact, it is probably worse than procedural programming; using OOP
> creates substantial overhead (initializing objects requires CPU cycles
> and memory that would not be used if the code were procedural).
>
Properly done, OOP does not create any significant overhead. After all,
even in procedural programming you should initialize your variables.
>> The next step, it seems to me, is to become much more skilled in
>> analyzing a program from an OOP point of view and learning the
>> techniques for organizing the structure of the scripts and how to
>> implement them in a website. In other words, I want to move from
>> amateur to pro in terms of both career and technique.
>
> If you want to do it in PHP, you need to start by learning the limits
> of OOP. PHP developers often face a trade-off between development
> time and application performance; code developed quickly (usually,
> using an object-oriented framework) requires more system resources to
> run, while code that runs fast has to stay away from all kinds of
> abstraction, including OOP.
>
PHP is not good for learning OOP. And OOP does not require any
significant additional resources, when done properly.
>> Can someone point me in the direction of the right schools(online),
>> books, websites, example code, or other assets that I can use to
>> learn?
>
> Read up on patterns. Note, however, that these days, most books on
> patterns are written with Java in mind.
>
Which isn't a bad language to learn OOP. It is, however, heavy on
resources. But that is the language - not OOP.
>> Also, is PHP the best language to use to learn and implement
>> the full power of OOP?
>
> Definitely not. PHP is the best language to learn deficiencies of
> OOP. :)
>
I agree it's not the best language to learn OOP. But that's because it
doesn't implement a proper OO model.
>> If not, any suggestions?
>
> C++ and Java.
>
> Cheers,
> NC
>
>
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 08.11.2007 05:36:59 von Jake Barnes
On Nov 7, 9:11 am, firewood...@yahoo.com wrote:
> I need some help in furthering my education in OOP. I have developed
> a set of PHP scripts that I use in a fairly sophisticated database
> driven website, but I am not proud of the rather amateurish
> programming that I used to create the functionality. Although I use
> classes and objects to organize my data and their related functions,
> it seems to be only marginally better than plain procedural
> programming. For example, I do not use inheritance, much less
> polymorphism.
Since you're posting to a PHP forum, I'm going to assume you've an
interest in scripting languages. So I would say you should study Ruby.
It's an elegant scripting language, and more fully OOP than PHP. If
you're focused on web related work, then study Ruby on Rails, which
is a framework for developing web site. It's a very intelligent,
elegant framework, with a graceful language that allows a high level
of abstraction.
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 08.11.2007 05:41:55 von Jake Barnes
On Nov 7, 2:47 pm, Darko wrote:
> On Nov 7, 4:36 pm, Rob wrote:
>
>
>
> > On Nov 7, 2:11 pm, firewood...@yahoo.com wrote:
>
> > > I need some help in furthering my education in OOP. I have developed
> > > a set of PHP scripts that I use in a fairly sophisticated database
> > > driven website, but I am not proud of the rather amateurish
> > > programming that I used to create the functionality. Although I use
> > > classes and objects to organize my data and their related functions,
> > > it seems to be only marginally better than plain procedural
> > > programming. For example, I do not use inheritance, much less
> > > polymorphism.
>
> > > The next step, it seems to me, is to become much more skilled in
> > > analyzing a program from an OOP point of view and learning the
> > > techniques for organizing the structure of the scripts and how to
> > > implement them in a website. In other words, I want to move from
> > > amateur to pro in terms of both career and technique.
>
> > > Can someone point me in the direction of the right schools(online),
> > > books, websites, example code, or other assets that I can use to
> > > learn?
>
> > > Also, is PHP the best language to use to learn and implement the full
> > > power of OOP? If not, any suggestions?
>
> > Although I hate to say it, C#.Net is probably the best way to learn
> > OOP at the moment, as it pretty much forces you to write code in
> > the .Net way.
>
> If you hate to say it, then don't say it :) I know it is an expected
> behaviour here
> at comp.lang.php to go around saying how Microsoft's products are bad
> and how all the
> rest is great, but I'm not trying to do that since I try not to be
> emotionally related to
> something I consider only my job.
>
> So, if the topic starter needs to be _forced_ to make all in classes,
> then he/she can use Java. I don't
> really see the reason for that since, like Wasmus said already, it is
> a little bit silly to make
> contact forms or other small pages with objects. There is place and
> time for everything, so that's exactly
> PHP (and C++, for example) philosophy - use OOP if you need it, don't
> use it if you don't need it. It is
> only an important thing to be able to notice that you need it, which
> is another story.
Before anyone tries to learn Java, they should read the introductory
chapter in Bruce Tate's recent book:
http://www.amazon.com/Java-Ruby-Manager-Pragmatic-Programmer s/dp/0976694093/ref=sr_1_1/105-2471520-1320409?ie=UTF8&s=boo ks&qid=1194496791&sr=8-1
He makes a good case for switching from Java to Ruby for all kinds of
work, especially web work.
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 08.11.2007 05:52:24 von Jake Barnes
On Nov 7, 9:11 am, firewood...@yahoo.com wrote:
> The next step, it seems to me, is to become much more skilled in
> analyzing a program from an OOP point of view and learning the
> techniques for organizing the structure of the scripts and how to
> implement them in a website. In other words, I want to move from
> amateur to pro in terms of both career and technique.
Building something somewhat large scale (I mean non-trivial) in an OOP
style is the best way to learn OOP. You'll make lots of mistakes and
that will be educational. You can, at the same time, read about design
patterns, and your reading should inform your code writing, and your
code writing will give you an appreciation of the design patterns you
are reading about.
> Also, is PHP the best language to use to learn and implement the full
> power of OOP? If not, any suggestions?
Between 2002 and 2005 myself and some friends built a content
management system using PHP 4. We were consciously designing as an OOP
design. We used objects to mask the connections to the database, and
objects to mask access to the server directories (only the code had to
know where things were).
In 2006 I came to the conclusion that the design was much too heavy,
and all the masking had slowed things down. I've since been moving
toward a style of coding that I think most people would find quite
primitive - lots of plain PHP code right in the templates, nothing
masked, everything plain, very little abstraction, lots of stuff hard
coded. Stuff can be abstracted out once a project is mature.
The downside of OOP is that when a new programmer comes in, they've a
harder time figuring out what is going on. Everything is masked and
abstracted. The upside of plain, procedural code is that a new
programmer can usually pick it up faster. This may not be an issue for
you, but for me, being able to hand a project off to other programmers
has been one of my top concerns, so I've come to favor plain code over
OOP.
Re: Furthering my education in OOP - where/how can one learn professionalskills?
am 08.11.2007 05:53:15 von Jerry Stuckle
lawrence k wrote:
> On Nov 7, 2:47 pm, Darko wrote:
>> On Nov 7, 4:36 pm, Rob wrote:
>>
>>
>>
>>> On Nov 7, 2:11 pm, firewood...@yahoo.com wrote:
>>>> I need some help in furthering my education in OOP. I have developed
>>>> a set of PHP scripts that I use in a fairly sophisticated database
>>>> driven website, but I am not proud of the rather amateurish
>>>> programming that I used to create the functionality. Although I use
>>>> classes and objects to organize my data and their related functions,
>>>> it seems to be only marginally better than plain procedural
>>>> programming. For example, I do not use inheritance, much less
>>>> polymorphism.
>>>> The next step, it seems to me, is to become much more skilled in
>>>> analyzing a program from an OOP point of view and learning the
>>>> techniques for organizing the structure of the scripts and how to
>>>> implement them in a website. In other words, I want to move from
>>>> amateur to pro in terms of both career and technique.
>>>> Can someone point me in the direction of the right schools(online),
>>>> books, websites, example code, or other assets that I can use to
>>>> learn?
>>>> Also, is PHP the best language to use to learn and implement the full
>>>> power of OOP? If not, any suggestions?
>>> Although I hate to say it, C#.Net is probably the best way to learn
>>> OOP at the moment, as it pretty much forces you to write code in
>>> the .Net way.
>> If you hate to say it, then don't say it :) I know it is an expected
>> behaviour here
>> at comp.lang.php to go around saying how Microsoft's products are bad
>> and how all the
>> rest is great, but I'm not trying to do that since I try not to be
>> emotionally related to
>> something I consider only my job.
>>
>> So, if the topic starter needs to be _forced_ to make all in classes,
>> then he/she can use Java. I don't
>> really see the reason for that since, like Wasmus said already, it is
>> a little bit silly to make
>> contact forms or other small pages with objects. There is place and
>> time for everything, so that's exactly
>> PHP (and C++, for example) philosophy - use OOP if you need it, don't
>> use it if you don't need it. It is
>> only an important thing to be able to notice that you need it, which
>> is another story.
>
> Before anyone tries to learn Java, they should read the introductory
> chapter in Bruce Tate's recent book:
>
> http://www.amazon.com/Java-Ruby-Manager-Pragmatic-Programmer s/dp/0976694093/ref=sr_1_1/105-2471520-1320409?ie=UTF8&s=boo ks&qid=1194496791&sr=8-1
>
> He makes a good case for switching from Java to Ruby for all kinds of
> work, especially web work.
>
>
>
>
It's not a "good case". He makes some assumptions which are not valid -
like it will only be used for Web applications. Not true - I've written
a lot more Java code for non-web based apps than anything else. Ruby is
good on the web - but quite frankly, it doesn't do well in other apps.
OO is NOT just a web design strategy!
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Furthering my education in OOP - where/how can one learn professionalskills?
am 08.11.2007 14:38:24 von Jerry Stuckle
lawrence k wrote:
> On Nov 7, 9:11 am, firewood...@yahoo.com wrote:
>> The next step, it seems to me, is to become much more skilled in
>> analyzing a program from an OOP point of view and learning the
>> techniques for organizing the structure of the scripts and how to
>> implement them in a website. In other words, I want to move from
>> amateur to pro in terms of both career and technique.
>
> Building something somewhat large scale (I mean non-trivial) in an OOP
> style is the best way to learn OOP. You'll make lots of mistakes and
> that will be educational. You can, at the same time, read about design
> patterns, and your reading should inform your code writing, and your
> code writing will give you an appreciation of the design patterns you
> are reading about.
>
>
Agreed.
>
>
>> Also, is PHP the best language to use to learn and implement the full
>> power of OOP? If not, any suggestions?
>
> Between 2002 and 2005 myself and some friends built a content
> management system using PHP 4. We were consciously designing as an OOP
> design. We used objects to mask the connections to the database, and
> objects to mask access to the server directories (only the code had to
> know where things were).
>
Two problems - a) You were using PHP 4, and b) you were relatively new
to OO.
Your lack of experience meant you didn't always know where the
bottlenecks could be, and how to avoid them. And since you were on PHP
4, you couldn't implement a lot of them anyway.
> In 2006 I came to the conclusion that the design was much too heavy,
> and all the masking had slowed things down. I've since been moving
> toward a style of coding that I think most people would find quite
> primitive - lots of plain PHP code right in the templates, nothing
> masked, everything plain, very little abstraction, lots of stuff hard
> coded. Stuff can be abstracted out once a project is mature.
>
Better to have a good design and abstract from the start. That way you
aren't rewriting your code all the time.
> The downside of OOP is that when a new programmer comes in, they've a
> harder time figuring out what is going on. Everything is masked and
> abstracted. The upside of plain, procedural code is that a new
> programmer can usually pick it up faster. This may not be an issue for
> you, but for me, being able to hand a project off to other programmers
> has been one of my top concerns, so I've come to favor plain code over
> OOP.
>
>
>
Properly documented, OOP is *much easier* for a new programmer, because
he/she doesn't have to worry about the internals. The interface is all
that's needed.
For instance - do you worry about the internal format of a floating
point number? Nope - it's abstracted for you. But you know the
interface - and can use them.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 08.11.2007 15:29:56 von firewoodtim
Let me start by apologizing for the length of this note. I believe it
is worth reading, however, because it must epitomize the situations of
a lot of people who try to become serious programmers. I hope it
helps more people than myself.
Also, thank you all for the feedback. The generosity of the people
who post here is clear. You want to help others. It is much
appreciated.
After reading many of the responses, it seemed beneficial that I be
more specific in describing the system I've developed and the
situation (quagmire?) in which I currently find myself. Also, from a
purely intellectual point of view, it would be good to get some advice
on how best to achieve elegance, both in my programming and in
charting the course of my future education.
About 3 years ago I had a dramatic change in career (a failed
non-cumputer-related business), and I decided to make a new career of
my hobby - website development. At that time, I had a first-course
knowledge of C, C++, Java, Assembly, and I had developed some trivial
sites in a Linux/Apache/MySQL/PHP environment. It was fun, and I had
some savings, so I threw myself into developing an idea that I'd been
playing with for some time.
Now after three years, I find myself in possession of a feature-rich
PHP system that, as an end product, provides a website-owner with a
site they can modify in the following ways:
1. Add/delete/modify categories in a multi-level menu system (several
menu layouts available).
2. Add/delete/modify several "elements" which constitute the content
of the website pages. An element is a title+text+image combo, along
with formatting options (position, colors, sizes, etc.).
3. Drag and drop absolute placement of elements.
4. Drag-based resizing of images, text boxes and titles within
elements, as well as the overall elements themselves.
5. Combinations of parent elements and child elements that enable
multi-element sets, each subelement independently formattable.
6. "Components", which are product-like, independent pages, branching
off the category pages. These provide the facility to implement any
number of independent pages from thumbnail links off a parent category
page.
7. A feature-rich highest-level admin system, where I create the
original, empty website for a customer and provide the formatting and
other features that the customer wants for his/her site. This
includes a storage facility for each website's design that can provide
a template for new sites when the client wishes to duplicate the
features of a previously designed site.
8. more, more, more... the list grows
However, all that has come at a cost. I am now semi-paralyzed when I
start to create a new feature. I have to trace through miles of code
that is not quite "spaghetti-code", but does remind me of that phrase.
I know the system well enough to do what I need to do, but it
sometimes takes me days to do what I know should take me hours.
For version 2, I need to rewrite the code from the ground up and I
want to get started on the right track. That is the purpose of my
original post. Can anyone give feedback on that?
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 08.11.2007 16:24:58 von firewoodtim
Another possibility in furthering an education in programming is to
study the work of high-quality, professional programmers. What
existing, open-source projects are built with the best, most elegant
programming techniques? Since my own project so closely resembles a
content management system, I suppose that class of projects would be
the best to study. Any suggestions?
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 08.11.2007 17:33:31 von Rob
On Nov 8, 2:29 pm, firewood...@yahoo.com wrote:
> Let me start by apologizing for the length of this note. I believe it
> is worth reading, however, because it must epitomize the situations of
> a lot of people who try to become serious programmers. I hope it
> helps more people than myself.
>
> Also, thank you all for the feedback. The generosity of the people
> who post here is clear. You want to help others. It is much
> appreciated.
>
> After reading many of the responses, it seemed beneficial that I be
> more specific in describing the system I've developed and the
> situation (quagmire?) in which I currently find myself. Also, from a
> purely intellectual point of view, it would be good to get some advice
> on how best to achieve elegance, both in my programming and in
> charting the course of my future education.
>
> About 3 years ago I had a dramatic change in career (a failed
> non-cumputer-related business), and I decided to make a new career of
> my hobby - website development. At that time, I had a first-course
> knowledge of C, C++, Java, Assembly, and I had developed some trivial
> sites in a Linux/Apache/MySQL/PHP environment. It was fun, and I had
> some savings, so I threw myself into developing an idea that I'd been
> playing with for some time.
>
> Now after three years, I find myself in possession of a feature-rich
> PHP system that, as an end product, provides a website-owner with a
> site they can modify in the following ways:
> 1. Add/delete/modify categories in a multi-level menu system (several
> menu layouts available).
> 2. Add/delete/modify several "elements" which constitute the content
> of the website pages. An element is a title+text+image combo, along
> with formatting options (position, colors, sizes, etc.).
> 3. Drag and drop absolute placement of elements.
> 4. Drag-based resizing of images, text boxes and titles within
> elements, as well as the overall elements themselves.
> 5. Combinations of parent elements and child elements that enable
> multi-element sets, each subelement independently formattable.
> 6. "Components", which are product-like, independent pages, branching
> off the category pages. These provide the facility to implement any
> number of independent pages from thumbnail links off a parent category
> page.
> 7. A feature-rich highest-level admin system, where I create the
> original, empty website for a customer and provide the formatting and
> other features that the customer wants for his/her site. This
> includes a storage facility for each website's design that can provide
> a template for new sites when the client wishes to duplicate the
> features of a previously designed site.
> 8. more, more, more... the list grows
>
> However, all that has come at a cost. I am now semi-paralyzed when I
> start to create a new feature. I have to trace through miles of code
> that is not quite "spaghetti-code", but does remind me of that phrase.
> I know the system well enough to do what I need to do, but it
> sometimes takes me days to do what I know should take me hours.
>
> For version 2, I need to rewrite the code from the ground up and I
> want to get started on the right track. That is the purpose of my
> original post. Can anyone give feedback on that?
Although formal qualifications and training are not to be sniffed at,
it sounds like you need to do some heavy reading on 'best coding
practices' and the like.
There are dozens of books out there describing different models,
practices and methods.
Perhaps you could do some searches for those, or are there any
specific recommendations from anyone else listening?
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 09.11.2007 04:58:51 von Jake Barnes
On Nov 8, 8:38 am, Jerry Stuckle wrote:
> lawrence k wrote:
> > The downside of OOP is that when a new programmer comes in, they've a
> > harder time figuring out what is going on. Everything is masked and
> > abstracted. The upside of plain, procedural code is that a new
> > programmer can usually pick it up faster. This may not be an issue for
> > you, but for me, being able to hand a project off to other programmers
> > has been one of my top concerns, so I've come to favor plain code over
> > OOP.
>
> Properly documented, OOP is *much easier* for a new programmer, because
> he/she doesn't have to worry about the internals. The interface is all
> that's needed.
>
> For instance - do you worry about the internal format of a floating
> point number? Nope - it's abstracted for you. But you know the
> interface - and can use them.
A floating point number in PHP? Last time I checked PHP was written in
plain C. It is not written OO anything. If you're trying to say that
complicated things can be made simple with intelligent masking, then I
agree with you. But that doesn't have anything to do with OO, does
it?
The style one adopts should be well suited to the kinds of clients one
acquires. I've mostly been working with start-ups where the projects
start, stop, re-focus, lurch forward in a panic, are canceled, then
revived, then re-purposed, then declared "ready to launch" about two
months before I think they are ready to launch. Personally, I never
get the time to debug any masking code I might write. Buggy code
hidden under a mask is worse than plain code. The mask simply makes
debugging harder.
If you work on projects that are well-planned and have budgets that
match the ambition of the project, then I'd say it is best to build
the code up in layers, with each layer resting on the layer below, and
each layer well tested before the next higher level is built. And OOP
is certainly the preferred way to do for such projects.
Re: Furthering my education in OOP - where/how can one learn professionalskills?
am 09.11.2007 05:14:15 von Jerry Stuckle
lawrence k wrote:
> On Nov 8, 8:38 am, Jerry Stuckle wrote:
>> lawrence k wrote:
>>> The downside of OOP is that when a new programmer comes in, they've a
>>> harder time figuring out what is going on. Everything is masked and
>>> abstracted. The upside of plain, procedural code is that a new
>>> programmer can usually pick it up faster. This may not be an issue for
>>> you, but for me, being able to hand a project off to other programmers
>>> has been one of my top concerns, so I've come to favor plain code over
>>> OOP.
>> Properly documented, OOP is *much easier* for a new programmer, because
>> he/she doesn't have to worry about the internals. The interface is all
>> that's needed.
>>
>> For instance - do you worry about the internal format of a floating
>> point number? Nope - it's abstracted for you. But you know the
>> interface - and can use them.
>
>
> A floating point number in PHP? Last time I checked PHP was written in
> plain C. It is not written OO anything. If you're trying to say that
> complicated things can be made simple with intelligent masking, then I
> agree with you. But that doesn't have anything to do with OO, does
> it?
>
Yes, it does. All a floating point number is is an object. It has a
state and operations you can perform on it. The only difference is it's
an object provided by the compiler.
> The style one adopts should be well suited to the kinds of clients one
> acquires. I've mostly been working with start-ups where the projects
> start, stop, re-focus, lurch forward in a panic, are canceled, then
> revived, then re-purposed, then declared "ready to launch" about two
> months before I think they are ready to launch. Personally, I never
> get the time to debug any masking code I might write. Buggy code
> hidden under a mask is worse than plain code. The mask simply makes
> debugging harder.
>
Clients don't care about style. They care about results. And proper
design resolves most of these problems, and minimizes the effects of the
others.
Sure, sometimes you have to rewrite code. But a proper OO design limits
the effects of any changes.
And debugging is easier because you can debug and run regression tests
at the class level. Once that's working according to the design, it
won't be a problem in the code.
> If you work on projects that are well-planned and have budgets that
> match the ambition of the project, then I'd say it is best to build
> the code up in layers, with each layer resting on the layer below, and
> each layer well tested before the next higher level is built. And OOP
> is certainly the preferred way to do for such projects.
>
None of the projects I've been on are like that. But every project I've
been on in the last 18 years has built like that. And almost every one
has come in ahead of schedule and under budget. Those which didn't
didn't have a realistic budget or schedule to start with.
It works. And it works better than "code and go".
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 09.11.2007 16:01:17 von Rob
On Nov 8, 3:24 pm, firewood...@yahoo.com wrote:
> Another possibility in furthering an education in programming is to
> study the work of high-quality, professional programmers. What
> existing, open-source projects are built with the best, most elegant
> programming techniques? Since my own project so closely resembles a
> content management system, I suppose that class of projects would be
> the best to study. Any suggestions?
The 'best techniques' are in the eye of the beholder! Everyone has
their own opinion on what is best.
I read an interesting article recently that said OOP and frameworks
are just there to make themselves look good, and in the real world,
procedural programming is actually much easier to read, write and
change.
I'm not sure if I agree with that, but I can certainly see what the
author was getting at, and it definitely shows that there is no single
'best method'.
If you want to see an example of OOP in action for a CMS system, then
I'd suggest having a look at the source code for Mambo or Joomla.
Beware though, to truly understand it and benefit from the way it
works, you probably need to spend a few weeks getting your hands dirty
- it's no good just having a quick read through.
Rob.
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 09.11.2007 19:23:20 von firewoodtim
On Fri, 09 Nov 2007 07:01:17 -0800, Rob
wrote:
>On Nov 8, 3:24 pm, firewood...@yahoo.com wrote:
<"snip">
>If you want to see an example of OOP in action for a CMS system, then
>I'd suggest having a look at the source code for Mambo or Joomla.
>Beware though, to truly understand it and benefit from the way it
>works, you probably need to spend a few weeks getting your hands dirty
>- it's no good just having a quick read through.
>
>Rob.
Thanks for that lead. I had been considering looking into Joomla for
precisely that purpose, but I was not sure if it was the right CMS for
my purposes. It is the most popular open source CMS (Drupal is number
two), but that does not mean it is good for learning code. However,
they do have an active and well-supported developer community, with a
special consideration for beginners, like myself. I will probably be
able to learn quite well there.
As for the difficulty of the code to which you refer, I just want to
know that the code is well-written. That will resolve my doubts that
the struggle with the complexities is worth it. Thanks for that
assurance. Joomla it is.
Re: Furthering my education in OOP - where/how can one learn professional skills?
am 10.11.2007 11:00:24 von Neil
On Nov 9, 10:23 am, firewood...@yahoo.com wrote:
> On Fri, 09 Nov 2007 07:01:17 -0800, Rob
> wrote:
>
> >On Nov 8, 3:24 pm, firewood...@yahoo.com wrote:
>
> <"snip">
>
> >If you want to see an example of OOP in action for a CMS system, then
> >I'd suggest having a look at the source code for Mambo or Joomla.
> >Beware though, to truly understand it and benefit from the way it
> >works, you probably need to spend a few weeks getting your hands dirty
> >- it's no good just having a quick read through.
>
> >Rob.
>
> Thanks for that lead. I had been considering looking into Joomla for
> precisely that purpose, but I was not sure if it was the right CMS for
> my purposes. It is the most popular open source CMS (Drupal is number
> two), but that does not mean it is good for learning code. However,
> they do have an active and well-supported developer community, with a
> special consideration for beginners, like myself. I will probably be
> able to learn quite well there.
>
> As for the difficulty of the code to which you refer, I just want to
> know that the code is well-written. That will resolve my doubts that
> the struggle with the complexities is worth it. Thanks for that
> assurance. Joomla it is.
Check out the Zend Framework. I personally think its pretty well
written and designed.
One of the things I particularly like about it is that it isn't just
about OOP, inheritance, and polymorphism
but that they also make good use of patterns.
Re: Furthering my education in OOP - where/how can one learn
am 16.11.2007 20:19:07 von Jake Barnes
On Nov 8, 11:14 pm, Jerry Stuckle wrote:
> lawrence k wrote:
> > The style one adopts should be well suited to the kinds of clients one
> > acquires. I've mostly been working with start-ups where the projects
> > start, stop, re-focus, lurch forward in a panic, are canceled, then
> > revived, then re-purposed, then declared "ready to launch" about two
> > months before I think they are ready to launch. Personally, I never
> > get the time to debug any masking code I might write. Buggy code
> > hidden under a mask is worse than plain code. The mask simply makes
> > debugging harder.
>
> Clients don't care about style. They care about results. And proper
> design resolves most of these problems, and minimizes the effects of the
> others.
>
> Sure, sometimes you have to rewrite code. But a proper OO design limits
> the effects of any changes.
>
> And debugging is easier because you can debug and run regression tests
> at the class level. Once that's working according to the design, it
> won't be a problem in the code.
>
> > If you work on projects that are well-planned and have budgets that
> > match the ambition of the project, then I'd say it is best to build
> > the code up in layers, with each layer resting on the layer below, and
> > each layer well tested before the next higher level is built. And OOP
> > is certainly the preferred way to do for such projects.
>
> None of the projects I've been on are like that.
In which case, we are not actually in disagreement, are we?
Re: Furthering my education in OOP - where/how can one learn
am 16.11.2007 20:22:22 von Jake Barnes
On Nov 9, 1:23 pm, firewood...@yahoo.com wrote:
> On Fri, 09 Nov 2007 07:01:17 -0800, Rob
> wrote:
>
> >On Nov 8, 3:24 pm, firewood...@yahoo.com wrote:
>
> <"snip">
>
> >If you want to see an example of OOP in action for a CMS system, then
> >I'd suggest having a look at the source code for Mambo or Joomla.
> >Beware though, to truly understand it and benefit from the way it
> >works, you probably need to spend a few weeks getting your hands dirty
> >- it's no good just having a quick read through.
>
> >Rob.
>
> Thanks for that lead. I had been considering looking into Joomla for
> precisely that purpose, but I was not sure if it was the right CMS for
> my purposes. It is the most popular open source CMS (Drupal is number
> two), but that does not mean it is good for learning code.
That's an interesting statistic. I would have thought there are more
installations of WordPress than of Joomla, if for no other reason than
WordPress tends to be used on smaller sites and there are more smaller
sites in the world than there are larger sites. Where did you read
that Joomla was the most popular open source CMS?
Re: Furthering my education in OOP - where/how can one learn professionalskills?
am 16.11.2007 21:50:29 von Jerry Stuckle
lawrence k wrote:
> On Nov 8, 11:14 pm, Jerry Stuckle wrote:
>> lawrence k wrote:
>>> The style one adopts should be well suited to the kinds of clients one
>>> acquires. I've mostly been working with start-ups where the projects
>>> start, stop, re-focus, lurch forward in a panic, are canceled, then
>>> revived, then re-purposed, then declared "ready to launch" about two
>>> months before I think they are ready to launch. Personally, I never
>>> get the time to debug any masking code I might write. Buggy code
>>> hidden under a mask is worse than plain code. The mask simply makes
>>> debugging harder.
>> Clients don't care about style. They care about results. And proper
>> design resolves most of these problems, and minimizes the effects of the
>> others.
>>
>> Sure, sometimes you have to rewrite code. But a proper OO design limits
>> the effects of any changes.
>>
>> And debugging is easier because you can debug and run regression tests
>> at the class level. Once that's working according to the design, it
>> won't be a problem in the code.
>>
>>> If you work on projects that are well-planned and have budgets that
>>> match the ambition of the project, then I'd say it is best to build
>>> the code up in layers, with each layer resting on the layer below, and
>>> each layer well tested before the next higher level is built. And OOP
>>> is certainly the preferred way to do for such projects.
>> None of the projects I've been on are like that.
>
> In which case, we are not actually in disagreement, are we?
>
>
>
No, we aren't. And you shouldn't quote out of context.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Re: Furthering my education in OOP - where/how can one learn
am 18.11.2007 21:09:11 von Jake Barnes
On Nov 16, 3:50 pm, Jerry Stuckle wrote:
> lawrence k wrote:
> > On Nov 8, 11:14 pm, Jerry Stuckle wrote:
> >> lawrence k wrote:
> >>> The style one adopts should be well suited to the kinds of clients one
> >>> acquires. I've mostly been working with start-ups where the projects
> >>> start, stop, re-focus, lurch forward in a panic, are canceled, then
> >>> revived, then re-purposed, then declared "ready to launch" about two
> >>> months before I think they are ready to launch. Personally, I never
> >>> get the time to debug any masking code I might write. Buggy code
> >>> hidden under a mask is worse than plain code. The mask simply makes
> >>> debugging harder.
> >> Clients don't care about style. They care about results. And proper
> >> design resolves most of these problems, and minimizes the effects of the
> >> others.
>
> >> Sure, sometimes you have to rewrite code. But a proper OO design limits
> >> the effects of any changes.
>
> >> And debugging is easier because you can debug and run regression tests
> >> at the class level. Once that's working according to the design, it
> >> won't be a problem in the code.
>
> >>> If you work on projects that are well-planned and have budgets that
> >>> match the ambition of the project, then I'd say it is best to build
> >>> the code up in layers, with each layer resting on the layer below, and
> >>> each layer well tested before the next higher level is built. And OOP
> >>> is certainly the preferred way to do for such projects.
> >> None of the projects I've been on are like that.
>
> > In which case, we are not actually in disagreement, are we?
>
> No, we aren't. And you shouldn't quote out of context.
Sorry. I'm using Google Groups to read this thread, and the design of
their pages leaves the context fairly clear. One only has to look up
the page slightly to see your whole post.
Re: Furthering my education in OOP - where/how can one learn professionalskills?
am 18.11.2007 22:30:02 von Jerry Stuckle
lawrence k wrote:
> On Nov 16, 3:50 pm, Jerry Stuckle wrote:
>> lawrence k wrote:
>>> On Nov 8, 11:14 pm, Jerry Stuckle wrote:
>>>> lawrence k wrote:
>>>>> The style one adopts should be well suited to the kinds of clients one
>>>>> acquires. I've mostly been working with start-ups where the projects
>>>>> start, stop, re-focus, lurch forward in a panic, are canceled, then
>>>>> revived, then re-purposed, then declared "ready to launch" about two
>>>>> months before I think they are ready to launch. Personally, I never
>>>>> get the time to debug any masking code I might write. Buggy code
>>>>> hidden under a mask is worse than plain code. The mask simply makes
>>>>> debugging harder.
>>>> Clients don't care about style. They care about results. And proper
>>>> design resolves most of these problems, and minimizes the effects of the
>>>> others.
>>>> Sure, sometimes you have to rewrite code. But a proper OO design limits
>>>> the effects of any changes.
>>>> And debugging is easier because you can debug and run regression tests
>>>> at the class level. Once that's working according to the design, it
>>>> won't be a problem in the code.
>>>>> If you work on projects that are well-planned and have budgets that
>>>>> match the ambition of the project, then I'd say it is best to build
>>>>> the code up in layers, with each layer resting on the layer below, and
>>>>> each layer well tested before the next higher level is built. And OOP
>>>>> is certainly the preferred way to do for such projects.
>>>> None of the projects I've been on are like that.
>>> In which case, we are not actually in disagreement, are we?
>> No, we aren't. And you shouldn't quote out of context.
>
>
> Sorry. I'm using Google Groups to read this thread, and the design of
> their pages leaves the context fairly clear. One only has to look up
> the page slightly to see your whole post.
>
>
>
Yes, but when you quote, you need to quote the whole thing. The way you
tried to quote me indicated we were in agreement, but when you read the
entire quote, we are diametrically opposed.
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================