Chapter 12. Better Living Through Code Reuse
At one time in my career, I was a consultant, or, if you prefer, a hired gun. My job was to ride into town, clean up things, and then ride off into the sunset. It was like being a Wild West hero, ...
12.1. Reuse = Laziness
I'm not really sure whether it is a character flaw or a skill, but I have a tendency to code some routines twice. The first time is to solve the particular problem at hand; the second time is so that I have a generic solut...
12.2. JavaScript Objects
Although it's not an object-oriented language, JavaScript is an object-based language. This means that, although it might not be as powerful as PHP, Ruby, or Java, it is still pretty darn powerful. Add the fact that it is ...
12.3. Generic XSLT
Whenever I'm creating an XSL style sheet, unless I'm very, very careful, my style sheets are basically a one-trick pony. Yeah, they do that one trick well, but as I said before, I'm paid by the page, not by the line. Maybe this ...
12.4. Summary
The advantages of code reuse are obvious; large pieces of code need only be designed, coded, tested, and documented once. Whether it is a class constructor, a function, or an XSL style sheet, if at least part of a solution is alrea...
С 2009 года мы стали переводить структура сайта на различные языки. Сайт теперь будет содержать книги не только на английском языке, но также и на других европейских языках, в том числе и на Русском языке.