|

Source: ONLamp.com The more I write WSGI code, and read WSGI posts like this one on the Repoze blog, the more I wonder if Phillip Eby didn’t invent Python’s own Howard Roark in WSGI, when he wrote PEP 333. Zope Corporation was founded in 1995, according to the, about Zope,page on their website. This means there are a heck of a lot of Python programmers who know a heck of a lot about Python Web Development. If you look at say, Ruby on Rails, which deserves a great deal of respect for what it has accomplished, you will notice it was released to the public in 2004, there is about a decade of experience difference there. In terms of computer science, this is an eternity. Python now has mod_wsgi, a Zope TM that works inside of WSGI with any other WSGI application, people that spend every waking minute developing an ORM, and new hybrid, WSGI specific, Python web frameworks like Pylons,and,Grok. Not to mention incredibly mature full web applications, like Plone 3.0. Let’s also not forget Deliverance, which makes “skinning” multiple WSGI applications, and/or products like Plone trivial. In plain english, all of this stuff works together! As Ian Bicking explains, it is just a bunch of tubes. At this EXACT moment, people have completed the rest of the tubes, that connect the rest of the technologies in Python! Python Web development reminds me of a very large battleship, which was slowing turning toward the shore, all the while loading the guns with large shells. Well, the ship has turned, the guns are loaded, and now, it is time to see what Python web development can really do in 2008. The perceived weakness of many different frameworks in Python, has now turned into a strength with WSGI, and these host of other technologies all working in harmony. Plus, lets not forget this is Python, perhaps, the most human readable language in existence. I also think Python has the potential to become the dominant Web Development language in the next couple of years, due to its massive, yet growing, pool of experienced developers, WSGI, the incredible, battle tested Standard Library, tested and proven scalability, with a plethora of concurrency solutions, readability, and outstanding leadership of the core developers. I suppose, armed with knowledge of these new developments, I wonder why anyone would not use Python Web Development for projects in the next two years?

Source: ONLamp.com After a batch of feedback about the way that our previous Short Cut on Dojo was titled and marketed, we decided to update it for version 1.0 (the previous version targeted 0.9), make the title more descriptive of the Short Cut’s focus on creating custom widgets, and try it all again. Here’s the link to the updated Short Cut. One caveat is that the URLs for the code examples in it point to version 1.0.0 of the code on AOL’s Content Delivery Network. The latest Dojo build features the 1.0.2 code (a significant bug fix release). While the example code should work the same way either way, you’ll want to use the 1.0.2 code in any actual development you do over the CDN. For those who haven’t heard of Dojo, it’s a fantastic JavaScript toolkit that you really don’t want to live without if you are a web developer in this day and age. In addition to providing facilities that comprise a JavaScript standard library, you also get a library of amazing out-of-the-box widgets and build tools. You can read a short ONLamp article about it here if you’re looking for a drive-by overview. Also, stay turned for the upcoming book that’ll be available early next year. PS - What more could someone possibly ask for on Christmas morning than a Short Cut on Dojo? It makes a great stocking stuffer :)

Source: ONLamp.com I was just commiserating with David Wheeler about a problem he had with mod_ssl on Mac OS X. The .dylib extension on shared libraries seems “arbitrary” in his words, and I’ve wrestled with it in cross-platform code a few times myself.
Then I realized where so many of my frustrations with Mac OS X came from as a developer:
Unix circa 1986 via NeXT is different from Unix circa 1998 or 2008 via Linux.
I’m happy to stick with POSIX when I want software to run somewhere outside of the nice cozy GNU/GCC/Linux/glibc universe, but those NS* functions just don’t quite feel right, you know?

Source: ONLamp.com Another article of the series “Yet Another Perl 6 Operator” The syntax of an if-then-else expression in Perl 6 is composed by the conditional operator.
say "My answer is: ", $maybe ?? 'yes' !! 'no';
The expression above is equivalent to that, which uses the if-then-else statement within a do.
say "My answer is: ", do { if $maybe { 'yes'; } else { 'no'; } };
The operator '?? !!' syntactically breaks the expression into three subexpresssions. The first is evaluated in boolean context and, based on that result, one of the two parts are evaluated. (It never evaluates both of them.) If the conditional is true, it evaluates and returns the middle part; if false, the right part.
The choice for the strong markers '??' and '!!' was done to enhance the visibility of the construction. Contrast this to the typical C expression (which Perl 5 also adopted):
$maybe ? 'yes' : 'no'
where the tokens '?' and ':' easily blend with other symbols in complex expressions, making harder to distinguish what’s going on without extra spaces and layout.
To stop some common errors, it is a syntax error to use an operator with looser precedence (such as '=') in the middle part.
my $x; hmm() ?? $x = 1 !! $x = 2; # ERROR hmm() ?? ($x = 1) !! ($x = 2); # works
Be aware that both sides have to be parenthesized. A partial fix is even wronger:
hmm() ?? ($x = 1) !! $x = 2; # parses, but WRONG
which actually means
( hmm() ?? ($x = 1) !! $x ) = 2;
always assigning 2 to $x (because ($x = 1) is a valid lvalue).
Also to help catch errors by programmers used to C-derived languages (like Perl 5 itself), the Perl 6 parser will produce an error when a bare question mark is seen in infix position and suggest that ?? !! should be used instead. That is an example of pseudo operators that will be introduced to catch migratory brainos at compile time, helping the transition into the new language and common first-time mistakes by the would-be Perl 6 programmers. A non-exhaustive list of such operators is postfix:{'-'} , infix , and infix: .
Note. That article is a mere rewriting of the section on “Conditional operator precedence” from Synopsis 03 .
Next article is due tomorrow (Dec 21, 2007).
LINKS
Synopsis S03, the official source
The introduction of this series
Official Perl 6 Documentation
Perl 6 in your browser
|