Now on youtube a series of videos about how I code with Agility.js

111 views
Skip to first unread message

Gav

unread,
Mar 21, 2012, 6:49:15 AM3/21/12
to Agility.js
Hi All

I am new to Javascript programming, but am an experienced Flex
developer and have spent the last month or so investigating JS
programming with Agility.js.

I put together a playlist on YouTube which takes you from at the
basics of OOP Javascript development with the Agility.js MVC
framework, before introducing some concepts inspired by the Robotlegs
the AS3 MVC framework, shows you a sample application and then the
underlying project and source code of that project and finally shows
you how to use automated build scripts to combine and compress
multiple js class files into one minimised file, complete with
automatic versioning and cache control.

I'd love to read your thoughts/comments about my videos.

Cheers

Gavin

http://www.youtube.com/playlist?list=PLD1ED50BBB73A0E82

Artur Adib

unread,
Mar 22, 2012, 2:54:02 PM3/22/12
to agil...@googlegroups.com
Superb! Tweeted, thanks Gavin.

--
Artur Adib
http://twitter.com/arturadib

Olivier

unread,
Aug 23, 2012, 10:58:48 AM8/23/12
to agil...@googlegroups.com
I'm really liking the framework and your videos have really helped, thanks !

Karfau

unread,
Oct 23, 2012, 5:30:37 AM10/23/12
to agil...@googlegroups.com
I really like those screencasts (especially as I'm a Flex Developer and RobotLegs-"Fan" too).
I would really like to have a closer look at the code you used, e.g. the Actor class.

Is the code hosted somewhere accessable?

Gav

unread,
Oct 23, 2012, 11:22:22 AM10/23/12
to agil...@googlegroups.com
Hi Karfau

Glad you liked the screencasts.  I've put the code in a Gist https://gist.github.com/3939322 any questions let me know.  The events are based on Jquery's events stuff which is ok, but seems a bit buggy (look at the try catches in my code!).  I have since found JS-Signals which is really nice and felt very familiar if you ever used the ActionScript version, especially when using RequireJS which does dependency injection.

I feel like i should probably mention that I have since stopped using Agility.js and have moved onto Knockout.js, mainly for company driven reasons -  .NET backends. I do definitely recommend looking into RequireJS, JS-Signals, CoffeeScript (for an alternative OOP to Agility, and just lovely syntax when you get used to it) and Jasmine for testing all of which are now firm fixtures in my JS toolkit.

How are you finding the transition from Flex to JS? Me I am really enjoying the new possibilities and with the right tools its actually quite fun, its also nice that loads of techniques from Flash/Flex are still applicable. 

Karfau

unread,
Oct 23, 2012, 5:51:21 PM10/23/12
to agil...@googlegroups.com
Thx for the gist.

As for my experience in the js-world:
It feels like a pro and con that there are so many "execution-environments" for the code.
I think I understood most of the basics in js, but I have nearly practical "project"/"app"-expirience with js.
I'm still feeling a bit lost, with all the possiblities that should help the developer.

At the moment I'm doing some prototyping for an app,
for my first attempt I used agility.
It seems to me that the consepts are very easy to grap, but it also means that I have to wirte some essential thing myself.
which gives me great flexibility. But I think for me/"my team" it would be better to stick with some approved conventions about such details for now.
So my next attempt will be canJS, as it seems to get even closer to some paradigms known from AS.(Have u had any expiriencee with it?))
(Still finding it confusing to mix "classes" and "instances" the way it works in agility)

I found http://todomvc.com a good source for comparing how frameworks attempt some things and how the resulting code looks.

Gav

unread,
Oct 25, 2012, 5:20:42 AM10/25/12
to agil...@googlegroups.com
todoMVC is a great resource, especially when comparing frameworks.  I've been in a similar position to you, where Flex lost favour with our clients and i was tasked to find a frontend html5/js solution and spent a few months investigating all things JS.  Kinda daunting.


Among the frameworks i looked into, ones worth mentioning are AngularJS (amazing for very specific types of projects, brilliant testing stuff but not flexible imo) and EmberJS (I probably would've chosen this one over knockout if the choice was purely mine), although the docs arent that good.  

I've not looked into CanJS but I can tell you that I have ended up really liking knockout.js - it initially put me off all this MVVM stuff they go on about on the website, but basically there is a really powerful binding system in play thats really flexible and great for DOM manipulation based on underlying models.  It doesn't offer as much structure as other frameworks which i actually found quite nice as it meant i could build a robotlegsy type architecture around it and use knockout.js purely for view rendering - i guess it does depend on how much legwork you want to do yourself.  It also has a brilliant tutorial system, thats worth checking out.

i definitely struggle with the number of different ways in JS there are to do the same fundamental thing, and it feels like the wild west sometimes with the number of new frameworks and stuff cropping up, but that can be a good thing as well.  

I particularly struggled with how to implement OOP which was probably the main thing i liked about agility, but once i moved away from agility i needed a new solution. I tried many different ways of encapsulating my code, from revealing module patterns ala Doug Crockford, to prototype chaining but ended up really liking coffeescripts way of doing things, its basically prototype chaining but even better as it allows your methods to access and override their supers. Plus it generates JSlint friendly (better than i can code) JavaScript for you.  

All that depends on your framework choice i guess, cos some offer their own OOP (i think backbone does) but not sure if using framework classes for your own stuff is the best way of going - like what i was going with agility where i would extend an agility object for a command class which had no view, seems wasteful resource-wise.

good luck out there! 

Christian Bewernitz

unread,
Oct 25, 2012, 4:43:29 PM10/25/12
to agil...@googlegroups.com

Thx for this great input.

I only have some weeks to get ready for building the prototype, but it seems my vision of JS gets clearer every day :-)
And "knowing" the fundamentals about JS-"OOP" helps a lot.

For this first project, especially as it is a prototype, I'm looking for a framework that takes away some basic decisions and let ne build something maintainable and "understandable".

EmberJS had been our first attempt, but it did not make sense to us at that point...

If I understand CoffeeScript right it it more a tool/lang then a framework, so this could enhance the quality and workflow, but it doesn't provide the glue one gets from using a framework. But it can be used with any framework?

Thx again, I will keep your answers in mind.

Reply all
Reply to author
Forward
0 new messages