Dart Tutorial

Dart Tutorial Single-Page Application Architecture Dart Features Dart Installation Guide Dart Basic Program Dart Syntax Dart Keywords Dart Variables Dart Comments Dart Standard Input Output Dart Important Concepts

Data Types

Built-in Data Types Numbers Strings Booleans Lists Sets Maps Runes and Graphemes Symbols Enumerations Constants Queues

Other data types

Objects Future and stream Iterable Miscellaneous types

OPERATORS

Precedence and associativity Arithmetic operators Equality and Relational operators Type Test Operators Assignment Operators Logical Operators Bitwise and Shift Operators Miscellaneous operators

Control Flow Statements

Introduction If statement If-else statement If-else-if statement Loops Switch and case Dart Break And Continue Assert In Dart

FUNCTIONS

Dart function Types of Functions Anonymous function main( ) function Lexical scope and closure Recursion Common Collection Methods

Object Oriented Concepts

Dart Object-Oriented Concepts Dart Classes Dart Constructors Dart This Keyword Dart Super Keyword Static Members Method Overriding Dart Interfaces Inheritance Dart Abstract Classes Dart Builder Classes Dart Callable Classes

Dart Type System

Dart Type System Dart Soundness Dart Type Inference

MISCELLANEOUS

Dart Isolates Dart Typedef Dart Metadata Dart Packages Dart Generics Dart Generators Dart Concurrency Dart Unit Testing Dart Html Dom Dart URIs Dart Extends, With and Implements Keywords Dart Optional Parameters Rust Vs Dart C++ vs Dart Golang Vs Dart Dart Basics Exception Handling

Dart Single-Page Application Architecture

In a single page application architecture, the source code for a single web page loads the entire application. The responsibility of building the user interface and requesting data from the server to populate this user interface is attributed to this source code. The best example of single-page applications includes Google Mail, Google Instant Search, and Google Maps built using Dart programming language.  

Single-page applications use a client-side virtual machine to move processing from the server to the client. This makes it easier for the server to respond to more requests because the client-side bears the responsibility of processing involved in building the layout. By using Dart’s HTML libraries to incorporate modern HTML5 browser storage and caching technologies, applications can also cache data in the browser to further improve application performance or allow users to work offline. 

Every code in the Dart language has a single entry-point function like in any other programming language, called main( ) that is the first function executed by the Dart virtual machine. Therefore, every source code that defines an application only runs when the ‘main’ function is called, making it reliable. This is the point that makes it differentiable from JavaScript, where definition and execution of a function can take place even while the code is being run using eval( ) or monkey-patching technique. Monkey patching is a technique that allows the addition and modification of the default behaviour of a source code at run time without affecting the source code. This particular feature enables the Dart applications to fit in the single-page architecture because it is sure that your source code will be executed as a single unit of code.  The Dart virtual machine uses this architecture technique to increase application start-up time and load the apps more quickly using heap snapshots, making it more efficient than JavaScript applications.

Dart Single-Page Application Architecture