Silverlight data access - how to save gruntwork on the server

What technologies are used / recommended for HTTP Rpc calls from Silverlight. My server stack is JBoss (servlets / json_rpc [jabsorb]), and we have a ton of business logic (object creation, validation, persistence, server-side events) that I still want to use.

This is our first attempt to bring ria applet style to our product, and ideally we keep both HTML and Silverlight versions.

For better or worse, the forces that pushed us toward the Silverlight path, and while flex / java fx / silverlight is an interesting discussion, this question is removed from the equation. We just need to find a way to get Silverlight to behave with our classes.

Should I define the representation of the .NET class of our JSON objects and the methodology for serializing / deserializing access to these objects? IE "blah.com/dispenseRpc?servlet=xxxx&p1=blah&p2=blahblah creating functions that invoke a web request and convert the incoming response string to objects?

Another way would be to reverse-convert .NET communications to wcf (or any other) and implement a Java-side handler that calls the correct server-side code and returns what .NET expects. But that sounds a lot harder.

T

+4
source share
1 answer

Well, since we use JSON Rpc through HTTP on the server -> HTML clients, we decided to use HTTP calls and .NET JsonSerializer; future plans include adding Java annotations to our EJB project and a console application that will work against EJBs and generate HTTP calls and F # records with DataContract attributes.

It works pretty smoothly. There were some problems with async in silverlight, but it worked with some help from people in MS.

thanks

+1
source

Source: https://habr.com/ru/post/1311145/


All Articles