A XSL transformation mindset

Someone asks on Metafilter.

When you imagine XSLT transformations happening in your mind's eye, what does it look like?

Its a really good question and opens up a whole range of thinking about the differences in peoples thought processes. So first Jeff talks about the question.

This is a very powerful question to ask, because ancient, procedurally oriented developers like me sometimes have trouble following the non-linear, pattern-driven processing that takes place when an XSLT template is applied to a tree of XML elements. In fact I have noticed that non-developers sometimes have an easier time with XSLT than do experienced developers, because they don't try as hard to figure out what is happening beneath the covers.

I would kind of agree with that statement. Theres something about XSL and XML which just makes sense in my head. I'm not from a traditional software or computer science background, so I still find it weird to be called a programmer by some of my peers. John wrote this fantastic comment.

My first project with XSLT a few years back was to actually generate XSLT *from* XML and XSLT and forced me to break my ideas of how it worked. When I finally got the whole “it happens all at once” approach, it started to make sense. However, every programmer that I've brought on board to an XSLT project since has had trouble getting out of the procedural thinking and that ends up being the biggest source for their mistakes.

Unfortunately, like MagicEye images, some people just aren't able to unfocus their minds in the right way to really grok XSLT beyond the simplest examples.

I have heard of programmers comparing XSLT to Prolog and even Lisp, I'm not sure how true this is but its certain that you can't approch XSLT in a regular way. Recursion is one of those things which seems to drive people mad. In XSL there's a lot of recursion and declaration which seems to fit the way I think. I always wanted to create a SVG of a XSLT process. So you can see in lines and boxes what templates are being called and add some kind of dimension to XSL. I'm sure its not that hard and even my experiements with transforming Cocoon's Sitemap file into SVG didn't require too much work. Talking about recursion someone posted this nice animated gif of how it all works. There's no douht that XSL requires a different mindset and working with a programming language like Java or Perl will be more of a hinderance that an advantage.

I posted this question to a few of the XSL developers I know and got a variaty of answers. In my own mind I see lots of lines and trees which get broken into branches

Comments [Comments]
Trackbacks [0]

Virtual Private Java Hosting choices

So I almost made my mind up when I thought I'd check out what people were saying about 4java.ca. The first result got my attention, as its someone looking for a private Java servlet hoster too. Erik also decided on 4Java.com but was considering Addr.com which I've honestly never seen before. I was a little put off by there image driven site but quickly found the lighter version which is much easier to navigate and compare prices. However I couldn't really found anything about the actual hosting besides they support Java Servlets. So I checked out the comments to the blog entry. Hub.org gets my vote for worst designed and styled hoster site, but there prices are nice and cheap at only 11.99 dollars for a basic Tomcat VPS setup. They also as standard run Cocoon 2.1.3, OpenLDAP and Jabber! Now thats something worth shouting about. KGBbinternet are simply too expensive for what you get. I mean you have pay 60 dollars a month to get 15gig of bandwidth a month. Cubicgarden.com is currently using about 6gig in webpage access and RSS and I expect that to grow over the coming year. Back to the blog, someone else pointers Erik to eapps which was one I considered a while ago.

Later this evening I spent some time talking to the live help at hub.org and they pointed me to the Cocoon hosters list, but that was not very fruitful. But I have to say the person on the other end did seem to know what they were talking about and seemed to be less sales and more sys op. At one point I did send the link to my blog about being told to leave Interadvantage and remarked it was the first time he's ever seen someone told to leave for such reasons. I also spent some time talking to Miles about Memory usage in Java Servlet containers. He had some great questions to ask any Java hoster. Whats the permanent generation set to on the JVM if at all? What's the command line used to start the JVM? Whats the percentage of customers which go over-bandwidth a month? and Email addresses of 3 customers I can correspond with. I've yet to get any response back from Hub.org but there certainly looking like the right choice if I can keep my bandwidth down to less that 8gig a month. As Miles has remarked already, I'm not using 304's in blojsom and I'm not Gzipping responses. So realisticly it shouldn't be a big problem. Those famous last words…

Comments [Comments]
Trackbacks [0]