Atitit. Method for Improving api Compatibility & #160; v3 & #160; q326, atititq326

Source: Internet
Author: User

Atitit. Methods for Improving api compatibility v3 q326 and atititq326

Atitit. Method for Improving api compatibility v3 q326

 

1. Atitit. Compatibility "One plus three" policy 1

2. Extended table mode 1

3. 3. Simultaneous running mode 1

3.1. 3.1. Perfect backward compatibility 2

3.2. 3.2. Virtual Machine Mode 2

3.3. 3.3. Version compatibility mode 2

. Forward compatibility (leave sufficient room for upgrade) 3

. Forward compatibility concept 3

6. List of specially processed software 3

7. New api vs modify old api4

8. Threadlocal4

9. ref5

 

 

1. Atitit. Compatibility "One plus three" Strategy

 

"By removing outdated code to reduce compiler maintenance costs, Java 9 javac will no longer support Java 1.5 and earlier code. JDK9's "one plus three" policy means that this version of javac supports the options in 1.9/9, 1.8/8, 1.7/7, and 1.6/6. This policy will be continued in JDK 10 ."

The title is my explanation of the news. Here is my understanding.
This means that many of the original java design will be modified improperly.
Will bring about many source code-level incompatibility.
Some expressions may be false in the early compilation result, and may become true in the future.
For example, String =
It also means Integer I = new Integer (0); Integer j = new Integer (0 );
I = j may also be true.

 

Author ::★(Attilax)> nickname: old wow's paw (full name: Attilax Akbar Al Rapanui Attila Akba Arla Panui) Chinese name: AI long, EMAIL: 1466519819@qq.com

Reprinted please indicate Source: http://www.cnblogs.com/attilax/

 

2. Extended table mode 3. Simultaneous Running Mode

 

Web surfing, of course, is the most widely used browser for users, while the built-in IE browser in Windows is really uncomfortable for users. As a result, many dual-core browsers in China become popular. No, Microsoft is also embarrassed. In Windows 10, a new browser-Spartan was added. The new browser integrated with Microsoft's Cortana digital assistant has two versions: desktop and mobile, the Bing search service is deeply integrated to make the user's search experience more seamless.

It integrates the OneNote function to facilitate user recording, tagging and sharing, and supports PDF file display. In addition, it also has reading mode features such as message saying it will support Chrome extensions. The development code of the new browser is "Sparta ".

However, the message shows that new and old browsers will coexist in the early stage, on the one hand, to avoid compatibility problems caused by sudden switching, on the other hand, it can also give users more flexible choices Until Microsoft determines that the new browser is sufficient to replace IE, will be completely converted.

 

3.1. 3.1. Perfect backward compatibility 3.2. 3.2. VM mode 3.3. 3.3. Version compatibility mode

,

 

 

. Forward compatibility (leave sufficient room for upgrade). Concept of "Forward compatibility"

 

 

For a company that is already in a monopoly status, it must be at risk and dare to develop its own lives to usher in a longer-term success. For example, although Early intel held a monopoly in the storage field, it saw a longer future in the CPU market and resolutely invested in cpu r & D to achieve today's success. However, Intel also holds the concept of "Forward compatibility" in terms of CPU, and allows Atom chips to dance with shackles. In the global embedded chip market, ARM chips are dominant. In the mobile operating system field, Microsoft's mobile operating system is far behind the iOS and Android systems designed for mobile devices because it is compatible with the Windows operating style. On the contrary, Google is commendable. In addition to maintaining its own advantages in the search field, it not only successfully launched the Android operating system, it is now available in advance in robotics, smart cars, wearable devices, and other fields.

6. List of specially processed Software

I first heard such a thing from a popular game, a developer in a simulated city. He said the simulated City has a fatal bug: it immediately re-uses the memory after the memory is released. In a DOS environment, this approach is not a problem. However, in Windows, the memory released by a program may be immediately acquired and used by another program. Therefore, such an approach is absolutely not allowed. Testers of the Windows development team tested several popular applications and completed them, but the simulated city has been experiencing problems. They reflected the problem to developers. The latter thoroughly studied the simulation program, found out the root cause of the problem, and added special code to check whether the simulation city is running. If yes, the Memory Manager runs in special mode. In this mode, the program can use the released memory.

This is not a rare thing. The Windows testing team is huge, and their most important responsibility is to ensure that everyone can smoothly upgrade their operating systems, no matter which applications they install, whether or not these applications use undisclosed old system interfaces or rely on problematic system resources. In fact, if you check the software compatibility section in the Windows registry, you will find a long list of software specially processed. The new version of Windows will simulate some bugs in the old system so that these software can operate normally.

 

 

7. New api vs modify old api

It is better to add new APIs .. In this way, you do not need to adjust the old api... add the test job...

Of course, you can directly adjust the old api for some minor adjustments.

 

 

8. Threadlocal

 

It also has some similar methods for use, that is, there are many dynamic calls at the framework level, and some protocols need to be met during the call process. Although the protocol will be as common as possible, many extension parameters cannot be fully considered during definition negotiation, and the version is also upgraded at any time. However, the Framework extension also needs to meet the versatility and backward compatibility of interfaces, for some extended content, we need ThreadLocal for convenient and simple support.

To put it simply, ThreadLocal converts some complex system extensions into simple definitions, making it easy to relate the components of relevant parameters. The following is an example:

 

9. ref

Implementation principle of ThreadLocal lockless thread blocking in Java-Code rural network .htm

Atitit. improve compatibility best practices p825.doc-attilax column-blog channel-CSDN.NET.htm

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.