<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: JavaSampleApproach</title>
    <description>The latest articles on DEV Community by JavaSampleApproach (@javasampleapproach).</description>
    <link>https://dev.to/javasampleapproach</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F581080%2Fe1a6c455-437d-434e-a9c9-4213b5af120a.png</url>
      <title>DEV Community: JavaSampleApproach</title>
      <link>https://dev.to/javasampleapproach</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/javasampleapproach"/>
    <language>en</language>
    <item>
      <title>Spring Boot + Vue.js example | Spring Data MongoDB + RestApi CRUD</title>
      <dc:creator>JavaSampleApproach</dc:creator>
      <pubDate>Mon, 01 Mar 2021 12:33:42 +0000</pubDate>
      <link>https://dev.to/javasampleapproach/spring-boot-vue-js-example-spring-data-mongodb-restapi-crud-5ai3</link>
      <guid>https://dev.to/javasampleapproach/spring-boot-vue-js-example-spring-data-mongodb-restapi-crud-5ai3</guid>
      <description>&lt;p&gt;Tutorial: &lt;a href="https://grokonez.com/frontend/spring-boot-vue-mongodb"&gt;https://grokonez.com/frontend/spring-boot-vue-mongodb&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Client &amp;amp; Spring Boot Server example that uses Spring Data to do CRUD with MongoDB and Vue.js as a front-end technology to make request and receive response.&lt;/p&gt;

&lt;p&gt;Related Posts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/spring-framework/spring-boot/spring-data-mongooperations-accessing-mongo-database"&gt;Spring MongoOperations to access MongoDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/spring-framework/spring-boot/how-to-use-springdata-mongorepository-to-interact-with-mongdb-springboot-application"&gt;How to use SpringData MongoRepository to interact with MongoDB&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://grokonez.com/spring-framework/spring-boot/build-springboot-mongodb-restfulapi"&gt;How to build SpringBoot MongoDb RestfulApi&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;a href="https://grokonez.com/frontend/vue-js/vue-router-example-with-nav-bar-dynamic-route-nested-routes"&gt;Vue Router example – with Nav Bar, Dynamic Route &amp;amp; Nested Routes&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Technologies&lt;/h2&gt;

&lt;p&gt;– Java 1.8&lt;br&gt;
– Maven 3.3.9&lt;br&gt;
– Spring Tool Suite – Version 3.8.4.RELEASE&lt;br&gt;
– Spring Boot: 2.0.5.RELEASE&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Vue 2.5.17&lt;/li&gt;
&lt;li&gt;Vue Router 3&lt;/li&gt;
&lt;li&gt;Axios 0.18.0
&lt;h2&gt;Overview&lt;/h2&gt;
This is full-stack Architecture:&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wtRfQy6R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/09/spring-boot-vue-example-spring-data-mongodb-rest-api-mongodb-architecture.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wtRfQy6R--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/09/spring-boot-vue-example-spring-data-mongodb-rest-api-mongodb-architecture.png" alt="Full Architecture"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Demo&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.youtube.com/embed/gOrP0coCV10?rel=0"&gt;https://www.youtube.com/embed/gOrP0coCV10?rel=0&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Spring Boot Server&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--DdYV1UyW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/09/spring-boot-vue-example-spring-data-mongodb-rest-api-mongodb-architecture-server.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--DdYV1UyW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/09/spring-boot-vue-example-spring-data-mongodb-rest-api-mongodb-architecture-server.png" alt="SpringBoot MongoDB RestAPI"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Vue.js Client&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--OdxkfXs3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/09/spring-boot-vue-example-spring-data-mongodb-rest-api-mongodb-client.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--OdxkfXs3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/09/spring-boot-vue-example-spring-data-mongodb-rest-api-mongodb-client.png" alt="SpringBoot Vuejs Client"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;Spring Boot Server&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8VelSoqA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/09/spring-boot-vue-example-spring-data-mongodb-rest-api-mongodb-project-structure-server.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8VelSoqA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/09/spring-boot-vue-example-spring-data-mongodb-rest-api-mongodb-project-structure-server.png" alt="Project Structure"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Customer&lt;/strong&gt; class corresponds to entity and table &lt;strong&gt;customer&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CustomerRepository&lt;/strong&gt; is an interface extends &lt;strong&gt;MongoRepository&lt;/strong&gt;, will be autowired in &lt;strong&gt;CustomerController&lt;/strong&gt; for implementing repository methods and custom finder methods.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;CustomerController&lt;/strong&gt; is a REST Controller which has request mapping methods for RESTful requests such as: &lt;code&gt;getAllCustomers&lt;/code&gt;, &lt;code&gt;postCustomer&lt;/code&gt;, &lt;code&gt;deleteCustomer&lt;/code&gt;, &lt;code&gt;findByAge&lt;/code&gt;, &lt;code&gt;updateCustomer&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Configuration for Spring Datasource and Spring Data properties in &lt;strong&gt;application.properties&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dependencies&lt;/strong&gt; for &lt;strong&gt;Spring Boot&lt;/strong&gt; and &lt;strong&gt;MongoDb&lt;/strong&gt; in &lt;strong&gt;pom.xml&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>springboot</category>
      <category>vue</category>
      <category>mongodb</category>
      <category>restapi</category>
    </item>
    <item>
      <title>Dart/Flutter Map Tutorial – Create/Add/Delete/Iterate/Sorting</title>
      <dc:creator>JavaSampleApproach</dc:creator>
      <pubDate>Mon, 01 Mar 2021 11:59:15 +0000</pubDate>
      <link>https://dev.to/javasampleapproach/dart-flutter-map-tutorial-create-add-delete-iterate-sorting-5e82</link>
      <guid>https://dev.to/javasampleapproach/dart-flutter-map-tutorial-create-add-delete-iterate-sorting-5e82</guid>
      <description>&lt;p&gt;Dart Map Flutter Tutorial.&lt;/p&gt;

&lt;p&gt;In the tutorial, I will introduce how to work wiht Dart Map by example coding. What will we do?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://loizenai.com/dart-map-tutorial/"&gt;https://loizenai.com/dart-map-tutorial/&lt;/a&gt;&lt;br&gt;
&lt;a href="https://grokonez.com/dart-map-tutorial/"&gt;https://grokonez.com/dart-map-tutorial/&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How to Initial Dart Map by literal or constructor?&lt;/li&gt;
&lt;li&gt;Add new entry with Dart Map&lt;/li&gt;
&lt;li&gt;Iterate through Dart Map&lt;/li&gt;
&lt;li&gt;Update a Dart Map&lt;/li&gt;
&lt;li&gt;Delete with Dart Map&lt;/li&gt;
&lt;li&gt;Convert Dart Map to List&lt;/li&gt;
&lt;li&gt;Sorting a Dart Map&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A collection of key/value pairs, from which you retrieve a value using its associated key.&lt;br&gt;
Keys and values in a map may be of any type. A Map is a dynamic collection. Maps, and their keys and values, can be iterated.&lt;/p&gt;

&lt;p&gt;Implementers&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HashMap, HttpSession, LinkedHashMap, MapMixin, MapView&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;Dart Map Literals&lt;/h2&gt;

&lt;p&gt;To declare a map using map literals, you need to enclose the key-value pairs within a pair of curly brackets "{ }".&lt;/p&gt;

&lt;p&gt;Here is its syntax:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
var identifier = { key1:value1, key2:value2 [,…..,key_n:value_n] }
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;void main() { 
   var userInfo = {'Username':'Jack','Password':'123@passloizenai'}; 
   print(userInfo); 
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;output −&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;{Username: Jack, Password: 123@passloizenai}
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Dart Map&amp;lt;K, V&amp;gt;() constructor&lt;/h2&gt;

&lt;p&gt;Creates a Map instance with the default implementation, LinkedHashMap.&lt;br&gt;
This constructor is equivalent to the non-const map literal &amp;amp;lg;K,V&amp;gt;{}.&lt;/p&gt;

&lt;p&gt;A LinkedHashMap requires the keys to implement compatible operator&lt;code&gt;==&lt;/code&gt; and hashCode, and it allows null as a key. It iterates in key insertion order.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
void main() { 
   var userInfo = new Map(); 
   userInfo['Username'] = 'Jack'; 
   userInfo['Password'] = 'loizenai_password'; 
   print(details); 
} 
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output :&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;{Username: Jack, Password: loizenai_password}&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Dart Map&amp;amp;lg;K, V&amp;gt;.from constructor&lt;/h2&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
Map&amp;lt;K, V&amp;gt;.from(
Map other
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Creates a LinkedHashMap instance that contains all key/value pairs of other.&lt;/p&gt;

&lt;p&gt;The keys must all be instances of K and the values of V. The other map itself can have any type.&lt;br&gt;
A LinkedHashMap requires the keys to implement compatible operator== and hashCode, and it allows null as a key. It iterates in key insertion order.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
Map userinfo = {'username': 'Jack', 'password': '123@loizenai'};

Map _userinfo = Map.from(userinfo);
print(_userinfo);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;{_username: Jack, Password: 123@loizenai}&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Dart Map&amp;lt;K, V&amp;gt;.of constructor&lt;/h2&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map&amp;lt;K, V&amp;gt;.of(
Map&amp;lt;K, V&amp;lt; other
)
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Creates a LinkedHashMap with the same keys and values as other.&lt;/p&gt;

&lt;p&gt;A LinkedHashMap requires the keys to implement compatible operator== and hashCode, and it allows null as a key. It iterates in key insertion order.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
Map userinfo = {'username': 'Jack', 'password': '123@loizenai'};

Map _userinfo = Map.of(userinfo);
print(_userinfo);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;{_username: Jack, Password: 123@loizenai}&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Map&amp;lt;K, V&amp;gt;.fromIterable constructor&lt;/h2&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map.fromIterable(
Iterable iterable,
    {
        K key(
            dynamic element
        ),
        V value(
            dynamic element
        )
    }
)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Creates a Map instance in which the keys and values are computed from the iterable.&lt;/p&gt;

&lt;p&gt;The created map is a LinkedHashMap. A LinkedHashMap requires the keys to implement compatible operator== and hashCode, and it allows null as a key. It iterates in key insertion order.&lt;/p&gt;

&lt;p&gt;For each element of the iterable this constructor computes a key/value pair, by applying key and value respectively.&lt;/p&gt;

&lt;p&gt;The example below creates a new Map from a List. The keys of map are list values converted to strings, and the values of the map are the squares of the list values:&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;List&amp;lt;int&amp;gt; list = [1, 2, 3];
Map&amp;lt;String, int&amp;gt; map = new Map.fromIterable(list,
    key: (item) =&amp;gt; item.toString(),
    value: (item) =&amp;gt; item * item);

map['1'] + map['2']; // 1 + 4
map['3'] - map['2']; // 9 - 4&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If no values are specified for key and value the default is the identity function.&lt;/p&gt;

&lt;p&gt;In the following example, the keys and corresponding values of map are list values:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
map = new Map.fromIterable(list);
map[1] + map[2]; // 1 + 2
map[3] - map[2]; // 3 - 2
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;The keys computed by the source iterable do not need to be unique. The last occurrence of a key will simply overwrite any previous value.&lt;/p&gt;

&lt;h2&gt;Dart Map&amp;lt;K, V&amp;gt;.fromIterables constructor&lt;/h2&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
Map&amp;lt;K, V&amp;gt;.fromIterables(
    Iterable&amp;lt;K&amp;gt; keys,
    Iterable&amp;lt;V&amp;gt; values
)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Creates a Map instance associating the given keys to values.&lt;/p&gt;

&lt;p&gt;The created map is a LinkedHashMap. A LinkedHashMap requires the keys to implement compatible operator== and hashCode, and it allows null as a key. It iterates in key insertion order.&lt;/p&gt;

&lt;p&gt;This constructor iterates over keys and values and maps each element of keys to the corresponding element of values.&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;List letters = ['b', 'c'];
List&amp;lt;String&amp;gt; words = ['bad', 'cat'];
Map&amp;lt;String, String&amp;gt; map = new Map.fromIterables(letters, words);
map['b'] + map['c'];  // badcat&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If keys contains the same object multiple times, the last occurrence overwrites the previous value.&lt;/p&gt;

&lt;p&gt;The two Iterables must have the same length.&lt;/p&gt;

&lt;h2&gt;Map&amp;lt;K, V&amp;gt;.fromEntries constructor&lt;/h2&gt;

&lt;pre&gt;&lt;code&gt;Map&amp;lt;K, V&amp;gt;.fromEntries(
    Iterable&amp;lt;MapEntry&amp;lt;K, V&amp;gt;&amp;gt; entries
)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Creates a new map and adds all entries.&lt;br&gt;
Returns a new Map where all entries of entries have been added in iteration order. If multiple entries have the same key, later occurrences overwrite the earlier ones.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
Iterable someInts = [2, 7, .... ];
var squareMap = Map.fromEntries(someInts.map((n) =&amp;lt; MapEntry(n, n * n)));
print(squareMap[7]);  // prints 49.
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Or you can filter the entries somehow:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
var filteredMap = Map.fromEntries(otherMap.entries.where((e) =&amp;lt; e.key.isOdd));
&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Map&amp;lt;K, V&amp;gt;.identity constructor&lt;/h2&gt;

&lt;p&gt;Creates an identity map with the default implementation, LinkedHashMap.&lt;/p&gt;

&lt;p&gt;An identity map uses identical for equality and identityHashCode for hash codes of keys instead of the intrinsic Object.== and Object.hashCode of the keys.&lt;/p&gt;

&lt;p&gt;The returned map allows null as a key. It iterates in key insertion order.&lt;/p&gt;

&lt;h2&gt;Map&amp;lt;K, V&amp;gt;.unmodifiable constructor&lt;/h2&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map&amp;lt;K, V&amp;gt;.unmodifiable(
Map other
)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Creates an unmodifiable hash based map containing the entries of other.&lt;/p&gt;

&lt;p&gt;The keys must all be instances of K and the values of V. The other map itself can have any type.&lt;/p&gt;

&lt;p&gt;The map requires the keys to implement compatible operator== and hashCode, and it allows null as a key. The created map iterates keys in a fixed order, preserving the order provided by other.&lt;/p&gt;

&lt;p&gt;The resulting map behaves like the result of Map.from, except that the map returned by this constructor is not modifiable.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
Map map = Map.unmodifiable({1: 'one', 2: 'two'});
print(map);
// {1: one, 2: two}

map[3] = 'three';
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you try to modify/add object to the unmodifiable Map, it will throw an error.&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Unhandled exception:
Unsupported operation: Cannot modify unmodifiable map&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Difference between Map.from() and Map.of&lt;/h2&gt;

&lt;p&gt;See the example:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map&amp;lt;int, String&amp;gt; map = {1: 'one', 2: 'two'};

Map&amp;amp;ltString, String&amp;amp;gt map1 = Map.from(map); // runtime error
Map&amp;amp;ltString, String&amp;amp;gt map2 = Map.of(map);   // compilation error&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;– Map.from(map) doesn’t cause any compilation error. When we run the statement, the error occurs:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Unhandled exception:
type 'int' is not a subtype of type 'String'&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Why? -&amp;gt; This is because of its prototype:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map&amp;lt;K, V&amp;amp;gt Map.from(Map&amp;lt;dynamic, dynamic&amp;gt; other)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If we pass a Map&amp;lt;int, String&amp;gt; map to the function, it converts the key-value pair type into Map&amp;lt;dynamic, dynamic&amp;gt;.&lt;/p&gt;

&lt;p&gt;– Map.of(map) doesn’t do that thing, it keep the key-value pair type, so the compiler realizes the error before running the program.&lt;/p&gt;

&lt;p&gt;Map&amp;lt;K, V&amp;gt; Map.of(Map&amp;amp;ltK, V&amp;gt; other)&lt;/p&gt;

&lt;h2 id="dart-map-get-value-by-key"&gt;Dart Map Get Value by Key&lt;/h2&gt;

&lt;p&gt;Example - What we do:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create a Dart Map:&lt;/li&gt;
&lt;li&gt;find the size of map.&lt;/li&gt;
&lt;li&gt;check if a Map is empty or not using .isEmpty or .isNotEmpty.&lt;/li&gt;
&lt;li&gt;get all keys or values with keys &amp;amp; values property.&lt;/li&gt;
&lt;li&gt;get value of specified key in a Map or operator [].&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
Map map = {1: 'one', 2: 'two'};

print(map.length);      // 2

print(map.isEmpty);     // false
print(map.isNotEmpty);  // true

print(map.keys);        // (1, 2)
print(map.values);      // (one, two)

print(map[2]);          // two
print(map[3]);          // null
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id=""&gt;Dart Map Foreach&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;forEach enables iterating through the Map’s entries.&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map.forEach(void f(K key, V value));&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;f(K key, V value) − Applies f to each key-value pair of the map.
Calling f must not add or remove keys from the map. Return Type − void.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;void main() { 
   var usrMap = {"name": "Jack", 'Email': 'jack@loizenai.com'}; 
   usrMap.forEach((k,v) =&amp;gt; print('${k}: ${v}')); 
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;It will produce the following output −&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;name: Jack
Email: jack@loizenai.com &lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We can use entries property and forEach() method.&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;map.entries.forEach((e) {
  print('{ key: ${e.key}, value: ${e.value} }');
});&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;We can iterate over keys or values using Map property and forEach() method.:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;map.keys.forEach((k) =&amp;gt; print(k));
map.values.forEach((v) =&amp;gt; print(v));&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;
name
Email
Jack
jack@loizenai.com
&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id="dart-map-add"&gt;Dart Map Add&lt;/h2&gt;

&lt;p&gt;We have 2 way to add an item (key-value pair) to a Map:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;using square brackets []&lt;/li&gt;
&lt;li&gt;calling &lt;code&gt;putIfAbsent()&lt;/code&gt; method&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map map = {1: 'one', 2: 'two'};

map[3] = 'three';
print(map);

var threeValue = map.putIfAbsent(3, () =&amp;gt; 'THREE');
print(map);
print(threeValue); // the value associated to key, if there is one

map.putIfAbsent(4, () =&amp;gt; 'four');
print(map);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;{1: one, 2: two, 3: three}
{1: one, 2: two, 3: three}
three
{1: one, 2: two, 3: three, 4: four}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;You can use &lt;code&gt;addAll()&lt;/code&gt; method to all key/value pairs of another Map to current Map:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map map = {1: 'one', 2: 'two'};
map.addAll({3: 'three', 4: 'four', 5: 'five'});
print(map);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;{1: one, 2: two, 3: three, 4: four, 5: five}&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id="dart-map-update"&gt;Dart Map Update&lt;/h2&gt;

&lt;p&gt;We use one of the below solution to update a Dart Map:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;square brackets []&lt;/li&gt;
&lt;li&gt;update() method&lt;/li&gt;
&lt;li&gt;update() method with ifAbsent to add a new object/entry if the input key is absent&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example Code:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map map = {1: 'one', 2: 'two'};

map[1] = 'ONE';
print(map);

map.update(2, (v) {
  print('old value: ' + v);
  return 'TWO';
});
print(map);

map.update(3, (v) =&amp;gt; 'Three', ifAbsent: () =&amp;gt; 'added');
print(map);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;{1: ONE, 2: two}
old value: two
{1: ONE, 2: TWO}
{1: ONE, 2: TWO, 3: added}&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Remove Entry with Dart Map&lt;/h2&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map.remove(Object key)&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Parameters:&lt;br&gt;
    - Keys: identifies the entry to be deleted.&lt;br&gt;
    - Return Type: Returns the value corresponding to the specified key.&lt;/p&gt;

&lt;p&gt;Removes key and its associated value, if present, from the map.&lt;br&gt;
Returns the value associated with key before it was removed. Returns null if key was not in the map.&lt;br&gt;
Note that values can be null and a returned null value doesn't always mean that the key was absent.&lt;/p&gt;

&lt;p&gt;Example:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;void main() { 
   Map m = {'name':'Tom','Id':'001'}; 
   print('Map :${m}'); 
   
   dynamic res = m.remove('name'); 
   print('Value popped from the Map :${res}'); 
}&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Output:&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map :{name: Tom, Id: 001} 
Value popped from the Map :Tom&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id="dart-sort-map-by-value"&gt;Dart Sort Map by Key&lt;/h2&gt;

&lt;p&gt;When we need to sort maps, we can use the SplayTreeMap. The SplayTreeMap is ordered by sorted keys.&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;import 'dart:collection';

void main() {
  var fruit = new SplayTreeMap();

  fruit[0] = 'Banana';
  fruit[5] = 'Plum';
  fruit[6] = 'Strawberry';
  fruit[2] = 'Orange';
  fruit[3] = 'Mango';
  fruit[4] = 'Blueberry';
  fruit[1] = 'Apple';

  print(fruit);

  fruit.forEach((key, val) {
    print('{ key: $key, value: $val}');
  });

  var sortedByValue = new SplayTreeMap.from(
      fruit, (key1, key2) =&amp;gt; fruit[key1].compareTo(fruit[key2]));
  print(sortedByValue);
}&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Output:&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;{0: Banana, 1: Apple, 2: Orange, 3: Mango, 4: Blueberry, 5: Plum, 6: Strawberry}
{ key: 0, value: Banana}
{ key: 1, value: Apple}
{ key: 2, value: Orange}
{ key: 3, value: Mango}
{ key: 4, value: Blueberry}
{ key: 5, value: Plum}
{ key: 6, value: Strawberry}&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Dart Convert Map to List&lt;/h2&gt;

&lt;p&gt;Create a Customer model:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;class Customer {
  String name;
  int age;

  Customer(this.name, this.age);

  @override
  String toString() {
    return '{ ${this.name}, ${this.age} }';
  }
}&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Create a Dart Map:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;Map map = {'Jane': 21, 'Mary': 43, 'Peter': 13};&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Using Map &lt;code&gt;forEach()&lt;/code&gt; method:&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;map.forEach((k, v) =&amp;gt; list.add(Customer(k, v)));
print(list);&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Output:&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;[{ Jane, 21 }, { Mary, 43 }, { Peter, 13 }]&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Using Iterable forEach() method:&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;map.entries.forEach((e) =&amp;gt; list.add(Customer(e.key, e.value)));
print(list);&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Using Iterable map() method:&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;list = map.entries.map((e) =&amp;gt; Customer(e.key, e.value)).toList();&lt;/code&gt;&lt;/pre&gt;

&lt;h2 id="dart-sort-map-by-value"&gt;Dart Sort Map by Value&lt;/h2&gt;

&lt;p&gt;Continue with above example, we create a sorted map by values from the original map. We pass the from function a comparison function, which compares the values of the pairs.&lt;/p&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;var sortedByValue = new SplayTreeMap.from(
    fruit, (key1, key2) =&amp;gt; fruit[key1].compareTo(fruit[key2]));
    
print(sortedByValue);&lt;/code&gt;&lt;/pre&gt;

&lt;ul&gt;
&lt;li&gt;Output:&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code class="language-javascript"&gt;{1: Apple, 0: Banana, 4: Blueberry, 3: Mango, 2: Orange, 5: Plum, 6: Strawberry}&lt;/code&gt;&lt;/pre&gt;

&lt;h2&gt;Related posts&lt;/h2&gt;

&lt;p&gt;Related posts:&lt;br&gt;
&lt;/p&gt;


&lt;ul class="ul-loizenai-pre-related-post"&gt;
&lt;li&gt;&lt;a href="https://loizenai.com/how-to-integrate-springboot-2-x-with-postgresql-database-using-spring-jpa/"&gt;Integrate SpringBoot with PostgreSQL using Spring JPA&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://loizenai.com/kotlin-map-to-list-example/"&gt;Kotlin Map to List Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://loizenai.com/java-read-write-csv-file-open-csv-apache-common/"&gt;Java Read Write CSV File Open CSV Apaceh Common&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://loizenai.com/reactjs-crud-firebase-realtime-database/"&gt;Reactjs CRUD Firebase Realtime database&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://loizenai.com/reactjs-crud-firestore-example/"&gt;Reactjs CRUD Firebase Example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Read more at &lt;a href="https://api.dart.dev/stable/2.10.5/dart-core/Map-class.html"&gt;here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>dart</category>
      <category>flutter</category>
      <category>dartmap</category>
    </item>
    <item>
      <title>Angular 6 NgRx Store example – Angular State Management</title>
      <dc:creator>JavaSampleApproach</dc:creator>
      <pubDate>Wed, 17 Feb 2021 17:20:45 +0000</pubDate>
      <link>https://dev.to/javasampleapproach/angular-6-ngrx-store-example-angular-state-management-3j3g</link>
      <guid>https://dev.to/javasampleapproach/angular-6-ngrx-store-example-angular-state-management-3j3g</guid>
      <description>&lt;p&gt;&lt;a href="https://grokonez.com/reactive-programming/angular-6-ngrx-store-example-angular-state-management"&gt;https://grokonez.com/reactive-programming/angular-6-ngrx-store-example-angular-state-management&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;NgRx Store is a state management solution for Angular apps that helps us build applications by working around our app’s data (state). In this tutorial, we’re gonna look at how to work with NgRx Store, custom Actions, Reducers. Then we will practice to understand all of them in a simple practical Angular 6 example.&lt;/p&gt;

&lt;p&gt;Why we need a State container&lt;br&gt;
State container helps JavaScript applications to manage state.&lt;br&gt;
=&amp;gt; Whenever we wanna read the state, look into only one single place – NgRx Store.&lt;br&gt;
=&amp;gt; Managing the state could be simplified by dealing with simple objects and pure functions.&lt;/p&gt;

&lt;p&gt;NgRx Store&lt;br&gt;
Store holds the current state so that we can see it as a single source of truth for our data.&lt;br&gt;
– access state using store.select(property) (property is defined at app.module.ts in StoreModule.forRoot()).&lt;br&gt;
– update state via store.dispatch(action).&lt;/p&gt;

&lt;p&gt;All tutorial at: &lt;a href="https://grokonez.com/reactive-programming/angular-6-ngrx-store-example-angular-state-management"&gt;https://grokonez.com/reactive-programming/angular-6-ngrx-store-example-angular-state-management&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Related posts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/frontend/angular/django-angular-6-example-django-rest-framework-angular-crud-mysql-example-part-3-angular-client"&gt;https://grokonez.com/frontend/angular/django-angular-6-example-django-rest-framework-angular-crud-mysql-example-part-3-angular-client&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/django/django-angular-6-example-django-rest-framework-mysql-crud-example-part-1-overview"&gt;https://grokonez.com/django/django-angular-6-example-django-rest-framework-mysql-crud-example-part-1-overview&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/frontend/angular/error-handler-angular-6-httpclient-catcherror-retry-with-springboot-restapis-example"&gt;https://grokonez.com/frontend/angular/error-handler-angular-6-httpclient-catcherror-retry-with-springboot-restapis-example&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>How to Deploy Angular application on Heroku hosting with Git repository</title>
      <dc:creator>JavaSampleApproach</dc:creator>
      <pubDate>Wed, 17 Feb 2021 17:14:43 +0000</pubDate>
      <link>https://dev.to/javasampleapproach/how-to-deploy-angular-application-on-heroku-hosting-with-git-repository-2j6e</link>
      <guid>https://dev.to/javasampleapproach/how-to-deploy-angular-application-on-heroku-hosting-with-git-repository-2j6e</guid>
      <description>&lt;p&gt;&lt;a href="https://grokonez.com/frontend/angular/angular-deployment/how-to-deploy-angular-application-on-heroku-hosting-with-git-repository"&gt;https://grokonez.com/frontend/angular/angular-deployment/how-to-deploy-angular-application-on-heroku-hosting-with-git-repository&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Youtube Video: &lt;a href="https://youtu.be/4W0WN39d5YM"&gt;https://youtu.be/4W0WN39d5YM&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Technologies
&lt;/h1&gt;

&lt;p&gt;– Angular&lt;br&gt;
– Git&lt;br&gt;
– Heroku&lt;/p&gt;

&lt;h1&gt;
  
  
  Goal
&lt;/h1&gt;

&lt;p&gt;We use Heroku Hosting to deploy Angular application -&amp;gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Unk0Zo0e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/12/deploy-angular-application-on-heroku-hosting-deployment-successfully.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Unk0Zo0e--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/12/deploy-angular-application-on-heroku-hosting-deployment-successfully.png" alt="angular app"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Create Heroku App
&lt;/h1&gt;

&lt;p&gt;Login to Heroku, and create an app grokonez-angular-app:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--T3K7ep18--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/12/deploy-angular-application-on-heroku-hosting-create-app-step-2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--T3K7ep18--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://grokonez.com/wp-content/uploads/2018/12/deploy-angular-application-on-heroku-hosting-create-app-step-2.png" alt="Create Heroku App"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Related posts:
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/frontend/angular-6-dynamic-navigation-bar-add-remove-route-dynamically"&gt;https://grokonez.com/frontend/angular-6-dynamic-navigation-bar-add-remove-route-dynamically&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/frontend/angular/angular-deployment/how-to-deploy-angular-on-nginx-remote-server-example-use-vultr-vps-hosting"&gt;https://grokonez.com/frontend/angular/angular-deployment/how-to-deploy-angular-on-nginx-remote-server-example-use-vultr-vps-hosting&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/spring-framework/spring-boot/deployment-spring-boot/heroku-springboot-deployment-example-how-to-deploy-springboot-postgresql-on-heroku-platform-with-heroku-cli"&gt;https://grokonez.com/spring-framework/spring-boot/deployment-spring-boot/heroku-springboot-deployment-example-how-to-deploy-springboot-postgresql-on-heroku-platform-with-heroku-cli&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Angular Tutorial</title>
      <dc:creator>JavaSampleApproach</dc:creator>
      <pubDate>Wed, 17 Feb 2021 17:09:55 +0000</pubDate>
      <link>https://dev.to/javasampleapproach/angular-tutorial-14m2</link>
      <guid>https://dev.to/javasampleapproach/angular-tutorial-14m2</guid>
      <description>&lt;p&gt;&lt;a href="https://grokonez.com/angular-tutorial"&gt;https://grokonez.com/angular-tutorial&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>ElasticSearch Tutorial</title>
      <dc:creator>JavaSampleApproach</dc:creator>
      <pubDate>Wed, 17 Feb 2021 17:07:18 +0000</pubDate>
      <link>https://dev.to/javasampleapproach/elasticsearch-tutorial-23pk</link>
      <guid>https://dev.to/javasampleapproach/elasticsearch-tutorial-23pk</guid>
      <description>&lt;p&gt;&lt;a href="https://grokonez.com/elasticsearch"&gt;https://grokonez.com/elasticsearch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Elasticsearch is a distributed, full-text search engine based on Lucene with JSON schema. It is an open source and implemented by Java.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Introduction&lt;br&gt;
Elasticsearch uses a structure called an inverted index. It is designed for the fastest solution of full-text searches. An inverted index consists of a list of all the unique words that appear in any document, and for each word, a list of the documents in which it appears.&lt;br&gt;
For example:&lt;br&gt;
– “The quick brown fox jumped over the lazy dog”&lt;br&gt;
– ” Quick brown foxes leap over lazy dogs in summer”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Problem&lt;br&gt;
There are a few problems with our current inverted index:&lt;br&gt;
– “Quick” and “quick” appear as separate terms, while the user probably thinks of them as the same word.&lt;br&gt;
– “fox” and “foxes” are pretty similar, so are “dog” and “dogs”. They share the same root word.&lt;br&gt;
– “jumped” and “leap”, while not from the same root word, are similar in meaning. They are synonyms.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Solution&lt;br&gt;
– “Quick” can be lower-cased to become “quick”.&lt;br&gt;
– “foxes” can be stemmed for reduced to its root form to become “fox”. Similarly, “dogs” could be stemmed to “dog”.&lt;br&gt;
– “jumped” and “leap” are synonyms and can be indexed as just the single term “jump”.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Tutorial at: &lt;a href="https://grokonez.com/elasticsearch"&gt;https://grokonez.com/elasticsearch&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://grokonez.com/elasticsearch/elasticsearch-character-filters"&gt;https://grokonez.com/elasticsearch/elasticsearch-character-filters&lt;/a&gt;&lt;br&gt;
&lt;a href="https://grokonez.com/elasticsearch/elasticsearch-tokenizers-structured-text-tokenizers"&gt;https://grokonez.com/elasticsearch/elasticsearch-tokenizers-structured-text-tokenizers&lt;/a&gt;&lt;br&gt;
&lt;a href="https://grokonez.com/elasticsearch/elasticsearch-tokenizers-structured-text-tokenizers"&gt;https://grokonez.com/elasticsearch/elasticsearch-tokenizers-structured-text-tokenizers&lt;/a&gt;&lt;br&gt;
&lt;a href="https://grokonez.com/elasticsearch/elasticsearch-tokenizers-structured-text-tokenizers"&gt;https://grokonez.com/elasticsearch/elasticsearch-tokenizers-structured-text-tokenizers&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Reactjs Nodejs MongoDB CRUD Example</title>
      <dc:creator>JavaSampleApproach</dc:creator>
      <pubDate>Wed, 17 Feb 2021 17:03:57 +0000</pubDate>
      <link>https://dev.to/javasampleapproach/reactjs-nodejs-mongodb-crud-example-3j97</link>
      <guid>https://dev.to/javasampleapproach/reactjs-nodejs-mongodb-crud-example-3j97</guid>
      <description>&lt;p&gt;&lt;a href="https://grokonez.com/react-node-js-mongodb-crud-example-mern-stack" rel="noopener noreferrer"&gt;https://grokonez.com/react-node-js-mongodb-crud-example-mern-stack&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Reactjs Nodejs MongoDB CRUD Example – MERN Stack Application
&lt;/h1&gt;

&lt;p&gt;Tutorial at: &lt;a href="https://grokonez.com/react-node-js-mongodb-crud-example-mern-stack" rel="noopener noreferrer"&gt;Reactjs Nodejs MongoDB CRUD Example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the tutorial, I introduce how to build an “React.js Nodejs CRUD MongoDB Example” project with the help of Ajax to POST/GET/PUT/DELETE requests with step by step coding examples:&lt;/p&gt;

&lt;p&gt;– Nodejs project produces CRUD RestAPIs with MongoDB database using the supporting of Mongoose ODM.&lt;br&gt;
– React.js project will consume the Nodejs CRUD RestAPIs by Ajax then show up on Reactjs component’s views.&lt;/p&gt;

&lt;h2&gt;
  
  
  List to do:
&lt;/h2&gt;

&lt;p&gt;– I draw a fullstack overview Diagram Architecture from React.js Frontend to MongoDB database through Nodejs RestAPI backend.&lt;br&gt;
– Develop Nodejs CRUD RestAPIs with the supporting of Mongoose ODM.&lt;br&gt;
– Implement Reactjs CRUD application with Ajax fetching APIs to do CRUD request (Post/Get/Put/Delete) to Nodejs Backend APIs.&lt;br&gt;
– I create a testsuite with a number of integrative testcases with CRUD RestAPI requests from Reactjs to do CRUD requests to Nodejs RestAPIs Server and save/retrieve data to MongoDB database.&lt;/p&gt;

&lt;h2&gt;
  
  
  Overall Architecture System: Reactjs + Nodejs + MongoDB
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Floizenai.com%2Fwp-content%2Fuploads%2F2020%2F11%2FReact.js-Nodejs-MongoDB-Diagram-Architecture.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Floizenai.com%2Fwp-content%2Fuploads%2F2020%2F11%2FReact.js-Nodejs-MongoDB-Diagram-Architecture.png" alt="Reactjs + Nodejs + MongoDB system"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We build a backend: Nodejs CRUD Application with MongoDB that provides RestAPIs for POST/GET/PUT/DELETE data entities and store them in MongoDB database.&lt;/li&gt;
&lt;li&gt;We implement React.js CRUD Application that use Ajax to interact (call/receive requests) with Nodejs CRUD application and display corresponding data in Reactjs Component.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Nodejs MongoDB CRUD Design Application
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Floizenai.com%2Fwp-content%2Fuploads%2F2020%2F11%2FNodejs-MongoDB-CRUD-Example.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Floizenai.com%2Fwp-content%2Fuploads%2F2020%2F11%2FNodejs-MongoDB-CRUD-Example.png" alt="Nodejs MongoDB CRUD Design Application"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We have 4 main blocks for the application:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;For building RestAPIs in Nodejs application, we use Express framework.&lt;/li&gt;
&lt;li&gt;For interacting with database MongoDB, we use Mongoose ODM.&lt;/li&gt;
&lt;li&gt;We define APIs URL in router.js file&lt;/li&gt;
&lt;li&gt;We implement how to process each API URL in controller.js file&lt;/li&gt;
&lt;li&gt;We use Bootstrap and JQuery Ajax to implement frontend client.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reactjs CRUD Application Design
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Floizenai.com%2Fwp-content%2Fuploads%2F2020%2F11%2FReactjs-CRUD-RestAPI-Application-Frontend-Architecture-Diagram-4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Floizenai.com%2Fwp-content%2Fuploads%2F2020%2F11%2FReactjs-CRUD-RestAPI-Application-Frontend-Architecture-Diagram-4.png" alt="Reactjs CRUD Application design"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;React.js components let you split the UI into independent, reusable pieces, and think about each piece in isolation.&lt;/li&gt;
&lt;li&gt;Ajax is used by Reactjs component to fetch (post/put/get/delete) data from remote restapi by http request&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Reactjs CRUD Application defines 5 components:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Home.js is used serve as the landing page for your app.&lt;/li&gt;
&lt;li&gt;AppNavbar.js is used to establish a common UI feature between components.&lt;/li&gt;
&lt;li&gt;CustomerList.js is used to show all customers in the web-page&lt;/li&gt;
&lt;li&gt;CustomerEdit.js is used to modify the existed customer&lt;/li&gt;
&lt;li&gt;App.js uses React Router to navigate between components.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Integrative Project Goal
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Floizenai.com%2Fwp-content%2Fuploads%2F2020%2F11%2FProject-Goal-Customer-List-3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Floizenai.com%2Fwp-content%2Fuploads%2F2020%2F11%2FProject-Goal-Customer-List-3.png" alt="Integrative Project Goal"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Tutorial: &lt;a href="https://loizenai.com/reactjs-nodejs-mongodb-crud/" rel="noopener noreferrer"&gt;Reactjs Nodejs MongoDB CRUD Example&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Related posts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/reactjs-crud-firebase-realtime-database-example" rel="noopener noreferrer"&gt;Reactjs CRUD Firebase Realtime Database Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://grokonez.com/reactjs-jwt-authentication-example" rel="noopener noreferrer"&gt;Reactjs JWT Authentication Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://loizenai.com/reactjs-nodejs-postgresql-example/" rel="noopener noreferrer"&gt;Reactjs Nodejs PostgreSQL Example&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://loizenai.com/reactjs-nodejs-mongodb-crud/" rel="noopener noreferrer"&gt;Reactjs Nodejs MongoDB CRUD Example – MERN Stack Application&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>react</category>
      <category>node</category>
      <category>mongodb</category>
      <category>crud</category>
    </item>
  </channel>
</rss>
