Sjoerd Visscher's weblog
Last Update
10/16/2005; 1:19:45 AM
Thursday, January 31, 2002
Let's go into some more detail about what is the overhead in .NET web service example. The problem is that there's no good context for the code to run in. So every department of the compiler needs to know what this code is going to be used for. Let's see how many code could have been inferred when the compiler would know we're writing a webservice: "WebService", "using System.Web.Services", "WebService", "public", "[ WebMethod ]". Also the class definition is of no use, and could have been generated. (Just like Tomcat does for JSP pages) So I don't understand why .Net doesn't allow you to write:
<%@ WebService Namespace="urn:Hello" Language="C#" %>
public string sayHello(string name) {
return "Hello " + name;
}
This would still give you all the functionality and power of SOAP and .Net. I can only think of one reason: Microsoft tries to make it so complex that you have to use their tools.
Read this article on Web Services interop. It's an eye-opener because they include sample code for a web service in .NET. Look at all the overhead. Did they really design an environment for web services? If so what are all those magic incantations about? [Scripting News]
Indeed. And I think most C-programmers think this example is actually very short, certainly for a webservice. But with scripting it can be as simple as this:
<?
function sayHello($name) {
return "Hello $name";
}
?>
I save this as hello.lib in the right directory, et voila.
Dave and I are both having fun seeing how others say the comparison isn't fair. Oh sure, it really isn't. The .Net example only excepts strings. This example also does a good job on numbers and dates. And we don't have to learn new things, only that functions created in a special place automatically become webservices. It saves us time so we can keep our weblogs updated.
It might look very hard to write a "Hello world" routine in C#, Java or even Assembler and expose that as a Web Service. On the other hand, it might look very hard to write a Pascal-Compiler in UserTalk, PHP or Python and expose that as a Web Service. [A Practising Maniac at Work]
Christian Riege has a good point. However most webservices are more like a "Hello World" routine than like a compiler. (anyone up for a Java Compiler webservice?)
Wednesday, January 30, 2002
I'm slowly starting to understand what "semantics" means, how it works and how it could be used for the web. Semantics is defined as the study of the meaning of language. And language is defined as the means to convey or transport meaning. In programming terms this can be (freely) translated to: The encoding and decoding of information (meaning) into a string. So maybe it's not so surprising that programming seems to be largly actually performing those encoding and decoding steps. Every bit of information has to fit on Alan Turing's infinite tape, filled with ones and zeros.
The question that arises then is: How can a computer actually know anything? How can a computer ever "get it"? But of course we can also ask how a person can know something. We just don't know (yet), although those neurons probably have something to do with it. But here semantics research helps us out. Apparently we only need two principles: equivalence and relations.
Equivalence has two important effects. 1: once we've encountered some "thing", and we encounter it a second time, we know it's the same "thing". And 2: we don't confuse two different "things" for the same "thing". And relations allow us to express how these "things" are related, i.e. how one "thing" is something of another "thing".
That's all there is to it. And I think this is also the way it works in the brain. You don't actually know apples, but you only know their description; how they are related to concepts like color or size. So now that we know how to know, let's see how this works on the web. (Some other time...)
Tuesday, January 29, 2002
According to the Register, Microsoft has a relational database on the front burner for a future version of Windows. Personally, I think they're barking up the wrong tree. If they spent more time building websites they'd know that hierarchical models with very tight scripting connections offer more performance and a higher level application model. Relational databases are good for factories and stores. Object databases map the model of the Web. Just change the slashes to dots and off you go. [Scripting News]
I think Microsoft knows that. They're building Exchange on the same database, and the filesystem. My guess is that the registry will be stored in it too. And of course SQL Server already supports XML (in some way). So the engine may be relational, but it won't be hard to store objects in it.
Friday, January 25, 2002
Adam gets a radio show. And guess what, we're going to integrate his show with our Radio show. This is so cool. The Netherlands is leading the way. [Scripting News]
Yes, we (the Dutch) always do... No, really! And of course I'm going to listen.
The sidebar on the left is now generated from an OPML file:
The script then generates this piece of javascript code:
weblogSidebar={
'What I read':[
{style:'button2', content:'Jake's Brainpan',
gonew:'http://jake.editthispage.com/'}
,{style:'button2', content:'Joel on Software',
gonew:'http://joel.editthispage.com/'}
,{style:'button2', content:'Lambda the Ultimate',
gonew:'http://lambda.weblogs.com/'}
,{style:'button2', content:'markpasc_blog',
gonew:'http://markpasc.org/blog/'}
,{style:'button2', content:'owrede_log',
gonew:'http://owrede.khm.de/'}
,{style:'button2', content:'Scripting News',
gonew:'http://www.scripting.com/'}
,{style:'button2', content:'XMLHack',
gonew:'http://www.xmlhack.com/'}
,{style:'button2', content:'<b>All sources</b>',
gonew:'http://w3future.com/html/weblogsources.html'}
]
,'Friends/Family':[
{style:'button2', content:'Joeri',
gonew:'http://joeri.mulder.com/'}
,{style:'button2', content:'Marco',
gonew:'http://www.maggerydoo.net/'}
,{style:'button2', content:'Jelle',
gonew:'http://uitdeschaduw.blogspot.com/'}
,{style:'button2', content:'Q42',
gonew:'http://www.q42.nl/'}
]
};
The template contains a script that creates the buttons from the data. I named the opmlfile #sidebar.opml. The # means that files in subdirectories can have their own sidebar links, but they default to the one from the parent directory.
OK, what's the number one glaring hole in Radio 8 (aside from the bugs and glitches, which we're working on after spending much of the weekend overloading on excitement and sleeping)? It doesn't connect to Manila. It will. I'm working on a Tool that mirrors your posts to Manila sites. I have it working here. Now here's a heads-up to developers of other centralized blogging tools like Manila. We're using the Blogger API. That means it will also work with Blogger, naturally, and any other centralized blogging tool that supports the API. [Scripting News]
This is really cool. Dave, if I may, can I beta test this, please?
Dan Gillmor: Google effect reduces need for many domains. [Scripting News]
Dan says that you don't need short easy to guess domainnames anymore. But it´s still smart to have an easy to remember URL once you've found it. (Or just provide an RSS file of course)
A remote post. No problem.
