NYCPHP Meetup

NYPHP.org

[nycphp-talk] SPL, Container Classes, and all that...

paul at devonianfarm.com paul at devonianfarm.com
Mon Oct 1 08:47:53 EDT 2007



    There's always a tension between creating generic data structure classes (Lists,  Trees,  Maps) and classes that are specific to the task at hand

    I haven't used container classes much in PHP.  With associative arrays on my fingertips,  I haven't felt motivated.

    I recently did a stint of programming in Java,  developing a client-side application with the Google Web Toolkit.  GWT is an unorthodox Java environment:  you write Java,  but a special compiler translates the code to Javascript,  which runs in an ordinary web browser.  This lets you write AJAX applications in a style much like writing a desktop app.

    It might sound crazy,  but it works pretty well.

    I like the Java containers alot,  particularly the extra container classes from the Apache Commons.  I particularly like there are multiple back-end implementations of the data structures so can choose structures that are appropriate for your particular workload.  Java containers didn't work well with the type system in older versions of Java,  but JDK 1.5 introduces generics, foreach and other syntactic sugar that makes them more fun to work with.

    Java developers rarely used hashes (associative arrays) when I was doing Java 5 years ago,  but they're much more fashionable now -- they've been learning from the PHP (Perl, Python,...) world.

 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20071001/529d37d7/attachment.html>


More information about the talk mailing list