0

What would help to get started with caja?

Hey everyone,

I'm going to be putting together a JavaScript library with common functionality that developers have issues with when working with YAP and Caja. I'll release this openly for everyone to use but what I'm really looking for is what were the pain points everyone ran into and what would help you in a library like this? What I have thus far for method calls would be:
- running an ajax request
- assigning click handlers to DOM elements
- working with JSON

Any feedback or suggestions would be appreciated.
Thanks everyone.

Jonathan LeBlanc
Senior Software Engineer
Yahoo! Developer Network

4 Replies
  • Sounds great, and the Caja team is happy to help with anything that makes it easier to write gadgets that cajole.

    Is this library meant to cajole, or would it be part of the YAP container? Should it work both with and without the caja runtime javascript loaded?

    Is this something that you'd like to see being rolled into Caja eventually?

    What license were you planning on using? Caja uses the Apache license, and YUI and a lot of other Yahoo! open-source stuff uses the BSD License.

    Fyi, Caja is going to have better JSON handling soon, and if you have problems with the cajoling of event handlers or XMLHttpRequest, we'd love to hear about them: http://code.google.com/p/google-caja/issues

    cheers,
    mike (of the Caja team)


    QUOTE (Jon @ Feb 27 2009, 03:34 PM) <{POST_SNAPBACK}>
    Hey everyone,

    I'm going to be putting together a JavaScript library with common functionality that developers have issues with when working with YAP and Caja. I'll release this openly for everyone to use but what I'm really looking for is what were the pain points everyone ran into and what would help you in a library like this? What I have thus far for method calls would be:
    - running an ajax request
    - assigning click handlers to DOM elements
    - working with JSON

    Any feedback or suggestions would be appreciated.
    Thanks everyone.

    Jonathan LeBlanc
    Senior Software Engineer
    Yahoo! Developer Network
    0
  • Hi Mike,

    Thanks for the support and info on this one. I work with a lot of our developers and partners to get them started on YAP, so we were thinking of putting together a series of common functions to both provide developers with the ability to get acclimated to caja easily as well as showcase the fact that caja does not kill JS. We have built a number of apps under caja and after a few small roadblocks we now no longer have very many issues working with it. This is what we're trying to contribute back.

    This library will just be meant to be cajoled, but will also work as a regular JS library anywhere else, and provide functionality to be easily migrated to different OpenSocial containers. I think within the scope of this library, this type of functionality just showcases what caja can currently do, but I do have a lot of ideas about what should be included into caja / cajita in the future. In that respect, thanks for providing me with the issues link - I'm going to get myself fully versed on current issues so that I can contribute back to the initiative as I really do believe in what caja is trying to accomplish. Since this library touches on some of the items (in a very light sense) that the YUI team is developing for caja from their libraries, it will fall under the BSD License.

    The good thing about working in an OpenSocial environment is that the JSON parsing utilities that I advocate using are those under gadgets.JSON, so within the YAP environment that is fairly well supported - although traditional JSON support is something that I would very much like to see in order to smooth the development gap when migrating apps into YAP. With regards to XMLHttpRequest, we can again get around the support issue by using gadgets.io to make requests. I've been attempting to get a traditional XMLHttpRequest working under YAP but have not had too much luck as of yet - I also didn't have too much luck using something like http://codereview.appspot.com/8703/patch/601/818. Of course, I don't know yet if this is our implementation or caja itself - I believe I'm going to have to set up my own caja environment to do some comparison tests.

    I wanted to ask you a question about one of the issues in the caja list: http://code.google.com/p/google-caja/issues/detail?id=209. One of the developers I'm working with was asking about current GWT support with caja, to which I was going to run some tests to discover the answer. Would you happen to know if there is currently some functionality available in GWT that will cajole and execute? If not, is there a timeframe on GWT integration (as I see it's set to a low priority).

    Thanks again, and I look forward to contributing back to caja.

    Jonathan LeBlanc
    Senior Software Engineer / Technology Evangelist
    Yahoo! Developer Network

    QUOTE (Mike Samuel @ Mar 3 2009, 07:55 PM) <{POST_SNAPBACK}>
    Sounds great, and the Caja team is happy to help with anything that makes it easier to write gadgets that cajole.

    Is this library meant to cajole, or would it be part of the YAP container? Should it work both with and without the caja runtime javascript loaded?

    Is this something that you'd like to see being rolled into Caja eventually?

    What license were you planning on using? Caja uses the Apache license, and YUI and a lot of other Yahoo! open-source stuff uses the BSD License.

    Fyi, Caja is going to have better JSON handling soon, and if you have problems with the cajoling of event handlers or XMLHttpRequest, we'd love to hear about them: http://code.google.com/p/google-caja/issues

    cheers,
    mike (of the Caja team)
    0
  • QUOTE (Jon @ Mar 4 2009, 11:42 AM) <{POST_SNAPBACK}>
    Hi Mike,

    Thanks for the support and info on this one. I work with a lot of our developers and partners to get them started on YAP, so we were thinking of putting together a series of common functions to both provide developers with the ability to get acclimated to caja easily as well as showcase the fact that caja does not kill JS. We have built a number of apps under caja and after a few small roadblocks we now no longer have very many issues working with it. This is what we're trying to contribute back.

    This library will just be meant to be cajoled, but will also work as a regular JS library anywhere else, and provide functionality to be easily migrated to different OpenSocial containers. I think within the scope of this library, this type of functionality just showcases what caja can currently do, but I do have a lot of ideas about what should be included into caja / cajita in the future. In that respect, thanks for providing me with the issues link - I'm going to get myself fully versed on current issues so that I can contribute back to the initiative as I really do believe in what caja is trying to accomplish. Since this library touches on some of the items (in a very light sense) that the YUI team is developing for caja from their libraries, it will fall under the BSD License.


    Great.

    Caja contributors need to have signed an Apache CLA. I think Felix and others from Yahoo have already done this, so they probably know the process required on Yahoo's side.

    QUOTE (Jon @ Mar 4 2009, 11:42 AM) <{POST_SNAPBACK}>
    The good thing about working in an OpenSocial environment is that the JSON parsing utilities that I advocate using are those under gadgets.JSON, so within the YAP environment that is fairly well supported - although traditional JSON support is something that I would very much like to see in order to smooth the development gap when migrating apps into YAP. With regards to XMLHttpRequest, we can again get around the support issue by using gadgets.io to make requests. I've been attempting to get a traditional XMLHttpRequest working under YAP but have not had too much luck as of yet - I also didn't have too much luck using something like http://codereview.appspot.com/8703/patch/601/818. Of course, I don't know yet if this is our implementation or caja itself - I believe I'm going to have to set up my own caja environment to do some comparison tests.


    Yeah. There's a taming of XmlHttpRequest at line 138 of http://code.google.com/p/google-caja/sourc...lugin/domita.js but using gadgets.io where available makes perfect sense.

    Felix was going to contribute a bunch of Yahoo patches to us but I think he's been busy with other things lately.


    QUOTE (Jon @ Mar 4 2009, 11:42 AM) <{POST_SNAPBACK}>
    I wanted to ask you a question about one of the issues in the caja list: http://code.google.com/p/google-caja/issues/detail?id=209. One of the developers I'm working with was asking about current GWT support with caja, to which I was going to run some tests to discover the answer. Would you happen to know if there is currently some functionality available in GWT that will cajole and execute? If not, is there a timeframe on GWT integration (as I see it's set to a low priority).


    We've been talking to Lex Spoon on the GWT side about that. I don't think he has anything running yet, but I'm sure he'd love to hear what people want from that.

    QUOTE (Jon @ Mar 4 2009, 11:42 AM) <{POST_SNAPBACK}>
    Thanks again, and I look forward to contributing back to caja.

    Jonathan LeBlanc
    Senior Software Engineer / Technology Evangelist
    Yahoo! Developer Network
    0
  • Thanks Mike, I'm following up with Felix on the CLA to get things rolling. Do you have any other tamed code for common JS requests? I appreciate the XMLHttpRequest alternative...even though we had gadgets.io available to us I like the idea of having a standalone code sample that is divorced from the OpenSocial container.

    - Jon

    QUOTE (Mike Samuel @ Mar 4 2009, 01:49 PM) <{POST_SNAPBACK}>
    Great.

    Caja contributors need to have signed an Apache CLA. I think Felix and others from Yahoo have already done this, so they probably know the process required on Yahoo's side.



    Yeah. There's a taming of XmlHttpRequest at line 138 of http://code.google.com/p/google-caja/sourc...lugin/domita.js but using gadgets.io where available makes perfect sense.

    Felix was going to contribute a bunch of Yahoo patches to us but I think he's been busy with other things lately.




    We've been talking to Lex Spoon on the GWT side about that. I don't think he has anything running yet, but I'm sure he'd love to hear what people want from that.
    0
  • I would like to be involved

    Jerry Schrader
    0
  • Would be glad to have the extra hands Jerry. What I can do is put together a model library of what i have and place it on github to open source it.

    - Jon

    QUOTE (JLe @ Feb 28 2009, 08:29 AM) <{POST_SNAPBACK}>
    I would like to be involved

    Jerry Schrader
    0
  • Hi, Jon. This open-source caja-friendly JS library that you're working on sounds helpful. Is it available yet? An early version, perhaps?
    0
  • It got bumped down on the priority list unfortunately. I'm trying to make time to push out content to github so that there will be a lot of functional examples. Both myself and a colleague are pushing out content to our github accounts and we'll post back with our account locations once something comprehensive is there.

    - Jon

    QUOTE (Jared @ Apr 15 2009, 08:08 AM) <{POST_SNAPBACK}>
    Hi, Jon. This open-source caja-friendly JS library that you're working on sounds helpful. Is it available yet? An early version, perhaps?
    0

Recent Posts

in YAP