This series of articles is designed to get developers with a Web front-end background up and running with native languages.

Background and Motivation

From WebView to Hybrid and React Native, the front end students have more and more space to display in mainstream technology solutions of mobile terminals. However, students with traditional Web front-end background are familiar with JavaScript, and it is easy to encounter pits beyond the control range on the boundary of collaboration with Native, which is also one of the reasons for RN and other schemes to be criticized.

However, a specific programming language should not be a career bottleneck or obstacle. Students who are already familiar with a major language can learn a new language very quickly. Essential C++ is a good example of this: It assumes that the reader already has a good command of a programming language, so it ignores a lot of trivial novice knowledge in the beginning of programming, and directly shows the reader the core features of C++, so that the reader can learn C++ very quickly (note that this is not the same thing as mastery). The goal of this tutorial is to give students with a JavaScript background a quick and familiar understanding of the native language features and the underlying principles behind them, so that they can get over the hurdle of cross-side development.

The project is still in the early stages of serialization and any form of feedback and participation is welcome.

Requirements and Objectives

This tutorial requires only one thing: familiarity with JavaScript. In terms of learning objectives, please first clarify what this tutorial cannot achieve:

  • Bring you up to the level of mastery: Use this word sparingly.
  • Make you a mobile developer: Specific programming languages are only a subset of platform development.
  • Familiarize yourself with the IDE: This tutorial will use the simplest command line compilation and configuration, no IDE required.

In contrast, this tutorial is positioned to help you achieve your goals faster in these scenarios:

  • You are developing based on RN or other solutions and need to integrate the native SDK or class library.
  • You stepped on the pit of Native under RN and other schemes, and hope to solve it through independent debugging.
  • You need to have a rough understanding of existing application code such as Objective-C, or make minor changes.

If these scenarios hit you, then don’t hesitate to get in the car and continue 😉

Getting Started

How to read it? Just start with the link below:

  • C
    • Revisit Hello World – Introduces the basics of the build environment and coding style.
    • Variables and types – introduces the importance of the type system, which is often overlooked by JS programmers.
    • Control Flow – Describes how common for and while loops relate to the underlying mechanism.
    • Function calls and stacks – describes how native languages reuse code snippets.
    • Pointers and References – explains why we need to distinguish primitive types from reference types.
    • Structures and heaps – Introduces prototypes of objects and concepts of memory management.
  • Objective-C

Why start with C? For one thing, THERE is a lot of C in WASM and WebGL, but more importantly, THERE is very little in C and a very good mental model that helps you understand the core features of programming languages, making it easier to learn other languages by analogy. For example, as a superset of C, there’s a lot of C in Objective-C. Starting with C will give you a better understanding of why its features are designed the way they are, and therefore, a better understanding of other compiled native languages. Of course, if you’re already familiar with C, you can just skip it and read the rest.

To participate in

All forms of participation are welcome, including but not limited to Issue discussions, errata and additions 🙏 use GitHub’s Issue and PR to participate.

Thank you

The organization of this series of articles is based on The Objective-C Programming The Big Nerd Ranch Guide.

The license

CC signature – No deductive