Elasricsearch in nutshellElasticsearch (ES) is a search engine based on Lucene. It is a distributed, multi-tenant capable full-text search engine with an HTTP web interface and schema-free JSON documents. Cause it uses HTTP as web interface it can be used with any client . ES offers APIs that requires JSON input in HTTP Post request or sometimes the HTTP GET request with query parameters suffice. Official clients
Some Facts
Elasticsearch- About Indexes/Mapping/DocumentIf you are from RDBMS background you understand database, tables, rows and columns but in ES world , here an index is like database which contains related set of documents , index could have multiple mappings ( or types) but its optional (analogous to tables in RDBMS) .A document (a json object) resembles with Rows.
Since Json object could have hierarchical structure, Columns could not be analogous ditectly , but some how you get the idea how the structure is maintained in ES. Database <--> Index Tables <--> Mappings (or Types) Rows/Columns <--> Document with Properties. An introduction to Angular 2
Angular 2 is next version of AngularJS (popular javascript framework backed by Google) to create single page applications or mobile apps.
If you have worked with Angular JS (1.x) , It is viewed as MV* (Model View Controller or Model View ViewModel) based framework, where we creates (or use already craeted) modules, controllers , directives, and html templates (as views). Angular JS is known for expressive html (you can use ngIf, ngRepeat) , powerful data bindings ({{bindings}}) , and modular design, built in services ($http, etc). Angular 2 is complete rewrite of Angular 1.x to avoid its shortcomings.
A single page application could be viewed as root component that may contains several other components. A component is basically logical collection of html template, associated style and model that would operate on template using angular 2 bindings.
As shown in figure, we can think of our application in terms of components . Root component is consist of TOP-NAVBAR and CONTENT. Similarly CONTENT consist of TABLES which has TABLE-VIEW.
The framework is designed in such way that each component should be independently testable and maintainable using several ways including dependency injection. We shall see more in detail while we proceed with the tutorial. Getting Angular 2 Start kit
So Angular 2 Project structure is not so much straight forward as it was earlier. So its better to download a project structure with most common configuration and quickly start development.
There is a quick start kit available from angular team or you may use Angular CLI to create project using commands as shown in figure. We will understand more when we start our project in next post. You may use javascript, typescript, or DART for Angular 2 development. I personally believe , since Angular 2 itself is developed using Typescript, also majorly community is going with typescript so its better to go for typescript . Note : If you are beginner for typescript , just go through typescript playground and you will get pretty much good idea to work with typescript , Its really pretty straight forward and would not take much time . Go ahead and create your first project now using Angular CLI, its really easy and fun. Installing Angular CLI 1. Install latest NodeJS from their website for your OS, It will install npm package manager. 2. Install Angular-CLI using command npm install -g angular-cli Creating Project using Angular-CLI ng new myProject
As you can see , the angular-cli has created project structure that is ready to be used.
Please note that this process may take a long time, as it downloads and install all required npm packages and tools from the web. Now open the folder in Visual Studio Code or any other editor of your choice. In next post we will navigate and understand main files and start with basic Hello world app. |
AuthorDIVESH PAL Archives
July 2019
Categories
All
|