NYCPHP Meetup

NYPHP.org

[nycphp-talk] [Re: Code cleanliness vs. code popularity]

Anirudh Zala arzala at gmail.com
Sun Sep 18 08:27:15 EDT 2005


In general I would call OO as Luxury added to normal way of programming.
So it is meant to be only for those groups of programmers who can afford
it (in general, who really can understand it and can use it
effectively). Since there is not any standard convention in programming
that what technology or framework is to be used, programmer can choose
either any 1 of both or both of them. This entirely depends upon the
person who is going to code and the level of his/her experience.

Normally OO framework is used in Product based softwares where 80%-90%
requirements are defined, so developers can start building whatever kind
of framework according to requirements. And in future changes can be
released in terms of patches or service packs. So the real beauty of OO
programming shines only when you have most of requirements defined in
your mind.

But in other case where Service based softwares are developed, where at
a time you would have only half of the total requirements defined. So if
you start coding your software entirely using OO techniques, you might
have problems in future when some requirements differ in significant way
as you can not change frameworks or code easily which  is OO based. So
here you must choose mix environments where you design some code using
OO techniques and some code using procedural techniques like normal
functions. Most of web based softwares are service based only, because
requirements often get changed time by time depending upon users'
requests or by companies policies.

Though procedural code adds repetitive works sometimes, it keeps your
software easy to understand by new programmers, because web based
softwares are developed to keep running for long time and obviously,
team of same programmer can not be there always, as they might have been
moved to other projects or simply their life line is over.

You can see that C++ and Java are mainly OO programming languages, but
could you see their Effective versions that can be used for developing
web based softwares?

So personally, I would use both approaches in effective way while
developing web based softwares.

Thanks

Anirudh Zala

Jayesh Sheth wrote:
> Hello all,
> 
> I was recently reading through the phpBB source code, and had some
> observations to shares. In most of the pages / script files I looked
> through, there were 1000 - 2000 lines of PHP code, with no functions or
> comments. While the code itself is strictly procedural, it is also to
> the point, and not indecipherable.
> 
> Still, some interesting questions came to me: how can one of the most
> popular PHP applications be written in eighties-style procedural code?
> Or, to rephrase it: are object-oriented design, (fancy) frameworks not
> useful in practice? How many of you have worked with commercial, open
> source or in-house frameworks? Have you found these frameworks to be
> useful in the long run, or do they just get in the way?
> 
> I have long been a fan of PEAR (and other external / third-party)
> libraries. I much prefer to save myself work, when I do not have to
> reinvent the wheel. Still, in many companies, people prefer to write
> everything from scratch, often wrapped up in laborious frameworks. In
> your collective experience, what's the best policy for code development?
> In other words: bang it out, test it, ship it, receive feedback, fix it,
> and then back to the beginning again, or: huge design upfront, OO or
> functionized code,UML diagrams, and the 'f' word: a framework.
> 
> I personally cannot write strictly procedural code any more, and I
> prefer a mix of functionized and OO code. Still, real world applications
> - popular real world applications, often totally avoid this approach.
> So, what gives?
> 
> - Jay
> _______________________________________________
> New York PHP Talk Mailing List
> AMP Technology
> Supporting Apache, MySQL and PHP
> http://lists.nyphp.org/mailman/listinfo/talk
> http://www.nyphp.org
> 

----------------------------------------------------------------
Anirudh Zala (Production Manager),    ASPL, 814-815, Star Plaza,
Ph: +91 281 245 1894                  Phhulchhab Square,
anirudh at aspl.in                       Rajkot 360001, Gujarat
http://www.aspl.in                    INDIA
----------------------------------------------------------------


-- 
----------------------------------------------------------------
Anirudh Zala (Production Manager),    ASPL, 814-815, Star Plaza,
Ph: +91 281 245 1894                  Phhulchhab Square,
anirudh at aspl.in                       Rajkot 360001, Gujarat
http://www.aspl.in                    INDIA
----------------------------------------------------------------



More information about the talk mailing list