Re: functions classes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Bigmark,

I have been involved in the evolution of the development process and architecture called functional normalization. I do intend to post some detail on this at funkifunctions.blogspot.com very soon.

Anyhow, using this method might help you some what. The trick being to look through your script and see if the same thing is being done in more than one place. For example, if you find a piece of code that converts a string into a URL and that piece of code is REPEATED through thes script, then place that code in a function and replace the instance of the code with function calls.

Over a period of time you will see more and more of your code turn into functions. Once this process has started you will be able to predict to some extent what new pieces of code could be re-used in this way and hence write them as functions also.

This approach has proved to be extremely successful in advancing the careers and coding practices of developers inside and contractors to the project network (www.project-network.com).

If you would like, I am very happy to take a script from you and convert it over to functions. I will also let you know when more material on FN is posted to the blogsphere.

As for classes. I would recommend avoiding thinking about these yet. Function level re-use is a better start discipline that class level re-use IMHO. I know this is an contentious issue. Having been an avid OO programmer for many years I have evolved away from this, other people have different views (yes really, I did a lot of OO work with Java/Weblogic/C++/iTCL etc etc etc - please don't flame - not interested!).

For more thoughts on what I don't like about OO:
http://deployview.com/blog/2006/08/object-oriented-poison.html

Best wishes and good luck

AJ


Mourad Boulahboub wrote:
Hi Bigmark,

Bigmark schrieb am 25.08.2006 11:39:
Can anyone tell me if it is relatively an easy process for an experienced
coder (not me) to convert a php script to mainly functions/classes.
I have my own script that i would like to make more streamlined as it is
becoming very difficult to work with.


it's not impossible, but can take a lot of time to pick the script to
pieces and get it converted to a script (ore more coherent scripts) with
functions and/or classes.
It depends on the script itself.

Greets
Mourad


--
www.deployview.com
www.nerds-central.com
www.project-network.com

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux