Rich Morin
Posts: 3
Nickname: rdm
Registered: Jan, 2006
|
|
Re: Ruby, PHP and a Conference
|
Posted: Jan 27, 2006 10:37 AM
|
|
I came to PHP, curiously, by way of Ruby. I had been quite impressed with the power and convenience of Embedded Ruby and wished that I had a way to do something like this in my everyday web pages. Although I could have hassled with getting Ruby and Erb support, I tried PHP and found it to be quite a reasonable solution. FWIW, I put most of my PHP function definitions into a separate file, then include them in the "working" pages.
I started out using PHP very simply, as kind of a "macro preprocessor" for HTML. For example, I have an "ah" function that I use to generate "<a href=... " sequences. Aside from letting me break up long URLs and predefine common strings, this also lets me add "target" attributes, etc.
<?= $WP = 'http://en.wikipedia.org/wiki'; ah("$WP/Semantic_Wiki", 'Semantic wikis'); ?> are interesting.
More recently, I have used PHP to do oddball tasks such as generating sidebar navigation links and "print-friendly" pages for a set of web pages (http://www.cfcl.com/rdm/MBD), calculating the fourth Wednesday of the month for the Beer and Scripting SIG (http://www.cfcl.com/rdm/bass), etc. I've even started to lurk on the MediaWiki (http://www.mediawiki.org/wiki/MediaWiki) mailing lists...
|
|