|
|
Thursday, February 14, 2002 |
Ars Technica: What is .NET?
The "unassailable computing enthusiasts" at Ars Technica deliver consistently deep and clueful technology write-ups. Here's their take on .NET.
7:19:18 PM
|
|
Table-heavy, table-light, table-less
Tables are the right way to effect a two-column or three-column layout, because CSS-P is impractical. But not every layout problem is a nail to be hammered with tables. It's trouble when they proliferate like kudzu, and become deeply nested, in order to solve layout problems that are within CSS's domain of competency.
Achieving table-less layout is unimportant. Achieving table-light layout is important. It can speed up page loading quite a lot for users, and can vastly simplify template maintenance for developers. In a table-light layout, CSS helps a lot. The Radio templates are table-heavy. They can't and shouldn't be table-less. But some table-light choices would be nice.
7:07:52 PM
|
|
Ruby XML-RPC: the followup
I haven't yet managed to run that example. I found both of the needed modules -- xmlrpc and win32ole -- in the Ruby application archive. I got xmlrpc built and installed, but not win32ole, and the whole process was a flashback to what I like least about Perl: configuration management.
Here's the drill for xmlrpc:
"Edit the lib/config.rb file to configure which XML parser/writer to use or which features to enable. Type 'ruby install.rb' in current directory. Make sure you have root priviledges before you do this."
OK, that's not too bad, though you have to make some educated guess about this:
# available parser: # * XMLParser::NQXMLTreeParser # * XMLParser::NQXMLStreamParser # * XMLParser::XMLTreeParser # * XMLParser::XMLStreamParser (fastest) DEFAULT_PARSER = XMLParser::XMLStreamParser
But win32ole uses a different, more Perlish protocol:
1. unzip win32ole-x.x.x.zip 2. ruby extconf.rb 3. make (or nmake) 4. make install (or nmake install)
Here's the output of nmake:
NMAKE : fatal error U1073: don't know how to make '/cygdrive/g/ruby/lib/ruby/1.6/i386-cygwin/ruby.h'
Sigh. Googling reveals that this hardcoded /cygdrive is a problem on Windows. I'm sure I could ferret it out, but I have less and less patience with this kind of thing.
In an upcoming column, I talk about the tradeoffs -- for scripting languages -- between language innovation and environmental baggage. In other words, to be free to innovate, which Ruby indisputably does in some important ways, a language has to carry a lot of baggage. Conversely a language that travels light, acquiring everything from its environment -- like any .NET language -- has limited scope for innovation. It's more like a skin, as Osvaldo's article points out.
A bit of a dilemma, really.
Discussion
11:36:44 AM
|
|
Ruby XML-RPC
Here's a nice example courtesy of Rich Kilmer:
File summary_service.rb: require "xmlrpc/server" require "win32ole"
word = WIN32OLE.new('Word.Application') doc = word.Documents.Add server = XMLRPC::Server.new(8080, "0.0.0.0") server.add_handler("word.autosummarize") do |text, percent| doc.Content=text doc.AutoSummarize(percent, 2).text[8..-1] #note: 8..-1 gets rid of the word "summary<cr>" end server.serve doc.Close(0) word.quit File summary_client.rb require 'xmlrpc/client' summarizer = XMLRPC::Client.new("http://localhost:8080") puts summarizer.call('word.autosummarize', DATA.read, 30) __END__ The fantasy epic The Lord of the Rings: The Fellowship of the Ring won best-picture honors and two other prizes at the first American Film Institute Awards on Saturday. Based on J.R. R. Tolkiens trilogy about hobbits, wizards, elves and a ring of ultimate power, the three parts of Lord of the Rings were shot simultaneously. Part two is due out next Christmas, with the final chapter coming in 2003. It is a classic epic. It is a true adventure, said Elijah Wood, who stars as the hobbit Frodo Baggins. I think it appeals to people of all ages, and it has for years and years.
11:33:41 AM
|
|
Consuming foreign WSDL from .NET
It all started so well. I had just installed The Mind Electric's GLUE, a really elegant Java-based XML-and-Web-services product that friends have raved about. GLUE autogenerates WSDL, and being curious about interop, I pointed Visual Studio.NET at it. The magic namespace completion worked like a charm! This was really encouraging!
Then things went downhill. I switched the GLUE sample service from returning a string to returning a java.util.Hashtable. GLUE itself was perfectly happy to consume that complex return value, but VS.NET had no clue what to do with it.
Then I hopped over to xmethods and started trying to consume WSDL found there. Results were lousy. A bunch of WSDL files that can be retrieved don't seem to be recognized as Web services at all by VS.NET. Of those that can, only some complete on the service name. Of that subset, only some complete on operations and types. I did finally manage to get VS.NET to consume one or two services that return simple types, but as Kevin Altis said yesterday, it sure feels like work.
12:30:15 AM
|
|
© Copyright 2002 Jon Udell.
|
|