Kendo UI for JSP- DataSource Servlet or RESTful service - kendo-ui

I am new to Kendo UI framework. I would like to know whether I could use normal Servlets or RESTful service instead of Spring Controller for Kendo UI for JSP?
E.g. For the following grid example(http://demos.telerik.com/kendo-ui/web/grid/index.html), they have used Spring Controller class in data source, so instead of Spring Controller class, could it be possible to use servlets or RESTful service class for datasource?
Any help is highly appreciable.
Regards

Yes it is possible. This blog post shows how to do it: Building a better UI – JSP Wrappers part 2

Related

Kendo UI JSP DataSourceRequest.java class does NOT work for Spring Data JPA. Which class needs to be used with Spring Data JPA?

Kendo UI DataSourceRequest.java class is written for Hibernate. This is used to filter server side data for Grid, Dropdown UI Controls etc. But it does NOT work with Spring JPA. Is there any another class to use with Spring Data JPA ?
Please guide on this.
Thanks
S

Using Spring with JSF/Facelets [duplicate]

This question already has answers here:
Using JSF as view technology of Spring MVC
(3 answers)
Closed 7 years ago.
I would like some clarification on some things.
I have developed a web application in the Eclipse IDE using JSF and facelets (xhtml web pages). Now, my manager told me to re-create this application but as a RESTful web application using Spring.
I did some research on Spring MVC and its DI/IoC features and have a few questions:
I see that Spring offers DI/IoC, does JSF not offer that?
Can you create RESTful web apps in JSF?
Since JSF uses beans just like Spring, what advantage is there to use Spring over JSF?
Are the facelets just the view part of the Spring framework?
Can I use Spring IoC/DI with facelets?
I am starting to think he just wants me to keep the project as is but add the IoC/DI of Spring.
As you can see, I am quite confused on this subject and would like some clarification.
I can understand your confusion. Once I did a project in which I used JSF as front end and Spring MVC as backend.
for you the answer is Yes , You can do inversion of control using JSF by using JSF Beans (for instance managed beans) but you need to keep in mind couple of things.
1: You need to register beans both for JSF and Spring.
2: Its recommneded that you should set same type of scope for this bean in JSF and Spring.
for example: if you are setting request scope for a specific bean in JSF then you should also set Request scope for the same bean in Spring. Only view scope will not be available in Spring but you can write custom view scope which is not big deal
Answer for the part of question Are the facelets just the view part of the Spring framework?
No, you can't say it is part of spring, facelets are handled by JSF but yes , they mostly used as a view part. So when you have a plan to make a application with JSF and Spring then I will interpret it as you are using JSF for front end and Spring for backend.
Restful services using JSF:
Yes, you can make restful service using JSF. here it is very good blog regarding thisRestful web Services in JSF You can also create restful web service in Spring Rest Web Services in Spring

Creating controller classes in spring framework

I am developing an accounts related project using spring mvc. I have problem in creating controller classes. Like Action class in struts framework do we need to create separate controller for spring ie (individual controller for every UI pages). I stuck up here. How can I create a controller class? based on module or by UI pages?
If I correctly understand your question, You want to know the design of serving request. It is not necessary or a good practice to create controller for serving each request(page). I think you should go for module based controllers. You can follow MVC architecture to have a better understanding on coupling requests with controllers.Spring have mvc support. There are numerous tutorials in spring mvc.
Here is a demo of spring MVC.

Ajax support in Spring MVC 3.0

We are just starting a new web application using Spring MVC 3.0.
We will be using lot of Ajax in our application. I wanted to know if there is any in built support for Ajax (like Struts 2) in Spring MVC 3.0 or do we have to use some third party API like DWR or jQuery?
We have used lot of both DWR and jQuery in our other applications based on Struts 1 and Struts 2. So, we are very familiar with both of them.
Thanks!
Spring mvc 3 supports Ajax. Check this
As explained in the link in Viren Pushpanayagam's answer, the typical way to use ajax with Spring is to use JQuery (or plain JS or other framework, it doesn't matter) to make ajax call, passing necessary parameters. Spring controller handles request and returns JSON (which is very simple in Spring if you just annotate your controller with #ResponseBody and include Jackson Mapper or Gson in your classpath). There is no Spring tag library or other feature that performs the ajax functionality that I am aware of.

Experiences with integrating spring 3 mvc with GWT?

Given:
Spring 3.0 mvc has excellent REST support with one of the representation being JSON.
GWT simplifies development as UI is developed in java. But by default it uses RPC for client server interaction. But there is an option to use JSON.
Questions:
Can you share experiences with using Spring 3.0 mvc with GWT ?
What is the best approach to integrate these two frameworks?
Is the default GWT's MVP architecture only for client side and does it work well with JSON?
Thanks
Can you share experiences with using Spring 3.0 mvc with GWT ?
Yes. We've successfully built a whole large application around GWT and Spring MVC (1500 source files, 6 months in development).
Spring was the key to the project's success. Only with Spring we were able to test individually some pieces of the application on the server side.
What is the best approach to marry these two frameworks?
Ignore the default Servlet used by GWT and instead create your own Spring controller to handle incoming GWT-RPC requests. This blog post was the key to integrating the two techs.
We also successfully integrated other components: Flash for animated charts and third-party Javascript components for other stuff. These communicate with the server through JSON. So you have two or more kinds of URLs:
the *.rpc urls are for GWT components and are served by the Spring controller for gwt
the *.json urls are for other components and are served by another Spring controller.
Also, in our case, we shunned configuration with annotations and instead preferred configuration with the good old Spring XML files. They make it much more clear what's going on. Except for the #Required annotation; it's great to find spring beans that should be connected but aren't.
Is the default GWT's MVP architecture only for client side and does it work well with JSON?
GWT's MVP architecture works best if you follow the guide lines. Use GWT-RPC communication as Google suggests.
You can still have JSON for other client-side components.
Try this solution: GWT and Spring MVC Integration
It uses 3 classes. Its very simple, declarative and clear.
It's stupid to mix Spring MVC and GWT. Also it's stupid to mix Spring MVC and JSF... It's stupid to mix 2 MVC (MVP) frameworks together. But you can use Spring DI and GWT for sure!
You may want to check out Spring Roo. It will help you get started quickly with Spring MVC, especially when dealing with RESTful URLs. It also provides a means to automatically set up GWT "scaffolding" (GWT code to interact with the Spring MVC backend). Hope it helps!

Resources