EcmaScript 4.0 given the boot…

Posted in Flex, Interesting and Entertaining, Web Development on August 15th, 2008 by Shaun

In a move that could have a huge impact on the future of the web, the EcmaScript language standards body has killed the draught version of EcmaScript 4.0.

This draught version was widely recognised as a great improvement for JavaScript and formed the basis of Flex and the current versions of Flash because EcmaScript 4.0 is known as ActionScript in the Adobe world.

Microsoft are once again at the forefront of this as they point blank refused to adopt the proposed standard, ensuring that IE 8 has absolutely no support for it at all.

The result of all this is quite astounding really. Adobe are no longer ahead of the game with ActionScript, instead they now have a proprietary Open Source scripting language. The rest of the industry has a watered down, much less useful and far less innovative version.

Well done Microsoft! once again thinking of your own bank account over the benefits to the user.

I have really started to get my teeth into Flex and I for one am a big supporter of ActionScript. Coming from a JavaScript developers perspective I felt that it was a HUGE improvement and defenitely the way things should have gone.

I think this is just more proof that Microsoft’s new open initiative is all spin and no substance, they sure like to appear more open and part of the Open Source crowd then they go do something stupid like this.

It’s the same old story all over again, if it isn’t done the way Microsoft want it done then it gets stomped on.

You can read Brendan Eich’s announcement here. Feel free to go all slackjawed and rant.

The basic points are that we will get 2 interoperable implementations of EcmaScript 3.1 by early next year.
There will be a collaboration on post ES3.1 and i need to quote this because I can’t bring myself to justifyingly paraphrase it:

2. Collaborate on the next step beyond ES3.1, which will include
syntactic extensions but which will be more modest than ES4 in both
semantic and syntactic innovation.

They actually put it out in black and white that they are going to be less innovative… deliberately.

Apparently Packages, namespaces and early binding are off the table for good, these will never be part of EcmaScript because they have been

deemed unsound for the Web

There will also be some rephrasing of other goals and ideas to keep concensus in the committee including the notion of classes based on ES3 concepts combined with proposed ES3.1 extensions.

I wanted to find out what Douglas Crockford had to say about all this and as usual his blog has a typical crockfordian response. You’ll be wanting the entry titled harmony.

I haven’t been able to find any official comment from Adobe on this yet. I assume they are going to have a few big decisions to make in the next few weeks and months. I for one hope that they don’t water down ActionScript though I’m sure from a business perspective, going it alone with a proprietary solution is exactly what they tried to avoid in the first place.

Hank Williams has a great blog entry on this that sparked me off on the trail to find out more.

Tags: , ,

TF2 heavy update due.

Posted in Gaming on August 13th, 2008 by Shaun

Valve are at it again, details for the next big update to Team Fortress 2 are already sneaking out. this time the big man himself gets an update. The Heavy is the next class to be tweaked and you can get some of the details here.

Tags: , ,

pragmaric programmers have new payment options.

Posted in Programming, Prototype, Rails, Web Development on August 8th, 2008 by Shaun

Anyone involved in software development would have, at some time, heard of the pragmatic programmers series of books.

The books have a superb approach learning that makes it very easy indeed to grasp the concepts they are imparting.

Their website contains their entire print catalogue ready for order and as well as the paper version of the book you can download PDF versions that are specially crafted just for you, imprinted with your own personal monogram (OK it’s your name) by a team of gerbils no less…

You can also buy beta versions of books giving you the chance to read them as they are being written. With regular updates you can get ahead of the game on the very latest versions of your chosen tipple. there are lots of Ruby books as well and some very good career development titles.

Payment choices are Credit card and now they also have PayPal as a choice if you don’t have a credit card or just prefer to handle your purchases through Paypal.

Prices are very reasonable and you get a discount if you buy the paper plus PDF version of a book so you can have a handy reference version in your pocket as well as a copy to read on the train… cool!

so pop on over and take a look at what they have got.

Tags: , , ,

Making controls work when using Modules in Flex

Posted in Flex on August 1st, 2008 by Shaun

In my last post I explained roughly what modules are and how you can break your application into smaller chunks allowing for a faster download and better user experience.  In this post I want to pass on a solution to a problem that had me outfoxed for a day or so and which will benefit you greatly when using Modules.

First a quick description of the problem.

I have two Modules one acts as a front page and this has a grid a textbox and a calendar in side a panel.; my second Module has a couple of combo’s and another grid on it.  Each module has code specific to the operation of the Module although each has a common set of classes because they both use a grid.

The problem here is that once the first module has loaded, all the relevant classes are loaded into the application but they are only visible by that module.  When the second module loads the framework realises that the classes are already loaded and doesn’t load them again.  The second module can’t see the classes though because they were loaded by the first module.  It does take a bit to get your head round this and I recomend you read Alex Harui’s presentation on Modules, it’s the March 7 2007 entry.  This will give you a lot more in depth info on what I’m trying to convey.

So, I have a nicely modularised app but I get an error everytime I switch between modules and try to use the controls.  The answer here is to inform Flex that the modules classes should be loaded into the application domain, this makes them visible to all modules.
It took a bit more digging around and the assistance of a Cardboard Programmer to get there but I eventually found that ModuleLoader has a property allowing you to set the application domain.  So taking my sample from the previous post, changing the ModuleLoader by adding in the new applicationDomain property so it now looks like the code below solves the issue.

<mx :ModuleLoader id="module1" url="modules/homePage.swf" applicationDomain="{ApplicationDomain.currentDomain}"/>
<mx :ModuleLoader id="module2" url="modules/testReports.swf" applicationDomain="{ApplicationDomain.currentDomain}"/>

This also solved an issue with the showEffect not working on my canvas.  That’s a primer for my next post ;0)

Tags: , ,

Flex Modules and why to use them.

Posted in Flex on August 1st, 2008 by Shaun

Flex is a pretty nice and quite powerful way of building web applications. Sure everything compiles to flash and that’s not everyone’s cup of coffee, but Flex is definitely not something to pass by. If you are a web developer familiar with flash, JavaScript HTML and even ASP.Net then you will find it very easy indeed to get on with Flex.

Getting the architecture of your application right will probably be the next challenge after getting used to the framework.

Flex applications have a single tag allowed to define the application itself. It’s easy therefore, to build your app solely within the one page as this has the application tags. Sure you can farm out some of your code to classes and import them, and your app will probably run fine. The problem is in the user experience though, as a user will need to download a big chunk of data before they get to run the app.

Many web developers will already recognise this problem from the old days when many websites had all the JavaScript inside the page (not linked) and images were not as nicely compressed as the lovely png format we have now. Site bloat was a big problem.

To solve this issue Flex has two different solutions each suited to a different purpose. The one we are concerned with here is the use of Modules to break your application down into smaller logical chunks.
By doing this the user will only need to download small chunks of data when it’s needed rather than a much bigger chunk of data which may not all be relevant.

To create a module you right click your project, or a folder ( I like to put my modules into a modules folder somewhere in my project), from the context menu choose new> Module. Fill out the details in the form to create your module.
When the new module opens you will see that it looks exactly like your main application MXML except it has tags where the tags used to be. Script and MXML can be input exactly the same as in your main application MXML file.

Now once you have created your Module you will need to load it somehow. Let’s take a look at some sample code.

<mx :Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
    </mx><mx :Script>
        < ![CDATA[
        import mx.core.Container;
        import mx.events.IndexChangedEvent;
       
        public function viewstackShow(childViewId:String):void
        {
            var cont:Container = Container(dash.getChildByName(childViewId));
            if(cont != null){
                dash.selectedChild = cont;
            }
        }         
        ]]>
    </mx>

    <mx :Button label="Load Module 1" id="loadModule1" enabled="true" click="viewstackShow('module2')"/>
    <mx :Button label="Load Module 2" id="loadModule2" enabled="true" click="viewstackShow('module1')"/>

    <mx :ViewStack id="stack1">
        <mx :ModuleLoader id="module1" url="modules/homePage.swf"/>
        <mx :ModuleLoader id="module2" url="modules/testReports.swf"/>
    </mx>

(The code sample is proving an absolute pain in the ass to insert properly please don’t copy and paste this anywhere it’s for illustration only.)

In this sample we have an application with a single function, two buttons and a ViewStack with two ModuleLoaders.
We shall come to the function in a moment, the ViewStack is a nice control that effectively gives you layers to put your application pieces on, each stacked one on top of the other, inside this I have added two ModuleLoaders. The ModuleLoaders are used to load your modules and as you can see I have given each a unique ID and they have a URL property that points to the relevant Module.
This piece is important. As you can see the url points to module1 and module2 but they are both .swf files not MXML. This is because we will be loading the compiled versions of our modules and these will have a .swf extension.

The Function I have created here is just a simple function that allows me to quickly switch between the different layers in the ViewStack by passing in the ID of the layer I want to load.

always give each object in your MXML an ID, this will make it so much easier to perform an action on them.

So if I were to have a project with my application mxml as shown above and two modules inside a modules folder, one named module1 and the other module2; I would be able to click each button to load each module.
The nice think here is that when my application loads it will only load module1 as this is on the top of the ViewStack module2 doesn’t load until I click the Load Module 2 button.

Quick and simple.

In my next post I will cover a key element you will need to use when you have more complicated modules with lots of controls on them.

Tags: ,

Duane of Duane’s world visited Business Objects!

Posted in Flex on July 27th, 2008 by Shaun

Catching up on a load of pd/vid casts this morning while enjoying a spot of rare sunshine in the garden I came up on an episode of Duane’s world in which he visits Business Objects in Canada.

As many of you already know I work for Business Objects (now an SAP company) and I’m not a little unimpressed that Duane’s visit appears to have gone unnoticed among the developer fraternity outside Canada. Ho hum… such is life in a large organisation, no doubt I’m not reading the right intranet pages.

Anyhow Duane is a pretty cool guy, ex musician and extreme sportsman, and now as an evangelist for Adobe he’s pretty good at sharing key skills to get you up and running as a Flex expert. in Episode 4 Duane visits BOBJ to hear about the new Flex version of one of BOBJ’s key applications and the SDK to go with it. He also shows how incredibly simple it is to hook up a chart to your own data.

I’ve been pretty busy learning Flex and developing a new tool for my company (hence the lack of posts recently) and i’m loving it. It’s not perfect (show me a language that is) - feel free to comment on that btw, but Flex is pretty neat, I’ve tried to commit to sharing the lessons i’ve learned on stuff before and if I can get over a lack of confidence, I’ll try and share what I’ve learned. Someone may get value out of it I’m sure.

Enjoy.

Tags: , , ,

It’s official!

Posted in Interesting and Entertaining on July 4th, 2008 by Shaun

With ove 8 Million downloads Mozilla officially own the Guiness World record for browser downloads in a singe 24 hour period. Firefox 3 is already a great browser, now it’s an official bona fide record breaker.


Dedication oh, oh, dedication oh, oh , dedication, that’s what you need.

If you want to be the best, soar above the rest.


Who-oh Dedication’s what you need


If you want to be a record breaker, yeah.


- from the theme tune that Roy Castle Sang at the end of the show

Tags: , ,

Caught out.

Posted in Interesting and Entertaining on July 2nd, 2008 by Shaun

I got caught out by a very strange issue the other day. I posted a short entry about Bill Gates having a spot of bother with Windows. The entry I posted was copied out of an email I was composing to my brother in-law and this was my mistake. Of course I was using Outlook to compose the email, Outlook in this case is using word to compose the body of the email and add in the fancy rich text effects. What I did not realise was that when you copy and paste from word, you don’t just get the text but all the background XML and styling info as well.

Initially this might not sound too alarming, unfortunately when you paste that into Wordpress, without using the ‘paste from word’ option in the WSYWIG editor provided within Wordpress, the tags and style info becomes active.

The result of the cock-up was that over the weekend I has a blog with the ugliest colour scheme know to man (what you don’t like orange? ;0) All the links were blue, the default styling for most browsers, and IE refused to load the site at all :0(

Thankfully my pal Lummie did a quick search and found out what the problem was while I was trying to figure out how the frack I got all these crappy tags into my site without touching it.

Once the offending article was cleaned up, the universe was returned to it’s previous state and all is well.

There are several plugins available out there to help you clean up if you need to but I advise you either copy into notepad first then copy from there to ensure you don’t get the crud or use the paste from word function in Wordpress.

Technorati Tags: ,

Tags: ,

Advertising Standards Finally slaps Virgin Media…

Posted in Interesting and Entertaining on July 2nd, 2008 by Shaun

…In response to complaints… From BT!?

I’m pretty sure that if you look at Broadband forums as well as many sites and blogs on the web, you’ll find many consumers who have complained about Virgin Media’s appalling service and the never ending changes to their ‘traffic shaping’ policy. maybe those complaints aren’t being made in the right way to the right people?

At least someone finally agreed that Virgin’s latest advertising campaign is a total crock of shit. The BBC is carrying a good article outlining the problems and corrections Virgin will have to make. There are a couple of interesting statements from a Virgin Media Spokesperson too.

One comment made me chuckle

“Our traffic management policy helps ensure the majority of customers receive the quality of service they expect from our fibre-optic broadband product by managing demand from the heaviest users at certain times of the day,”

Considering VM cap ALL users when they hit a download limit meaning

“Customers on its L 4Mbps package could download 60 songs and or two TV shows before reaching caps while those on the XL 20Mbps package could download 614 songs or nine TV shows before their speeds would be subject to caps”

I fail to see how anyone using Virgin Media’s Broadband service can be said to receive great value for money. Basically so long as you pay VM your money and don’t do anything at all with the service they are happy. Try using it and somehow you are breaking the rules and causing much upset in the universe so you must be restricted and policed. (using it would mean, emails with photo’s from family members, video’s shared with family members, Windows Updates, Buying Software online, Buying Games online, Playing online games…).

It’s like buying a car from a manufacturer and being told that you can only do 5 miles a day in it or you will be restricted to 1st gear for the next 50 miles then you get another 5 miles with the full 6 gears then… you get the picture.

It’s Complete Bollocks! If you can’t provide the service and are not prepared to invest in the infrastructure to guarantee the speeds and service at all times to all customers then you shouldn’t offer the damn service in the first place.

Let us not dwell on the negative though Virgin will soon be offering a blistering 50MB service (between 1 am and 1.10 am every day with a DL Limit of 5kb no doubt).

Technorati Tags: ,

Tags: ,

Satisfaction…

Posted in Ajax, Interesting and Entertaining on June 26th, 2008 by Shaun

There’s a certain satisfaction in knowing that somehow, some place, someday even Bill Gates has hammered his desk in frustration brought on by a healthy dose of Windows. :0)

http://blog.seattlepi.nwsource.com/microsoft/archives/141821.asp

Tags: