i am new to ajax technology
and i want to use YUI technology with spring framework
so please guide me where to start;useful links & tutorials
thank you.
YUI is a Javascript library. Spring is a Java application framework. These are not directly related; ie, Spring has no YUI hooks or anything like that.
Spring MVC and Spring Web Flow can be used to build web applications, and web applications can serve whatever files you want, including any Javascript files you have.
Here is a list of YUI examples.
YUI is a client side js library, and has little to do with serverside frameworks; so, Spring and YUI are not related.
if your are looking to work with YUI2, or for YUI3. also yui-gallery is a good place to get started with the examples.
YUI Theater has a whole bunch of developer videos to help you understand the internals of YUI JS Library, is a place worth spending time
Related
I am currently studying Java EE with Hibernate for a project. In The Web App I am creating I am planning to Ajaxify page contents, and Site wide audio player(Which I think would be implemented using AJAX).
I am using a JSP based MVC, no frameworks, Just Java EE and Hibernate. And I've heard that I need to use a Framework like JSF to be able to AJaxify may web-app. How true is this? Do I really need to learn JSF or other frameworks to be able to Ajaxify my web app? As much as possible I do not want to learn a new framework for now since it is a big learning curve. but if there's no other way to Ajaxify my web app, I'll study a framework.
You don't have to adopt any framework to use partial page updates and similar, you can construct and send requests "manually" with JavaScript, but this is much more tedious then using a framework like JSF, maybe coupled with a component library like primefaces.
EDIT: you can find an abundance of examples of ajax capabilities in the primefaces showcase. Primefaces uses JQuery internally.
EDIT2: I have found some resources on how to dispatch ajax requests with JQuery from a JSP page (I assumed that using JSP was almost equal to not using a framework ;)): here and here. I hope this is what you were looking for.
To add on #Kostja's answer -
I totally agree with him, with Ajax you just need to have a servlet to handle the HTTP requests, and proper JavaScript code.
Besides JSF,I would also consider to look at Apache Wicket - you can read here how Wicket handles Ajax.
The reason I'm suggesting Wicket is that it's more comfortable to some developers to work with somewhat more "component oriented" (swing-like) framework.
I'm developing a webapp with Hibernate+Spring 3 (Spring MVC, JSP): I'd like to create some divs with AJAX style (i.e. no need to refresh all the page, independent update of each div).
I'd like a good advice about which AJAX library to use (in conjunction with Spring 3 MVC + JSP) and, if possible, where to find some code snippets.
I know very little of AJAX libraries, JSONs and how to integrate them, but I have good knowledge of Javascript and Spring (and how callbacks work). I'd like to write as less code as possible, particularly in the jsps.
My Webapp will display an updated (every 5 minutes) POJO in a div and perform some operations between different domain objects in the other div when user press a button.
This is correct use JQuery
Here
http://blog.springsource.com/2010/01/25/ajax-simplifications-in-spring-3-0/
you can find working examples to use Jquery+JSON+Spring MVC.
and this question can help you with server side configuration:
JQuery, Spring MVC #RequestBody and JSON - making it work together
I would suggest jQuery. It is very easy to use and has very good ajax support.
In addition to that it has quite a lot of plugins and components.
I am new to Spring as well as Dojo. I need to use Dojo with one of my mvc project in Spring 3.0
I came accross below link which talks about using spring-js with Dojo.spring-js part of spring framework?
http://static.springsource.org/spring-webflow/docs/2.0.x/reference/html/ch11.html
I could not really follow that link, is there any step by step tutorial which will show me how to use dojo with spring framework 3.0 ?
I need to start with simple things with Dojo like client side validation of forms.
Thanks in advance!
This is a tough question to answer, because it turns out you don't really need to worry about how Dojo and Spring interact. Your client and your back end server are completely unrelated until you decide to send data back & forth.
So for dojo, you probably want to look at how to use some of the form validation. Take a look at this link for some help on that:
http://o.dojotoolkit.org/book/dojo-book-0-9/part-2-dijit/form-validation-specialized-input
Once you have some validation in place, your form can use the normal form post to post your data to the server, same as how you would do it without javascript.
On the other hand, if you want to add some nice Ajax to your application, take a look at this link which explains how to implement Jackson marshalling/unmarshalling to send JSON data to Spring & handle responses correctly.
http://blog.springsource.com/2010/01/25/ajax-simplifications-in-spring-3-0/
Spring Roo uses Dojo, so you can create a Roo Project and have a look like they did it.
For Spring, You can follow this tutorial (Its the most compact and covers all basics):
http://www.tutorialspoint.com/spring/index.htm
And for Dojo The best tutorial is at: http://dojotoolkit.org/features/desktop
(in Create Beautiful User Interfaces subheading youll find all the APIs and their examples)
Its the way I learnt it. :)
Cheers
I would like to add ajax to an existing spring mvc 2.5 webapps. But i dont know where to start.
I think spring does not support ajax integration.
Does someone know how can I accomplish this? I was thinking that my ajaxrequest should be catch by the controller interface but I dont know where to start.
I dont want to use any ajax library at this point but just plain old ajax approach
Kindly send me links or tutorials if what I am thinking is possible please
Spring MVC does not provide out of the box Ajax support. However it provides suitable extension points through its template based design to enable Ajax support very easily. Still you can implement it using jquery library.
I am having an application developed with Struts1.3, Jboss4.X version and jdk1.5
Now as an enhancement we are planning to implement AJAX to the web application
Can you please suggest me
Whether I can use AJAX with Struts1.3 Framework?
Which Jar I need to use if I Can implement AJAX?
At Some website, I realised struts2-dojo-plugin.jar can be used for Struts2, whether the same jar works for Struts 1.3 Version
Please clarify my doubts
Yes. You can use AJAX with the struts1.3 framework. AJAX is mostly done in the JavaScript on the client. It requests a URL on your server which will correspond to an action that you write. As far as the browser is concerened it knows nothing about struts, it just happily request pages assuming they are all static html pages.
You do not need any special jar files to use AJAX. In struts2 they included dojo making it simple to use that library without needing extra libraries. However, you can download and install any javascript library such as jQuery, dojo, prototype etc that will help you do AJAX.
Most likely not. the struts2 Dojo integration will not work out of the box in struts1.3 You can use the Dojo library if you wish but you will have to do it yourself.
Some links:
AJAX and Struts1 and Struts2
Justin Coyne