Recent Blog Posts
Blogs » Archive for May, 2004
The Importance of Testimonials
http://www.sitepoint.com/blog-post-view.php?id=170248
The above blog had a great stream of discussion going about the importance of testimonials. Some of you indicated that in your experience testimonials actually DECREASE credibility.
I was very surprised to read those two responses, because test after test shows that testimonials — correctly executed — increase response for a variety of professionals, including web designers/developers.
So this blog aims to make a few points to clarify the role of testimonials:
1. The concept of “social proof” is incredibly important in marketing. Social proof, simply stated, means that people tend to believe what other people believe, especially people they respect. So if you can assemble a group of people, especially opinion leaders, who rave about you, you build credibility. Unfortunately, that’s how we humans work. So why not take advantage of social proof in your marketing efforts?
2. There are lots of ways to use social proof to build credibility: testimonials, case studies, reprints of articles by/about you or interviews of you in local papers, and referral systems. In a different industry, believe it or not, the “As Seen on TV” decal has been shown to increase retail sales of certain products significantly.
3. Testimonials are not an either/or proposition. You still …
XMLHttpRequest and Javascript Closures
Following from Simon’s excellent tips on Closures and executing JavaScript on page load got an email from Scott Raymond regarding how this can be applied to XMLHttpRequest so figured I’d share some experiences I’ve been having as a result of ScriptServer.
The Mozilla implementation of XMLHttpRequest provides the “onload” and “onerror” properties to which you can assign your own callbacks, the callback automatically being passed an Event object through which you can get back to your calling object – this is best seen by looking at the Mozblog nsXmlRpcClient.js – see what they do with their _onload function.
Unfortunately, Microsoft’s ActiveX implementation doesn’t, requiring you use a property called onreadystatechange and thankfully Mozilla also supports this (side note – is Mozilla’s XMLHttpRequest the first time someone’s pulled Microsoft’s favorite “Embrace and Extend” on Microsoft themselves? ). The problem is nothing get’s automatically passed to the callback function assigned to onreadystatechange, but that’s where the closure comes in handy.
The rest I’ll leave to a long piece of code
<!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.0 Transitional//EN”>
<html>
<head>
<script type=”text/javascript”>
<!–
// Mozilla only implementation!
// Constructor for generic HTTP client
function HTTPClient() {};
// Add methods and properties as array
HTTPClient.prototype = {
…
Cross Platform Open Source more successful?
Following on from musings on PHP as Disruptive Technology and Why MySQL Grew So Fast, it occurs to me that what hasn’t been said yet is both are technologies that aim to be cross platform, the platform being the operating system (and the web server in PHP’s case).
More precisely, they both run well under Windows. It may be an obvious point but getting started with “dynamic duo” is almost easier on Windows than it is on *Nix, at least for a standard installation. By being open to Windows, both are exposed to a huge user base. It may be your run your live site on a LAMP but, as a developer, you can set up an environment on Windows which is close enough to that which your code will end up running under.
When you consider MySQL relative to PostgreSQL, everyone who’s ever looked knows that PostgreSQL is much more mature, in terms of it’s functionality. So why isn’t PostgreSQL the big hit MySQL is? Perhaps the #1 reason is PostgreSQL has never made it easy for Windows users.
Python is another language that runs nicely on many platforms and does a great job of making life easy …
FxCop
This, to me, is the best tool for .NET so far. And, I’m including nDoc here :)
FxCop is a code inspector that checks assemblies for conformance to .NET Framework design guidelines. And, it really works. Kind of.
The program works using introspection and a flexible rule engine to decompile and analyse managed assemblies and show you where your code is breaking the guidelines.
As a test, I checked out my own blog code with FxCop. The process takes just seconds, and a whole list of bad practises were presented. I actually learnt from the analysis. For example, I used a sloppy:
if (bodyText == “”)
FxCop has told me to check for empty strings using:
if (bodyText.Length() == 0)
as its far more efficient. Now, that’s cool.
Many of the problems it highlighted were actually produced by Visual Studio .NET, such as :
“Make ‘CheckBox1′ private or internal and provide a public or protected property to access it.”
Taking those errors to one side however, you can really get a good idea of how to improve your coding. What a great tool.
FxCop is Microsoft produced, and is free to download.
thanks to Zak for the original link!
Closures and executing JavaScript on page load
Over on my other blog I’ve just published a new technique for executing a piece of JavaScript once a page has finished loading. Here’s the code:
function addLoadEvent(func) {
var oldonload = window.onload;
if (typeof window.onload != ‘function’) {
window.onload = func;
} else {
window.onload = function() {
oldonload();
func();
}
}
}
addLoadEvent(nameOfSomeFunctionToRunOnPageLoad);
addLoadEvent(function() {
/* more code to run on page load */
});
My other post has a run-down of why this technique is needed and an explanation of how it works, but I’d like to expand on that here by talking about the way the above code uses a JavaScript language feature known as a closure.
A closure consists of a function along with the lexical environment (the set of available variables) in which it was defined. This is a remarkably powerful concept, and one commonly seen in functional programming languages such as JavaScript. Here’s a simple example of closures in action:
function createAdder(x) {
return function(y) {
return y + x;
}
}
addThree = createAdder(3);
addFour = createAdder(4);
document.write(’10 + 3 is ‘ …
Key Distinction: Practice vs. Project Leadership
http://www.sitepoint.com/blog-post-view.php?id=170800
In the last blog (link is above), Roly had some questions about the philosophy of considering your Web Design/Development business to be a professional practice. (If you missed that blog, he was referring to the PowerPoint and .wav file that you can read at
http://www.itprosuccess.com/tele-seminar-thankyou.shtml).
Here is my response:
First, I hope that all readers at Sitepoint consider their business to be a professional practice with clients, not a series of projects or “gigs.” Having a professional practice means that you have a certain attitude when you work with clients, similar to a lawyer, physician, or accountant. You focus on service, continuous improvement, excellence, and a long-term relationship. Clients rave about them (most people complain about lawyers in general, but love their own lawyer), and stay loyal to them over a lifetime. They perceive them to be experts in their field and, over time, trust them with confidential information.
In contrast, IT professionals who focus on projects and gigs are mercenaries and vendors, forced to compete on price and almost always bid on projects. They put themselves first, and the customer second. They focus on tasks instead of results, and just get the job done and move on.
I would much rather …
Quick note on Blackstone
If you read any other CF blogs then this is old news to you, but for those of you who depend on this blog for news and information you’ll want to start watching this blog.
The above link will guide you to the blog for Tim Buntel. This is the Macromedia Product Manager for the next ColdFusion version aka Blackstone. You won’t find you typical news and CF talk here. He’s started the blog for one reason and one reason only, Blackstone.
As Tim says “I won’t waste your time with a lot of general ColdFusion information here (there are lots of other excellent CF blogs for that). What I’d like to do is offer an insider’s view into CF – particularly the development and evolution of the next major release of ColdFusion, code-named Blackstone. Lots of people ask me how the product comes to be – how features are selected, who’s who on the team, what exciting things may be on the horizon.”
So fire up your RSS readers or add it to your daily web visits.
Thoughts on using DOM as a template engine
Håvard has posted an interesting article exploring how the newest incarnations of PHP’s DOM extension could be used as a form of template engine for PHP, which is a step in the direction of XMLC (now a possibility for PHP as we’ve got decent parsers).
He explores it in the context of it being an interesting experiment and there’s certainly issues to be resolved before this could be used as a serious approach (e.g. “compiling” the end result vs. parsing at runtime for each request). There’s also some general comment on XMLC on WACT’s Template View page under API styles, thanks to Jeff;
DOM API
XMLC is the only example I know of.
This is the mama bear of template API styles (too fine). The DOM breaks up the template into very fine objects (for example attributes of tags are represented as objects). This offers exquisite control over every detail of the template, but the API can be a bit too cumbersome.
Although latest versions of PHP’s DOM extension provide solid HTML support, these days I’ve settled on the idea that an “event based” parser (SAX, XML Pull) is actually best suited for parsing / compiling templates, it delivering you …
WSE 2.0 Released
If you’re a Web Service nut (like me) then today is a happy day. WSE 2.0 (Web Service Enhancements) has been released, and is available for download from Microsoft.
The biggest enhancement I see is full support for the OASIS standard of security WS-Security. This makes is far easier to implement security policies.
A word of caution however. SOAP messages between WSE 1.0 services and WSE 2.0 services cannot interop, which may dampen your deployment options, especially if you’re relying on 3rd party services.
Even so, its a great release, and makes .NET the first platform to support this Oasis security standard. Happy days.
Grid Computing on OS X?
As you all know now, I like to slip in some OS X news as I have covered OS X in some columns. Apple became a part of the Unix and Open Source communities with the release of OS X and has since been garnering support from these communities as they engage in non-traditional business markets (at least non-traditional considering Apple for many years was found in design, legal and print shops).
I noted in a previous post that MySQL has brought clustering to the smaller business and home business by releasing an open source database cluster. Apple has joined these ranks by releasing a technology preview of Xgrid, which, while not open source, enables one to build a simple cluster from two or more 10.2.8 or better workstations at home.
As web hosting and web applications continue to get more sophisticated, Apple now offers some solutions which support this market in the Xserve, Xraid (for large RAID storage) and Xgrid.
As a side note, MySQL runs on OS X, so you can see the benefit.
Apple has also announced a roadshow with Oracle based on the new Oracle 10g running on OS X. Information on the roadshow is found …
Sponsored Links
SitePoint Marketplace
Buy and sell Websites, templates, domain names, hosting, graphics and more.