Update: While attending the Boston Web Innovators group, I got some really great feedback. People were excited in what Yajaf could do but most felt that this blog didn’t adequately represent the technology I was describing. Stay tuned for some new material, documentation, and perhaps a live sample application or two.

A quick essay on what I think differentiates YAJAF from other frameworks.

What is Yajaf?

Yajaf is a library/framework for making rich web applications.

Why the name Yajaf?

It’s mostly a joke, seems like everyone is releasing frameworks these days. I do think Yajaf has some really innovative and neat features I haven’t seen anywhere else (yet). I know “javascript” is part of the Ajax acronym, the foundation of the library doesn’t necessarily require Ajax.

Is it a library or a framework?

I tend to use the terms interchangeably although I’d say it’s more like a library than a framework. The amount of “auto-gen” code is low.

Why did you write Yajaf?

I am currently working on a software product that, it is my intention, will eventually use a web interface. I decided to ‘simplify’ my life by creating a library. Heh, simplify.

So does it use prototype (dojo etc…)?

Protowhat? Honestly I didn’t even know about prototype when I started this project. While those guys have done a heck of a job, this is a completely new library rolled from scratch. Some may say I’m swimming against the current, well I’ve never been one to follow convention.

Why didn’t you switch to prototype when you learned about it?

Prototype is very nice, but my library works in a fundamentally different way. I have a system that, IMHO, is more ‘natural’ to work with from my experience with OO programming.

What do you mean ‘natural’?

Imagine programming Java swing, or a C# gui except in a browser application.

But Javascript is just a scripting language, it isn’t object oriented!

Actually, it is. Javascript gets short-changed as a programming language. Not only is it OO but it has some neat functions/features that other more ‘mainstream’ languages do not (especially in it’s latest incarnation). I know, I was surprised too when I started looking into it. I may follow up on this blog with “magic-ninja-foo of javascript” I’ve learned, if there’s interest.

But Javascript OO is “weird”.

It is kind of weird, that’s part of the reason for this library. It hides some of the ‘weirdness’ from you as you use it.

Are there any other example of coding javascript like this?

It is my understanding that Microsoft’s “Atlas” project works in a similar manner to my framework at least from a cursory inspection. Even then my library/framework has some nice differences (and all the library code!).

Ok, so what makes Yajaf different?

I think there are several things that make Yajaf different but I would argue the primary difference lies in the programming model. It’s a different animal from prototype style applications. I think this is a relatively big difference in terms of ease of use, but again your mileage may vary.

Yajaf Also contains (not all of this is unique):

  • A dynamic library / application loader, start with a 3k “seed” and the library dynamically loads the code you need (and only the code you need)
  • Modern browser cross compatibility
  • Smart browser caching of library code
  • A window toolkit for building WIMP applications
  • UI skinning, almost complete control over the look
  • Intelligent dynamic sizing of components
  • Access to a more natural inheritance mechanism
  • Mechanisms to help prevent IE memory leaks
  • More sophisticated error handling
  • Some support for cross domain content


  • Eventually, if there’s interest, a web based IDE
  • Web analytics built in

What browsers does it work in?

So far I’ve tested in IE 6, FF 1.0 and 1.5 on Windows, FF 1.0, FF 1.5, Safari 2.0.3, and Opera 8.51 on Mac OSX, and FF 1.0.7 on Linux (ubuntu breezy). Can you tell what machine I do my development on? :)

Will it work in older / alternate browsers?

Probably not, I haven’t done much testing beyond the above. A *lot* of work went into making it behave across those browsers (gah standards people!) and I can’t imagine it “just working” in others.

Is the library extensible?

Why yes! In fact it’s one of the benefits of the library. Every object in the framework can be extended with custom code.

Is there typecasting of data?

Javascript is, fundamentally, an untyped language. This makes it powerful in some ways, but can lead to some gotchas. Overloading of methods using different type arguments isn’t really supported (although I can think of some hacks to allow it, it would get ugly).

Do applications written in Yajaf have ‘teh snappy’?

Performance differs from browser to browser, but in most cases applications are quite smooth. Windows IE and FF are particularly good. On OSX Safari is the fastest browser I’ve tested. Again most of my test applications run smoothly (if not with the elusive ‘teh snappy’) on a 1.25 GHz Powerbook.

‘Teh snappy’?

Sorry, a cheeky term used mostly by Macintosh users to describe the responsiveness of a user interface (usually OS X).

Can I make spiffy whizzy DHTML effects?

Yes you can, but that was never the intent of this project. Eye candy, swooping windows, fading, blinking, beeping, swooshing were all kept at a minimum. The intent was to make a solid foundation for making web applications.

Why the blog?

Ahh now we come down to it. I am interested in potentially opening up a web based IDE that would either be subscription based or advertising based to allow development of code using the library. I am using this entry to gauge interest in this kind of an approach. If there’s substantial interest I’ll finish work on the developer tool (docs + IDE).

Why not open source it?

Eventually, if I open up a web IDE, it will be open source. Javascript is inherently ‘open source’ in that it is an interpreted language (obfuscation isn’t really a good solution, and it can be undone by the persistent). I am actually trying to make a living with my company, therefore I could use some kind of a revenue stream. The intent would be to charge for the developer tools (the web based IDE) or monetize via advertising. The resultant code would then be free to be used / hacked on your websites / web applications (no draconian licensing agreements, although plugs for the library/IDE would be appreciated).

What happens if there’s not enough interest to make a developer tool available?

Well it was never my intent to make this framework a product, and I can just as easily keep it completely internal until my initial product is complete. It just seemed like people might be interested in using this kind of a thing now, and having some income (any income!) would be nice. :)

Can I see it work?

I have some flash-based movie captures of it in operation as well as some screenshots coming soon. The flash movie captures use vnc2swf and show some “choppiness”, the choppiness is due to the screen capture method and not the application. I’m still looking for a better way to take cross platform movie captures. (any suggestions?).

Why not a live web page so I can play with it?

Call me paranoid, but since Javascript is inherently open source (see above) I’d rather not have people reverse engineering Yajaf if I decide not to send it out into the wild.


Nope, maybe after I get some feedback I’ll reconsider it.

If you have a spare second, I’d love to get quick feedback from you. I’m trying to gather how interested the developer community is in this.

What do you think of YAJAF? (click as many as are applicable)
There’s already too many libraries and frameworks out there, not interested.
Not sure if I undestand whats new/different, not interested.
Not sure if I undestand whats new/different, but I am curious to see more.
I’m excited by the idea, but would only know for sure once you open it up.
Create a live demo now! I want to see a real site running with it!
Looks promising, I’d like to see more (more screenshots and screencasts), give me more details.
The idea of a web based IDE sounds great (if done properly).
I’d pay ($5-$10) a monthly fee to access a web IDE / API docs.
I would never pay, but advertising would be ok.

Free polls from Pollhost.com

None of that applies to me, how can I ask other questions/give other feedback?

Well this is a blog after all, comments.

Comments on this entry are closed.

  • kiawin

    great attempt, and you should proceed the work :)

  • Jeffrey

    Sounds like fun. I would like to take it for a test drive. I didn’t like Rico, or Prototype much simply because of the large download footprint and all the extra ‘features’ I wasn’t going to use.

  • mikepk

    I agree, Jeffrey. The bloated footprint was part of the reason for building a loader into the library. It allows the library to grow without increasing the dowload time at all.

    The loader takes care of all dependencies, and only fetches the js code that’s needed. The other cool thing is if multiple pages use the same code (obvisouly in the same domain), it’s usually automatically fetched from the browser cache, further accelerating the dl.

    The other thing I wasn’t keen on was the emphasis on DHTML eye-candy above the fundamentals for web application development. When looking for example web applications with Rico, Dojo, and prototype the examples listed were almost always “swooshing” or “fading” panels. That’s neat and all but I don’t think it should be the focus.

  • kiawin

    I pressume the mild response is not because of the saturation of the ajax framework, it’s just that it’s bit difficult to imagine where your framework heading to. Not saying that it doesn’t tell us what it will/should be, but a live demo (showing certain application) will show people about the proof-of-concept for your project :)

    eg. Many would wonder why they need to develope a ajax powered web application (with your gui tools) in the first place. As ajax still very deemed as a web programming, not application. Paradigm shift is required ;)

    a good example, where people will realise how useful is ajax would be – google office (though at this moment, it’s still a myth).

    keep up your good work.

  • Rob Gonda

    If you’re afraid of JavaScript being stolen choose another language; you are in the wrong environment.

    There are ways to secure your JavaScript by loading it dynamically in the client’s RAM instead of including it in the browser. While this can be sniffed too by http packet analyzers, it sure makes it more difficult.

    If after all that you’re still afraid, for real, start developing in Flex maybe.

  • mikepk

    Hi Rob, thanks for the comment!

    I’m not actually worried about the code being stolen once I set up my developer tool:

    The resultant code would then be free to be used / hacked on your websites / web applications (no draconian licensing agreements, although plugs for the library/IDE would be appreciated).

    I’m worried that if I have a quick demo up now, it will be reverse engineered before I can make my developer tool available. I’m looking for feedback of interest for the framework and what people would be interested in from an IDE standpoint.

    I’m starting to gather that people aren’t interested (by the lack of comments) unless they can play with it.

  • Anonymous

    Go to isomorphic.com and see what a real toolkit is… and download the obfuscated current release, and test drive their many amazing demo apps.

    You are so far behind the curve here, it’s just silly. Your paranoia is simply ludicrous.

    That said, if you wanted to contribute some of this to the Dojo framework, we could all use it instead of having to pay huge fees to companies like Isomorphic to use excellent Ajax frameworks.

  • mikepk

    Great I was hoping for a comment like that. So far the only other competitors I’ve seen are Bindows (as far as I can tell it’s *really* slow) and qooxdoo (again it seems really slow). I’ll check out isomorphic.

    The fact that they’re charging for it means I’m not totally crazy that there’s something of value here.

    It would be significant work to twist my framework to work with Dojo, since Dojo works in a very different way.

    I’m not talking about exhorbitant charges, more like a small monthly subscription (or even advertising) to get docs/apis/web ide access. The reason for it is not that I want to get rich of of it, but I’d like some kind of revenue so I can survive and keep hacking.

  • Berkay

    Hi Mike,

    As stated above by Rob Gonda and anonymous, what you’re describing does not sound like something “new”. It may be “better” than what is out there, but that remains to be seen. At this stage, it is very unlikely that you’ll see any interest just talking about it. At minimum, people have to try/see that it has something more than what is out there already.

    In addition, I have to say that it is not likely for you to get any traction this late in the game even if you do release the code. There are many freely available toolkits out there. You may not think they are like your product, but they aim to solve the same problem. Take a look at the list at the:

    If you still think your tool is unique, then you still have to consider that this is the field you’ll have to compete with.

    There is consolidation/standardization going on, http://www.eclipse.org/proposals/atf/
    which means the outcome of this project will likely have the most users, regardless of whether it is the “best”.

    In short, it is unlikely for you to have a business model based on a toolkit. You may be better off to focus on the product you’re building, rather than the toolkit. After all, if people need the product, they won’t necessarily care which toolkit it’s based on (as long as it’s not causing them problems)

    Good luck!

  • Anonymous

    I have read your article “Practical Garbage Collection”. It’s very useful information. As a result of this I have one question for you. It’s important for me. I had memory leaks in my project. I destroyed all circular references. Now I need initiate IE garbage collection without page refreshing and changing to the another page. Can I do it using js arrangements?

Next post:

Previous post: