Loading ...
Sorry, an error occurred while loading the content.

RE: Re: [json] JSDL (Javascript Service Definition Language)

Expand Messages
  • Mert Sakarya
    I ve finally had the time to check DOJO and JSDL and examining it since Friday.I think I ll be able to use my server-side application (JSDL definition) with
    Message 1 of 5 , Jun 4, 2006
    • 0 Attachment
      I've finally had the time to check DOJO and JSDL and examining it since Friday.I think I'll be able to use my server-side application (JSDL definition) with DOJO.

      It's good to know the people are thinking the same way, all over the world. I thought, that this was something that I've found, but hey, someone has already thought about it, and coded it on the web, while I was eating pizza ;). Even the extension was the same. So I think I'll use DOJO as my client-side library, instead of creating one from scratch.

      I know this is not the place to talk about it, but has anyone been using DOJO on real-time web project in this group? How does it perform? Any recommendations?

      Mert Sakarya


      To: json@yahoogroups.comFrom: mfncooper@...: Tue, 23 May 2006 09:14:10 -0700Subject: Re: [json] JSDL (Javascript Service Definition Language)You might want to look at the Dojo toolkit. It already has a JSDLimplementation that it uses along with its JsonService class for JSON-basedremote calls.--Martin CooperOn 5/23/06, Mert Sakarya <mertsakarya@...> wrote:>> Lately I've been coding with Javascript and JSON a lot. I'am using> XHConn.js (downloadable from http://xkr.us/code/javascript/XHConn/)> as XmlHttpRequest object which is quite small and efficient.>> I've noticed that it might be a good practice to move or copy the> business/application layer to the client side (basically some HTML> file). I've modified XHConn (XmlHttpRequest) a little, to use client-> side caching, work both synchronously and asynchronously and return> JSON objects only (currently it is using eval function for> performance). The thing, I like about using "eval" is, you can> create function properties.>> Assume that you have a service that works just like a web service,> but this one talks only JSON and works on Web pages over HTTP> (narrowed down the platform). JSON objects are results of our> WebMethods which are callable through XmlHttpRequests. If we can> group these methods in a service in a logical way, we> get "Javascript Services". So we need something like WSDL to combine> these methods. They should contain the definitions of the methods> (the body of the method is a XmlHttpRequest to the server),> parameter validation and some very light error checking (eg. if a> parameter can be null or the max length of parameter etc.). I call> this concept JSDL (Javascript Service Definition Language). The good> thing is, JSDL is itself written with Javascript and actually can be> a JSON object (if we are allowed to add functions to JSON standard).> In Javascript Services we can define functions like below;>> function GetCustomer(custId) {> if(!custId) throw "CUSTID null";> return (new XHConn()).connect("URL", "GET", "Parameters", null);> }>> or async version;>> function GetCustomerAsync(custId, asyncCallback) {> if(!custId) throw "CUSTID null";> (new XHConn()).connect("URL", "GET", "Parameters", asyncCallback);> }>> Now assume that we combine these method definitions in a JSON Object;>> Service.jsdl file> ------------------------------------------------------------------> {> "GetCustomer" : function(custId) {> if(!custId) throw "CUSTID null";> return (new XHConn()).connect("URL", "GET", "Parameters", null);> }>> "GetCustomerAsync" : function(custId, asyncCallback) {> if(!custId) throw "CUSTID null";> (new XHConn()).connect("URL", "GET", "Parameters",> asyncCallback);> }> }>> As long as "Service.jsdl" file is a JSON object, it can be> downloaded with XmlHttpRequest and be named as a service.>> //Synchronous version;> try {> var service = (new XHConn()).connect("Service.jsdl", "GET", "",> null);> var customer = service.GetCustomer("CustId");> } catch(e) {> alert(e);> }>> //Asynchronous version;> try> {> //probably we need to load the service synchronously> var service = (new XHConn()).connect("Service.jsdl", "GET", "", );> var customer;> service.GetCustomerAsync("CustId",> function(jsonObj) {> customer = jsonObj;> }> );> }> catch(e)> {> alert(e);> }>> All you need is to figure out a way to generate JSDL files on the> server-side just like WSDL files are generated may be something> like, attribute based programming on .Net.>> I've got a working copy of this idea in a zip file, but i think> attachments are not allowed here. Wait till I can upload it to the> internet or I can gladly mail it individually.>> I've created a server-side solution for this(Javascript Sevices and> JSDL), but it is another long story (may be I'll post it on some> other mail) and covers a lot of other issues (eg. using MSMQ, RSS> generation, Logging, Caching etc). JSDL is only a small part of it.> It is called MS.Services and can be downloded from gotdotnet.com.>> Best regards,> Mert Sakarya>>>>>>>>> Yahoo! Groups Links>>>>>>>[Non-text portions of this message have been removed]
      SPONSORED LINKS



      Programming languages
      Format
      Computer security

      Computer training
      Large format
      Cover letter formats


      YAHOO! GROUPS LINKS

      Visit your group "json" on the web.
      To unsubscribe from this group, send an email to: json-unsubscribe@yahoogroups.com
      Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.



      _________________________________________________________________
      It�s the future of Hotmail: Try Windows Live Mail beta
      http://www2.imagine-msn.com/minisites/mail/Default.aspx?locale=en-us

      [Non-text portions of this message have been removed]
    • Martin Cooper
      ... You re right, this is not the place to talk about Dojo. You should check out the Dojo mailing lists, and the archives of those lists. There are many, many
      Message 2 of 5 , Jun 6, 2006
      • 0 Attachment
        On 6/4/06, Mert Sakarya <mertsakarya@...> wrote:
        >
        > I've finally had the time to check DOJO and JSDL and examining it since
        > Friday.I think I'll be able to use my server-side application (JSDL
        > definition) with DOJO.
        >
        > It's good to know the people are thinking the same way, all over the
        > world. I thought, that this was something that I've found, but hey, someone
        > has already thought about it, and coded it on the web, while I was eating
        > pizza ;). Even the extension was the same. So I think I'll use DOJO as my
        > client-side library, instead of creating one from scratch.
        >
        > I know this is not the place to talk about it, but has anyone been using
        > DOJO on real-time web project in this group? How does it perform? Any
        > recommendations?


        You're right, this is not the place to talk about Dojo. You should check out
        the Dojo mailing lists, and the archives of those lists. There are many,
        many hundreds of Dojo users on the list, so you will get lots of feedback if
        you ask the right questions.

        That said, as for "real-time", it somewhat depends on how you define that
        term. Do you mean highly interactive applications, or do you specifically
        mean Comet applications? Two commercial examples that might be of interest
        to you are http://www.jotlive.com/ and http://www.renkoo.com/. Both are
        built on Dojo.

        At my company, we are using Dojo in current product development, but not for
        real-time purposes (since we don't have any real-time requirements at this
        time). You'd have a hard time persuading me to use anything else.

        --
        Martin Cooper


        Mert Sakarya
        >


        [Non-text portions of this message have been removed]
      Your message has been successfully submitted and would be delivered to recipients shortly.