Why Dojo? From a Flash/Flexer’s Perspective

Hey you guys…  Is your Twitter stream bombarded with Ted Patrick tweets and retweets about Sencha?  Do you get Sencha ads targeted at you when you visit websites, like EVERYWHERE you go?

I am.  It’s kind of annoying since I’m not looking to learn Sencha.  Truthfully, though, you can hardly blame the current Sencha evangelist.  After Adobe abandoned Flex sending it off to Apache, Ted seems to be leading a HUUUUUUGE marketing push trying to turn former Flex devs into Sencha/ExtJS devs.  Ted is leading webinars, reaching out to people, posting on G+ threads, the whole deal.

I can hardly blame him because:

a) I follow him on Twitter, so it’s mostly my own damn fault

b) This is the perfect time to grab a bunch of disillusioned and lost Flex devs, and Ted is doing it in a perfectly ethical (although a bit overzealous way).

I looked into going “beyond” jQuery because of a G+ post by Jesse Warden claiming that ExtJS is the perfect compliment to enterprise development.  He made the very apt analogy that Flash is to jQuery as Flex is to ExtJS/Sencha.  It really made me re-think things because it had been drilled into my brain that jQuery “won”, and given the tide of developers (84.8% of all websites using a library use jQuery) it seemed like there was no reason to use anything else.

Turns out, there really is a use for the lesser used libraries/frameworks/toolkits.  We can see this because even if jQuery is and always will be your library of choice, as you build more advanced applications you might want some binding, templating, MVC, or other action.  AngularJS by Google is getting more widely used.  It gives you binding, declarative HTML markup for data, and other MVC goodies.  There’s Backbone.JS, Underscore.JS, and tons of others.  A lot of folks seem to be combining all of these separate libraries together to custom fit their project.  And I’m sure that works fantastically – I was doing similar things for a time.

As these separate projects get more and more features, you may now have feature overlap between 3 different libraries you’ve used in your project.  It seems a LITTLE wasteful at best.  At worst, maybe your dev team does a very basic thing 3 different ways because binding is available 3 different ways given each of the libraries you’re using.

Wouldn’t it be better, or even just worth looking into, if you could find a cohesive library/framework that offered all of these things together? Maybe it could even do a little more and help you make a massive Javascript application that loaded in components and scripts AS YOU NEED THEM instead of all at once in the beginning.

It looked like Dojo and ExtJS were the most mature offerings in terms of what I describe.  I took a look at ExtJS by Sencha first.  At first glance, it looks pretty awesome.  You’ve got designer and animator tools.  They are a wee pricey, but considering my Flash background, spending $279 on Sencha Designer and $199 on Sencha Animator doesn’t seem obscene.

What I can’t get past is having to spend $329 for a Javascript library license!  When I’m doing Flash/Flex development, I use the Flash Builder IDE for coding and sometimes Flash Professional if I’m doing animations or graphics.  And that’s cool.  I chose to buy into these tools.  I didn’t have to pay to use Actionscript 3 though.  My fellow developers who may not do Flash all the time can crack open any text editor and edit my code.  They can check it back into SVN and contribute to the project.  They can launch the Flex SDK command line and build my project.  None of this costs a dime.

If and when they get more invested in Flash/Flex, they might then want to buy Flash Builder or even IntelliJ for the advanced featureset including debugging, profiling, etc.

Not so with ExtJS.  I’m buying a license to use the code base.  Kind icky in my mind.  If I start a project in ExtJS/Sencha and I pay my $329 for the seat, but then I want some more help on the project occasionally, each developer will then need to pay out $329 just to use/edit the code no matter what tools they use.  If you are starting a major project, and plan the ExtJS cost into the budget, then great.  But if you’re a lone developer who wants to start something which blossoms into something bigger – the licensing can be a major roadblock.

Moreso, if I’m a consultant and I’m paid x dollars to develop a web application, I can easily choose and pay to use ExtJS.  After two months, I make a deliverable.  It might be the type of project where I do the major architecture and first phase, but then it gets shipped off internationally for maintenance mode or a lower cost second phase of the project.  Well, if you use ExtJS, you’ve just upped maintenance mode by $329 for every developer that needs to touch the project.  You’ve just cost your client lots of money.

This is why I discounted Sencha and ExtJS and moved on to exploring Dojo.  Dojo seems to offer MOST of what Sencha does.  They both have a rich set of components, offer lazy loading of scripts so that your massive enterprise application doesn’t load several hundred scripts (or a huge 2MB block of script) before the application starts up.  Both have a build system – Dojo’s runs on Rhino or Node, and is built on Closure or Shrinksafe.  ExtJS seems to be built off of a Yahoo builder.

In terms of scripting, both seem to nudge you in the direction of organizing your Javascript into classes which can be based on straight inheritance, or mixins.

Both seem to offer a visual tool for design.  Dojo’s Maqetta is free and can be used for jQuery, YUI, or Dojo.  I don’t see myself being very productive in it though – I can lay things out, but it wasn’t obvious to me if I could wire in data or do anything extensive.  Though I haven’t used Ext Designer, I have to imagine it’s a better product than Maqetta.  But then I seriously question how much I’d use a good tool for this anyway.  It’s like when everyone complains that design mode in Flex really sucks – but what if it didn’t? Would you actually use it, or just code everything?  I think we’d use it only like 5% of the time.  But this is all personal preference – ExtJS wins here, but only if you feel like you need a good design tool, which I don’t.

Dojo seems to offer one thing that ExtJS doesn’t though – and that’s declarative HTML markup.  This may be where my ExtJS ignorance comes in, so feel free to correct me if I’m wrong, but to mark up a component like you might do with Flex’s MXML, you write a JSON object describing the component or layout you’re introducing in ExtJS.  This is pretty cool – but with Dojo, you get to write REAL HTML.  I can tag existing divs or other elements as a Dojo component and they’ll act like Dojo components.  Yes, Dojo does offer templating, but you can choose which to use…or even to use both.

The worst part of Dojo?  They don’t have a MASSIVE marketing and tutorial push.  There is tons of ExtJS and Sencha material out there to learn from.  Yes, there is tons of Dojo material, but much of it is older and not up to date.  The material on the Dojo site is pretty technical and not very “quickstart-ish”.  What quickstart material they do have, don’t seem to be big picture enough to inform you what’s really going on.  I always had bad luck copying and pasting code from tutorials and having it work without spending hours debugging.  Most of the trouble with Dojo material is the switch to new loading routines that happened with the 1.7 release in December 2011.  I feel like when they release 2.0 sometime this year, we’ll have some better effort from the Dojo Foundation in terms of educating people on how to use the toolkit

All in all, Dojo and Sencha seem eerily similar from everything I read.  I feel so lucky that by learning Dojo, I’ll probably feel right at home in ExtJS as well.  For me it really comes down to the licensing that drives me to Dojo.  If that wasn’t an obstacle for me, there were more than a few times I’ve been frustrated by Dojo in the past couple weeks of learning it that I’d been open to abandoning ship if there was another choice.  I get the feeling though that there are similar frustrations with understanding ExtJS (helped in large part by their tutorials).

That’s why I’m team Dojo right now!  However, I’ll continue using jQuery for the smaller projects.  Dojo could easily replace jQuery, but for the smaller stuff when something minimal is all you need, there’s no sense in going against the grain and using something that not many people have experience with.

I’ll be posting more technical stuff on Dojo, but for now, this is how I got where I am!

7 thoughts on “Why Dojo? From a Flash/Flexer’s Perspective”

  1. Benjamin,

    Sorry for the flood of Flex to Sencha marketing.

    A bit about Sencha pricing, we charge for the framework. We have 50% of the Fortune 100 as customers and many require that we have professional teams working on the product full time, that we fix bugs in a timely manner, we provide support & training, and that we remain a viable business. We are able to deliver on these commitments and deliver a very high quality product because we license the framework. I can understand if you do not share that perspective.

    Also I would not let a $350 price tag hold you back. I rejected Flex 1.0 due to its $40K per CPU pricing but a year later had tripled my salary using Flex 1.5 on consulting projects and within 6 months I was employed by Adobe. The irony, be careful what you reject initially.

    I would strongly encourage the exploration of other frameworks as you recommend above. Just as there is a huge range of experiences possible with HTML5, there is a diverse parallel set of frameworks to help deliver these experiences. Sometimes one framework might not be the best one for the project at hand.

    Looking forward to reading your Dojo series of posts.


    Ted Patrick
    Developer Relations

    1. Hey man, if I couldn’t handle your tweets, I should just unfollow you like I say! And yes, nothing you’re saying here is untrue. I’m definitely not discounting anything – the sad fact is that it’s getting nigh impossible to get acquainted with everything these days. When the only real game in town was just Flash and Flex it was easy to step out and look at an alternate tech here and there.

      Now of course, we need to look at jQuery, Angular, Corona, Objective C, Java, Phonegap…..the list is endless. When it comes to two seemingly equal technologies: Dojo and ExtJS, I’m going to be fairly picky because I really only have time for one at this very moment.

      I actually did spend a half hour to objectively look at job postings for Sencha vs Dojo. And (in my very unscientific research), I’m seeing 2x the Dojo posts as I am ExtJS/Sencha posts. And of those Sencha posts, it looks like Sencha (the company) is doing most of the hiring there.

      But I’m not really after the big payout – at this point I just want to have fun and learn. Something that ExtJS makes a little daunting. See, when I set out to learn things, I have these maniacal dreams that my project will be the next hot thing and I can form a startup from it. I can’t ease into ExtJS – according to the licensing, either my project is open source (and always will be), or I need to pay out the money right then and there before I start. There’s no room for indecisiveness. With Dojo, I can get started with it, and maybe 2 months down the line I either stick with it, or reject it.

      I totally get that you folks need to charge at the price point you do – you do seem to have some fantastic free training and you need to support that somehow.

      Anyway, you seem to be doing a fantastic job getting the old Flexers interested in Sencha. It looks like something I’d be happy to use if money was no object, and if you keep up doing the job you’re doing, I’ll probably have to use it someday!

  2. Sencha is dual licensed GPLv3 and Commercial:

    Free – Sencha Touch GPLv3
    Free – Sencha Touch Commercial
    Free – Ext JS GPL
    $350 – Ext JS Commercial

    Just FYI

    Ted 🙂

  3. Yup! I knew that, though in your FAQ it states that if I start a project as GPL it has to remain as GPL. So I have to commit to GPL or buy a license before I kick anything off.

    Again, you charge what you charge, and I don’t fault you for that – but its not very inviting to me to play and learn when I have other options.

  4. Hi, Great posts on this site, I am going through the exact same pain barrier at the moment.

    Loving Sencha as it appears very well put together but I have no money, the designer software by the way is also very good! Dojo is also great but Free, the Meqetta designer needs more work! A tough decision! But in all honesty its about choosing a framework/toolkit that is in it for the long haul! I need to know that what I develop today will be supported in the future! So money shouldn’t be a part of the decision making process, its about providing the right tools that support me as a developer.

    The main problem I have is learning enough to get up and running fast enough, the only hold ups are the documentation on both parts, Dojo just updated some tutorials on 1.7 great but there is no flow to them, you find yourself bouncing around the site flitting between the features and missing out the important steps! The Sencha site also has some great tutorials but it feels like they have just thown as much stuff on the site as possible leaving you feeling very confused on direction.

    The way I see it is that the first one to release a decent book that I can systematically follow and learn from will get my vote on which of these frameworks I chose to work with as I think both of these are in it for long haul and off very similar tools.

    For the record pact publishing are due to release a Sencha EXT JS4 cookbook in April! Come on DOJO get an eBook online for us newbies to following… build it and they will come blah blah blah!!!

    1. Thanks! I agree with everything you’re saying. Dojo is definitely being slow and steady, and like Ted said on this post the money you pay for Sencha really do help things along. The weird thing is where you and I are coming from which is Flash/Flex. Dojo and ExtJS have been around for a while, but Sencha as a company that like to make money sees a unique opportunity in all the Flex devs going to Javascript. It’s very opportunistic (and I don’t mean that in a bad way). Meanwhile Dojo doesn’t seem to feel the need for the same opportunistic marketing push – but I suspect they well later this year with 2.0. Good luck, and like I said in my post – I’m really not seeing any downsides to learning either one, they both feel about the same so I think we’ll be good whichever way we go.

Comments are closed.