-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathothers.txt
97 lines (80 loc) · 4.23 KB
/
others.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
TypeScript
-------------
It is a superset of JavaScript, which means that any valid JavaScript code is also valid TypeScript code
TypeScript adds optional static typing and other features that enhance JavaScript's capabilities
Static Typing => TypeScript allows developers to specify types for variables, function parameters, return types, and more
Interfaces and Classes => TypeScript supports interfaces and classes, allowing developers to define custom data types and OOPS principles
Enums => to define a set of named constants with numeric or string values
Generics => to write reusable code components that work with a variety of data types
Advanced JavaScript Features => TypeScript supports modern JavaScript features such as async/await, destructuring, arrow functions, and modules
Compatibility => it is fully compatible with existing JavaScript libraries, frameworks, and tooling
union
-------
a union type allows a variable, parameter, or property to accept values of multiple types
Union types are defined using the | (pipe)
let myVar: number | string;
classes
----------
classes provide a way to define blueprints for creating objects with properties and methods
Interface
---------
an interface is a way to define the shape or structure of an object
interface Person {
name: string;
age: number;
greet: () => void;
}
Decorators
-----------
Decorators are a feature of TypeScript that allows you to attach metadata to classes, methods, properties, or parameters
Types => class, method, property and parameter Decorators
Elasticsearch
---------------
It is designed for horizontally scalable, real-time search and analysis of large volumes of data
used for a variety of use cases, including full-text search, log and event data analysis, real-time analytics, and application monitoring
Distributed Architecture => allowing it to scale horizontally by adding more nodes to a cluster
Near Real-Time Search => It provides near real-time search capabilities, meaning that documents are indexed and made searchable within milliseconds
Full-Text Search => supports full-text search, allowing users to search for documents based on the content of their fields
Rich Query DSL => It provides a powerful Query DSL (Domain-Specific Language) for constructing complex search queries.
MySQL vs Elasticsearch
-----------------
Feature | MySQL | Elasticsearch
Data Storage | Relational database storing tables in rows and columns | Distributed search engine storing JSON documents
Query | SQL | DSL (document query language)
Data Model | Relational (rows and columns) | NoSQL (JSON structure)
Indexing | supports | build in
Scalability | Vertical (scaling server) | Horizontal (adding more node)
Single-Threaded Languages
------------------
Execute instructions one at a time.
JavaScript, PHP, Python, Ruby
Multi-Threaded Languages
---------------
Can manage multiple threads of execution concurrently, potentially improving performance for CPU-bound tasks
Java, C#, C++, Go, Rust
libraries and frameworks
--------------
Libraries => react, jQuery, Pandas,
Frameworks => Angular, Vue, express JS, Django, Flask
JavaScript vs TypeScript
-----------------
Aspect | JavaScript | TypeScript
Language Type | Dynamically typed | Statically typed
Type System | no build in type check | Built-in static type checking
Extension | .js | .ts
Tooling Support | less tool support | Strong tooling support IntelliSense, code navigation, error checking
Code Readability | less readable cod | Enhanced code readability with type annotations
Development Speed | more time for debugging | Faster development process
React.js vs Node.js
----------------
Aspect | react | node
Purpose | Frontend | backend
Type | library | runtime environment
Main Features | Component-based architecture, Virtual DOM, JSX | Asynchronous I/O, Event-driven architecture, CommonJS modules
Execution | browser | server
Frameworks | next.js | express.js
HTTP Server | not handle HTTP req | create HTTP req
webpack
-----------
Webpack is a free and open-source module bundler primarily for JavaScript applications. It takes your project's code (modules) and their dependencies,
and transforms them into optimized bundles that can be easily loaded by a web browser. This improves the performance and organization of your web application