Category Archives: programming

Installing Angular.js on Windows

If you’re new to Angular.js and are trying to follow their example app (see, chances are you might get an error like this:

node ./scripts/web-server.js
 throw err;
Error: Cannot find module 'C:\Users\<user>\scripts\web-server.js'
 at Function.Module._resolveFilename (module.js:338:15)
 at Function.Module._load (module.js:280:25)
 at Function.Module.runMain (module.js:497:10)
 at startup (node.js:119:16)
 at node.js:902:3

What the tutorial failed to mention is that you need to be in the directory of the angular-phonecat directory – so the sequence is :

cd angular-phonecat
node ./scripts/web-server.js

Then access your browser at localhost:8000 and it will work. Remember if you’re using Windows that port 80 is typically reserved for IIS so unless you want to mess around with IIS default ports….


Adobe and the future of Flex

On the 15th November 2011, Adobe effectively announced that it no longer saw Flex as a long term going concern and would push it into the community/open-source domain (semantics aside), as it realized that HTML5 combined with comprehensive Javascript libraries such as JQuery were the future. There was mixed reaction from the Flex community, covering both positives and negatives of this announcement, but after the dust has settled what does this really mean for Flex, Adobe and the community?

It’s a beautifully ugly thing

I’ve always had mixed feelings about Flex as a platform; on one hand I found the to be much elegance and simplicity of the architecture – XML for layout; Javascript-u-like for code seemed a fantastic approach, particularly as it opened up the possibility of writing your own Flex app without the need of a $$IDE. However the delivery through what is basically a Flash container always concerned me as it limited the available platforms (no need to rehash why Flash/Flex doesn’t run native on Apple mobile devices).

So Moving Off Flex Is Good?

Strategically speaking this is the right move for Adobe; Using HTML5 + JS….

  • Removes the run-time dependencies of Flash
  • Creates a wider base of developer community
  • Standardises on technology/architecture
  • Adds more pressure on the less compliant browsers to man-up (Internet Explorer – why are you even still here?!?)
  • Allows touch-capable mobile devices able to consume applications

However there are still challenges:

  • We’re back to the browser inconsistency world; implementation of HTML5 is not standard across all browsers
  • There isn’t yet one “go-to” Javascript framework implementation or standard

So there are still a few key open issues that need to be solved, buying Adobe some time to continue to support Flex with a view to moving folks to the next big platform. Once could argue that there needn’t be one Javascript framework as we’ve all managed fine for some time – but to have a reference implementation that is open and standard (as possible) would be a great thing.

Should Adobe Acquire?

If I was Adobe I would be deep in discussion already with the likes of the folks who make JQuery, mooTools, 960Grid, etc. with a view to acquisition. These Javascript frameworks have built a reputation of quality and capability which has made many developers lives so much easier.

JQuery would undoubtedly be everyone’s first choice as it has gained popularity in the community and has many extensible attributes and add-ons covering both User Interface elements and mobile device support. However, I cannot pass up an opportunity to mention and often overlooked framework which came out around the same time as JQuery and in my personal opinion, has a some architectural advantages (though cool architectures don’t always make happy users) …. I refer to MooTools. You can draw many parallels between mooTools and JQuery, although the former takes a hit in terms of adoption. There are many “versus” articles out there (here, here, here) for you to make up your own mind. I speculate JQuery will win if only for popularity.

Adobe did try their own framework of sorts (Spry) with limited success; partnering with a JS Framework might be a good first step, but without acquisition or co-ownership they lose control of the roadmap. Producing their own framework might be a bit late in the game, so it stands to reason that obtaining a popular and well supported framework such as JQuery with its’ vast community would be the best thing to do.

So What’s Next?

I foresee a roadmap to a new Adobe application which will allow the creation of HTML5 applications in replacement of the Flex Builder product. It will be a hybrid that takes MXML (layout/UI) and ActionScript (action / code)  and (somehow) compiled /assembled into an HTML5 app. We’re likely to see an announcement over the coming months.