This article has participated in the third “topic writing” track of the Denver Creators Training Camp. For details, check out: Digg Project | Creators Training Camp third is ongoing, “write” to make a personal impact.

concept

According to the development technology, App can be divided into three categories.

  • Native Applications (native Apps)
  • Web Application (Web App for short)
  • Hybrid Applications (Hybrid Apps)

Native App

Apps developed specifically for a particular mobile platform will not work on other platforms. A mobile application that works with both iphones and Android phones requires a native App for each.

Advantages:

  • Better performance and experience
  • Access to all of the system’s hardware and software apis, such as GPS, camera, microphone, accelerometer, notification push, and so on, fully exploits the system’s potential.

Disadvantages:

  • It’s expensive and requires IOS and Android development teams
  • Native APPS use the language of the underlying operating system, which is a very heavy compiled language, with relatively high development and debugging costs and long time cycle.
  • Native apps must be downloaded and installed to use, and must be re-downloaded and installed as soon as the version is upgraded. Users are often reluctant to update, forcing vendors to support long-ago versions.

The Web application

A Web App is an application that uses a Web page and must be used in a browser. It uses web technologies, namely HTML, JavaScript, and CSS.

Advantages:

  • No need to download and install, just open a browser to use, and always use the latest version.
  • For developers, Web apps are quick to write, easy to debug, and don’t require App store approval to be released.

Disadvantages:

  • The API (Web API) provided by the browser is very limited (currently there are only a few cameras, GPS, batteries, etc.), and most of the system hardware cannot be accessed through Web pages or read hard disk files directly, so the Web App cannot make full use of the hardware of the platform.
  • Webpage rendered by browser, performance is not as good as native App, not suitable for pages with high performance requirements.
  • It can only be accessed by opening a browser, not from the phone’s front screen
  • Lack of ability to push notifications when the phone’s status bar or lock screen
  • Do not know offline access (that is, off the network can be used)

The Chrome team developed a new technology called Progressive Web App (PWA). It can cache the website in the mobile phone for offline use. It can also generate ICONS on the first screen of the mobile phone and directly click to enter, and has notification push ability. It does not have the address bar and status bar of the browser, which is very close to the experience of using the native App.

However, PWA requires a browser visit to the site in order to generate ICONS on the first screen, and iOS support is not yet ideal, so it is still an exploratory technology with limited success so far.

Hybrid application

The combination of native App and Web App. The shell is a native App, but inside it is a web page. It can be understood that there is a hidden browser inside the hybrid App, and the user actually sees the webpage rendered by the hidden browser.

The native shell of a hybrid App is called a “container”, and the browser is hidden inside, usually using system-provided web rendering controls (i.e. WebView controls), or it can have a built-in browser kernel of its own.

Structurally, the hybrid App is divided into three layers from top to bottom: the HTML5 web layer, the Web engine layer (essentially an isolated browser instance), and the container layer.

All apis of the underlying system can be called. The container layer provides THE API Bridge, acting as the intermediary of the underlying API, allowing internal web pages to call the underlying layer.

Advantages:

  • cross-platform
  • flexibility
  • The development of convenient

Disadvantages:

  • Performance is relatively poor, there is a middle layer of Web engine, not only inferior to native App, but also because WebView is not a full-function browser, it may be slower than Web App.
  • Cross-platform features that are only available on a specific platform cannot be used, resulting in a worse experience than a pure native App. Like android’s physical back button, the iPhone doesn’t.
  • The development of convenient

Technology stack for mobile apps

  1. Native App stack

Java Technology stack (Android Studio) for Android, Object-C technology stack or Swift technology stack (Xcode) for iOS.

  1. Hybrid App technology stack

PhoneGap, Cordova, Ionic and other frameworks

  1. Cross-platform App technology stack

Facebook’s React Native, Google’s Flutter, Ali’s Weex, Dcould’s Uni app

The advantages and disadvantages

  1. The skills and experience are best in the native stack, and for large, complex apps, this approach should be adopted if possible.

  2. The hybrid technology stack has low cost and good flexibility. Simple APPS with low performance requirements, especially pure display pages, can be developed in this way.

  3. The cross-platform stack works for situations where there are external or internal constraints and only one team is developing a cross-platform App.

Let’s talk about the tech stack of iOS

  1. If iOS needs to do native development, it must need a native programming language to do the technology stack. (Object-c, Swift)

object-c :

  • IOS is the first iOS development language, but also in C/C++ extension of C advanced packaging, mainly for iOS development.

  • The bottom layer is the encapsulation of C. If you want to improve the code efficiency, you need to study more or use C/C++ to achieve some functions.

  • OC is a runtime language, a dynamic language, and a lot of things like hot updates that are easier to do, similar to JSPatch.

  • OC security is relatively weak, since it is dynamic, others also have the opportunity to dynamically modify your app information.

Swift:

  • Static, strongly typed; Relatively safe language.
  • Swift is more extensible, protocol oriented, function oriented, object oriented, etc.
  • The development efficiency is also higher than OC, which is highly praised by Apple and relatively better
  • Internally, it is relatively smoother than OC for generics, some higher-order functions, and some custom syntax.
  1. In development, there will be things that go against the grain, such as ads, tips, and iterations that need to be started, and interactions with the Web will become more important.
  2. If you get down to the bottom, you still need to know as much about C, C++, or even assembly as possible, and both OC and Swift provide interfaces to call.
  3. Some basic animation principles, use etc. IOS apps and systems are popular because of the variety of good animation interactions.
  4. You should be aware of some cross-platform technologies, such as Week, Flutter, RN, etc. You can embed modules to improve your technology stack and even improve your development efficiency.

The advanced way

Basis:

  • UI – Various base pages can be implemented
  • Memory management – Memory leaks, lag, latency, caching, reference counting, etc
  • Network – API request, data processing
  • Storage (DB) – databases, file operations, etc
  • Render – animation, image loading process
  • Threads – Multithreaded processing technology, thread safety
  • , etc…

Advanced:

  • Analyze and check excellent third parties: RxSwift, Kingfisher, SnapKit, etc. (of course, you can find the corresponding OC version)
  • Work in a particular area: audio and video, image processing, etc
  • Performance optimization: will use the system’s own, or third-party plug-ins to debug performance; Optimize app (stall, crash). Use try and catch syntax.
  • Code optimization: to do more code review, to analyze and optimize, how to do more concise, how to do more excellent, restructuring, architecture ideas, etc.
  • Development efficiency: in the case of quality improvement, we should think more about efficiency and have more time to do more progressive things. (e.g., encapsulating controls, automation, etc.)
  • Security: OC dynamic language, how to protect others hook, signature, etc.
  • Try new technologies: Deep web interaction, cross-platform technology for a module, embedded applications like applets.