JSON-RPC-Java (1)

xiaoxiao2021-03-06  41

Today is a Valentine's Day, it is also my birthday, the people who should have a holiday, but it is really cold and clear. However, the mother deliberately booked a gift of the cake, I and my parents also had a birthday dinner with my mother-in-law. This is not a happiness. A few days ago, a friend introduced a good stuff to me, JSON-RPC-Java. I have studied two days, I feel that if I get treasure, I don't dare to enjoy it. I feel that it is necessary to write something, and readers. JSON-RPC-Java is a web application middleware that allows DHTML to directly access remote Java applications, and no refresh returns. The surface is similar to XML-RPC, or remotely call EJB. However, the implementation of JSON-RPC-Java is much simpler, and most important, it is in the client and is just JavaScript. People who do a web program must not be unfamiliar XMLHttpRequest. So you might have already guess the bottom realization technology of the JSON-RPC-Java framework. That's right, JSON-RPC-Java exactly switches data with the server and exhibits the page no refresh. XmlhttpRequest I don't have much to say, there is a more introduction on the Apple website. See here, Mozilla's documentation is more detailed, see here (very unexpected, I didn't find a comparative system document on Microsoft's MSDN). From my understanding of the current so-called new technologies, there is usually a very magnificent name, then you are all giants, you have a drink, but it is actually a new bottle of old wine. Existing technology sets on standard or standardized coats, plus commercial quarrels, the industry is a bloody hurricane. In order to make my own commercial interests, each giant often makes me is awkward and nausea. Clarified the most underlying implementation, then JSON-RPC-Java has an essential understanding, which helps us open its mysterious coat. It's like treating a woman, we usually have a good time to treat or have patient treatment when you have a tempting body. JavaScript Object Notation is obviously the basis of JSON-RPC-Java, which is a simple and easy-to-read lightweight data exchange format based on JavaScript. Its home page is here. If you are not familiar with JavaScript, then understanding JSON has some difficulties. Here I have to introduce "Literals" this JavaScript concept. Unfortunately, I am hard to find a Chinese article introduction it, it is difficult to find a copy on the Chinese website of Lycos, but can only access the Google's web snapshot, see "JavaScript direct quantity". Simply put, if we want JavaScript to create an object, usually write: function person (name, sex) {this.name = name; this.sex = sex;} var p = new person ('zhaozexin ", 1); Alert (p.Name); starting from JavaScript 1.2, create an object with a fairly fast syntax, as follows: var p = {"name": 'zhaozexin', "sex": 1}; this sentence It is the "direct amount" of the object. Such syntax is very like the output of the toString () method in the MAP in Java.

转载请注明原文地址:https://www.9cbs.com/read-58330.html

New Post(0)