I've been a .NET web developer for several years now, working with asp.net web forms and c#, wcf etc.But recently developed touch enabled customer facing application. Its device-agnostic application designed for any platform capable of running HTML5 applications (iOS, Android, Windows8), for Mobile devices (such as tablets), Assisted or unassisted kiosks, Laptop or desktop computers.
we used asp.net webapi, ASP.net MVC 4.0 framework, Jquery mobile libraries, HTML 5, signal R for development.
Is it possible for us to migrate or convert complete server side code(i.e controllers methods) under Java?
Does Apache tomcat server or (webspehere) supports verbs like PUT, DELETE inaddition to GET and POST?
Any thing available in Java world which is equivalent ASP.NET SignalR functionality?
what are the required softwares or libraries for developing device aganostic touch enabled applications in java?
I think Web API objectively wins out over other APIs in below few key areas.
Content negotiation, Flexibility, Separation of concerns
How much extent Spring MVC API or Jersey API will support the above areas?
Java Server pages (JSP) are the Java world's equivalent of ASP, and a great way to build server-side web sites and applications in the Java ecosystem.
What is Web API? API stands for Application Programming Interface. A Web API is an application programming interface for the Web. A Browser API can extend the functionality of a web browser. A Server API can extend the functionality of a web server.
This example shows how Java classes can easily be used in an ASP.NET application through use of a Java/. NET bridge. The bridge allows the Java classes to be called directly from the ASP.NET code through proxies; to interact with a Java object, access the corresponding proxy object in exactly the same way.
There are many differences between MVC and Web API, including: We can use the MVC for developing the Web application that replies as both data and views but the Web API is used for generating the HTTP services that replies only as data.
Is it possible for us to migrate or convert complete server side code(i.e controllers methods) under Java?
You could, but it's not very easy as there is not direct mapping apis, but there are similar apis which you could use. There are lots of people who have done it
Does Apache tomcat server or (webspehere) supports verbs like PUT, DELETE inaddition to GET and POST?
Yes all HTTP commands can be enabled/disabled in Tomcat or any JEE compliant App servers
Any thing available in Java world which is equivalent ASP.NET SignalR functionality?
DWR (Direct Web Remoting), Vaadin, GWT etc. But I am sure there are more.
What are the required softwares or libraries for developing device aganostic touch enabled applications in java?
JavaMe, Android, GWT-Touch etc. Also this link might help you.
Java rest Apis
Hope this helps.
Jersey (jax-rs) is a very solid alternative to ASP.NET Web API in the Java World.
Jersey RESTful Web Services framework is open source, production quality, framework for developing RESTful Web Services in Java...
It's an annotation based approach to the problem. I think it's a very well thought and productive environment. You can customize all sorts of stuff and that contains sane defaults.
The answer is yes you can create restful web service in Java with spring framework. Here is and example of how code looks
import java.util.concurrent.atomic.AtomicLong;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@RestController
public class GreetingController {
private static final String template = "Hello, %s!";
private final AtomicLong counter = new AtomicLong();
@RequestMapping("/greeting")
public Greeting greeting(@RequestParam(value="name", defaultValue="World") String name) {
return new Greeting(counter.incrementAndGet(),
String.format(template, name));
}
}
Link : http://spring.io/guides/gs/rest-service/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With