January 2005 - Posts

Posting a bit of Javascript got me remembering about a cool feature in Javascript not every (web)developer is aware of (but should be...).

The prototype keyword lets you add methods and properties to custom objects, even some predefined objects like the string object!

function AddQuotes()
{
  return('Quote: “' + this + '“');
}

String.prototype.Quoted = AddQuotes;

Now, every string in your Javascript has a Quoted() method...

function Bericht()
{
  var msg = 'this sentence is not mine but a quote.';
  alert(msg.Quoted());

}

Lousy example, but imagine what you can do with these possibilities...
I used this in a large webapplication to add things like Trim(), LTrim() en RTrim() to the string object.

Cool, right?

(I know, I know...
Not cutting edge .NET technology. Just thought I 'dump' it on the blog in case someone might find it usefull.)

Even though .NET and ASP.NET keeps getting better and better, a lot of times we still need to use javascript on the client to reduces roundtrips or to get more dynamic websites.

So here's a piece of javascript code I find very usefull to show the properties of any (HTML) object:

function ShowProps(obj)
{
  var names = "";
  for (var name in obj) names += name + "; ";
  alert(names);
}

Be carefull, allthough it enumerates all user-defined properties, it doesn't enumerate certain predefined props or mehods...

Googling for some info I hit this site with all kinds of free chapters, from elementary C# to the lesser known GraphicsPaths.

All samples so free for download.
As we say in Dutch: “us bin zuunig“ (“we're stingy“).

 

Is this the future of TDD?

Some of these predictions might even come true: Predictions for 2005...

More SOA (SOA Oriented Arguments)

Frans Bouma already wrote some stuff about the delay of WinFS.
WinFS probably won't be present in Longhorn for a long while.

Hmmm...
Especially interesting since I've just recently read
this article about SOA on MSDN.
It's also downloadable as
Word doc.

Now, can you find the difference?
I'll  make it easy for you.
On page 11 of the Word doc you'll read:

“WinFS,” the code-name for the next-generation storage platform in “Longhorn,” is one key innovation that will make “Longhorn” critical to your connected systems strategy. This new structured file system will permit schematized storage of information using an extensible type system. Microsoft will deliver initial support for common types and encourages development groups to schematize the information their applications use for greater reusability of critical organizational information. “WinFS” will greatly reduce the cost of replicating service information for local and offline manipulation.

Now try to find the word WinFSin the webbased article...

I guess Microsoft forgot the remove this section in the webpage

Managers, please don't read this...

Posted Fri, Jan 7 2005 2:29 PM by Ernst Wolthaus | with no comments
Filed under:

At my current project, we are developing multiple websites. Developing and testing them locally on W2K Pro means you have to change the webroot in IIS every time you switch to another website.

This tool saves some annoying repeating work:
“IIS Admin is a small tool for for use on Windows XP Professional. As you may have noticed, Windows XP Professional's IIS installation only allows one running website at a time.
This is where IIS admin enters the picture, it allows you to easily create multiple websites on Windows XP Professional and quick switching between them.”

During my daily blogreading session I read about a interesting installation solution in this article on Ponder This.

“This solution will take your executable (.Net, VB or C++) and all of its dependencies and wrap them all into a single executable. The neat thing is that it even includes the portions of the .Net framework needed to run your executable inside the executable it creates. So, there's no need to distribute the whole .Net framework.“

P.S.
Two things bother me though...
1. Why is this the only article on the blogsite? Is it plain PR? 
2. You have to contact Thinstall to get a pricequote... that usually means it's #$%^$@ expensive!)

The price is right with Joel!

Hilarious column, yet painfully accurate.

Posted Wed, Jan 5 2005 1:24 PM by Ernst Wolthaus | with no comments
Filed under: