|
|
Massimo Morelli's Weblog
|
domenica 28 settembre 2003
|
|
|
lunedì 22 settembre 2003
|
|
|
domenica 21 settembre 2003
|
|
|
Martin Fowler is abandoning XSLT:
MovingAwayFromXslt.
All of this site is written in simple XML documents and transformed to HTML. I find this works really well, and means I never have to worry about dealing with HTML formats. (Not that fancy layout is my style, as you can tell.) I've even written a whole book that way.
For most of this time I've used XSLT as my transformation language. I've got pretty good with slinging XSLT around and getting it to do what I want.
But no more.
When I wrote the software for this Bliki (on a long flight) I did it in Ruby.Prior to that I used Ruby to do a new version of my home page. My conclusion from this exercise was that using Ruby for XML transforms was much easier than using XSLT.
- XML makes a lousy syntax for a programming language. There's way too much noise in there and as a result you can't see the program.
- XSLT makes calling subroutines so painful that you are seriously discouraged from using them, which encourages duplicate code.
- XSLT handles simple tasks well, but is baroque when it comes to more complicated things. Indeed some are impossible and you have to jump out into another language anyway.
- Ruby gives me a clean, OO language with clear syntax and a kick-ass XML library.(Python may well be just as good, I haven't tried it.)
- I can mix template style code with transformer style code.
[..] I think this may raise some real questions about XSLT. There's still much I like about the power of XSLT, but I hate the syntax and the walls you keep running into. I'm not going to convert my whole site over to Ruby tomorrow - most of the XSLT works fine - but I can certainly see my way to doing that at some point in the future. But the bigger question is whether you're better off with scripting language for this kind of task than XSLT. [Martin Fowler's Bliki]
3:04:11 PM Bel post? Si No
|
|
|
|
sabato 20 settembre 2003
|
|
|
Phil Greenspun: Java is the SUV of programming tools.
[..]After researching how to do bind variables in Java (see the very end of http://philip.greenspun.com/internet-application-workbook/software-structure), which turns out to be much harder and more error-prone than in 20-year-old C interfaces to relational databases, I had an epiphany: Java is the SUV of programming tools.
A project done in Java will cost 5 times as much, take twice as long, and be harder to maintain than a project done in a scripting language such as PHP or Perl. But the programmers and managers using Java will feel good about themselves because they are using a tool that, in theory, has a lot of power for handling problems of tremendous complexity. Just like the suburbanite who drives his SUV to the 7-11 on a paved road but feels good because in theory he could climb a 45-degree dirt slope.
With Web applications, nearly all of the engineering happens in the SQL database and the interaction design, which is embedded in the page flow links. None of the extra power of Java is useful when the source of persistence is a relational database management system such as Oracle or SQL Server. Mostly what you get with Java are reams of repetitive declarations at the top of every script so that the relevant code for serving a page is buried several screens down. With a dynamic language such as Lisp, PHP, Perl, Tcl, you could do bind variables by having the database interface look at local variables in the caller's environment. With Java the programmer is counting question marks in the SQL query and saying "Associate the 7th question mark with the number 4247", an action that will introduce a bug into the program as soon as the SQL query is modified (since now the 7th question mark has been moved to become the 8th question mark in the query). [Philip Greenspun Weblog]
11:53:37 PM Bel post? Si No
|
|
|
|
giovedì 18 settembre 2003
|
|
|
I used to prefer to call the xsl and the xml via javascript from a page, but for RSS it's a good idea.
What I'm talking about is putting an XSL Stylesheet header in your RSS documents so that when a browser like Moz or IE6 sees it, it'll render the XML instead of dumping raw tags in case you click on it. [..]It's as simple as hell to do, just add a XSL declaration after your initial XML header like: <?xml version="1.0" encoding="utf-8"?> <?xml-stylesheet type="text/xsl" href="http://www.allaboutsymbian.com/rss/rss2html.xsl"?>
If you're using a decent browser, it'll pick up the XSL and format it accordingly. This is *very* cool. Having links on pages to RSS for those who have no idea what RSS is, is a real user-unfriendly thing to do. The monkies don't like when they click on links and receive a boatload of XML in their face. [Russell Beattie Notebook]
9:51:51 PM Bel post? Si No
|
|
|
|
domenica 14 settembre 2003
|
|
|
Tim Bray, thoughts on PR, Microsoft and weblogs:
[..] Jean, who is a decent human being in my opinion, was genuinely mad that the PR droids had done the dirty downstream, and I wasnt actually that irritated. Mind you, it will be a cold day in hell before I give another friendly quote to Microsoft, since clearly their PR lizard-brains cant be trusted not to fuck with it.
Anyhow, I dont need to. If I want to say something nice Ill say it here and Box or Scoble or someone will pick it up and those guys understand that what people said is what they said, not what PR said they said. And Box and Scoble et al are rapidly becoming very important to Microsofts image, potentially more so than all that message-managing apparatus. [ongoing]
10:18:46 AM Bel post? Si No
|
|
|
|
venerdì 12 settembre 2003
|
|
|
|
© Copyright
2003
Massimo Morelli.
Last update:
28/09/2003; 16.11.11. |
|
|
|