<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mohammed Al-jefri on Medium]]></title>
        <description><![CDATA[Stories by Mohammed Al-jefri on Medium]]></description>
        <link>https://medium.com/@algfry12?source=rss-82c77156f4d8------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-HtWYZgYIGaaUYdR6rb3_A.jpeg</url>
            <title>Stories by Mohammed Al-jefri on Medium</title>
            <link>https://medium.com/@algfry12?source=rss-82c77156f4d8------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 04:27:59 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@algfry12/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[JavaScript will not die, is NodeJS will?]]></title>
            <link>https://algfry12.medium.com/javascript-will-not-die-is-nodejs-will-e5364cf48b2f?source=rss-82c77156f4d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/e5364cf48b2f</guid>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[deno]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Mohammed Al-jefri]]></dc:creator>
            <pubDate>Sat, 06 Feb 2021 12:48:59 GMT</pubDate>
            <atom:updated>2021-02-06T12:48:59.600Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KSyg409l74T8yrgbKCZZzQ.jpeg" /><figcaption>Deno and nodejs fight</figcaption></figure><p>as you see programming evolving daily so if you want to be a great developer in the software industry you should have knowledge and awareness of what’s new things in your path and trying to be more compatible with them. And choosing the right tools for yourself, your business, and your team.</p><p>JavaScript is one of the most revolutionary in the software industry, especially on the web. there are long stories around JavaScript and they will be longer.</p><p>In this post, I will share my ideas about JavaScript and the reasons for its long life Also I will talk a lot about JavaScript Run-Time environments such as NodeJS and Deno. I will not dive deeply into tech and programming hierarchy this post will be as simple as possible</p><p><strong>The history of JavaScript.</strong></p><p>In June 1997 Netscape raised <a href="https://en.wikipedia.org/wiki/JavaScript">JavaScript</a> as a <strong>**scripting language**</strong> of <a href="https://en.wikipedia.org/wiki/ECMAScript">ECMAScript</a> specification. Over ECMAScript evolved with many and many editions shipped the best practices of writing front-end language and now it’s used in back-ends too. because ECMAScript JavaScript will not die or it will live longer than anybody thought.</p><p>— -</p><p><strong>Super helpers</strong></p><p>After creating NodeJS, Many tools come such NPM, electron, and Facebook Hermes.js. Those tools make the development of javascript much easier also increased the productivity of javascript developers. with nodejs javascript language runs everywhere</p><p>NodeJS is a really a big revolution and it helps JavaScript to be everywhere with high performance and here a link of <a href="https://benchmarksgame-team.pages.debian.net/benchmarksgame/fastest/node-python3.html">performance comparison with python</a></p><p>JavaScript is everywhere it’s on mobile, desktop, IoT, ML, and AI. You can build great applications on mobile with react native, desktops with electron and react native, and also ML while TensorFlow has a JavaScript version. On the other hand JavaScript is not doing all this independently it got help from another low-level language to give it this Diversity and power. exactly C++, NodeJS built with C++ but it had many things goes in the wrong way as [Ryan Dahl](), gives a talk about it and raising Deno.</p><p><strong>Is NodeJS gonna die?</strong></p><p>I don’t know, maybe. but it was the reason of being JavaScript everywhere and many techs using it on production and that’s a good enough reason to be alive for a couple of years. NodeJS was a great solution that makes JavaScript stronger than ever before. And many Tech tried to run JavaScript on the server-side even Netscape itself and all tries suddenly fail because of the way they used and philosophy but Ryan Dahl win, with the philosophy of NodeJS. So why it should die?</p><p>Short answer because of Deno. Nodejs built earlier and many new things go after were not compatible with nodejs. NodeJS Design has many issues as Ryan Dahl and the solution was with Deno. The design issue is hard to fix and while Node.JS served with dozens of real projects it was hard to redesign a new NodeJS.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F1gIiZfSbEAE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D1gIiZfSbEAE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F1gIiZfSbEAE%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/777c7656b1abb33e792a0e1a6579be6b/href">https://medium.com/media/777c7656b1abb33e792a0e1a6579be6b/href</a></iframe><p>Here some difference between them:</p><p>&lt;table&gt;<br>&lt;thead&gt;<br>&lt;tr&gt;<br>&lt;th&gt;Feature&lt;/th&gt;<br>&lt;th&gt;Deno&lt;/th&gt;<br>&lt;th&gt;NodeJS&lt;/th&gt;<br>&lt;/tr&gt;<br>&lt;/thead&gt;<br>&lt;tbody&gt;<br>&lt;tr&gt;<br>&lt;td&gt;Language&lt;/td&gt;<br>&lt;td&gt;Rust&lt;/td&gt;<br>&lt;td&gt;C++&lt;/td&gt;<br>&lt;/tr&gt;<br>&lt;tr&gt;<br>&lt;td&gt;Supported Language By default&lt;/td&gt;<br>&lt;td&gt;TypeScript + JavaScript&lt;/td&gt;<br>&lt;td&gt;JavaScript + TypeScript! need some headech config and some times fails 😩&lt;/td&gt;<br>&lt;/tr&gt;<br>&lt;tr&gt;<br>&lt;td&gt;Modules&lt;/td&gt;<br>&lt;td&gt;URLs&lt;/td&gt;<br>&lt;td&gt;node_modules “npm” =&amp;gt; lead to Url 🤐 in web&lt;/td&gt;<br>&lt;/tr&gt;<br>&lt;/tbody&gt;<br>&lt;/table&gt;</p><p><strong>Conclusion</strong></p><p>Deno conception is better but it’s still earlier to kill nodejs. the most good thing in Deno is Rust. Rust is really good language and as frontend developer it the right time for me to learn it to dive deeply on [WA](https://webassembly.org/) And Contribution in Deno Community. Deno run both JavaScript and TypeScript so it your choice. feel free to say no and share you thoughts.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e5364cf48b2f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How much easy Code splitting is on Reactjs?]]></title>
            <link>https://algfry12.medium.com/how-much-easy-code-splitting-is-on-reactjs-d94c30e9bec2?source=rss-82c77156f4d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/d94c30e9bec2</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[code-splitting]]></category>
            <dc:creator><![CDATA[Mohammed Al-jefri]]></dc:creator>
            <pubDate>Mon, 29 Oct 2018 06:03:17 GMT</pubDate>
            <atom:updated>2018-10-29T06:57:45.046Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XTt1f4xUFr9UOSY_" /><figcaption>“lioness sleeping” by <a href="https://unsplash.com/@sanderwehkamp?utm_source=medium&amp;utm_medium=referral">Sander Wehkamp</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="/service/ttps://reactjs.org">Reactjs</a> is powerful ecosystem, that make web development painless with the ability to create Progressive Web App and many more feature coming with it. and as it JavaScript it like to using bundling.</p><p>Code splitting is not for react it can be in any other framework using <a href="https://webpack.js.org/">web-pack</a> or <a href="https://parceljs.org/">parceljs</a> for bundling code and packages. <strong>“<em>never make your bundle big It take a time to load</em>”</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/673/1*g9h3C1sPG0krgXViynFHRA.jpeg" /></figure><p>Why does we need code splitting and how much it’s important. If you want make your application thin and much more faster in run time we will need code splitting and how much your application speed and bundle size important code splitting is. JavaScript frameworks are really faster and make web development great than before. But there are new challenges on the right hand and more powerful in front-end on the other. Bundle size is challenge it’s really challenge imagine your application is train because it was created on JavaScript framework train is fast and every time we get new features we add new wagon and this wagon may have many travelers this happen many times on development and your very fast train becoming slow. Yeah very very slow. In this situation we need to solve this problem the problem of hug bundle. And the solution is splitting it. Let us try code splitting.</p><h3>Tasks = () =&gt;</h3><ul><li>Implement Code splitting in react 16.6 and newer versions.</li><li>Implement Code splitting using <a href="https://github.com/jamiebuilds/react-loadable">react-loadable</a> package.</li><li>Create custom code splitting function.</li><li>What’s behind code splitting.</li></ul><h3>Requirements = basics of =&gt;</h3><ul><li>Webpack</li><li>Reactjs</li></ul><h3>React 16.6.0</h3><p>is released on (October 23, 2018) with great feature. once of them is lazy <a href="https://reactjs.org/docs/higher-order-components.html">HOC</a>.</p><p>The React.lazy function lets you render a dynamic import as a regular component.</p><pre>const OtherComponent = React.lazy(() =&gt; import(&#39;./OtherComponent&#39;));<br><br>function MyComponent() {<br>  return (<br>    &lt;div&gt;<br>      &lt;OtherComponent /&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><p>React.lazy take a function as argument that call a dynamic import using of import() syntax. And get a default export of OtherComponent file and assign it to constant.</p><blockquote>The dynamic import() syntax is a ECMAScript (JavaScript) <a href="https://github.com/tc39/proposal-dynamic-import">proposal</a> not currently part of the language standard. It is expected to be accepted in the near future.¹</blockquote><p>With the example above we splitting code of OtherComponent and load it once used in our app. webpack bundling the application code as bundle.js and every time we import another component in run time it load it as chunck.js.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*bctcHqrGWjAZCjKZzZjZYg.png" /><figcaption>bundle.js and code splitting chunk</figcaption></figure><p>Some times loading chunk module of OtherComponent take time so to get better UX use loading indicator or any text tell user that our component is loading and let him or her waiting.</p><p>as React.lazy function call function return promise from import() React 16.6.0 give us a component that handle fallback of import() this component is React.Suspense</p><pre>const OtherComponent = React.lazy(() =&gt; import(&#39;./OtherComponent&#39;));<br><br>function MyComponent() {<br>  return (<br>    &lt;div&gt;<br>      &lt;React.Suspense fallback={&lt;div&gt;Loading...&lt;/div&gt;}&gt;<br>        &lt;OtherComponent /&gt;<br>      &lt;/React.Suspense&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><p>Suspense fallback is props accept component and Suspense component can contain many lazy component.</p><pre>const OtherComponent = React.lazy(() =&gt; import(&#39;./OtherComponent&#39;));<br>const AnotherComponent = React.lazy(() =&gt; import(&#39;./AnotherComponent&#39;));<br><br>function MyComponent() {<br>  return (<br>    &lt;div&gt;<br>      &lt;React.Suspense fallback={&lt;div&gt;Loading...&lt;/div&gt;}&gt;<br>        &lt;section&gt;<br>          &lt;OtherComponent /&gt;<br>          &lt;AnotherComponent /&gt;<br>        &lt;/section&gt;<br>      &lt;/React.Suspense&gt;<br>    &lt;/div&gt;<br>  );<br>}</pre><p>Also loading lazy module may fail for example (for example, due to network failure) so it’s better to Wrap it with error boundaries. this is out our tasks.</p><blockquote>we can import React.Suspense and React.lazy as import { lazy, Suspense } from &#39;react&#39;; to use it directly instead of React.* . ^_^</blockquote><h3>react-loadable package</h3><p><strong>react-loadable</strong> is <a href="https://reactjs.org/docs/higher-order-components.html">HOC</a> using for code splitting and server side rendering and many magic. react-loadable is better if we want to implement code splitting on server side rendering application and get the benefit of Search engine optimization.</p><pre>import React from &#39;react&#39;;<br>import Loadable from &#39;react-loadable&#39;;<br>import Loading from &#39;./my-loading-component&#39;;<br><br>const LoadableComponent = Loadable({<br>  loader: () =&gt; import(&#39;./my-component&#39;),<br>  loading: Loading,<br>});<br><br>export default class App extends React.Component {<br>  render() {<br>    return &lt;LoadableComponent/&gt;;<br>  }<br>}</pre><h3>Create custom function</h3><p><strong>It’s</strong> better if you implement the existing things in your way this will allow you to understanding what is going behind and improving programming scales. This doesn’t mean you shouldn’t use any packages. Open-source community is great and increase the productivity of many Start-ups and this isn’t main topic here. and you can skip it to the next section.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3a85d3fe1b2c5386cf346369258718b/href">https://medium.com/media/b3a85d3fe1b2c5386cf346369258718b/href</a></iframe><p>We can use codeSplittingHoc() like we did with React.lazy .</p><pre>import codeSplittingHoc from &#39;./file_of_codeSplittingHoc&#39;;</pre><pre>const ComponentName = codeSplittingHoc(() =&gt; import(&#39;./component_file&#39;)</pre><pre>function App() {<br>    return &lt;ComponentName /&gt;;<br>}<br></pre><h3>What’s behind</h3><p><strong>The</strong> better understanding of code splitting and how it done may help you avoid one of the main issue on network the <em>waterfall issue. </em>But before goes and this issue we have to answer one question =&gt;<strong> In which level should we implement code splitting?</strong></p><p>We have to main levels</p><ul><li>Component base level.</li><li>Route level.</li></ul><p><strong>Component base level</strong> is implemented before. that component load component module once we need code.</p><p><strong>Route level</strong> is somehow similar load module if route matched and this is quit and save way for code splitting but sometimes we need code splitting on <strong>Component base level</strong> to get more power of code splitting.</p><p><strong>Waterfall Issue </strong>look<em> bundle.js and code splitting chunk </em>image above you will say <em>bundle</em>.<em>js</em> and to <em>chunk</em>.<em>js</em> files and this raise waterfall issue. in brief waterfall is loading many module one by one and to solve this we use <strong>webpack</strong> or <strong>parclejs</strong> and with misunderstanding of code splitting we got the same.</p><h3>References =&gt;</h3><ul><li><a href="https://reactjs.org/docs/code-splitting.html#import"><em>Reactjs documentation</em></a></li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d94c30e9bec2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript scope ]]></title>
            <link>https://algfry12.medium.com/javascript-scope-c544817e0e5e?source=rss-82c77156f4d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/c544817e0e5e</guid>
            <category><![CDATA[scopes]]></category>
            <category><![CDATA[closure]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Mohammed Al-jefri]]></dc:creator>
            <pubDate>Sat, 22 Sep 2018 21:29:31 GMT</pubDate>
            <atom:updated>2018-09-23T06:04:56.566Z</atom:updated>
            <content:encoded><![CDATA[<p>How javascript engine react with variables.</p><h3>Scope</h3><p>Scope determines the accessibility (visibility) of variables In the code area.</p><p>Javascript contain two types of scope:</p><ul><li>Local scope</li><li>Global scope</li></ul><p>Variable declared inside function is <strong>Local Variable and </strong>variable declared out side function is <strong>Global variable</strong>.</p><h4>Local variable</h4><p>Local variable is a variable that declared inside function block. this variable is life when it’s declared and death outside the function .</p><h3>MOHAMMED OMAR on Twitter</h3><p>JavaScript Local #variable can&#39;t breathing out of it&#39;s function declared block. #scope</p><p>example of local variable:</p><pre>function name() {<br>  var i = &quot;can&#39;t be ivokied outside this method&quot;;<br>  console.log(i); // will work<br>}</pre><pre>name();</pre><pre>console.log(i); // Uncaught ReferenceError: i is not defined</pre><h4>Global variable</h4><p>Global variable is variable declared outside function block and can be used in any area of javascript application.</p><p>When you writing you javascript application everywhere outside the function is global area and variable declared in this area can be used everywhere in the document.</p><p>example of global variable:</p><pre>var i = &quot;hey, I&#39;m Global&quot;;</pre><pre>function name() {<br>  var i = &quot;Opps, I&#39;m local&quot;;<br>  console.log(i); // Opps, I&#39;m Local<br>}</pre><pre>name();</pre><pre>console.log(i); // hey, I&#39;m Global</pre><blockquote>JavaScript engine run every function in context when it’s invoked.</blockquote><h4>Block statement</h4><p>Block statement is like if , for , and switch .</p><pre>if (true) {<br>  var i = &quot;Am I local?&quot;;<br>}</pre><pre>console.log(i); // it will work</pre><p>we can declare local variable only inside <em>function block,</em> if we used <em>var</em> keyword in variable declaration. Because functions create it’s own execution context once it called.</p><p><strong>Why variable </strong><strong>i global while it’s declared inside statement block?</strong></p><p>statement block does’t create new scope like function block (<em>execution context</em>). and that’s make variable i global every time declared in statement block. So how can we declaring local variable inside statement block is there another solution?</p><p>It’s does’t make sense to declare only global variable in statement block. So JavaScript give us another declaring keywords: let and const</p><pre>if (true) {<br>  var i = &quot;global varible scope&quot;;</pre><pre>  let x = &quot;Local varible scope&quot;;<br>  const m = &quot;Local Constans scope&quot;;<br>}</pre><pre>console.log(i); // will work<br>console.log(x); // will raise error<br>console.log(m); // will raise error</pre><p>let is like var but it must useful in declaring locale variable inside block statement. const is most power on declaring constants that can’t be modified in run time. Also in defining objects and arrays …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KbUihew_WBFeJlI-" /><figcaption>“Play text” by <a href="https://unsplash.com/@benhershey?utm_source=medium&amp;utm_medium=referral">Ben Hershey</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>JavaScript Closures</h4><p>Global variables can be made local (private) with <strong>closures</strong>. In other word Closures contain their own scope chain, the scope chain of their parents and the global scope</p><pre>var user;</pre><pre>function msg() {<br>  user = &#39;Mohammed&#39;; // globale<br>  let app = &#39;medium&#39; // locale</pre><pre>return function() {<br>    console.log(&#39;Hi &#39; + name + &#39;you are on &#39; + app); // Closure access both globale and local<br>  }<br>}</pre><p>when you try to call inner function that return function. this return function will not be called unless it’s saved in other variable and then variable saved function called.</p><pre>msg(); // will do nothing</pre><pre>var callMsg = msg(); // saved into varible<br>callMsg(); // variable called and run the return function :)</pre><pre>// or you can access Closures like<br>msg()(); // this will do what variable callMsg does.</pre><h3>Conclusion</h3><ul><li>JavaScript variables can belong to the <strong>local</strong> or <strong>global</strong> scope.</li><li>Closure makes it possible for a function to have “<strong>private</strong>” variables.</li><li>Every function had it’s execution context.</li></ul><p>That’s all thank you.</p><p>If you thought it’s good article clap me. 😃 <a href="https://medium.com/u/82c77156f4d8">Mohammed Al-jefri</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c544817e0e5e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Front end developer]]></title>
            <link>https://medium.com/series/web-front-end-developer-1353c154c27a?source=rss-82c77156f4d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/1353c154c27a</guid>
            <dc:creator><![CDATA[Mohammed Al-jefri]]></dc:creator>
            <pubDate>Fri, 21 Sep 2018 00:01:48 GMT</pubDate>
            <atom:updated>2018-09-21T00:01:48.617Z</atom:updated>
            <content:encoded><![CDATA[<h3>Road path to be full stack front end developer</h3><p>Web development almostly contains of two side</p><p><strong>server-side(Back-end)</strong></p><p>this is responsible of the business logic layer and connection with data simply.</p><p><strong>client-side(Front-end)</strong></p><p>it is responsible on the view layer simply, this is what we will talk a lot about :).</p><p>Web development road path is somehow long but it’s awesome when you have a Accompanying in this path.</p><p>So what’s your Accompanying?</p><p>the technology in use are your Accompanying. front-end development can be structured into three parts</p><h3><strong>The first part</strong></h3><p>is the basic this is the most important part, which contain the basic of Html, Css, and also JS. we can talk about it in the next section</p><h3><strong>The second part</strong></h3><p>This part to be more professional and take bigger projects is using framework to structuring your code add more functionality handle new feature not allowed in pure js. also Integrate your code with backend APIs services.such as Wordpress, Firebase and man more.</p><h3><strong>Basic</strong></h3><h4>html</h4><p>almost of web pages created with html.</p><p>HTML is the standard markup language for creating Web pages.</p><blockquote>it’s easy to learn ( it’s markup language )</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZkqMAO9Sa_M-31WAhgHUYQ.png" /></figure><p>simple code:</p><pre>&lt;!DOCTYPE html&gt;<br>&lt;html&gt;<br>&lt;head&gt;<br>&lt;title&gt;Page Title&lt;/title&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>&lt;h1&gt;Heading of content&lt;/h1&gt;<br>&lt;p&gt;paragraph&lt;/p&gt;<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>you can copy and past it it at new file.html</p><p>html document contains to parts. head and body</p><p>head for meta date and invisible informations. we can say it’s for browser and search engines</p><p>body is for visible elements like text and media … so on</p><p>to know more about html you can take a look on <a href="https://www.w3schools.com/html/default.asp">w3school</a> html course</p><h4>CSS</h4><blockquote>Css is Cascading Style Sheet</blockquote><p>it is styling language for html with css we can make or html more beautiful.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/214/1*y09pTOHQi5lT6e3xBZ0QEw.png" /><figcaption>css 3 logo</figcaption></figure><p>CSS describes how HTML elements should be displayed.</p><p>it had hundreds of attributes to enhance html design</p><p>simple code:</p><pre>body {<br>    background-color: lightblue;<br>}</pre><p>this code will change the background color of the bod tag in html page</p><p>to add css into .html page we have thre options:</p><p>1- inline style inside html tag directly</p><pre>&lt;p style=&quot;color: red&quot;&gt; red text &lt;/p&gt;</pre><p>2- Internal style sheet. Inside html document inside the head section between the &lt;style&gt; tag</p><pre>&lt;html&gt;<br>&lt;head&gt;<br>&lt;style&gt;<br>/* style goes here */<br>&lt;/style&gt;<br>&lt;/head&gt;<br>&lt;body&gt;<br>...<br>&lt;/body&gt;<br>&lt;/html&gt;</pre><p>3- External style sheet. Link css file into html using &lt;link&gt; tag same as style tag but instead of write style in evert .html file we just write one css for commen and link it</p><pre>&lt;html&gt;<br>&lt;head&gt;<br>&lt;link href=&quot;your_css_file.css&quot; rel=&quot;style-sheet&quot; /&gt;<br>&lt;/head&gt;<br>...<br>&lt;/html&gt;</pre><p>this is brief information about css. to know more and more about css look at <a href="https://www.w3schools.com/css/default.asp">w3school</a> css course.</p><h4>Js(Javascript)</h4><p>Javascript is the programming language for html.</p><p>with Javascript we can make our site dynamic and give better experience for user how use our site.</p><p>let us imagine <strong><em>html</em></strong> as human clothing nice <strong><em>CSS</em></strong> clothes, this human is death without soul. <strong><em>Javascript</em></strong> is the soul of every <strong><em>html</em></strong> site. don’t write death site bring the life to it :)…</p><blockquote>Javascript is evolving</blockquote><p>this is the basic of basic information about javascript and front end development. and to dijer deeply on this follow the second part of this series…</p><h3>Advanced</h3><p>Previously talked about the basics of front end development technologies html css and js.</p><p>But now will start drilling deeper on the front end development.</p><h4><strong>EcmaScript</strong></h4><p>JavaScript was invented by Brendan Eich in 1995, and became an ECMA standard in 1997.<br>ECMA-262 is the official name of the standard. ECMAScript is the official name of the language. the most popular ECMAScript version is ES6 and there is newer version than ES6 such ES7…ES9</p><p>every ES version has it’s new functions but to ensure it’s working on browsers user <em>transpiler </em>such<em> </em><a href="https://babeljs.io/"><strong><em>babel</em></strong></a><strong><em> </em></strong>which convert new javascript code into old.</p><h3><strong>CSS preprocessors</strong></h3><p>Preprocessors enrich CSS with the functionality that it isn’t capable of by default. There are different many options Sass, Less, Stylus etc. If I were to pick one, I would go for Sass. However, PostCSS has been gaining a lot of traction lately, it is a nice-to-have and is sort of “Babel” for CSS. You can use it stand-alone or on top of Sass also. I would recommend you to learn Sass for now and revisit PostCSS later when you have time.</p><h4><strong>Package Manager</strong></h4><p>Package manger help you to download and managing external package libraries. without package manger you will download the library files and link them manually. There is yarn and npm available. Both are almost same, there are only implementation, you can pick any of them and once you learnt to use one the other would be just the same.</p><h4>Build Tools</h4><p>Tools to help you in the building/bundling and development of JavaScript applications. This category includes linters, task runners and bundlers.</p><ul><li>linter =&gt; eslint</li><li>bulding =&gt; webpack</li><li>runner =&gt; webpack</li></ul><h4>Use Framework</h4><p>frameworks help you to write big projects in less time and better performance. and there are many open source framework for css and Javascript.</p><p>the most popular Javascripts are <a href="https://angular.io/"><strong>Anguler</strong></a>, <a href="https://vuejs.org/"><strong>Vue</strong></a>, <a href="https://www.emberjs.com/"><strong>Ember</strong></a>, and <a href="https://reactjs.org/"><strong>React</strong></a>. I prefer you to use react unless you are worked with <a href="https://developer.mozilla.org/en-US/docs/Web/Apps/Fundamentals/Modern_web_app_architecture/MVC_architecture"><strong>MVC</strong></a> pattern. every framework work with another library to increase it functionalty for example <strong>react</strong> with <strong>redux.</strong></p><p>in css there are also many frameworks like <a href="http://getbootstrap.com/?"><strong>bootstrap</strong></a><strong>, </strong><a href="http://semantic-ui.com/"><strong>semantic-ui</strong></a><strong>, </strong>and<strong> google material-ui</strong></p><h4>Progressive web app</h4><p>Is commen web app with more much functionality such working offline, workers, notifcation as mobile native app.</p><h4>Server Side Rendring</h4><p>every framework render on browser. But this may give you some troubles when your web app depends on Search engine results such market app. so depends on framework will get different options to render app at server SSR.</p><h4>Static Types</h4><p>Static type checkers help you to add type checking to JavaScript. <strong>Flow</strong> and <strong>TypeScript</strong></p><h4>Testing</h4><p>Good Developer the developer how write test for pieces of code and the whole app. <strong>Jest</strong> is the most popular test library for javascript.</p><h4><strong>Conclusion</strong></h4><p>The best way to get above list is bractes. every section had any tutorials on the internet. also to make you app more professional is to provide it with backend app such Wordpress, Rails, or Node.js.</p><p>All the best 😅</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1353c154c27a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React router best practices]]></title>
            <link>https://algfry12.medium.com/react-router-best-practices-9c564388f4d3?source=rss-82c77156f4d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/9c564388f4d3</guid>
            <category><![CDATA[react-router]]></category>
            <category><![CDATA[simple-react-app]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[jsx]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Mohammed Al-jefri]]></dc:creator>
            <pubDate>Thu, 08 Mar 2018 07:34:56 GMT</pubDate>
            <atom:updated>2018-09-14T10:49:09.195Z</atom:updated>
            <content:encoded><![CDATA[<p>Explain react-router and react-router-dom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YG2YmEJb9yGZvN81T9v_OQ.jpeg" /><figcaption>react-router logo</figcaption></figure><h3>React router called “Dynamic Router”</h3><p>In many frameworks like Rails, Express.js and Anglerjs we use the static router which configured in the beginning of your application. In rails application we have file called routes.rb in this file we make or routeing to start application from it’s controller.</p><p>But here with React router forget this, we can config or route when we want in which file we want as we want as possible.</p><h3>Simple example</h3><p>I will use <a href="https://reactjs.org/docs/add-react-to-a-new-app.html#create-react-app">create-react-app</a> to build this example and we need install some dependencies such <a href="https://nodejs.org/en/">nodejs</a> , <a href="https://www.npmjs.com/">npm</a> inside it and react-router-dom using npm/yarn.</p><p><strong>Create project:</strong></p><p>in terminal write</p><blockquote>create-react-app simple-example</blockquote><p>and goes to it’s folder in terminal</p><blockquote>cd simple-example</blockquote><p>we are now in simple-example and now we will install react-router-dom using npm which already installed we still inside terminal</p><blockquote>npm install react-router-dom</blockquote><p>after install all dependencies we can coding.</p><p>in index.js file which created by create-react-app we will warp &lt;App /&gt; component with Router component &lt;BrowserRouter&gt;</p><pre>// index.js</pre><pre>import React from &#39;react&#39;;</pre><pre>import ReactDOM from &#39;react-dom&#39;;</pre><pre>import &#39;./index.css&#39;;</pre><pre>import App from &#39;./App&#39;;</pre><pre>import registerServiceWorker from &#39;./registerServiceWorker&#39;;</pre><pre>import { BrowserRouter } from &#39;react-router-dom&#39;;</pre><pre>ReactDOM.render(</pre><pre>{/* Router is the core of every react router component */}</pre><pre>&lt;BrowserRouter&gt;</pre><pre>  &lt;App /&gt;</pre><pre>&lt;/BrowserRouter&gt;</pre><pre>, document.getElementById(&#39;root&#39;));</pre><pre>registerServiceWorker();</pre><h3>Router component in react router</h3><p>It should in the core of every react router app we can choice one of two component,&lt;BrowserRouter&gt; or &lt;HashRouter&gt;. Both of these will create a specialized history object for you. and if you have static server file like working with API use HashRouter instead of BrowserRouter.</p><h3>Route , Link and NavLink</h3><p>after initialize the first step of using Route component &lt;BrowserRouter&gt; which provide from react-router-dom. we should build or customized route and links to navigation around the route.</p><p>in App.js we will create the nav links and will config it’s route dynamically no need for routes file like in Rails framework. we will use &lt;NavLink&gt; component from react-router-dom with warp links like and create &lt;a&gt; tag in html. write the code after the end of &lt;/header&gt; tag <br>&lt;div className=&#39;nav&#39;&gt;</p><pre>  &lt;ul&gt;</pre><pre>    &lt;li&gt;&lt;NavLink to=&quot;/home&quot;&gt;Home&lt;/NavLink&gt;&lt;/li&gt;</pre><pre>    &lt;li&gt;&lt;NavLink to=&quot;/next&quot;&gt;Next&lt;/NavLink&gt;&lt;/li&gt;</pre><pre>    &lt;li&gt;&lt;NavLink to=&quot;/last&quot;&gt;Last&lt;/NavLink&gt;&lt;/li&gt;</pre><pre>  &lt;/ul&gt;</pre><pre>&lt;/div&gt;</pre><p>Now we can config the route of &lt;NavLink &gt; component. but before doing this I want talk in brief about the &lt;Link &gt; component. We can any of both &lt;NavLink &gt; or &lt;Link &gt; component to navigation around configured routes but the main difference between them as I now is &lt;NavLink &gt; give us activeClassName props to generate class for active link is most using for css. The default className generated by &lt;NavLink &gt; is <em>.active</em></p><pre>{/* activeClassName value can be an name to modify it in css styles */}<br>&lt;NavLink activeClassName=&#39;any-name&#39; to=&quot;/home&quot;&gt;Home&lt;/NavLink&gt;<br>{/* don&#39;t use the same in &lt;Link&gt; below is wrong use of &lt;Link &gt;*/}<br>&lt;Link activeClassName=&#39;any-name&#39; to=&quot;/home&quot;&gt;Home&lt;/Link&gt;</pre><p>Config the route in App.js file</p><pre>&lt;div className=&quot;App-intro&quot;&gt;</pre><pre>  &lt;Route path=&#39;/home&#39; exact component={Home} /&gt;</pre><pre>  &lt;Route path=&#39;/next&#39; component={Next} /&gt;</pre><pre>  &lt;Route path=&#39;/last&#39; component={Last} /&gt;</pre><pre>  &lt;Redirect to=&#39;/home&#39; /&gt;</pre><pre>&lt;/div&gt;</pre><p><strong>&lt;Route&gt; </strong>render the component if matches the pathname for example :</p><pre><a href="http://localhost:3000/hme">http://localhost:3000/h</a>ome </pre><p>this url ^ path will render the home component inside the App.js component. <strong><em>exact props </em></strong><em>ensure if path is exactly home </em>see the first &lt;NavLink&gt;</p><p>the App is mostly ready just create the Home.js , Next.js and Last.js and import them in the top of App.js</p><pre>// src/Home.js</pre><pre>import React from &#39;react&#39;;<br></pre><pre>let Home = () =&gt; {</pre><pre> return(</pre><pre>   &lt;div&gt;</pre><pre>     &lt;h1&gt; Hey I&#39;m Home &lt;/h1&gt;</pre><pre>   &lt;/div&gt;</pre><pre>  )</pre><pre>}<br></pre><pre>export default Home</pre><p>Next.js and Last.js is same like above only text will change</p><p>the example is on github URL: <a href="https://github.com/mohammedOmer/simple-routing-in-react">https://github.com/mohammedOmer/simple-routing-in-react</a></p><p>Installation instruction inside README.md on repository.</p><h3>Conclusion</h3><ul><li>react-router-dom will give all the component of react-router</li><li>&lt;NavLink&gt; is better than &lt;Link&gt; for UI if it’s in shared View Like Header Or Footer.</li><li>config Router in start of application like index.js to run &lt;Route &gt; properly</li></ul><p>All the best hacking in Your way. <a href="https://medium.com/u/82c77156f4d8">Mohammed Aljefri</a> Full stack developer in <a href="http://www.clickapps.co/en/"><em>ClickApps co</em></a><em> </em>clap me on clap button below if you like this article</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9c564388f4d3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Software industry vision]]></title>
            <link>https://algfry12.medium.com/software-industry-vision-b9b71b7bc0aa?source=rss-82c77156f4d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9b71b7bc0aa</guid>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[company]]></category>
            <category><![CDATA[smart-vision]]></category>
            <category><![CDATA[smart-people]]></category>
            <category><![CDATA[startup]]></category>
            <dc:creator><![CDATA[Mohammed Al-jefri]]></dc:creator>
            <pubDate>Tue, 27 Feb 2018 07:07:04 GMT</pubDate>
            <atom:updated>2018-02-27T07:07:04.391Z</atom:updated>
            <content:encoded><![CDATA[<p>The way to make successful company in software industry.</p><p>Nowadays the software industry is the biggest industry in the world.It’s evolve so quickly . and we should track the new technologies and solutions.</p><p>To make a good company in competition of software industry. May we Will follow the<strong> path of success.</strong></p><p>Make your future strategy &gt; Hire smart people &gt; Be patient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cp8-HNNaDApduoCO8qfDYg.jpeg" /></figure><h3>Make your future strategy</h3><p>Every successful company has it’s own future strategy in any type of industry. Even in software industry market there is a future strategy. <em>Why is it important?</em></p><p>With strategy we can reach three important things:</p><h4><strong>1- Understanding the company and industry</strong></h4><p>strategy give the company clear understanding of their own business and what’s required to success. It help company to it’s capability, weakness and risk that may meet in there business.</p><h4><strong>2- Growing in a changing world</strong></h4><p>As we said before Software industry is evolve so quickly and with strategy we can track the trends of environment and what changes are take place. <strong>in <em>short term</em> Successful should be new things or old things in way.</strong></p><h4><strong>3-</strong> <strong>Create vision and direction for the whole business</strong></h4><p>All companies and their staff need to understand their purpose, their destination and the course they’re taking to get there. A company without a strategy is akin to sending your staff into the desert and leaving them to follow mirages in search of water. Without a destination and focus in mind your staff will wander aimlessly from one activity to the other never knowing what to focus on or how to priorities.</p><h3>Hire smart people</h3><p>“It doesn’t <em>make sense</em> to <em>hire</em> smart people and then tell them what to <em>do</em>; we <em>hire</em> smart people so they <em>can</em> tell us what to <em>do</em>.”— <strong>Steve Jobs</strong>.</p><p>Smart people are the strong thing in <em>any any an</em>y company even if we have strategy smart people complete it and feedback decision makers with smart solution. Don’t work with adult company if you are smart and don’t hire adult people in smart company. <strong>Steve Jobs </strong>said he hire smart people and let him do what is better and that reason of it’s success.</p><h3>Be patient</h3><p>Strategy is make long time to applied in real and will facing many of <strong>challenges </strong>to make company bigger than other. Also hiring Smart people is so hard not every time you found creative and be patient to reach this to important things.</p><h3>Conclusion</h3><p>All smart companies or software industry are following this path as the main path and may they have more steps to reach their goals don’t stop on this and be creative with more options to make your company more efficient and productivity. Sorry for westing your time.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9b71b7bc0aa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Web Technologies are cross-platform]]></title>
            <link>https://algfry12.medium.com/web-technologies-are-cross-platform-b12787cd0bf4?source=rss-82c77156f4d8------2</link>
            <guid isPermaLink="false">https://medium.com/p/b12787cd0bf4</guid>
            <category><![CDATA[html]]></category>
            <category><![CDATA[electron]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Mohammed Al-jefri]]></dc:creator>
            <pubDate>Mon, 19 Feb 2018 07:26:36 GMT</pubDate>
            <atom:updated>2018-02-19T07:37:42.901Z</atom:updated>
            <content:encoded><![CDATA[<p>Many full-stack developers search about the best technology for both front-end and back-end to built high performance application in less time and in this article You will take a trip around the best frameworks for make cross-platform application for <em>desktop</em>,<em> android</em> and <em>ios.</em></p><h3><strong>What is cross-platform?</strong></h3><p>in brief application working in multiple platforms with the same efficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/397/1*7warsQf1FJICS24R-qGBZA.jpeg" /></figure><p>As you goes through this article you should have basic of the web based technologies “<em>html, css </em>and <em>JavaScript</em>” or you can visit the source of them all <a href="https://www.w3schools.com/"><em>w3schools</em></a></p><h3><strong>Desktop Application using Web based technologies</strong></h3><p>You will say they’re built for web application and working on the browser. I agree with you the built for web and working on the browser but there are many ways to make them in desktop. and the best choice is <a href="https://electronjs.org/"><em>Electron</em></a><em> </em>framework.<em> </em><a href="https://electronjs.org/"><em>Electron</em></a><em> </em>framework is open source created by <strong>Cheng Zhao</strong> and now developed by <a href="https://github.com/"><em>github</em></a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/215/1*g3Gb0tc0zKJmBDkdWUEJ2g.png" /><figcaption>electron logo</figcaption></figure><h3>Who are using Electron?</h3><p><a href="https://atom.io/"><em>Atom</em></a><em> </em>code editor, <a href="https://slack.com/"><em>Slack</em></a> team working and companies chatting and so many.</p><h3>Phone Application using Web based technologies</h3><p>In the desktop part you got knowledge about Electron framework. So is electron is can create Phone application for both android and ios?..</p><p>The answer is no. So is there another framework? surely Yes. We can using <a href="https://cordova.apache.org/"><em>Apache Cordova</em></a><em> ,</em><a href="https://ionicframework.com/"><em>ionic Framework</em></a><em> , </em><a href="https://facebook.github.io/react-native/"><em>React native</em></a> and many others. I was so confused witch one is better choice for build phone cross-platform applications.And after search and ask many professional I found <a href="https://facebook.github.io/react-native/"><em>react native</em></a><em> </em>is better.</p><h3>React Native</h3><p>React native is framework created by <a href="https://facebook.com/"><strong>Facebook</strong></a> for building <em>ios</em> and <em>android </em>application using <em>JavaScript </em>and <em>React</em>. so what should we do to goes in <em>react native </em>while we know the web base technologies. First we should understand <a href="https://reactjs.org/">React js</a> and how to use it’s component, state, props, and it’s life-cycle.</p><h3>Conclusion</h3><p>We goes around the most prefer frameworks for building cross-platform apps. and you can read more about every one from it’s documentation which are so easier to understanding and give us examples of the most seniors you will match. sorry for wasting your time <strong>Mohammed aljefri</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b12787cd0bf4" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>