Hybrid App

What is a hybrid app

Hybrid App (Hybrid App) of bai is a lightweight browser embedded in du. Some of the original functions of zhuan are changed to Html5 for development. This part of the function can not only be dynamically updated without upgrading, but also can Running on Android or iOS at the same time makes the user experience better and saves development resources.

There are currently three mainstream APPs on the market: native APP, Web APP (ie HTML5) and hybrid APP. The corresponding custom development is native development, H5 development and hybrid development.

1. App native development

Native development (Native App development) is to develop App software using the provided development languages, development libraries, and development tools on mobile platforms such as Android and IOS. For example, Android uses Java, Eclipse, and Android studio; IOS uses Objective-C and Xcode for development.

In layman's terms, native development is like building a house. The foundation is laid and then the ground beams are poured. The house structure, brick and tile, reinforced concrete, circuit orientation, etc., are all carefully designed. The same is true for native apps: each page, each function, each effect, each logic, and each step is written in code through code, layer by layer, and section by section is written in code.

advantage:

  1. Can access all the functions of the mobile phone (such as GPS, camera, etc.), and can achieve complete functions;
  2. Fast running speed, high performance, excellent user experience;
  3. Support a large number of graphics and animations, no lag, fast response;
  4. High compatibility, each code is carefully designed by programmers, generally there will be no crashes, and it can also prevent the appearance of viruses and vulnerabilities;
  5. Use the interface provided by the device more quickly, which has advantages in processing speed.

Disadvantages:

  1. The development time is long, as fast as 3 months to complete, and as slow as 5 months;
  2. The production cost is high and the cost is high;
  3. Portability is relatively poor. A native App, Android and IOS must be developed separately, and two sets of the same logic and interface must be written;
  4. Content restrictions (App Store restrictions);
  5. You need to download the app update again when you get a new version.

2. Web APP (HTML5) development

HTML5 application development is App development using Web technology. Web technology itself needs the support of a browser to display and interact with users, so the main technologies used are HTML5, Javascript, CSS, etc.

advantage:

  1. Supports a wide range of devices, can be cross-platform, and the written code can run on Android, IOS, and Windows at the same time;
  2. Low development cost and short cycle;
  3. No content restrictions;
  4. It is suitable for displaying pages with large sections of text (such as news, strategy, etc.) and rich in format (such as bold, diverse fonts);
  5. Users can directly use the new version (automatic update, no need for users to update manually).

Disadvantages:

  1. Due to the limitations of Web technology, H5 mobile applications cannot directly access device hardware and offline storage, so there are great limitations in experience and performance;
  2. High requirements for networking, no operations can be done offline;
  3. Limited functions;
  4. The APP response speed is slow, and the page switching fluency is poor;
  5. Pictures and animations are not very supportive;
  6. Poor user experience;
  7. The phone hardware (camera, microphone, etc.) cannot be called.

Three, hybrid APP development (native + H5)

Hybrid development (Hybrid App development) refers to a hybrid application that uses native and H5 development technologies in order to improve efficiency and save costs when developing an App product. In layman's terms, this is the mode of web pages, which usually consists of two parts: "HTML5 cloud website + APP application client".

Hybrid development is a development model that learns from each other's strengths. The native code part uses Web View plug-ins or other frameworks to provide containers for H5. The main business implementation and interface display of the program are all implemented using H5-related Web technologies. For example, apps such as JD.com, Taobao, and Toutiao are all developed using a hybrid development model.

advantage:

  1. High development efficiency and time saving. Basically, the same code can be used on Android and IOS;
  2. It is more convenient to update and deploy. Each upgrade version only needs to be upgraded on the server side, and no longer needs to be uploaded to the App Store for review;
  3. Easy code maintenance, fast version update, saving product cost;
  4. More functions than the web version;
  5. Can be run offline.

Disadvantages:

  1. Functions/interfaces cannot be customized: all content is fixed, no interface changes or functions can be added;
  2. Slow loading/high network requirements: All data of the hybrid APP needs to be retrieved from the server, and each page needs to be re-downloaded, so the opening speed is slow, the network occupies high, and the buffer time is long, which is easy to disgust users;
  3. The security is relatively low: the code is old and not compatible with the new mobile phone system, and the security is low. The network develops so fast and there are so many viruses. If it is not updated in real time and checked regularly, it is easy to cause loopholes. direct economic loss;

// Determine whether h5 is on ios or android

function detect(){
    
    
var equipmentType = “”;
var agent = navigator.userAgent.toLowerCase();
var android = agent.indexOf(“android”);
var iphone = agent.indexOf(“iphone”);
var ipad = agent.indexOf(“ipad”);
	if(android != -1){
    
    
		equipmentType = “android”;
	}
	if(iphone != -1 || ipad != -1){
    
    
		equipmentType = “ios”;
	}
	return equipmentType;
}

Guess you like

Origin blog.csdn.net/t5_5_5_5_5_7_7/article/details/110831462