This page has been archived. For the latest news on FormAssembly, go to: http://www3.formassembly.com/blog

New Feature: You can now export your responses

The Form Assembly now lets you export the responses you collect. This function is located in the ‘responses’ page under the list of responses for each form.

New Export Feature

At this time, only the csv format is available. It is compatible with MS Excel and other spreadsheet softwares. If you need more export options, leave a comment here.

Thanks !

Technorati Tags: , ,

Time-Tracker Export Feature

Yesterday I added the new export options to the Time-Tracker (in the account drop-down panel). You’ll find three different formats:

  • xml - This is the most detailed export. Everything that is being recorded is exported here (sorry no DTD available).
  • csv - This one is ideal for Excel and other spreadsheet softwares. It lists all the tasks and time-slices with date and duration. If you don’t get what you need with this export drop me a note, I’ll tweak it.
  • opml - This is an outline of your tasks (name and duration). It could be useful if you want to display your daily activities on your blog (wordpress plug-in anyone ?).

If you’re using Excel, don’t forget about Bryce Shober’s Excel spreadsheet. It might just be what you need (more about it here).

As for a read-write API, it’s still on the drawing board…

Technorati Tags: , ,

Free Account Upgrade

In order to simplify the offering and allow everyone to access all the features provided by the Form Assembly, the free and pay-as-you-go plans have been merged.

From now on, new users start with the pay-as-you-go plan with 5 credits, for free. Existing users on the free plan have been upgraded and paying customers get the 5 credits as well.

Being on the pay-as-you-go plan means that you only need to purchase credits if you want to use our response processing service. You can still create an unlimited number of forms at no charge.

If you have any question regarding this change don’t hesitate to contact me.

Time-Tracker 2.0 is now live

Time-Tracker v2.0 is now live.

If you are not familiar with it, the Time-Tracker is a simple productivity tool that keeps track of the time you spend on any task. It is ideal for people who bill clients by the hour and for those who just want help with their time management.

The Time-Tracker takes the guess-work out of the equation. Use it when you’re ready to start a new task and when you switch tasks. It is designed to be as little intrusive as possible. You’re never more than a couple clicks away from keeping it up-to-date.

This new version includes drag & drop sorting, unlimited nesting of tasks, time-slice level comments, and more. It was tested with IE6(*), Firefox 1.5, Opera 8.5 and Safari 2.0.2.

I’m looking for developers to contribute 3rd party components (widgets, reporting tools…). If you’re interested, please get in touch with me .

Version 1.0 will be taken down around 10pm GMT-5. I expect the transition to go smoothly, but if you encounter any problem, please report it here in the comments or on the discussion board.

(*) If you use IE6 and experience any problem with the Time-Tracker, please drop me an email. If possible keep a note of any javascript error you get.

Technorati Tags: , , ,

New Discussion Boards

If you have a question or a problem to report regarding the Form Assembly services and the various resources provided here (Form Builder, Time-Tracker, wForms, Freja …), don’t hesitate to post in the brand new Forums.

I’ll also use them to repost some useful bits of information that are currently disseminated throughout the comments in this blog.

Technorati Tags: , ,

Treating the HTTP Status code right

If you’ve been following the whole Ajax thing for a while, you’ve certainly seen this few lines of code hundreds of times. You know, the ones that check the readyState and status properties of a xmlHttpRequest.

    if (req.readyState == 4) {
        if (req.status == 200) {
            // ...processing...
        } else {
            alert("There was a problem retrieving the XML data:n");
        }
    }

The status is the HTTP code returned by the web server (here 200, meaning that everything went fine). Normally, the status code is part of the private conversation between the browser and the web server. You don’t have to worry about it, unless of course you encounter the dreaded 404 Page Not Found.

Things change when you start developing Ajax-style with XmlHttpRequest. You are basically by-passing the browser native handling of HTTP and left dealing with the status code on your own. And, that’s a great opportunity. Why ? Because you can
use it to relay information about the execution of your server-side scripts.

The HTTP protocol defines many status codes. For a web developer some of the interesting ones are:

  • 200 Ok
  • 201 created
  • 400 bad request
  • 403 forbidden
  • 500 internal server error

Most server-side scripting languages will let you modify the http response header and set just about any status code. For instance in PHP, if you were processing a request that looked suspicious (a tempered query string?) you could do:

< ?php
header('HTTP/1.0 400 Bad Request');
die('sorry, the execution failed for some reason..');
?>

If you are processing a login/registration form, you could use header('HTTP/1.0 200 Ok') for a successful login, header('HTTP/1.0 201 Created') if a registration was ok and an account was created, and maybe header('HTTP/1.0 403 Forbidden') for a wrong password or if the username was already taken.

Back to the javascript code, here’s now a smarter response handler for the authentication example.

switch (req.status) {
    case 200:
            // login ok, moving on...
            break;
    case 201:
            // was a registration.. will show a welcome message.
           showWelcomeMessage(req.reponseText);
           break;
    case 403:
           // authentication problem. The error message is in responseText
          showErrorMessage(req.responseText);
          break;
    default:
         // unknown error
         alert("There was a problem..");
    }

Remark: Safari will return a ‘undefined’ status code if the response content is empty, so make sure to have at least a space in the response (using echo "" in PHP for instance).

That’s it! Happy coding in 2006.

The Freja Framework

Background

Since I started working on the Form Builder, almost a year ago, I’ve adopted a radically different approach to web development. At that time, I had firmly embraced the concept of separating structure from presentation using valid XHTML and CSS. The next logical step was for me to catch up with the experienced web developers who preached the separation of data, business logic and presentation. The Model-View-Controller pattern was (and still is) big, but I was more impressed by the REST philosophy and the Service-Oriented Architecture style.

I gave a shot at building an application - the form builder - that would follow these principles. Coded in Javascript, it runs on the client and deals with web services using asynchronous HTTP GETs and POSTs. I found that writing REST services was dead simple. It’s like writing a regular server-side script but it doesn’t need to spit out a HTML page. You just output some HTTP headers and either plain text or a XML string.

Now, since the web services didn’t provide HTML, the client - the web browser - had to create it on its own. XSLT was the perfect candidate. It was a web standard and it was supported by 90% of the browser market (IE5+, Netscape 7+ / Mozilla).

By the time I had the Form Builder working, the Ajax term was coined and I was able to put a name on what I was doing.

Fast forward 10 months: more browsers now support XSLT and XMLHTTPRequest (Opera 9, and Safari - somewhat - ). The Form Builder is now at version 2.0 and so is the Time-Tracker - a small app that started as a proof-of-concept.

But it’s time to introduce Freja.

Framework

Freja is the fruit of this learning process. It is a lightweight and simple Javascript framework that facilitates the development of single-screen, zero-latency web applications.

It isn’t yet-another-Ajax-framework. It does things that no other Ajax tool does and it doesn’t do what most others do. It’s a companion for libraries like prototype and maybe for more complex frameworks like Dojo.

Freja stands for ‘Framework for REstful Javascript Applications’. At its core it’s a XML / XSLT engine, but it’s all abstracted into the Model-View-Controller pattern.

  • A model is a XML document obtained from a URL (could be a web service or just a flat file).
  • A view is a XSL template obtained also from a URL.
  • The controller is the javascript code. Freja provides a set of convenient (did I say elegant?) functions for retrieving, rendering, updating and saving the models.

Learn More

Visit Freja’s home site for Documentation, Tutorials and download.

Technorati Tags: , , , ,

You are currently browsing The Form Assembly weblog archives for January, 2006.

Search the Blog Archive

 

The Form Assembly blog is powered by WordPress ~ Entries (RSS) and Comments (RSS).