<?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: Sualeh Muhammad</title>
    <description>The latest articles on DEV Community by Sualeh Muhammad (@sualehfarooq).</description>
    <link>https://dev.to/sualehfarooq</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%2F966344%2F84e96a88-506e-4176-b284-1f7f7723502f.jpeg</url>
      <title>DEV Community: Sualeh Muhammad</title>
      <link>https://dev.to/sualehfarooq</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sualehfarooq"/>
    <language>en</language>
    <item>
      <title>Library Vs FrameWork</title>
      <dc:creator>Sualeh Muhammad</dc:creator>
      <pubDate>Wed, 09 Nov 2022 20:59:10 +0000</pubDate>
      <link>https://dev.to/sualehfarooq/library-vs-framework-4i63</link>
      <guid>https://dev.to/sualehfarooq/library-vs-framework-4i63</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;LIBRARY&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A library is a collection of prewritten code that can be used to simplify tasks. The term library simply refers to a collection of code that is reused repeatedly. It is essentially a set of pre-defined functions and classes that programmers can use to simplify their work and speed up the development process. So, developers do not have to write code to accomplish specific functionality because the library already includes code for those functionalities.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;FRAMEWORK&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A framework is like the foundation upon which developers build applications for specific platforms. It includes reusable pieces of code written to perform common tasks and uses code provided by a developer for custom functionality. The framework may include defined and undefined objects and functions that developers can use to create applications. In that way, we can add significant functionality to the system by using existing code around the structure. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1sVjj5_K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22qpjoydz2y9gx3ddbj6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1sVjj5_K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/22qpjoydz2y9gx3ddbj6.png" alt="Image description" width="880" height="429"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Differences Between Them&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;u&gt;*&lt;em&gt;Collection *&lt;/em&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Generally, libraries are a collection of helper modules, objects, classes, functions, message templates, pre-written code, etc.&lt;/p&gt;

&lt;p&gt;Frameworks consist of a lot of APIs, compilers, toolsets, support programs, libraries, etc.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Code Modification&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Codes in libraries are geared toward a particular program or to solve a specific development problem. Therefore, developers must modify library code to meet their needs.&lt;/p&gt;

&lt;p&gt;Despite the fact that frameworks generate new codes for developers. These codes cannot be altered or modified later. Unlike libraries, frameworks do not allow users to modify their pre-written codes, so you don’t have to worry about deleting or changing them.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Performance&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Less code is required to build libraries, which leads to faster loading times and better performance.&lt;/p&gt;

&lt;p&gt;Developing a framework requires a lot of coding, which increases loading times and decreases performance.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Function&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;In Library program linking and binding process, they play an important role.&lt;/p&gt;

&lt;p&gt;you can build and deploy applications in a standard way as the framework already provides code to perform common tasks and uses code provided by a developer&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Benefits&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Library ()=&amp;gt; {&lt;br&gt;
Good code quality, reusability, and control, enhanced speed and performance of the program, etc.&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;FrameWork ()=&amp;gt; {&lt;br&gt;
Faster programming, support from the community, great support for MVC (Model View Controller) pattern, etc.&lt;br&gt;
}&lt;/p&gt;

</description>
      <category>library</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>What is React ?</title>
      <dc:creator>Sualeh Muhammad</dc:creator>
      <pubDate>Wed, 09 Nov 2022 19:49:49 +0000</pubDate>
      <link>https://dev.to/sualehfarooq/what-is-react--kl</link>
      <guid>https://dev.to/sualehfarooq/what-is-react--kl</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--601AQdE_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g55wer2s2a4pi3zggson.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--601AQdE_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/g55wer2s2a4pi3zggson.jpg" alt="Image description" width="880" height="587"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Today, front-end frameworks and libraries are becoming an essential part of the modern web development stack. React.js is a front-end library that has gradually become the go-to framework for modern web development within the JavaScript community.&lt;/p&gt;

&lt;p&gt;The React.js framework is an open-source JavaScript framework and library developed by Facebook. It’s used for building interactive user interfaces and web applications quickly and efficiently with significantly less code than you would with vanilla JavaScript.&lt;/p&gt;

&lt;p&gt;React allows developers to use individual parts of their application on both the client and server sides, and any changes they make will not affect the application’s logic. This makes the development process extremely fast. The use of HTML tags and JS codes makes it easy to work with a huge dataset containing DOM. &lt;/p&gt;

&lt;p&gt;React acts as an intermediary that represents the DOM and helps you decide which component requires changes to get accurate results.React is incredibly user-friendly and makes any UI interactive. It also allows you to quickly and efficiently build applications, which is time-saving for clients and developers alike. One-way data-binding in react implies that absolutely anyone can trace all the changes that have been made to a segment of the data.  This is also one of the reasons that makes React so easy.&lt;/p&gt;

</description>
      <category>react</category>
      <category>reactnative</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Difference Between SPA vs MPA - Single Page Application vs Multiple Page Application</title>
      <dc:creator>Sualeh Muhammad</dc:creator>
      <pubDate>Wed, 09 Nov 2022 19:35:01 +0000</pubDate>
      <link>https://dev.to/sualehfarooq/difference-between-spa-vs-mpa-single-page-application-vs-multiple-page-application-3o39</link>
      <guid>https://dev.to/sualehfarooq/difference-between-spa-vs-mpa-single-page-application-vs-multiple-page-application-3o39</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;SPA - Single Page Application&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;A single-page application is a more modern approach to app development. Single Page application is application that allows you to work inside a browser &amp;amp; does not require any reloading while fetching data. SPA has a dynamic nature of loading so instead of render new page , server just send you your required data. The SPA wil use that data to render some part of page directly to browser.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;MPA - Multiple Page Application&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;When MPAs react to your input or has to display some new content, it requests a new HTML page from the server. After receiving the markup, the browser renders the new page causing it to reload.The multi-page design pattern requires a page reload every time the content changes. It’s a preferred option for large companies with extensive product portfolios, such as e-commerce businesses.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Which One to Choose ? SPA vs MPA .&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--M6pdO1TO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b8ckdn2aci9hu43x6h7c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--M6pdO1TO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b8ckdn2aci9hu43x6h7c.jpg" alt="Image description" width="880" height="534"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;SEO - Search Engine Friendly&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;MPAs will be far more SEO friendly than SPAs that's because MPA can be used to create multiple pages which mean you can target a  greater numbers of keywords. &lt;/p&gt;

&lt;p&gt;SPAs are also technically not quite well adapted to the way search engines work. JavaScript, in which SPAs are developed, is not recognized by search engines mostly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P9wRNFC0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uro3paaatap05w02mdvq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P9wRNFC0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uro3paaatap05w02mdvq.jpg" alt="Image description" width="880" height="461"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;SPEED&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;SPAs load faster because it loads the majority of app resources just once.The page doesn’t reload entirely whenever the user requests a new piece of data. &lt;/p&gt;

&lt;p&gt;MPA is slower as the browser must reload the entire page from scratch whenever the user wants to access new data or moves to a different part of the website. it can be sluggish if the user doesn’t have an optimal connection or if the server isn’t responding well.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IK_dQZ1d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uft1dwz9pfwjubzhuo79.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IK_dQZ1d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/uft1dwz9pfwjubzhuo79.jpg" alt="Image description" width="644" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;USER EXPERIENCE&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;A good user experience is no longer an option but a requirement. SPA’s are more mobile-friendly, which is worth remembering as a lot of traffic comes from mobile devices .SPAs allow continuation, mobile-friendliness, and ease of access.&lt;/p&gt;

&lt;p&gt;if creating an optimized information architecture is your priority to power a better user experience, then you need to opt for an MPA.You can create as many pages as required, and you can include as much information on a page as you need without any limits. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RdlcUJIb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cozh3xseykmet7xtrzyo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RdlcUJIb--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cozh3xseykmet7xtrzyo.jpg" alt="Image description" width="864" height="360"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;EASE OF DEVELOPMENT&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;MPAs require more time in development since they are more complex and larger than SPAs. Another major factor the development process for MPAs is the heightened interaction it needs to have between its front end and back end, each of which requires a separate framework.&lt;/p&gt;

&lt;p&gt;In a SPA, the front and backend are not that inter-related which effectively means you can have teams working on both fronts simultaneously, thus allowing you to reach the launch date faster. One of the greatest advantages of SPA’s is the reusable backend code. &lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Difference Between Import Something From Package VS Import { Something } From Package</title>
      <dc:creator>Sualeh Muhammad</dc:creator>
      <pubDate>Sun, 06 Nov 2022 18:46:13 +0000</pubDate>
      <link>https://dev.to/sualehfarooq/difference-between-import-something-from-package-vs-import-something-from-package-33b2</link>
      <guid>https://dev.to/sualehfarooq/difference-between-import-something-from-package-vs-import-something-from-package-33b2</guid>
      <description>&lt;p&gt;The difference between import &lt;strong&gt;something&lt;/strong&gt; and import &lt;strong&gt;{something}&lt;/strong&gt; from package is justify by the two export declaration forms.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Name Export&lt;/li&gt;
&lt;li&gt;Default Export&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Name Export&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Name exports are useful to export several values. During the import, it is mandatory to use the same name of the corresponding object. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;//app.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;export let language = 'Javascript'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;//admin.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import language from 'app.js'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;the above code example of import wouldn't work because &lt;strong&gt;app.js&lt;/strong&gt; not contains any default export , instead it contains name export so will write &lt;strong&gt;{language}&lt;/strong&gt; instead of &lt;strong&gt;language&lt;/strong&gt; while importing in admin.js .&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import {language} from 'app.js'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;above line of code is the correct syntax while importing name exports , remember that in this case the name you assign matters while importing because you are importing specific thing by it's export name.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Default Export&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Default exports are useful to export only a single object, function, variable. During the import, we can use any name to import. &lt;/p&gt;

&lt;p&gt;&lt;code&gt;//app.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let language = 'Javascript'
export default language;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;code&gt;//admin.js&lt;/code&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import language from 'app.js'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;or&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import anything from 'app.js'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The above code is the example of importing the default exports. In default export case assign value while importing will not enclosed in curly brackets { }. Otherwise it wouldn't work.&lt;br&gt;
In this matter no matter what you name assign while importing because it will always resolve to whatever is &lt;strong&gt;something default export&lt;/strong&gt; of &lt;strong&gt;app.js&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A module can only have one something default export, but as many named exports as you like. You can import them together&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
