From the perspective of architectural design, an end, especially a mature end, should have its own specifications, ranging from page jumps and service requests to specific business functions such as generating orders, canceling orders, and viewing orders. On the one hand, after formulating a unified protocol, it can not only constrain the development behavior of developers in each business line, unify the code style, but also enhance the cooperation and cohesion of team members. On the other hand, after the unified development behavior, it is very helpful for adding new functions, fixing bugs, querying problems, etc., which greatly improves development efficiency.
One of the most important functions of the App Architecture Group is to unify the App architecture, allowing business developers to shape end products in a unified architecture, with the mission of improving business development efficiency and ensuring business stability. Based on this principle, we have been exploring various skills related to App architecture over the past year. I have found that the protocol is a key technology that best reflects the significance of App architecture. Using and promoting the protocol well can double the efficiency of business development. Generally speaking, the protocol types in an App can be arbitrarily divergent. As long as they can be reused, you can use the word "protocol" to describe them. Of course, we are all people with aspirations, and we should create some more general, more abstract, and more reusable protocols. For example, the url scheme in the iOS SDK is such a typical example. iOS URL Scheme URL Schemes is a mechanism provided by Apple to jump to system applications or other people's applications. It can also transfer data between applications to implement some specific functions. You can understand the URL of an iOS application in the same way as you understand the URL of a web page. For example, WeChat’s URL scheme
WeChat Moments URL scheme format
Doesn’t it look convenient? In other apps, you can jump to the WeChat App (if installed) like this:
Each application can create one or more url schemes of its own. You only need to configure the info.plist file, and then communicate between apps through the App Management Center [UIApplication sharedApplication]. Similarly, we can apply this idea to other abstract modules. In each abstract module, we use a protocol to specify its usage rules and supported functions. When it is open to the caller, as long as it follows the protocol rules and uses the API interface provided by the abstract module, it can call the module or use the services it provides. From this, we can draw the following conclusion: To abstract a module using a protocol, two important components are needed: protocol + protocol management center. General Protocol
In the App architecture, the page navigation framework is a very important component, which directly determines the page organization and style of the current App. A good page navigation framework can also allow the business side to have the best new page construction and page jump experience. From the perspective of the protocol, we can agree on a page jump protocol as follows: Page jump protocol
The APIs that Manager needs to provide include:
Service Request Protocol
Bridge Protocol
|
<<: Web Dev: 2017 highlights and 2018 predictions
>>: What impact does big data have on mobile app development?
Editor's note: This article was originally pu...
Original title: June stargazing guide: "Supe...
At the early morning of November 21, Beijing time...
In the long history of China over 5,000 years, th...
A few days ago, I happened to see several quotes ...
When LeEco's senior executives and its partne...
Audit expert: Zheng Yuanpan, professor at Zhengzh...
The 2022 May Day holiday is over, but since this ...
How do you explain that product and operation are...
This article divides the operation of Douyin into...
I know that what everyone cares about most is the...
Only a few days into 2018, the internet was abuzz...
When we write soft articles or long copy , adding...
In the early morning of March 12, Apple officiall...
Previously, in the future of "Education + Sh...