The UI component in turn can have other UI components as its children. A NativeScript application can have any number of model view container.Įvery root module should have only one UI Component as its content. Model View Container − NativeScript manages the Modal dialogs using model view container. It initializes the UI of the application. NativeScript application have two type of UI containers −Īpplication Container − Every NativeScript application should have one application container and it will be set using n() method. Every UI container should have a Root Module and through which the UI container manages UI. NativeScript manages the user interface and user interaction through UI containers. Application module uses a separate file, page.js/ to code the actual functionality of the page. The functionality of the page can be done using JavaScript/TypeScript, which has full access to the design as well as the platform features. The design can be styled using standard CSS.Īpplication modules stores the style of the design in separate CSS, page.css/. Application module uses the UI Component to design the page and store the design in separate XML, page.xml/. UI Component can be represented in XML format or HTML format in Angular based application. NativeScript provides lot of UI components (under UI Module) to design the application page. page.css/)Īctual business logic of the module in JavaScript (e.g. An application module consists of below three items − It bootstraps a page, enables the developer to create user interface of the page and finally allows execution of the business logic of the page. The application module is the entry point of the NativeScript application. Root and Page modules can be categorized as application modules. The two important categories of module to bootstrap a NativeScript application are as follows − Each and every module enables a specific feature. Workflow of a NativeScript ApplicationĪs we learned earlier, NativeScript application is composed of modules. Modules are written in pure JavaScript and the modules access the platform related functionality (whenever needed) through plugins and finally, the plugins bridge the platform API and JavaScript API. In short, NativeScript application is written and organized using modules. Platform API − API provided by platform vendors. Native plugins− Native plugins are written in platform specific language to wrapper the system functionality which will be further used by JavaScript plugin. Modules uses the JavaScript plugins to provide platform specific functionality. JavaScript plugins − NativeScript framework provides a large collection of JavaScript plugins to access the platform related functionality. All modules can be accessed by application at any time to write any level of complex application. JavaScript Modules − NativeScript framework provides a rich set of JavaScript modules clearly categorized as UI Modules, Application Modules, Core Modules, etc. NativeScript Application − NativeScript framework allows developer to use either Angular style application or Vue Style application. All these modules can be combined in multiple ways to architect a complex mobile application.īelow diagram shows the high level overview of the NativeScript framework − Each module does a specific functionality like accessing a camera, designing a screen, etc. NativeScript builds on the foundation of Native plugins and provides many high level and easy to use JavaScript Modules. At the low level, NativeScript exposes the native API through a collection of JavaScript plugins called Native plugins. Since JavaScript is de-facto standard for client side programming (Web development) and every developer is well aware of the JavaScript language, it helps developers to easily get into the NativeScript framework. NativeScript invests heavily on the JavaScript language to provide an efficient framework for developers. Hybrid application uses the platform specific browser API to host a web application inside a normal mobile application and provides system access to the application through JavaScript API. The core concept of NativeScript framework is to enable the developer to create hybrid style mobile application. Let us understand the architecture of the NativeScript framework in this chapter. NativeScript enables even entry level developers to easily create mobile application in both Android and iOS. It hides the complexity of creating mobile application and exposes a rather simple API to create highly optimized and advanced mobile application. NativeScript is an advanced framework to create mobile application.
0 Comments
Leave a Reply. |