semintelligent.com: personal site of Max Schubert a.k.a. "perldork"
By Max Schubert a.k.a. "perldork"
[Home] [Blog] [Design] [Music] [Projects] [Talks]


Semintelligent

Javascript - now with more fun! · 11 days ago

I have been doing some javascript development for web UIs for the first time in years and wow have things changed for the better.

Integrating Javascript into an application is now easier than ever, thanks to the large number of open source Javascript libraries available on the Internet. Each framework I have tried provides a nice, object-oriented API that includes visual effects, event libraries that allow a developer to add events to pages without mixing Javascript and HTML together, and helper routines to make DOM manipulation and parsing very very easy.

Jason Seifer gives a very good talk on separating web UI display and formatting from Javascript functionality. Integrating Javacsript into web UIs in this manner has been given the name “Unobtrusive Javascript.” If you have used any MVC-style frameworks you will easily pick up this technique and it really does separate HTML and Javascript in a very nice way.

The frameworks I have tried out so far are:

I like them all; so far I find the event API (which has been my focus lately) of jQuery and Moo Tools to be the nicest of the five.

All hide browser differences from the user, something that used to make simple tasks take hours and hours to implement properly.

Dojo and Moo Tools allow you to roll your own distribution of their tool from their web sites, which is a neat feature. Unfortunately a number of the Dojo examples would not work on my Firefox 3.0.1 browser, threw javascript errors, this is something I am sure they will fix in the near future.

All of the libraries offer “minified” and compressed versions of their libraries, of the list above I believe Moo Tools comes in at the smallest when uncompressed when downloading their full package.

— Max Schubert

Comment

---

Where do I find documentation for Ruby, Perl, and PHP libraries? · 17 days ago

In this post I give a quick overview and comparision of documentation tools and resources for the three languages I am developing with the most these days: PHP, ruby, and perl. I enjoy developing with all of these languages, but some are easier than others when it comes to documentation.

Perl

CPAN – The Comprehensize Perl Archive Network. The vast majority of perl libraries are posted to CPAN. CPAN has a nice web-based search search interface as well as a great command line interface as well (the “cpan” command is a part of most perl distributions, if it is not on your system just type perl -MCPAN -e shell).

All built-in functions are well-documented in POD (Plain Old Documentation) format and available for reading using the perldoc tool. For example, to see the documentation for the open function, just type

perldoc -f open

As much as perl gets bashed for being noisy, confusing, etc, it by far has the best user-contributed documentation of the three languages I am covering in this post and being able to search using namespaces and regular expressions from the command line is a huge win.

Maybe it is because it is so flexible and because it has the potential to be confusing that user-supplied documentation is so well done?

PHP

PHP has a terrific set of online manuals for built-in libraries, to read them just enter the URL http://www.php.net/#function_name#, for example

http://www.php.net/fopen

to see the documentation for the fopen command. A terrific feature of this web site is that all pages allow for user comments, these comments oftern provide terrific examples and explanations of quirks or hints to be mindful of with a given function. Good stuff.

For 3rd party libraries, things are not quite as nice as CPAN. First check pear.php.net, you might find documentation for the library there, more likely than not you will find a link to the documentation that the developer is hosting elsewhere.

If the PEAR repository fails, use Google.

Ruby

Finding documentation with Ruby is interesting. For core libraries all documentation can be found online at http://www.ruby-doc.org/. Core documentation is excellent.

3rd party library documentation is good, but in my opinion much of it is not nearly as comprehensive or easy to find as it is for perl or PHP. Maybe this is because much new development still happens in Asia and the asian developers do not have the time nor interest to port documentation to English (which I can completely understand).

Most ruby libraries are hosted on http://www.rubyforge.org. Unfortunately, as with PHP’s PEAR, most developers do not take the time to extract / post documentation to the documentation section of any of the projects. Some leave links to the sites they have created in the documentation section of the project, some use the rubyforge web site URL, e.g.

http://mechanize.rubyforge.org/mechanize/

To document their projects online. In either case, the documentation seems to be much more complete when it is posted online than when it is installed with the gem. I find that it is usually much easier to use the web-based documentation than it is to try and read it from the command line with ri.

I also find that with Ruby, Google searching is required to find examples and often blogs are the best sources of examples and annotations for libraries. I am very very grateful to the many ruby users who post examples on their blogs, however, it is a litte disappointing to not have a centralized place for this information.

Finally, I find it annoying (and I know, if I do not like it, I should contribute) that the gem tool does not allow an end user to search by namespace .. how the heck am I supposed to know a gem name before I search for the name space? Google, I know :).

Ruby hates the command line for documentation.

Conclusions

— Max Schubert

Comment

---

Nagios 3 Enterprise Network Monitoring Book · 32 days ago

Lead a team of five very capable and talented authors to create this book for Syngress Publishing . The book discuss in depth how to integrate Nagios into a large organization and also provides a nice plugin cookbook-style chapter that focuses on SNMP.

If you have purchased this book and have any questions, please go to http://www.nagios3book.com and there you will find a link to the book mailing list along with all of the source code from the book.

The authors who worked with me to create this book are:

A special thank you to each of them for their hard work on this project. You all rock!

— Max Schubert

Comment

---

Older