[Typo3-dev] Good software design (Was: Smart Content Rendering)

Dmitry Dulepov typo3 at fm-world.ru
Wed Oct 26 08:24:27 CEST 2005


Hi!

Bas v.d. Wiel wrote:
> I definately class as a wannabe with some self-taught programming
> skills. I find it's very very hard to learn proper software
> development/system design 'on your own', that is outside a university or
> other course setting. I don't have the time or the money (they're
> mutually exclusive, sadly) to get back into university but I would like
> to learn how to design software well. Can you or anyone else recommend
> any good books on the subject? Maybe even PHP-specific even though I
> realize good design should be language-neutral? I'd like my own TYPO3
> extensions to be able to stand up to public scrutiny.. The only books I
> find though, are PHP and SQL beginner books but I'm comfortably past
> that stage.. looking for guidance.

I cannot recommend books (I rarely buy books in English) but what you
can do is a set of simple exercises that will greatly improve your skills :)

(1) Read various coding guidelines. Although they often refer more to
formatting, they may contain very good ideas about code writing (for
example, keep funtions small - within one screen). One of the best
coding convention documents is available for Java from Sun.
(2) Pick up a couple of code libraries (ADODB, phpNuke, Typo3 :)) and
try to find how they follow guidelines you have read. The more obvious
flows you find, they better you will know how to write code yourself. It
simply comes automatic: after you saw "bad" code, you will not repeat it.
(3) take your own code that you wrote some time ago. Examine it. See, if
you have unnecessary copies of code blocks, large functions, string that
not externalized, etc.
(4) Read tips about optimizing PHP scripts. Simplest start from using
single quotes instead of double quotes (gives large performance
increase). See if you code follows these tips.

It all takes time. And the main thing is practice. You can read many
books but it will not help unless you practice. The best way to learn is
to study others' mistakes, not your own (was it Bismark's idea?).

Good luck! :)

Dmitry.




More information about the TYPO3-dev mailing list