Skip to content

Commit

Permalink
chore: add how NS works page, remove common diagram from welcome page
Browse files Browse the repository at this point in the history
  • Loading branch information
tbozhikov committed Jan 15, 2018
1 parent d4488cd commit 228e2d2
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 3 deletions.
4 changes: 2 additions & 2 deletions docs/core-concepts/modules.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ previous_url: /modules

# Modules

![NativeScript Core Modules diagram](../img/ns-modules.png)

To let you access the native device and platform capabilities of your target platform, NativeScript uses a modular design pattern. All device, platform or user interface functionalities reside in separate modules. To access the functionality provided by a module, you need to **require** the module.

![NativeScript Core Modules diagram](../img/ns-modules.png)

In your project, the files for each module reside in a dedicated subdirectory in the `tns_modules` directory. Each default module comes along with a `package.json` file that declares how the module should be called within your call and which file contains its respective code.

```JSON
Expand Down
35 changes: 35 additions & 0 deletions docs/start/how-it-works.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
---
title: How NativeScript Works
description: NativeScript - technology stack diagram.
position: 10
publish: true
slug: how-it-works
previous_url: /index
---


# How NativeScript Works

The NativeScript technology can be presented as built upon several major parts - Runtimes, Core Modules, CLI, Plugins. Consider the following diagram:

![NativeScript common diagram](../img/ns-common.png)

## Runtimes

The runtimes enable you to call APIs in the Android and iOS frameworks using JavaScript code. To do that they use JavaScript Virtual Machines - Google’s V8 for Android and WebKit’s JavaScriptCore implementation distributed with iOS 7.0+. Find more information in [Android Runtime Overview](../runtimes/android/overview.md) and [iOS Runtime Overview](../runtimes/ios/Overview.md).

## Core Modules

The Core Modules are there to provide the abstractions needed to access the underlying native platforms. Take the Gestures module for example. It defines a common JS API that when called from the application TypeScript/JavaScript translates to native gestures APIs calls (thanks to the Runtimes).

Another thing the Core Modules provide is the "original" NativeScript way for defining UI, data-binding, navigation. Along with it, Angular and Vue can be used as Application Framework technologies. Read more in the [Modules Documentation](../core-concepts/modules.md).

## NativeScript CLI

It is the command-line interface that lets you create, build, and run apps using NativeScript. Runs on Windows, macOS or Linux. Find more information in the [NativeScript CLI repo](https://github.com/NativeScript/nativescript-cli).

## NativeScript Plugins

The NativeScript plugins are building blocks that encapsulate some functionality and help developers build apps faster (just like the NativeScript Core Modules, which is a plugin). Most are community built, written in TypeScript/JavaScript. Some can include native libraries, which are called from the TS/JS code thanks to the Runtimes layer. More information in the [Plugins documentation](../plugins/plugins.md).


1 change: 0 additions & 1 deletion docs/start/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ previous_url: /index

NativeScript is how you build cross-platform, native iOS and Android apps without web views. Use Angular, TypeScript or modern JavaScript to get truly native UI and performance while reusing the skills and the code from your web projects. Get 100% access to native APIs via JavaScript and reuse of packages from npm, CocoaPods and Gradle. Open source and backed by Progress.

![NativeScript common diagram](../img/ns-common.png)
{% endnativescript %}

{% angular %}
Expand Down

0 comments on commit 228e2d2

Please sign in to comment.