I am new to Spring as well as Dojo. I need to use Dojo with one of my mvc proj开发者_开发知识库ect 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
精彩评论