Android system-based development system, decoupling method and device

A development system and basic technology, applied in the computer field, can solve the problems of too deep state transfer path, complex relationship chain, low readability and maintainability, etc., achieve easy management, high flexibility, reduce programming complexity and The effect of dependent coupling

Active Publication Date: 2022-05-27
ALIBABA GRP HLDG LTD
View PDF0 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] 1. When creating, binding or configuring View in Activity and Fragment, it contains a large amount of view-related code. If you want to write a unit test for it, you must first decouple the business logic and view code, otherwise it is difficult to complete the unit writing test
[0005] 2. Due to the need to create, bind and configure View in Activity and Fragment, each class is very swollen, and the coupling between Activity or Fragment cannot be reused, and the readability and maintainability are low
[0006] 3. In actual business, the interdependence and state transfer between various components lead to complex relationship chains, deep state transfer paths, and extremely complicated state update notifications

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Android system-based development system, decoupling method and device
  • Android system-based development system, decoupling method and device
  • Android system-based development system, decoupling method and device

Examples

Experimental program
Comparison scheme
Effect test

example 1

[0246] Based on the existing Activity and Fragment processing mechanisms, Figure 4A The realization of →4B→4C involves the following processes:

[0247] Card bag (CardBag), card list (CardBagList), card (CardItem) are all created in Activity, these three are common business classes, card (CardItem) is the inner class of card list (CardBagList).

[0248] The corresponding execution process is: click on the card - the card responds to the click - read the card package expansion status (CardBag.isPopup) - if the card package is not expanded, expand it (CardBag.popup()) - card list expansion

[0249] CardBagList, as a card list, aggregates the cards CardItem, and monitors the click event onClick in CardItem. When clicking, you need to first read whether the state in the card bag CardBag has been expanded CardBag.isPopup, and then call the expansion method of the card bag CardBag.popup() . Since it is necessary to directly read the state of the card package and perform ...

example 2

[0253] After the page is switched to the background, it is necessary to return to the state of the card package being put away, that is, Figure 4B , Figure 4C →4A.

[0254] Based on the existing Activity and Fragment processing mechanisms, Figure 4B , Figure 4C The realization of →4A involves the following processes:

[0255] Call CardBag.isPopup(), CardBag.packup(), CardBagList.isListPopup(), and CardBagList.packupList() in the life cycle method onpause() of the Activity. As there are more and more components, there will be a lot of business logic code stacked in onPause(), and the Activity will become bloated and difficult to maintain due to the stacking of a lot of business logic code. And, because the business components are not related, both portability and maintainability will be greatly reduced.

example 3

[0257] Based on the existing Activity and Fragment processing mechanisms, when the business changes, creating other page reuse components involves the following processing processes:

[0258] Create a new page, take the CardBagList and put it on the Activity page, but due to the strong reference of CardBagList and CardBag, all the logic code related to CardBag needs to be removed to pass the compilation, and the onPause() method of the Activity on the new page is also required. Add CardBagList.isListPopup() call and CardBagList.packupList() call to , the porting cost is high, and the function is easy to lose.

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The embodiment of the present application provides a development system, decoupling method and device based on the Android system. The development system includes: a component management unit Controller, which is used to manage business components in the Android system. Relevant attributes that match the life cycle of the business component; the life cycle management unit LifeCycle is used to provide the life cycle interface of the business component; and distribute the life cycle of the business component to the corresponding Controller; the message management unit Messager, configured to process communication between the Controllers. In this embodiment, by adopting a modular programming solution, the componentization of large-scale applications can be realized, the programming complexity and dependency coupling degree are reduced, and the business components are not dependent on each other, so the flexibility of the business components is also higher.

Description

technical field [0001] The present application relates to the field of computer technology, and in particular, to an Android system-based development system, an Android system-based decoupling method, an Android system-based decoupling device, and one or more computer-readable media. Background technique [0002] In the Android system, Activity is the most basic and most commonly used component. Activity can provide a screen, and each Activity is given a window on which the user interface can be drawn. A window usually fills the screen, but can be smaller than the screen and float above other windows. Activity is a component responsible for interacting with the user, in which all operations are closely related to the user. In order to complete a certain task, the user can interact through Activity. For example, dialing, taking pictures, sending E-mails, viewing maps, etc. Activity can display some controls (such as display specified controls through setContentView(View)),...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F9/451G06F9/48
Inventor 谭博颖
Owner ALIBABA GRP HLDG LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products