Aurora: Actors for javascript

September 10th, 2011

Aurora is an attempt to bring easy concurrency to javascript. Many browsers now support web workers, so it is time for an implementation that is easy to use, lightweight, fast and saves you from writing boiler-plate code.

It is influenced by scala’s Akka actors. It is still very much a work in progress, but the committed code does work.

Have a look at https://github.com/LaurentZuijdwijk/Aurora for code samples.

Inspiring talk about software development processes

September 7th, 2011

Rich Hickey’s inspiring views on software development. Great advice: Get away from your computer and write better software with less bugs. A must watch.

Apollo injection and messaging framework for Actionscript

August 17th, 2011

Apollo is a lightweight Actionscript and Flex framework for dependency injection and message passing. Itt is an ideal basis for applications built using model-view-controller, or more specifically model-view-adapter patterns. The approach of this framework is slightly different from most other well know frameworks, such as Robotlegs or pureMVC. The aim is to give developers the best tool to focus on the fun part of development and less on writing boilerplate code.

With Apollo I decided to go with a public interface driven design for dependency injection, instead of the more common meta tags+introspection, or the string based message passing as in pureMVC or the AS3 event model.

So what is the good thing about using interfaces in an observer pattern I hear you ask?

  • Using interfaces gives the application architect the opportunity to divide an application up into certain areas of interest and group methods and properties together to be used across various controllers.
  • Ide’s will let you create stub code for all the interfaces that are implemented, preventing you from writing boilerplate code.
  • Type safety for object passing
  • No horrible switch statements

You might think: ‘ok, I get that, but why another framework if the existing ones do a good job?’

This framework was developed by me as a way to test this new subscriber/observer method. Just because I can. Hopefully it will give you some new ideas or even a handy new tool.

quick overview

The basis of the framework is a static Injector class which uses the observer pattern to register controllers.

The methods inject and call are used to update controllers. Inject does exactly what you expect it does. I will inject a strongly typed object in every controller that has a registered property, based on their interface.

Given an interface ‘IPersonInjectable’ which has a method set person(val:Person), then a call to Injector.inject(new Person(‘me’)) will inject this new Person instance into every controller. You can see that with altering your models a bit, you can make databinding extremely easy.

Example

 

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
public interface IPersonInjectable
{
   function set person(val:Person):void
}
 
public class PersonViewController extends Controller implements IPersonInjectable
{
   public function PersonViewController() 
   {
      super();
   }
 
   public function set person(val:Person):void
   {
      view.person = val;
   }
}
 
new PersonViewController();
 
Injector.inject(new Person('Laurent', 'Zuijdwijk'))

 

 

Have a look at https://github.com/LaurentZuijdwijk/Apollo for some examples.

 

Multi screen imagazine for Isobar Mobile

August 17th, 2011

My friends at Isobar Mobile made this video to show the multi-screen app we made for De Bijenkorf, a Dutch high-end retailer.

We made a multiscreen Javascript app, which we packaged in native apps for Android, iPad and iPhone. It is based on an in-house MVC framework and a custom animation framework in order to switch between CSS3 and jquery animations. It was quite a fun project.

 

Back from the arctic

May 24th, 2011

Arctic Greenland has to be one of the most amazing places I have ever visited. Big open spaces, intense cold, steep snow faces, magnificent gullies, a close encounter with a polar bear and some serious snowboard first descents. WooT.

Implementing the LinkedIn Javascript API for WebleadsB2B Investigate

May 18th, 2011

We just finished implementing the new LinkedIn Javascript API for Investigate. Using a custom javascript wrapper and a ExternalInterface, it became quite effortless to search in LinkedIn from our Flex app and retrieve data. This is definately easier to implement than their PHP API and it supports the same methods.

Thank you LinkedIn for coming up with the Javasript API.

Multiscreen Javascript application for Mercedes C-class

May 1st, 2011

Video rich Javascript application. This works on Android, Blackberry, iPad, iPhone, Webkit browsers, IE6 – IE9, Firefox, Opera. Using a framework I had developed earlier in the year, we could build this in an extremely short development time.

Have a look at http://www.thenewcclass.co.uk

 

ReclameArsenaal vakpers Flex app

February 7th, 2010

For ReclameArsenaal we finally launched two new modules to browse over 160.000 pages of archive material. It includes over 17 magazine titles from 1922 onwards and books of the Advertisers Club Netherlands from 1968.

I did end-to-end development of this app, from database design, import and management tool, web service and two Adobe Flex applications.

Working in close coorperation with Redbike Multimedia and Pim Reinders from ReclameArsenaal, I think we achieved a really nice result.

Have a look at http://bit.ly/dt1Xan to see nearly 100 years of Dutch advertisement history.

Actionscript 3 math fun: torus knots

December 26th, 2009

After seeing the Wikipedia page for torus knots, I thought it would be nice to write a simple 3d genetator in AS3.

The basic code for this script are four lines of codes, looped for each line section, with a max of 2 * PI or 360°.

1
2
3
4
5
_r = ((2 + Math.cos((q * i) / p)));
 
x = _r * tr * Math.cos(i);
y = Math.sin((q * i) / p);
z = _r * tr * Math.sin(i);

The x, y and z values can be drawn using the graphics class after we convert them to 2D points.

Some interesting results can be achieved when the number of line segments is lowered below 100, making the image really distorted. With 35 line segments and high p and q values things get interesting.

Get to know your visitors

June 27th, 2009

This is part one of a three part series on lead generation.
In this first part, web solutions expert Laurent Zuijdwijk talks about best practices in lead generation and the software products Flexr Web Solutions has developed for webleadsb2b. These products include WebWHO and ENRICH, rich internet applications to support lead generation.

Do you monitor the visitors on your website thorougly enough? Do you know who your visitors really are? Even if you have plenty of visitors on your corporate website, chances are you are not maximizing the potential value they represent. I am sure you use tools to track traffic on your website, but how well do you really know the visitors on your website?

You will probably have plenty of quantitative information about traffic. Maybe you know which browser your visitors are using and which operating system. You know if your visitors are Mac users and what size screens they have. What exactly does this information tell you? Is it enough to filter out potential leads from your visitors and does that tell you if you are reaching your target audience?

It might be, but if you do direct sales through your website, or if your website is meant to generate sales leads which need to be followed up, the chances are you are missing out on business opportunities. In this case you really want to get to know your visitors and actively engage with them.

How does it work?

As part of their three step plan to engage with web visitors and generate leads, we built an application for webleadsb2b to acquire more qualitative information about website traffic. The requirements were to get specific in-depth information to:

  • Monitor campaigns
  • Get the name of the organization visiting
  • Know their geographic location up to city level
  • Filter out competitors from the visitors
  • Measure on target audience
  • Find out where visitors come from

How we did it

We designed and built a tracking script in Javascript and a front end dashboard application using Adobe Flex. Adobe Flex was chosen, because of the quick development times, it’s XML support and cross browser capabilities.

This rich internet application features graphs, copyable Excel like data grids and drag and drop functionality for data. This makes the application intuitive to use and data is easy to export. All data connectivity is done asynchronous, making the application more responsive and safer than an average web application.

Results

Fiserv, a financial services provider, uses this application to monitor campaigns. They can for example track the clicks on web ads and drill down on what type of visitors clicked on them. They found out that out of every 100 clicks:

  • 85 % was non-commercial
  • 5% were competitors
  • 10% was their target audience

With this data they were able to calculate the effectiveness of their campaigns much more precisely.

In the next two posts I will get into how you can capture even more lead data and how to effectively follow up leads.

Webleadsb2b sells this product as part of their lead generation solution. If you want analyze the traffic on your website better or if you want to be able to monitor your campaigns, the team at www.webleadsb2b.com can help you out.