当前位置: 首页 > 工具软件 > jose > 使用案例 >

JAVA相关术语或简称[ HATEOAS, JWT,JOSE,JWS,CDI,CAP,BASE,JSON-P,JSONP,JAXP,IoC,JSON,JSON-B,WSDL,UDDI,SOAP ]

齐宗清
2023-12-01

Hypermedia as the engine of application state (HATEOAS)

Representational State Transfer (REST)

Hypertext Transfer Protocol (HTTP)

JSON Object Signing and Encryption standards (JOSE)

JSON Web Signatures (JWS)

JSON Web Encryption (JWE)

JSON Web Keys (JWK)

JSON Web Token (JWT)

Consistency Availability Partition (CAP) tolerance

Basically Available Soft state and Eventual Consistency (BASE)

Pulse Width Modulation (PWM)

Progressive Web App (PWA)

Service Level Agreement (SLA)

Dependency Injection (DI)

Context and Denendency Injection (CDI)

Inversion of Control (IoC)

Java API for XML Processing (JAXP)

JavaScript Object Notation(JSON)

JSON 是 JS 对象的字符串表示法,它使用文本表示一个 JS 对象的信息,本质是一个字符串。实现从JSON字符串转换为JS对象,使用 JSON.parse();实现从JS对象转换为JSON字符串,使用 JSON.stringify().
类型: String,Number,Object,Array,Boolean,Null
{
    "name": "Falco",
    "age": 3,
    "bitable": false
}

JSONP

用于处理跨域 AJAX GET调用

JSON-P

在Java EE 中定义的规范,用于处理JSON。
streaming fashion 类似 STAX API for XML
API classes 类似 DOM API for XML
核心API 「javax.json」「javax.json.stream」
public static void main(String[] args) {
   // Create Json and serialize
   JsonObject json = Json.createObjectBuilder()
     .add("name", "Falco")
     .add("age", BigDecimal.valueOf(3))
     .add("biteable", Boolean.FALSE).build();
   String result = json.toString();
     
   System.out.println(result);
 }
public static void main(String[] args) {
    // Parse back
    final String result = "{\"name\":\"Falco\",\"age\":3,\"bitable\":false}";
    final JsonParser parser = Json.createParser(new StringReader(result));
    String key = null;
    String value = null;
    while (parser.hasNext()) {
        final Event event = parser.next();
        switch (event) {
        case KEY_NAME:
            key = parser.getString();
            System.out.println(key);
            break;
        case VALUE_STRING:
            value = parser.getString();
            System.out.println(value);
            break;
        }
    }
    parser.close();
}

Jakarta JSON Binding (JSON-B)

Yasson 框架提供了标准的绑定层为java class和json

官方示例

Jsonb jsonb = JsonbBuilder.create();
String result = jsonb.toJson(someObject);
// Create custom configuration
JsonbConfig config = new JsonbConfig()
  .withNullValues(true)
  .withFormating(true);
// Create Jsonb with custom configuration
Jsonb jsonb = JsonbBuilder.create(config);
// Use it!
String result = jsonb.toJson(someObject);
<!-- https://mvnrepository.com/artifact/jakarta.json.bind/jakarta.json.bind-api -->
<dependency>
    <groupId>jakarta.json.bind</groupId>
    <artifactId>jakarta.json.bind-api</artifactId>
    <version>1.0.1</version>
</dependency>
public class User {
  public long id;
  public String name;
  public int age;
}
Jsonb jsonb = JsonbBuilder.create();

User bob = new User();
bob.id = 1234;
bob.name = "Bob";
bob.age = 42;

String bobJson = jsonb.toJson(bob);
System.out.println(bobJson); // {"id":1234,"name":"Bob","age":42}
Jsonb jsonb = JsonbBuilder.create();

String aliceJson = "{\"id\":5678,\"name\":\"Alice\",\"age\":42}";
User alice = jsonb.fromJson(aliceJson, User.class);

实际开发中应该结合JSON-P和JSON-B一起使用。

WebServicesDescriptionLanguage(WSDL)

UniversalDescriptionDiscovery andIntegration(UDDI)

Simple Object Access Protocol(SOAP)

JavaTM API for XML-Based Web Services(JAXWS)

JavaTM API for RESTful Web Services(JAXRS)

JAXRS 2.1 和 HTTP/2 更新 (单个请求具有多个响应), 2.1为了客户端的响应式编程来了一个Reactive Client API,用SSE和Websocket是时候停止长轮询了。

Open API Initiative (OAI)

Service Provider Interface (SPI)

Create, Read, Update, Delete (CRUD)

Service-Oriented-Architecture (SOA)

Web Archive (WAR)

Domain Driven Design (DDD)

Linux Virtual Server (LVS)

Service-Oriented Architecture (SOA)

Web Resource Access Protocol (WRAP)

Command Line Interface (CLI)

Read, Evaluate, Print, Loop (REPL)

Bourne Again Shell (Bash)

Advanced Message Queuing Protocol (AMQP)

Simple Authentication and Security Layer (SASL)

Java Message Service (JMS)

Least Recently Used (LRU)

  • Mybatis Cache 使用LRU算法进行收回

Plain Ordinary Java Object (POJO)

 类似资料: