Page 1 of 2 12 LastLast
Results 1 to 10 of 16

Thread: Spring JS documentation

  1. #1
    Join Date
    Sep 2006
    Posts
    115

    Default Spring JS documentation

    Could somebody please direct me to the documentation for Spring JS (which comes with Webflow) ? (Oh, and the stuff that currently comes in the Webflow documentation near the end is pathetically inadequate, so please don't bother mentioning it.)
    Alex Marshall

  2. #2
    Join Date
    Dec 2008
    Posts
    11

    Default

    *bump*

    I'd also be interested to know if there is any documentation for this. As alexmarshall points out, the 'Spring JS Quick Reference' in the Web Flow docs is not enough.

  3. #3
    Join Date
    Sep 2006
    Posts
    115

    Default

    *bump*

    Yes, I'm still paying attention to this thread as well. Does anybody out there have any idea if more documentation for Spring JS is forthcoming ?
    Alex Marshall

  4. #4
    Join Date
    Aug 2004
    Location
    Melbourne, FL
    Posts
    2,794

    Default

    I'll let Jeremy comment specifically on the roadmap for Spring JavaScript, which include making it its own top-level Spring project this year. One of the goals in the roadmap is to enhance the documentation to cover more practical use cases for things you can do with the library.

    However, with that said, it would be good to get some more concrete information on how you would like to see the documentation improved. What do you want to know how to do with the library? What are you looking for specifically in the documentation that is not there now? Investing some time explaining concretely what you would like to see would help benefit the Spring community as a whole.

    Thanks,

    Keith
    Keith Donald
    Core Spring Development Team

  5. #5
    Join Date
    Sep 2006
    Posts
    115

    Default

    Hi Keith,

    Thank you very much for your response. I've so far used Spring JS to create modal dialogs (but it would have been nice to have had documentation for this scenario to make it go faster). I'm planning on migrating our company's main application to Webflow 2 (it's currently using Webflow 1) specifically so that I can make use of its Ajax capabilities. I'd very much like to see coverage for things like form and link callouts (ie AJAX form / link submissions as well as handling the results). I'd also very much like to see coverage of Spring JSs usage of dijits (Dojo Widgets) and coverage of how to use Spring JS to access Dojo's validation functionality.

    Currently, the documentation provides a very high level overview, with very few concrete examples, none of which are very good at explaining what Spring JS is doing and why, few of which are at all useful. Implementing the modal dialogs was a pain because I had to thoroughly examine the Dojo documentation on top of the Spring documentation, and poke around changing various variables and parameters to find out what things did. I know all the above functionality is in there because I've gone over the code, but documentation and specific examples for the above use cases would be extremely useful. Thank you kindly.
    Last edited by alexmarshall; Jan 14th, 2009 at 12:47 PM. Reason: Added extra info
    Alex Marshall

  6. #6
    Join Date
    Dec 2008
    Posts
    11

    Default

    Thanks - I'm looking forward to Jeremy's update on the roadmap. A few things I think would be good to see documented (in addition to those alexmarshall describes):
    * API-style reference for the Spring.* functions and types
    * More on why you would use Spring JS rather than 'vanilla' Dojo
    * Examples comparing doing something with and without Spring JS to allow a comparison to be made, e.g. if constructing a Dijit programmatically, you have to explicitly dojo.require the Dijit.
    * Performance tips - e.g. I'm aware that including a script tag in the page body causes the browser to halt rendering while it runs the script. Could this be avoided/alleviated?

    Maybe some of these would work better as articles rather than documentation as such.

  7. #7

    Thumbs up

    Hello Keith,

    i would like to see the following improvements for the spring-js documentation:

    • a clear api of spring-js
    • an example of how to use a custom dojo widget with spring js
    • an example of how you can use your own custom dojo build ( == make use of a custom layer with spring-js)
    • Some examples on the various ways to decorate the html elements

      f.e.:
      most examples put the script to decorate an element in the body right behind the element

      i assume it would be possible to put something like this in an external javascript file:

      Code:
      dojo.addOnLoad(
          function(){
              Spring.addDecoration(new Spring.ElementDecoration({
              elementId: "targetId",
              widgetType: "dijit.form.ValidationTextBox",
              widgetAttrs: { required:"true" }}));
              
      
              /* or even */
              dojo.query(".dateTextbox").forEach(function(element) {
              Spring.addDecoration(new Spring.ElementDecoration({
                  elementId: element.id,
                  widgetType : "dijit.form.DateTextBox"
              }));
          });
      
          }
      );
    • a sort of quickstart for the dojo.query function and the various function ofa Nodelist (i know this is really dojo, but since most of us don't have that much experience with dojo, and since those things are really usefull to target te elements you want to decorate, it really would be a nice-to-have in the documentation )


    Keep up the good work,

    Davy

  8. #8

    Default Can I use Spring JS with prototype or any other...

    I want to know if actually Spring JS is designed to be used without dojo and to be served from simples controllers returning JSON data?? especifically an prototype integration without any widget just for decorating the element to talk with the server and take the advantage of javascript disabled. I would aprecciate any suggestions around this idea
    thanks

  9. #9

    Default

    Quote Originally Posted by aek View Post
    I want to know if actually Spring JS is designed to be used without dojo
    As far as i know, Spring JS is an abstraction of dojo, to easily decorate the html elements with dojo. It has to be possible though to use the resourceservlet to provide other files.

    Quote Originally Posted by aek View Post
    especifically an prototype integration without any widget just for decorating the element to talk with the server and take the advantage of javascript disabled
    I don't really understand this part of your question.
    If javascript is disabled Spring JS won't work

  10. #10

    Default javascript disabled

    spring-js has this feature, when an element is decorated, the functionality of the element its changed, but when the javascript is disabled in the browser, the functionality is still working without the decoration. an example from the SWF reference documentation:
    Code:
    <a id="prevLink" href="search?searchString=${criteria.searchString}&page=${criteria.page - 1}">Previous</a>
    <script type="text/javascript">
    Spring.addDecoration(new Spring.AjaxEventDecoration({
    elementId: "prevLink",
    event: "onclick",
    params: { fragments: "body" }
    }));
    </script>
    when javascript is disabled the link is still working because of the href value
    this is the feature that I want but without Dojo, SWF, JSF, or Tiles.
    don't you think that this would be a good toy to integrate with the AJAX framework of your choice?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •