CN109947424A - A kind of data processing method at the iOS App insertion interface HTML5 - Google Patents
A kind of data processing method at the iOS App insertion interface HTML5 Download PDFInfo
- Publication number
- CN109947424A CN109947424A CN201711392532.4A CN201711392532A CN109947424A CN 109947424 A CN109947424 A CN 109947424A CN 201711392532 A CN201711392532 A CN 201711392532A CN 109947424 A CN109947424 A CN 109947424A
- Authority
- CN
- China
- Prior art keywords
- ios
- interface
- request
- javascript
- data
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
Landscapes
- Stored Programmes (AREA)
Abstract
A kind of data processing method at iOS App insertion interface HTML5, step include: S1, by the WebServer Block JavaScript that iOS Native the is embedded Http to be executed request;S2, the Http according to route processing request, and basic parameter is added, iOS Native, which is converted, by the basic parameter locally requests;S3, the iOS Native do local cache to the data locally requested, and return to the JavaScript, do end interface rendering.The beneficial effect of the application is: can be very good to be multiplexed existing JavaScript rendering code;The problem of better solving JavaScript request authorization;IOS Native can do local cache for the data of request, promote interface fluency and user experience.
Description
Technical field
The application belongs to HTML5 technical field, specifically, being related at a kind of data at iOS App insertion interface HTML5
Reason method.
Background technique
With the development of HTML5 technology, it is universal and function become stronger day by day, many Internet companies start by primary now
Exploitation turns to nesting HTML5 and develops.Advantage using nested development scheme is:
1) in the case where limited budget, the insertion interface HTML5 can be with save the cost;
2) in the case where more demanding user experience, primary technology is more applicable;
3) in the case where requiring faster development rate, the insertion interface HTML5 is best selection;
4) some system function is being developed, when HTML5 is not supported, using primary technology.
Be embedded in the interface HTML5 mainly in two kinds of situation: the first is to load URL immediately above in WebView;It is for second
Local HTML5 file is run on WebView.
The problem of the case where current second of insertion interface HTML5 is primarily present has:
1) JavaScript requests licensing issue, and the authorization logic of the authorization logic at the interface HTML5 and iOS APP are obviously not
Together, how to solve the embedded interface HTML5 request licensing issue and have become critical issue;
2) JavaScript local cache problem annoyings always HTML5 developer, how preferably to solve
JavaScript data buffer storage problem also becomes iOS APP problem to be solved.
Summary of the invention
In view of this, the technical problem to be solved by the application is to provide a kind of numbers at iOS App insertion interface HTML5
According to processing method, code can be rendered to existing JavaScript and be multiplexed, and promote interface fluency and user experience.
In order to solve the above-mentioned technical problem, this application discloses a kind of data processing sides at iOS App insertion interface HTML5
Method, and realized using following technical scheme.
A kind of data processing method at iOS App insertion interface HTML5, step include:
S1, it is requested by the WebServer Block JavaScript that iOS Native the is embedded Http to be executed;
S2, the Http according to route processing request, parse basic parameter, convert iOS for the basic parameter
Parameter needed for the request interface of the local Native;
S3, the iOS Native do local cache to the data locally requested, and return to described
JavaScript does end interface rendering.
Further, the basic parameter includes interface message, authorization message and/or facility information.
Further, the Http request intercepted in the S1 is initiated by the JavaScript.
Further, the specific steps of the S2 include:
S21, the WebServer are requested according to the corresponding Http of route processing, and request to carry out to the Http
Parsing;
S22, the WebServer are packaged the parameter of the Http request after parsing, are converted into the first iOS
Native is locally requested;
S24, DAO pack the basic parameter, are converted into the 2nd iOS Native and locally request.
Further, between the S22 and the S24 further include:
S23, the WebServer call corresponding interface in the DAO.
Further, after the S24 further include:
S25, the DAO send the Http request to Server.
Further, the S3 specific steps include:
S31, the DAO parse the first iOS Native, and locally request and the 2nd iOS Native are locally requested
Response data, and do local cache and/or storage;
The DAO data parsed are packaged into the number that the JavaScript needs by S32, the WebServer
According to and return to the JavaScript;
S33, the JavaScript receive the data and do end interface rendering.
Compared with prior art, the application can be obtained including following technical effect:
1) it can be very good to be multiplexed existing JavaScript rendering code;
2) the problem of better solving JavaScript request authorization;
3) iOS Native can do local cache for the data of request, promote interface fluency and user experience.
Certainly, any product for implementing the application must be not necessarily required to reach all the above technical effect simultaneously.
Detailed description of the invention
The drawings described herein are used to provide a further understanding of the present application, constitutes part of this application, this Shen
Illustrative embodiments and their description please are not constituted an undue limitation on the present application for explaining the application.In the accompanying drawings:
Fig. 1 is the treatment process schematic diagram of the application one embodiment.
Specific embodiment
Presently filed embodiment is described in detail below in conjunction with accompanying drawings and embodiments, how the application is applied whereby
Technological means solves technical problem and reaches the realization process of technical effect to fully understand and implement.
A kind of data processing method at the iOS App insertion interface HTML5 is respectively as shown in Figure 1, relating generally to 4 layers
JavaScrip (i.e. JS), WebServer, DAO and Server.Wherein, JS refers to existing JavaScript code;WebServer
Refer to the embedded WebServer of iOS Native;DAO refers to iOS Native request of data layer, mainly solves request authorization, sends and ask
It asks, the operation such as data buffer storage;Server refers to background server, the request that processing DAO is sent and returning response.
Processing method includes three phases:
1) pass through the WebServer Block JavaScript that iOS Native the is embedded Http to be executed request;
2) it according to the corresponding request of routing list processing, is parsed;And interface message, authorization message, facility information is added
Equal basic parameters convert iOS Native for these basic parameters and locally request;
3) iOS Native does local cache to the data of request back, and returns to JavaScript, realizes final
Rendering.
Specific step includes:
S1, it is sent by JS initiation interface rendering Http request Concurrency;
S2, WebServer intercept Http request;
S3, WebServer are requested according to the corresponding Http of route processing, and are parsed to Http request;
S4, WebServer are packaged the parameter of the Http after parsing, i.e., convert iOS for the parameter parsed
The local Native required parameter;
S5, WebServer call the corresponding interface of local data request layer DAO;
S6, DAO pack the basic parameters such as interface parameters, authorization message and facility information, that is, are converted into iOS
Native is locally requested;DAO request of data layer encapsulates interface parameters, authorization message relevant parameter, facility information relevant parameter
It finishes;
S7, DAO send Http request;DAO request of data layer sends Http request to background server;
S8, Server receive Http request and returning response data;
S9, DAO parse the response data in S8, and do local cache and/or storage;
The data that S10, packaging JS need are into http response;Embedded WebServer parses DAO layers
Data be packaged into JavaScript needs data and return to JavaScript;
S11, it receives response data and renders interface;JS receives the data that embedded WebServer is returned and renders boundary
Face.
The beneficial effect of the application is:
1) it can be very good to be multiplexed existing JavaScript rendering code;
2) the problem of better solving JavaScript request authorization;
3) iOS Native can do local cache for the data of request, promote interface fluency and user experience.
Above to a kind of data processing method at the insertion of iOS App provided by the embodiment of the present application interface HTML5, carry out
It is discussed in detail.The description of the example is only used to help understand the method for the present application and its core ideas;Meanwhile for
Those of ordinary skill in the art have change according to the thought of the application in specific embodiments and applications
Place, in conclusion the contents of this specification should not be construed as limiting the present application.
As used some vocabulary to censure specific components in the specification and claims.Those skilled in the art answer
It is understood that hardware manufacturer may call the same component with different nouns.This specification and claims are not with name
The difference of title is as the mode for distinguishing component, but with the difference of component functionally as the criterion of differentiation.Such as logical
"comprising", the " comprising " of specification and claim mentioned in are open language, thus should be construed to " include but not
It is defined in "." substantially " refer within the acceptable error range, those skilled in the art can solve within a certain error range
The technical problem basically reaches the technical effect.Specification subsequent descriptions are to implement the better embodiment of the application, so
The description is being not intended to limit the scope of the present application for the purpose of the rule for illustrating the application.The protection of the application
Range is as defined by the appended claims.
It should also be noted that, the terms "include", "comprise" or its any other variant are intended to nonexcludability
Include, so that commodity or system including a series of elements not only include those elements, but also including not clear
The other element listed, or further include for this commodity or the intrinsic element of system.In the feelings not limited more
Under condition, the element that is limited by sentence "including a ...", it is not excluded that in the commodity or system for including the element also
There are other identical elements.
Above description shows and describes several preferred embodiments of the present application, but as previously described, it should be understood that the application
Be not limited to forms disclosed herein, should not be regarded as an exclusion of other examples, and can be used for various other combinations,
Modification and environment, and the above teachings or related fields of technology or knowledge can be passed through in application contemplated scope described herein
It is modified.And changes and modifications made by those skilled in the art do not depart from spirit and scope, then it all should be in this Shen
It please be in the protection scope of appended claims.
Claims (7)
1. a kind of data processing method at iOS App insertion interface HTML5, step include:
S1, it is requested by the WebServer Block JavaScript that iOS Native the is embedded Http to be executed;
S2, the Http according to route processing request, parse basic parameter, convert iOS Native sheet for the basic parameter
Parameter needed for ground request interface;
S3, the iOS Native do local cache to the data locally requested, and return to the JavaScript, do
End interface rendering.
2. iOS App is embedded in the data processing method at the interface HTML5 according to claim 1, it is characterised in that: described basic
Parameter includes interface message, authorization message and/or facility information.
3. iOS App is embedded in the data processing method at the interface HTML5 according to claim 1, it is characterised in that: in the S1
The Http request of interception is initiated by the JavaScript.
4. the data processing method at -3 any iOS App insertion interfaces HTML5 according to claim 1, it is characterised in that: institute
The specific steps for stating S2 include:
S21, the WebServer are requested according to the corresponding Http of route processing, and are parsed to Http request;
S22, the WebServer are packaged the parameter of the Http request after parsing, are converted into the first iOS
Native is locally requested;
S24, DAO pack the basic parameter, are converted into the 2nd iOS Native and locally request.
5. iOS App is embedded in the data processing method at the interface HTML5 according to claim 4, it is characterised in that: the S22
Between the S24 further include:
S23, the WebServer call corresponding interface in the DAO.
6. iOS App is embedded in the data processing method at the interface HTML5 according to claim 4, it is characterised in that: the S24
Later further include:
S25, the DAO send the Http request to Server.
7. iOS App is embedded in the data processing method at the interface HTML5 according to claim 4,
It is characterized by: the S3 specific steps include:
S31, the DAO parse the first iOS Native sound that locally request and the 2nd iOS Native are locally requested
Data are answered, and do local cache and/or storage;
The DAO data parsed are packaged into the data of the JavaScript needs simultaneously by S32, the WebServer
Return to the JavaScript;
S33, the JavaScript receive the data and do end interface rendering.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711392532.4A CN109947424A (en) | 2017-12-21 | 2017-12-21 | A kind of data processing method at the iOS App insertion interface HTML5 |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201711392532.4A CN109947424A (en) | 2017-12-21 | 2017-12-21 | A kind of data processing method at the iOS App insertion interface HTML5 |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109947424A true CN109947424A (en) | 2019-06-28 |
Family
ID=67005398
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201711392532.4A Pending CN109947424A (en) | 2017-12-21 | 2017-12-21 | A kind of data processing method at the iOS App insertion interface HTML5 |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109947424A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN104317591A (en) * | 2014-10-23 | 2015-01-28 | 西安未来国际信息股份有限公司 | OSGi (open service gateway initiative)-based web interface frame system and web business processing method thereof |
US20160092179A1 (en) * | 2014-09-26 | 2016-03-31 | Oracle International Corporation | High performant ios template based application build system |
CN105760162A (en) * | 2016-02-04 | 2016-07-13 | 四川长虹电器股份有限公司 | Development method for hybrid APP software |
CN106131143A (en) * | 2016-06-28 | 2016-11-16 | 北京车智赢科技有限公司 | A kind of method mutual for HTML with Native realizing Hybrid App |
CN107229454A (en) * | 2016-03-24 | 2017-10-03 | 阿里巴巴集团控股有限公司 | Mix the display methods and device of view |
-
2017
- 2017-12-21 CN CN201711392532.4A patent/CN109947424A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20160092179A1 (en) * | 2014-09-26 | 2016-03-31 | Oracle International Corporation | High performant ios template based application build system |
CN104317591A (en) * | 2014-10-23 | 2015-01-28 | 西安未来国际信息股份有限公司 | OSGi (open service gateway initiative)-based web interface frame system and web business processing method thereof |
CN105760162A (en) * | 2016-02-04 | 2016-07-13 | 四川长虹电器股份有限公司 | Development method for hybrid APP software |
CN107229454A (en) * | 2016-03-24 | 2017-10-03 | 阿里巴巴集团控股有限公司 | Mix the display methods and device of view |
CN106131143A (en) * | 2016-06-28 | 2016-11-16 | 北京车智赢科技有限公司 | A kind of method mutual for HTML with Native realizing Hybrid App |
Non-Patent Citations (1)
Title |
---|
SNAIL小菜: "iOS开发趋向:Native", 《HTTPS://WWW.JIANSHU.COM/P/56EC790197C2》 * |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103942225B (en) | A kind of resource transfer method, client and the system of mixed type applications client | |
US11736418B2 (en) | Decision tree processing for chatbot dialog flow | |
CN109062626A (en) | Exchange method, device and the equipment of Web page component and Native component | |
US11023263B2 (en) | Hybrid server-side and client-side portal aggregation and rendering | |
US10015135B2 (en) | Apparatus, method, and client for synchronizing jump context | |
CN102752388A (en) | Browser-based interactive system, browser-based interactive method, browser and cloud server | |
US10164970B1 (en) | Secure cross-domain page generation | |
EP3217622B1 (en) | Data backfill method and device | |
CN102467506A (en) | Cookie processing method and system | |
CN104346564A (en) | Web-based safe user interaction method | |
CN104965690A (en) | Method and apparatus for processing data | |
Song et al. | An improved approach to robust stability analysis and controller synthesis for LPV systems | |
CN104077151B (en) | The method and electronic equipment of fast start network application | |
US9529572B1 (en) | Composable application session parameters | |
CN103685551A (en) | Method and device for updating CDN (content delivery network) cache files | |
US9830209B2 (en) | Web based user interface driven prophylactic cross-domain communication architecture | |
CN104602034A (en) | Mobile webpage playing method and system | |
CN109947424A (en) | A kind of data processing method at the iOS App insertion interface HTML5 | |
US20130282859A1 (en) | System and method for enabling the styling and adornment of multiple, disparate web pages through remote method calls | |
CN103051722B (en) | A kind ofly determine the method whether page is held as a hostage and relevant device | |
US11487510B2 (en) | Dynamic web-based integrated development environment | |
CN105354269B (en) | Web applicational language Localization methodologies and system based on reverse proxy and information filtering | |
CN103425473A (en) | Implementation method and system of open micro-blog | |
US9369467B1 (en) | System, method, and computer program for providing generic access to web content on a mobile device | |
US10599610B2 (en) | Programmatic self-learning of inter-system document processing configurations |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20190628 |
|
RJ01 | Rejection of invention patent application after publication |