Thomas Sampson


1 Comment

SQL Generator

I found this tool today which allows you to use a webUI to design a database table, and will then generate you the SQL code to create that table at runtime.

http://ondras.zarovi.cz/sql/demo/

I used this to design a table to use with sqlite3 and although the code generated is intended for use with mysql, a few minor adjustments allowed me to execute this on a sqlite3 database with no problems.


Making Flash and Javascript Communicate

Making actionscript communicate with javascript is something I have achieved before by using the following action

script….

getUrl(“javascript:”+js_code_here);

However today I found a much better way to provide stable communication between the two languages One benefit of the method described here is that it does not make the “link clicked” sound in IE6+ which the getUrl actionscript call will trigger.

http://www.codeproject.com/KB/scripting/ActionScriptJavaScript.aspx


2 Comments

The new Facebook!

Im not sure exactly when this happened but I think it was some time today that facebook has a new look, well if you choose it that is. When viewing facebook I was offered to try the new skin / layout and was very impressed.

I’m a moderate user of facebook and have always favoured it over other sites for being a little bit, well, organised! Myspace was a mess and none of my friends used Beebo and eventually everyone moved over to facebook.

Anyway, the new system looks great. The first thing I noticed is that it seemed a bit nippier when loading, although this may be because not many people are currently on the new testing version, who knows.

Everything is accessible from one page and photos and information load dynamically into the page, which means no more clicking through pages of photos and waiting for a reload, the current batch of images nicely swooshes off to one side and the next batch appear!

The wall and recent activity panels have been merged into one activity log, with wall posts and recent activity logs all in sequence, giving a better view of what has happened over time, without looking through yourself!

Even though i would allways praise facebook for being tidy and well organised, this was probably exagerated as anything looks tidy and organised when compared ot myspace! Anyway, the new look feels even sleeker and makes full use of the width of the screen, instead of the narrow layout emplyed previously.

The new site feels like a true web application and less like a web site, huge improvement, what do you guys think?


Ajax Capabilities & Limitations

I have no official training or background in using Ajax technology, but do use it quite frequently when building web applications.

So far I have found it most effective when an AJAX call to a web service is triggered by the user. For example, they start typing in a search box and filtered results appear beneath, or perhaps they click “add comment” and that comment is posted asynchronously. This all works well and tidily through one javascript connection object, and never kicks up much of a fuss! However this post is more of a question than a solution.

My question is, what are the best practices to use for making continous timed calls to a web service / database?

I am currently building a web application where real time synchronisation between users is a key feature.

At first I wanted to approach this problem by using a technique whereby the client leaves an open connection to the web service, with the web service hooking this to a thread and delivering updates to the client (which i planned to achieve by sending JSON object code back and fourth). However, I was informed that this approach is not scalable and in-efficient on most web servers so i looked to polling.

The polling system I am now using means that the client will query the web server at (very) regular intervals in order to update the page. However I get problems when im doing a post to the webserver (perhaps posting a comment) and the page is auto polling in the background. I also have the question, how often should I asynchronously query the web server in order to keep efficient? Should I use separate connection objects in javascript to handle posts and queries? (although i dont think multiple http objects is an option in IE7? ).

As I mentioned my reading and study in this area is limited. I appreciate I could find tutorials on line and try and sequentially find information to answer my own questions, but expect that those who have experience can guide me (and other blog readers) on the orthodox way to do things when it comes to asynchronous web technology!

Anyone can appreciate that the technology here is very powerful. Only a few days ago Apple announced mobileMe and me.com which looks incredible, and very fast! A perfect example of the results I am trying to accomplish in my current project.


Ajax Capabilities & Limitations

I have no official training or background in using Ajax technology, but do use it quite frequently when building web applications.

So far I have found it most effective when an AJAX call to a web service is triggered by the user. For example, they start typing in a search box and filtered results appear beneath, or perhaps they click “add comment” and that comment is posted asynchronously. This all works well and tidily through one javascript connection object, and never kicks up much of a fuss! However this post is more of a question than a solution.

My question is, what are the best practices to use for making continous timed calls to a web service / database?

I am currently building a web application where real time synchronisation between users is a key feature.

At first I wanted to approach this problem by using a technique whereby the client leaves an open connection to the web service, with the web service hooking this to a thread and delivering updates to the client (which i planned to achieve by sending JSON object code back and fourth). However, I was informed that this approach is not scalable and in-efficient on most web servers so i looked to polling.

The polling system I am now using means that the client will query the web server at (very) regular intervals in order to update the page. However I get problems when im doing a post to the webserver (perhaps posting a comment) and the page is auto polling in the background. I also have the question, how often should I asynchronously query the web server in order to keep efficient? Should I use separate connection objects in javascript to handle posts and queries? (although i dont think multiple http objects is an option in IE7? ).

As I mentioned my reading and study in this area is limited. I appreciate I could find tutorials on line and try and sequentially find information to answer my own questions, but expect that those who have experience can guide me (and other blog readers) on the orthodox way to do things when it comes to asynchronous web technology!

Anyone can appreciate that the technology here is very powerful. Only a few days ago Apple announced mobileMe and me.com which looks incredible, and very fast! A perfect example of the results I am trying to accomplish in my current project.


2 Comments

Online File Coversion

I know how anoying it is when you get a file you cant open, and that happened to me today when I received a “docX” file from work. I stumbled upon Zamzar which is a great web service which will convert files from many file types to a long list of other file types, and all for free. The service worked great when converting my “docX” file to a simple “doc” file and boasts a long list of file types for documents, images, videos and even archives!

So Whats the catch?

  • Ads (and plenty of them)
  • Document is emailed to you shortly after conversion
  • Converted file must be retrieved within 24 hours after conversion

Other than the points above, brilliant free service. Something like this should definately be integrated into Google Documents which currently lacks support for most of the files zamzar works with!


4 Comments

Draw Anywhere!

Draw Anywhere!

Draw Anywhere is a cool tool I found today which allows you to create block / flowchart diagrams online with no software installation. The application runs in browser using Adobe Flash to do all the hard work!

My first impressions (from the poor site design and sketchy nature) were dissapointing, although once I had signed up, and declined upgrading to a pro account (i can crop their logo off my drawings myself thankyou very much!) I was quite impressed.

The interface works well although you do get the feeling that the application is still in development and little snags appear here and there with the rendering of your work. I worked through and used the system to draw a simple flowchart for an online flash game I am currently working on, here is the result.

Online Play Diagram

The subject of the flowchart isn’t too complex but as you can see the image is made quite nicely and was exported as a jpeg in moments (offered as an instant http download). Overall if your not at your PC and are missing programs such as Publisher or Mind Mapper, this online tool can be in-valuable. I can see it coming in handy at University when the admins have neglected to install anything remotely useful on my machine!