Flex VS Silverlight

These days everybody in the web world is pushing RIA’s. We have the javascript frameworks like Scriptacilous,Dojo,GWT,… , we also have the browser plugin options like Silverlight,Flex,JavaFX. Probably I’m forgetting some here, but these are the ones I’m following.

As I worked with most of them (some more then others) my preference more and more leans to Flex for developing Web applications.


Well there are several reasons but probably one of the biggest reasons is the fact that Adobe has been releasing a lot of there core frameworks opensource. The Flex core is opensource, they recently released BlazeDS a Java framework for communicating in their own binary format with a Flash application.
For now the development platform (Flex Builder) still has to be bought, but if you want you can just use an Ant script to compile it.

Another big reason is the fact that Flash runs on Windows,Mac and Linux. Even the tool Flex Builder runs on those 3 OS’.

The fact that Flex can display a couple of thousand records in a Datagrid without crashing my browser is also nice. Try doing that with javascript (although I’ve seen a demo of a Dojo Datagrid displaying 100.000 records) but in most frameworks it just hangs your browser.

JavaFX is still in a early stage and IMHO is too little to late!

Microsoft offcourse is pushing their new Silverlight. I’ve seen some demo’s went to some workshops. And I have to admit it’s not bad but if you compare it to Flex, well hmm I’m not sure but they sure seem to be far behind. I just tried the tool Deep zoom (this was shown on mix 2008 as showcase for Silverlight 2) and I’m not really impressed. Compare it to this tool that was shown on Javapolis 2007 and you’ll see where I’m heading 🙂
On the other side Microsoft has the benefit that a Silverlight application can be written in the same language from Gui to backend. But I’m not sure if that’s really such a major advantage. If I look at friends and collegeaus they all seem to be doing some animation stuff with Flash for their customers. And most of them do it in Macromedia Flash MX. They also write code in there, the language is called ActionScript and is a real object oriented language. But these guys don’t know to much about building a large scale application. They do know however to write a nice Gui interface. So they can write components that can be used in Flex. So there Adobe also has a big advantage as they pretty much own the Graphics industry 🙂

One thing that most peeple however seem to overlook is the fact that with all these RIA applications the search engines will index much less of your page. If you for example have product catalog made with Flex,Silverlight or with one of the Javascript toolkits I’m not sure that they will be indexed by the spiders. But then again you can workaround this and always generate a Sitemap of your product catalog in plain Html. Hmm I wonder how many companies do that and how much money has been lost by companies who didn’t show up on top in a search engine because of this.
Another thing is that integration using links and parameters also gets a lot more complicated!

As I’m working with Flex at the moment you’ll here some more in the future.

PS I hope the upgrade of wordpress worked. Now I’m on 2.3.3 (currently latest stable release) If more SPAM should appear please notify me ASAP!!

Dojo 1.0 + OCR

This week Dojo 1.0 was released. I already took a quick look at it, and it looks really nice. Big changes since the last version I used (0.4). The new grid is awesome, I really hope it will be easy to use but I’m pretty sure it will be. The guys from the Dojo community are really good programmers. I spent some timing digging through the code for a fix, I saw several things I didn’t even know were possible with Javascript 🙂
I’ll come back on Dojo once I’ve got some real first hand experience with it, but it looks promising (and also much faster than previous releases)
I already found out that if you pass in a JSON store to your grid, your identifier better be unique or it won’t work (took me some time to figure that one out 🙂 )

A couple of weeks ago We bought a All in one (scanner,fax,printer,copier). The nice thing about this device it let’s you scan 50 pages (document feeder) without having to put every page on the scanner window. That combined with the ability to scan to a networkdrive,email or ftp server makes this device the perfect solution for my administrative problem. My goal is to go to a paperless office but it will take some time until we get there.
Problem is the device scans the images straight to PDF. So text actually becomes an image, you can’t select it, search for text,… it’s not yet what I want. In my Ubuntu I searched for OCR and got some results witch I installed. Almost all of the tools let me scan for text in the PDF, when I saved the document I suddenly could search for text in the document. Still the selecting of text wasn’t possible. Philip told me that Google had a solution that let’s you convert these kind of documents to XHtml. I knew they were developing an OCR tool but didn’t know it would be able to do this kind of stuff. I tried to install it but I’m still missing some dependecies, I’ll try it later again.

Dojo patch rejected :(

I’m using the dojo dropdowndatepicker in a lot of my projects. Problem with this widget is that it only really supports the yyyy-mm-dd notation (as the standard is). But all the applications I develop the people want our local notation (dd-mm-yyyy). So I wrote a small fix that helps. Too bad it got rejected as it doesn’t fit in the idea of the project and the new widget set they are building.

For now it’ll be a patch I have to apply on all my dojo downloads to get the functionality I need from it. And let’s hope in the future we will migrate our code to the iso standards, right?

Most important setting when using Dojo

In our current application we use dojo. Only for a small amount of the application at this moment, but for the new version we are planning to include a lot more functionality using the dojo toolkit. I was testing this on an older machine (p3 1Gig) and the application took really long to display the page. So I asked around on irc #dojo and they pointed me to this really nice setting:

<script type="text/javascript">
	djConfig = {
		parseWidgets: false

Dojo waits until page has loaded and then starts scanning for the dojoType attributes, you can imagine if you have a lot of data this will take a while. With this simple setting you tell dojo don’t do this.
Then for every dojo widget you want to use, just add

<script> dojo.hostenv.searchIds.push(id)</script>

Dojo keeps all the ids and only tries to create a widget out of the ones you push out. So no page analysis afterwards.

Sweet 2