Archive for July, 2006

WordPress 2.0.4

Once again the guys from WordPress have pubblished a new update to WordPress:

WordPress 2.0.4, the latest stable release in our Duke series, is available for immediate download. This release contains several important security fixes, so it’s highly recommended for all users. We’ve also rolled in a number of bug fixes (over 50!), so it’s a pretty solid release across the board.

Upgrading is fairly simple, just overwrite your old files with the latest from the download. If you’d like more thorough instructions, the Codex is always the best spot.

Since this is a security release, if you have any friends with blogs make sure to remind them to upgrade and lend a hand if they’re not too savvy. We’re all in this together.

Did you like this? Share it:

JavaScript Boot Camp

Over at Slash7.com they Amy has posted the slides of her speech at O’Reilly OSCON 2006 in Portland. Having often to do with people who actually have no real understanding of JavaScript and want to play around with Ajax, I’m really happy that someone actually takes care of them ^^

On Monday I gave a 3-hour tutorial first thing in the morning, here at O’Reilly OSCON 2006 in Portland. From the description:

Even though AJAX wouldn’t ever have become so popular if the Javascript world hadn’t suddenly exploded with mature development and testing tools, there’s little information on how to be a really good Javascript programmer.

This talk is for everyone who feels their Javascript skills just aren’t up to snuff.


Take a look at the slides, I learned a lot from them too :D

Technorati Tags: , , , ,

»crosslinked«

Did you like this? Share it:

XML11: An Abstract Windowing Protocol

Just today I stumbled across a nice presentation about XML11, an Ajax Toolkit that bridges Java AWT applications right to the Web using modern Ajax-technologies:
The goal of XML11 is to help programmers write AJAX-applications without requiring any JavaScript knowledge. AJAX (Asynchronous JavaScript and XML) has become very popular for building web applications. AJAX basically proposes to move part of the application to the browser without requiring a JRE-plugin. In order to do so the application needs to be written in JavaScript since JavaScript is the lowest common denominator across different web browsers in terms of prerequisites. Writing portable JavaScript is a daunting and tedious task. XML11 allows you to write your application in Java (not JavaScript!). XML11 then translates your Java application to JavaScript so that it can run inside any browser. Just like a C++-compiler shields the programmer from the assembly language, XML11 shields the web-developer from the intrinsic complexities of writing cross-browser portable JavaScript code. As a consequence, a web-developer never has to write or even look at one line of JavaScript code. (source)
Personally I think the approach to the VM simulation using XMLVM a bit an overkill and it might lead to a lot of overhead it’s actually not that bad, due to moore’s law we probably should bother too much about it ^^
Just take a look at the presentation and you will fall in love with it :)
Did you like this? Share it:

Is combined server and client side validation possible?

When working with Ajax sooner or later you will run into the need to validate data the user has entered. The Ajax approach to validation would be client side validation (using a JavaScript on the browser) which gives the user a direct feedback for the values entered. While non-Web 2.0 applications rely mostly on server side validation, requiring a full round trip to the server and back before the user actually sees the validation result. While server side validation is slower it has some advantages over client side validation:
  • It can’t be fooled: while JavaScript can be turned off, or manipulated injecting scripts.
  • The server can perform security test, such as checking a password, without making the check vulnerable to viewers (remember: never check on the client side if the password is correct ^^)
  • Formatting errors will be recognized.
But Web 2.0 developers just love those fancy instant validations they can do with JavaScript so why not combine them? There are basically 3 different ways to validate data:
  • Client side (JavaScript): the easiest way to validate a field is to attach a callback function to a field that will then check if the value is valid.
  • Server Side (Ajax): for some operations we want on the fly validation but have to do a roundtrip to the server, for example to see if a username is still available.
  • Server Side (Submit): the classic way of doing things. User submits Form, Server validates and performs actions or throws out a bunch of validation errors.
All three of these techniques have their advantages and disadvantages, while the Client side (JavaScript) is the fastest it is neither secure as it can be turned off, nor applicable to every possible situation (see the Username example). The Server Side (Ajax) method is the nicest as it virtually allows any validation possible but it too can be turned off and it involves a full round trip making it slow and requires some extra data handling. The Server Side (Submit) method is the most secure method but it is the slowest and does not give immediate feedback on a user action. Nevertheless the server side validation (submit) should never be omitted since the others can be turned off, and we don’t want the user to add bogus data, do we?

So what’s our best option? The logic step would be combine them together so we do react on user actions immediately giving him some feedback and we are secure that the data is validated at least once (on the server) before we operate on it.
The main problem now is that we would have to write most of the validation criterias twice (once for the server side and once for the client side). What we need is some sort of meta-model for the form in which we describe the datatypes and validation tests we want to execute on them and then generate the Form on the fly out of this model. This idea isn’t actually new (and it would be wrong to give me the credits for it :-) ), I stumbled over it when starting to work on a Cocoon project. At first sight the Framework looks a bit overblown but once you get started it is really easy to understand.
Basically you describe the Form-Fields in an XML file defining fieldtype and name, and, what is interesting for us right now, add some validation functions. This model will then be translated into the Form once it is requested. The validation functions will be executed both on the server side and the client side, thus eliminating the need for writing them twice.
The same could be archieved with any other scripting language, and I’m looking forward to see other frameworks going in this direction, it really makes coding a pleasure.


Technorati Tags: , , , ,
Did you like this? Share it:

Complete redesign

Ok I have been working quite some time now on this new Look & Feel for my Blog, and I’m proud to say that it is my first Layout completely from scratch. Hope you all like it and I’m looking forward for some feedback :-)
Did you like this? Share it: