<?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: ABHISHEK KUMAR</title>
    <description>The latest articles on DEV Community by ABHISHEK KUMAR (@hypermatrix).</description>
    <link>https://dev.to/hypermatrix</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%2F390483%2F67680035-03d3-402d-8211-dc5440f83a3d.png</url>
      <title>DEV Community: ABHISHEK KUMAR</title>
      <link>https://dev.to/hypermatrix</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/hypermatrix"/>
    <language>en</language>
    <item>
      <title>Object-Oriented Programming</title>
      <dc:creator>ABHISHEK KUMAR</dc:creator>
      <pubDate>Sun, 29 Nov 2020 16:15:05 +0000</pubDate>
      <link>https://dev.to/hypermatrix/object-oriented-programming-4cmk</link>
      <guid>https://dev.to/hypermatrix/object-oriented-programming-4cmk</guid>
      <description>&lt;p&gt;Most of you might have heard the term Object-Oriented Programming while trying to learn a programming language. So, what exactly is this thing? Is it of any importance? Do we even need Object Oriented programming? Let's take a look into this.&lt;/p&gt;

&lt;center&gt;&lt;h3&gt;Various Programming Paradigms&lt;/h3&gt;&lt;/center&gt;




&lt;p&gt;Paradigm basically refers to a way of doing things. A programming paradigm defines the methodology of designing and implementing programs using the key features and other building blocks (such as key-words, etc.) of a programming language. So, a programming paradigm would give you an idea about the logic of a program i.e. how problems are generally analyzed and solved in a particular programming language.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmiro.medium.com%2Fmax%2F5514%2F1%2AAuy48pC39ps3AXEk-9WseA.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%2Fmiro.medium.com%2Fmax%2F5514%2F1%2AAuy48pC39ps3AXEk-9WseA.png"&gt;&lt;/a&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
So, why did I talk about programming paradigms because this is where the concept and idea of Object-Oriented programming begins. Object-Oriented Programming (commonly known as OOP) or Procedural Oriented Programming(commonly known as POP) are nothing but different paradigms. So, let's take a look into what these two things namely OOP and POP actually mean.&lt;/p&gt;

&lt;center&gt;&lt;h3&gt;Procedural Programming&lt;/h3&gt;&lt;/center&gt;



&lt;p&gt;Procedural Programming is a type of programming paradigm that lays more emphasis on procedure rather than on data. Procedural programming is basically used in programming languages such as c, Fortran, Pascal, etc.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Some advantages of Procedural programming paradigms are - &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;It is highly structured&lt;/li&gt;
  &lt;li&gt;It makes it easy to keep a track of program flow&lt;/li&gt;
  &lt;li&gt;It is quite simple and easy to implement&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The procedural programming paradigm separates the functions and data manipulated by them. Now, this leads to many problems when it comes to extending software or maintaining software. This is explained as follows - &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Procedural programming is susceptible to design changes&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For example, take a look at this code snippet -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;  &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nc"&gt;employer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the members of the structure can be manipulated within the program as -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;  &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;reademployee&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;employer&lt;/span&gt; &lt;span class="n"&gt;e1&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
  &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Enter id"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;cin&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;e1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;empid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Enter Name"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;gets&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;e1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Enter post"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="n"&gt;cin&lt;/span&gt;&lt;span class="o"&gt;&amp;gt;&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;e1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now if due to some reasons the structure employee needs to be changed and a new member employee number needs to be added -&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;  &lt;span class="k"&gt;struct&lt;/span&gt; &lt;span class="nc"&gt;employer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empno&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now the manipulating function reademployee also needs to be rewritten. So, this is where it becomes hectic. Now imagine a program having huge numbers of structures and functions modifying them. Every time the structure is modified the respective functions modifying them are needed to be changed.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt; Also procedural programming leads to increased time and cost overheads during design changes.&lt;/li&gt;
&lt;/ul&gt;

&lt;center&gt;&lt;h3&gt;Object Oriented Programming&lt;/h3&gt;&lt;/center&gt;



&lt;p&gt;&lt;em&gt;""Object-oriented programming (OOP) is a programming paradigm based on the concept of "objects", which can contain data and code: data in the form of fields (often known as attributes or properties), and code, in the form of procedures (often known as methods).""&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;-Wikipeida&lt;/p&gt;

&lt;p&gt;Object-oriented programming gives more emphasis on objects. In OOP data and its associated functions are enclosed within a single entity - a class. Some benefits of OOP are - &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Object based programming localizes the implementation details&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Object-oriented programming is a lot helpful when it comes up to the point of localization of implementation details. Let's take a look-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;employer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empno&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nl"&gt;public:&lt;/span&gt;
        &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;reademployee&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;removeemployee&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Don't get confused between a structure and a class. If you don't know the differences between a structure and a class. A class is basically a structure and it can even hold functions in it. And only declarations under public make the user interface. That's all that you need to know for now about structure and classes.&lt;br&gt;
So, by now you might have the above code snippet similar to the one we had discussed in POP. The only difference being the member functions being present inside the class. Now, let me show you the beauty of OOP.&lt;/p&gt;

&lt;p&gt;What if you need to add another field salary to class employer? Let's do it-&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;  &lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;employer&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empid&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;name&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="kt"&gt;char&lt;/span&gt; &lt;span class="n"&gt;post&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empno&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;salary&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;public:&lt;/span&gt;
        &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;reademployee&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
        &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;removeemployee&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So as you can see changes have been made to the class employer but what's the difference. The difference is the fact that the user would never know about the new field that has been added as the user can only view the public part. But now what about the function definitions, is it required to change them as well? Yes, it is necessary but now the point being that the changes are now localized to the definition of the changed function and the user cannot see them.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;OOP overcomes most shortcoming and drawbacks of POP&lt;/li&gt;
  &lt;li&gt;OOP supports user-defined types&lt;/li&gt;
  &lt;li&gt;OOP implements information hiding and abstraction,etc.&lt;/li&gt;
&lt;/ul&gt;

&lt;center&gt;&lt;h3&gt;Basic concepts of OOP&lt;/h3&gt;&lt;/center&gt;




&lt;p&gt;The general concepts of OOP are - &lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;Data Abstraction&lt;/li&gt;
  &lt;li&gt;Data Encapsulation&lt;/li&gt;
  &lt;li&gt;Modularity&lt;/li&gt;
  &lt;li&gt;Inheritance&lt;/li&gt;
  &lt;li&gt;Polymorphism&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But before dicussing the basic concepts lets take a look into what classes and objects are. Why are we discussing them? This is because of the fact which i mentioned earlier i.e. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;In OOP data and its associated functions are enclosed within a single entity - a class.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;Objects:-&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;""An object is an identifiable entity with some characteristics and behaviour""&lt;/em&gt;&lt;/p&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%2Fraw.githubusercontent.com%2Fandrejrs%2FObject-Oriented-PHP%2Fmaster%2Fimages%2FWordane-OOP-car-class-eg-2.jpg" 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%2Fraw.githubusercontent.com%2Fandrejrs%2FObject-Oriented-PHP%2Fmaster%2Fimages%2FWordane-OOP-car-class-eg-2.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To understand objects more clearly let's consider an example- Let's say a car is an object. So, we can say its characteristics are - It's green, It's a Ford Mustang and runs on gasoline. Similarly, Objects are an entity that store data, have some characteristics and behaviour.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;h3&gt;Class:-&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;""A class is a group of objects that share common properties and relationships""&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Let's consider the above example of objects. The different models Ford mustang, Toyota prius, Volkswagon polo are nothing but are different models of CARS. So, all these models of cars or what we can say Objects that share common properties are grouped under CARS or what we can say a class.&lt;/p&gt;

&lt;p&gt;&lt;br&gt;&lt;br&gt;
Now let's discuss the basic concepts of OOP-&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;h3&gt;Data Abstraction:-&lt;/h3&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;""Abstraction refers to the act of representing essential features without including the background details or explanations""&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;So, data abstraction is all about acknowledging the user with the necessary details required. Let's consider an example -&lt;/p&gt;

&lt;p&gt;&lt;a href="https://imgbb.com/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2FSQknbzG%2Fabstraction.jpg" alt="abstraction"&gt;&lt;/a&gt;&lt;br&gt;&lt;/p&gt;

&lt;p&gt;What do you enquire about when you buy a vehicle? Of course, you want to know the specifications of the vehicle like model, size, color, etc. But do you ever enquire any details such as wiring, motor working, etc. ?. This is what data abstraction actually means. The user only sees the essential things, and the other things that are not required by the user are hidden.&lt;/p&gt;



&lt;ul&gt;
  &lt;li&gt;&lt;h3&gt;Encapsulation:-&lt;/h3&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;""The wrapping up of data and operations/functions (that operate on the data) into a single unit (called class) is known as Encapsulation""&lt;/em&gt;&lt;/p&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%2Fmiro.medium.com%2Fmax%2F559%2F1%2ACLBzWEo22SXvh-0dT3eV_w.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%2Fmiro.medium.com%2Fmax%2F559%2F1%2ACLBzWEo22SXvh-0dT3eV_w.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Encapsulation is the way of combining both data and the functions that operate on data under a single unit. Encapsulation can be best described by the diagram beside- the capsule is basically interpreted as a class containing or encapsulating different members and member functions. &lt;br&gt;
Now, you may wonder what's the difference between data abstraction and encapsulation? The answer is simple - Encapsulation is a way to implement data abstraction. Encapsulation hides the details of the implementation of an object.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;h3&gt;Modularity:-&lt;/h3&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;""Modularity is the property of a system that has been decomposed into a set of cohesive and loosely coupled modules""&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://imgbb.com/" rel="noopener noreferrer"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.ibb.co%2F12CsXpc%2Fimage006.jpg" alt="image006"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Modularity is basically the act of partitioning a program into individual components. The advantages of modularity are - &lt;/p&gt;

&lt;ol&gt;
  &lt;li&gt;It reduces the complexity to some extent&lt;/li&gt;
  &lt;li&gt;It creates a number of well-defined boundaries within the program&lt;/li&gt;
  &lt;/ol&gt;

&lt;p&gt;Let's consider an example to understand it better. You might have come across an e-commerce website. So if we consider the basic structure of an e-commerce website, the website basically has a cart where you can add your products, and then after that either you can search for more products, or go for shipping and payment of the products. Now, searching, shipping, and payments within themselves are 3 different independent units but yet they are subparts of the e-commerce website. This is what modularity actually is. The program similarly can be divided into different modules.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;h3&gt;Inheritance:-&lt;/h3&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;""Inheritance is the capability of one class of things to derive capabilities or properties from another class""&lt;/em&gt;&lt;/p&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%2Fmiro.medium.com%2Fmax%2F5536%2F1%2ACaTNbDiboMzEXuBB2AaDjg.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%2Fmiro.medium.com%2Fmax%2F5536%2F1%2ACaTNbDiboMzEXuBB2AaDjg.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Inheritance is one of the major concepts of OOP. So, let us try to understand what inheritance actually is- &lt;br&gt;
As you can see in the diagram, it's kind of a simple graph to represent what comes under what!! Let's try understanding it from the base of the graph. What do mobile phones and cord phones come under? or we could say what they actually are? Simple they both are nothing but types of phones. Similarly, what are earpods, earphones, music players, stereos, etc? Simple they are different sound systems. Now, what are phones and sound systems?? It's more simple they are different electronic gadgets or electronic items. So, this is what the basic concept of inheritance is. So, if we consider this in terms of classes, Phones, and sound systems inherit some properties of the class electronic items. Mobile phones, cord phones, in turn, inherit some properties of the class Phones and Music players, earpods, etc. inherit some properties of the class Sound systems. &lt;/p&gt;



&lt;p&gt;Inheritance is a powerful way of passing down properties. So, in terms of inheritance Electronics Items class is the base class, and phones, sound systems are the inherited class.&lt;br&gt;
&lt;br&gt;&lt;/p&gt;

&lt;p&gt;So, &lt;strong&gt;Base Class&lt;/strong&gt; is a class from which different classes inherit their properties, and &lt;strong&gt;Inherited class&lt;/strong&gt; is a class that derives its properties from the &lt;strong&gt;Base class&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;The below classification of the above example in terms of base and inherited class will make the concept of base and inherited classes clear for you.&lt;/p&gt;

&lt;p&gt;1.Electronic Items - Base class for Phones and sound systems &lt;br&gt;
2.Phones - Base class for mobile phones, cord phones, and inherited class of Electronic Items.&lt;br&gt;
3.Sound systems - Base class for music systems, Earpods, etc., and inherited class of Electronic Items.&lt;br&gt;
4.Mobile phones and cord phones - Inherited class of Phones.&lt;br&gt;
5.Music Systems, earpods, etc. - Inherited class of Sound Systems.&lt;/p&gt;

&lt;ul&gt;
  &lt;li&gt;&lt;h3&gt;Polymorphism:-&lt;/h3&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;""Polymorphism is the ability for a message or data to be processed in more than one form""&lt;/em&gt;&lt;/p&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%2Fdata-flair.training%2Fblogs%2Fwp-content%2Fuploads%2Fsites%2F2%2F2018%2F02%2Fpolymorphism-in-Java-1200x900.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%2Fdata-flair.training%2Fblogs%2Fwp-content%2Fuploads%2Fsites%2F2%2F2018%2F02%2Fpolymorphism-in-Java-1200x900.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What does 10+6 result in 16 but what does A+BC result in? Yes, you are right it's ABC. Now as you can see the "+" operator easily distinguishes between the two operations namely addition and concatenation. This is what polymorphism is. In programming, we can see that a single function for e.g. a function to read area - area() can take up different types of arguments like - area(circle), area(square), area(rectangle), etc.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
Below is a complete program illustrating the implementation of OOP concepts.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight cpp"&gt;&lt;code&gt;&lt;span class="cp"&gt;#include&lt;/span&gt; &lt;span class="cpf"&gt;&amp;lt;iostream&amp;gt;&lt;/span&gt;&lt;span class="cp"&gt;
&lt;/span&gt;
&lt;span class="k"&gt;using&lt;/span&gt; &lt;span class="k"&gt;namespace&lt;/span&gt; &lt;span class="n"&gt;std&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Employer&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nl"&gt;private:&lt;/span&gt;     &lt;span class="c1"&gt;//Data abstraction,Encapsulation, Data Hiding&lt;/span&gt;
            &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empid&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1234432&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empno&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;empname&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Abhishek"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;public:&lt;/span&gt;
            &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
                &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Name:"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;empname&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"ID:"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;empid&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Employer No:"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;empno&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="k"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;SubEmployer&lt;/span&gt;&lt;span class="o"&gt;:&lt;/span&gt;&lt;span class="n"&gt;Employer&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;         &lt;span class="c1"&gt;//Inheritance&lt;/span&gt;
    &lt;span class="nl"&gt;private:&lt;/span&gt;                        
            &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empid1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;12342232&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;empno1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;empname1&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s"&gt;"Trideep"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

    &lt;span class="nl"&gt;public:&lt;/span&gt;
            &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="n"&gt;detailsFinal&lt;/span&gt;&lt;span class="p"&gt;(){&lt;/span&gt;
                &lt;span class="n"&gt;details&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
                &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Name:"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;empname1&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"ID:"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;empid1&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
                &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Employer No:"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;empno1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;poly&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;                                  &lt;span class="c1"&gt;//Polymorphism using function overloading&lt;/span&gt;
                &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Used function poly in one way:"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;poly&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;double&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
                &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Used function poly in another way:"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;
            &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;poly&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;string&lt;/span&gt; &lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="p"&gt;){&lt;/span&gt;
                &lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Used function poly in yet another way:"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="n"&gt;x&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
            &lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="p"&gt;};&lt;/span&gt;
&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="c1"&gt;//Driver Function&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="n"&gt;SubEmployer&lt;/span&gt; &lt;span class="n"&gt;emp&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;emp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;detailsFinal&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="n"&gt;cout&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"Illustrated Polymorphism using Function overloading"&lt;/span&gt;&lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\n&lt;/span&gt;&lt;span class="s"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="n"&gt;emp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;poly&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;emp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;poly&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mf"&gt;7.8&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="n"&gt;emp&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;poly&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"Polymorphism"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, this it. Hope you have now developed a good understanding of the OOP concept. Comment down below if you liked this blog.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Android App Development, IOS App Development &amp; Cross-Platform App Development(React Native) - Which one to choose? </title>
      <dc:creator>ABHISHEK KUMAR</dc:creator>
      <pubDate>Sun, 31 May 2020 10:09:45 +0000</pubDate>
      <link>https://dev.to/hypermatrix/android-app-development-ios-app-development-cross-platform-app-development-react-native-which-one-to-choose-1kp2</link>
      <guid>https://dev.to/hypermatrix/android-app-development-ios-app-development-cross-platform-app-development-react-native-which-one-to-choose-1kp2</guid>
      <description>&lt;p&gt;Application development is quite popular nowadays and of course who wouldn't like to develop a real time working application that works on an Android or IOS device. Even webapps nowadays are gaining quite popularity, but let's keep that aside for a moment.&lt;/p&gt;

&lt;p&gt;I have been learning React native for a while for developing cross platform applications. I have been quite familiar with developing Android apps using Java and Kotlin in Android studio as well as IOS apps using Swift in XCODE.&lt;/p&gt;

&lt;p&gt;Now developing cross platform apps ,and developing apps for respective Operating systems has its own advantages as well as disadvantages. So, let's take a look into that.&lt;/p&gt;

&lt;p&gt;I would like to tell you the benefits of each development procedure rather than performing a versus competition between these.&lt;/p&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcypxyveyv6sm5l14ztit.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcypxyveyv6sm5l14ztit.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;h1&gt;CROSS-PLATFORM APP DEVELOPMENT&lt;/h1&gt;&lt;/center&gt;




&lt;p&gt;So, I used React-Native for developing apps. And talking about my experience it was good, i liked it a lot. So, what actually is React-native ?&lt;/p&gt;

&lt;p&gt;&lt;em&gt;""React Native is an open-source mobile application framework created by Facebook. It is used to develop applications for Android, iOS,and Web  by enabling developers to use React along with native platform capabilities.""&lt;/em&gt;-Wikipedia&lt;/p&gt;

&lt;p&gt;So, feels great, right? A single framework that develops Android, IOS as well as Webapps. So, is this the idle choice for app developers?Let's take a look into it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h1&gt;
  
  
  Advantages-
&lt;/h1&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;Single code for developing apps for different platforms-
&lt;/h3&gt;
&lt;/li&gt;
&lt;/ul&gt; 

&lt;p&gt;Yes it does make it easy, using simple codes in javascript and JSX (Javascript XML) does make it easier to code apps. I found the codes to be quite simpler and i didn't require much effort to access various components and portions. While using Java/Kotlin i found myself messed up at certain types trying to access different objects from different classes and as everything in Java is based on classes it does become hectic at times.But comparing this to swift yes it wasn't that difficult. I found the code difficulty level of React-Native and Swift to be quite same, but java and kotlin were at a quite higher level as considered in terms of code difficulty.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;Layout-
&lt;/h3&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now it hugely matters how beautiful your app looks. And i strongly feel the User interface of the app is what makes it so beautiful. Regarding this i feel React native has an upper hand above native development. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxg16q42jntnugmo6zqcv.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fxg16q42jntnugmo6zqcv.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
React native will provide you with a lot of options to make your app beautiful. Using libraries such as REACT NATIVE PAPER apps get a beautiful native look. Now if taken a look into native development, can't apps be given such a beautiful look?&lt;br&gt;
The answer is yes it is possible but yet difficult. Designing is quite easier is what i found while using react native,rather than native app development. The best part about react native is that creating animation for different components of your app is far more easier than in native development. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;Other basic advantages-
&lt;/h3&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;-Highly time saving since you need to work on a single codebase.&lt;br&gt;
-Faster app building&lt;br&gt;
-Responsive UI&lt;/p&gt;

&lt;h4&gt;
  
  
  Another advantage which i often notice is the fast reload....it basically is a feature which reloads your phone to view the changes in your app immediately. Unlike native android development, you don't have to build the app again and again to view the changes and of course it gets included under the time saving advantage of react native.
&lt;/h4&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdl5b06wn3fpdz7x2hwha.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdl5b06wn3fpdz7x2hwha.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Another important advantage of React native is that you can work on it on a low end PC or laptop. Generally in native development you will need Android studio or XCODE which requires a good PC/Laptop to work upon, and the worst thing you can run XCODE only in a MAC (Bad apple, very bad apple). And then comes the simulator part IOS simulators require the hell lot of memory out of your laptop/PC, and the same goes for Android. For someone using a AMD processor laptop its more hectic.
&lt;/h4&gt;

&lt;blockquote&gt;
&lt;h1&gt;
  
  
  Disadvantages-
&lt;/h1&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;Average Documentation -
&lt;/h3&gt;
&lt;/li&gt;
&lt;/ul&gt;
 

&lt;p&gt;Being a coder documentation is something one does refer to most of the times ,once he/she has learnt the basics. And what i observed was that React native has a average documentation. I also took a look into flutter but i wasn't much impressed but thats my own opinion after all. But talking about documentation of native app development, cross platform stands no chance against it. Not only they have sufficient examples but also their documentation is brief and well explained.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;Third Party Dependency-
&lt;/h3&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;React native tho has its own libraries of widgets they are not sufficient. Rather what i observed was the fact that React native depends a lot on third party libraries , which may be good for some and bad for some. Comparing this to native development, their widget collection is vast and are highly customizable. Another thing to note is that customizability of react native components (Own/ Third party) is sometimes limited. Also you have to install packages for different libraries when you need them which is not the case most of the times in Native development.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;Layout-
&lt;/h3&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Wait! i just said that react native has an upper hand in terms of layout, then why in the world am i including it here? Its due to the fact that IOS and Android have their own design rules and regulations. You will become more clear about this as you see the below picture.&lt;/p&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbowz5sm96s9tqkbijgtd.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbowz5sm96s9tqkbijgtd.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Airbnb has its own design guidelines so even if the app is based on React native, developers have to edit its code regarding the layout. But this is not the case in native development since their default UI elements follow all OS and design guidelines.&lt;br&gt;
Also most of the times you will observe just building the apk or ipk or web modules of the React native app wont make it work out. You will often face designing and aligning issues in different platforms. So, even if the codebase remains the same, you will have to edit out the layouts and designs in Xcode / Android studio in order to make them work in different platforms.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;h3&gt;CONFUSION-
&lt;/h3&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;One big confusion which I faced was whether Cross platforms could produce IOS apps on windows. Being a windows user and I always wanted to produce IOS apps on windows. So, I thought cross platforms would help me for the same. But if you are new to application development, it will be quite good for you to note that React native produces the same codebase for all platforms but in order to build them, you will have to follow their way. Basically I mean you can't produce IOS apps without a MAC. The only way I found was to run MAC OS on VMware and then use Xcode to get my job done.&lt;br&gt;
Wait why don't I just simply get a MAC to get my job done? Simple answer, I belong to a middle class family, so I can't afford one(#SYMPATHY for me).&lt;/p&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F22bvf3hfnv5s12bau658.jpg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F22bvf3hfnv5s12bau658.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;&lt;h1&gt;NATIVE APP DEVELOPMENT&lt;/h1&gt;&lt;/center&gt;




&lt;p&gt;Ok so coming towards native app development. I generally use Java and Kotlin in Android studio for android apps and Swift plus Xcode for IOS apps.&lt;br&gt;
So, lets directly get to the point, i have already explained a lot of advantages that natives have over cross platforms in disadvantages of react native and disadvantages of native development in advantages of react native. So , here i will discuss in general what are some more advantages and disadvantages of Native app development.&lt;/p&gt;

&lt;p&gt;Ever heard about storyboards? Ahh i love them, a lot. They just make my work so easy. So what basically is a storyboard?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;""A storyboard is a visual representation of the user interface of an iOS application, showing screens of content and the connections between those screens. A storyboard is composed of a sequence of scenes, each of which represents a view controller and its views; scenes are connected by segue objects, which represent a transition between two view controllers.""&lt;/em&gt;&lt;/strong&gt;&lt;/p&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3quaz19i5m7sbl5o60j6.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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3quaz19i5m7sbl5o60j6.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So, storyboards in Xcode will give you a brief idea about your app and this is something Xcode/ native development specifically native IOS development has an upper hand over cross platform development. So this takes me to my next point-&lt;/p&gt;

&lt;p&gt;In Native app development you can make the most out your respective OS. If you develop android apps then native android development will allow you access to most of the features of a Android device like GPS,bluetooth etc and the same goes for IOS app developers but this is not the case for cross platforms. Their access is limited.&lt;/p&gt;

&lt;p&gt;Now if you come from a background of a Android app developer using native development then you will find it quite familiar to work with JSX which is the layout format of React native since native development uses XML. But if you develop apps for IOS you will find it quite difficult to switch to React native.&lt;/p&gt;

&lt;center&gt;&lt;h1&gt;CONCLUSION&lt;/h1&gt;&lt;/center&gt;




&lt;p&gt;So, we are at the end. So, by now you would be wondering which is good cross platforms or Native Development? The answer solely depends upon your need. Every form of development have made their sacrifices in order to achieve their aim. Cross platforms may not be that easy, may have limitations but they do achieve their aim that is what they are named!! They do provide a single codebase. On the other hand native development might not be that responsive and flexible but they do achieve their aim that is to get their apps get the best out of their respective OS.&lt;/p&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcgqylz22jsjppvluykmi.jpg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcgqylz22jsjppvluykmi.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If you are still wondering about which development way is better do take a look into a real life example i.e. Telegram and instagram. While instagram uses React native, Telegram uses Native app development and is developed using Java. So you might be using these apps now on a daily basis as they are too popular so this will give you an idea about both the development methods. You will ofcourse find that both of the apps have quite good and beautiful UI/UX. So this does show the fact that no development language is better than the other one, every development platform has its own benefits and advantages. So, in the end it all comes to you, which suits you cross platform development/native development.&lt;br&gt;
I have also made some good beautiful User responsive apps using both native development as well as cross platform development.Do take a moment to check them out-&lt;/p&gt;

&lt;p&gt;Native development :- &lt;a href="https://github.com/Hyper-Matrix/CORONA-DETECTOR" rel="noopener noreferrer"&gt;https://github.com/Hyper-Matrix/CORONA-DETECTOR&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Cross platform development :-&lt;a href="https://github.com/Hyper-Matrix/RESTAURANT-APP" rel="noopener noreferrer"&gt;https://github.com/Hyper-Matrix/RESTAURANT-APP&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Choosing a development platform isn't that difficult just try to identify what prerequisites do you need for learning to develop apps in natives or in cross platforms and tadaa you have your answer. If you know Java and have a windows machine, Android app development using Android studio is the best option for you. If you come from the background of web development then React native will work like a charm for you. And if you have a MAC, swift is damn easy to learn and you own a beast so developing an IOS app in Xcode will be beneficial for you.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;So, this was my first technical post. If you find me wrong at any point do tell me in the comments below. And do share your views i would love to hear them.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And yes regarding who won the battle between Cross platform Development and Native app development....THERE WAS NEVER A BATTLE BETWEEN THEM AT ALL......&lt;/p&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcnivtc7qkhatnldbpvgo.jpg" 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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fcnivtc7qkhatnldbpvgo.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;center&gt;__*THANK YOU*__&lt;/center&gt;

</description>
      <category>android</category>
      <category>ios</category>
      <category>reactnative</category>
      <category>beginners</category>
    </item>
    <item>
      <title>CORONA DETECTOR</title>
      <dc:creator>ABHISHEK KUMAR</dc:creator>
      <pubDate>Wed, 20 May 2020 10:45:40 +0000</pubDate>
      <link>https://dev.to/hypermatrix/corona-detector-5i8</link>
      <guid>https://dev.to/hypermatrix/corona-detector-5i8</guid>
      <description>&lt;p&gt;I made this project to aid a little to corona virus pandemic. I used react native to build the web as well as the android app. It was kind of a simple app that takes in input of the Country and shows different cases and parameters related to the virus in that country. I used an API from RAPID-API and integrated it in my app. React-native-paper was used to give a native design to the app.&lt;br&gt;
I also build an app named CORONA detector using Android studio and java for Android OS, that helps an user detect whether he/she is affected by the virus by asking simple questions. The points awarded to  answer each question was taken from the WHO website and a cumulative percentage was taken out.&lt;/p&gt;

&lt;p&gt;link to my repo- native app-&lt;a href="https://github.com/Hyper-Matrix/COVID-19-NATIVE-APP"&gt;https://github.com/Hyper-Matrix/COVID-19-NATIVE-APP&lt;/a&gt;&lt;br&gt;
-android app- &lt;a href="https://github.com/Hyper-Matrix/CORONA-DETECTOR"&gt;https://github.com/Hyper-Matrix/CORONA-DETECTOR&lt;/a&gt;&lt;/p&gt;

</description>
      <category>android</category>
      <category>reactnative</category>
    </item>
  </channel>
</rss>
