<?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>Forem: Sara °°°</title>
    <description>The latest articles on Forem by Sara °°° (@saraahmed626).</description>
    <link>https://forem.com/saraahmed626</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%2F147011%2F1b34265a-6505-41bc-a90d-87510522ae01.jpg</url>
      <title>Forem: Sara °°°</title>
      <link>https://forem.com/saraahmed626</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/saraahmed626"/>
    <language>en</language>
    <item>
      <title>Understanding Http Get request &amp; PODO (Mapping received data) in Flutter!</title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Mon, 12 Jul 2021 15:41:17 +0000</pubDate>
      <link>https://forem.com/saraahmed626/handling-http-get-request-podo-mapping-received-data-in-flutter-4hdf</link>
      <guid>https://forem.com/saraahmed626/handling-http-get-request-podo-mapping-received-data-in-flutter-4hdf</guid>
      <description>&lt;p&gt;For every application to be dynamic and fully interactive it needs to communicate with the back-end using HTTP requests, after handling the requests you can use the received data immediately, but to make it manageable and easy to handle one should map it into PODO (Plain Old Dart Object), it's a way for you to deserialize the response you received into Dart objects, this way it will be much easier for you to manipulate the data within your app and back-end, by creating, updating, deleting, or just reading.&lt;/p&gt;

&lt;p&gt;So this article will take you through the two parts of the process, Communicating with the pack-end using HTTP requests, and mapping received data into Dart model!&lt;/p&gt;

&lt;h3&gt;
  
  
  Communicating with the back-end using HTTP requests
&lt;/h3&gt;

&lt;p&gt;Applications frequently need to perform POST, GET, and other HTTP requests, in flutter you can use HTTP package, A Library for making HTTP requests.&lt;br&gt;
The first step is to add the HTTP package to your pubspec.yaml file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;dependencies:
  http: ^0.13.3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Run the following command flutter, after each edit in the pubspec.yaml, it downloads &amp;amp; gets all the dependencies listed in the file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$flutter pub get
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Import Http package in dart file by using&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'package:http/http.dart';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Also Import Convert package because you are going to need it for decoding JSON Response&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import 'dart:convert';
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;For our example in this article we are going to use  JSONPlaceholder API, a free fake API for testing and prototyping, using the endpoint &lt;a href="https://jsonplaceholder.typicode.com/todos" rel="noopener noreferrer"&gt;https://jsonplaceholder.typicode.com/todos&lt;/a&gt; that returns a list of fake todos.&lt;/p&gt;

&lt;p&gt;So, How are we going to receive this data? &lt;br&gt;
Using a get request, then decoding the response, just like in the code snippets below.&lt;br&gt;
The first line is receiving the response using get request; the second line is decoding the result and casting it in the form of List&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var response = await get(Uri.parse("https://jsonplaceholder.typicode.com/todos"));
    final List&amp;lt;dynamic&amp;gt; bodyData = json.decode(response.body);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Woohoo! Up until this step, we managed to receive our response from the server, our data is resting inside our App, we should welcome it and be good to it :)&lt;br&gt;
The next step is deserializing this result into a PODO, this step will help us deal with our received data as dart models! &lt;/p&gt;
&lt;h3&gt;
  
  
  PODO!
&lt;/h3&gt;

&lt;p&gt;What is PODO and why use it?&lt;br&gt;
The naive approach to decode the JSON and display the deserialized data in the app is via the PODO (Plain Old Dart Object) approach where a class with all the objects(with their respective data-type) closely resemble the keys in the JSON, and the objects resemble the values.&lt;/p&gt;

&lt;p&gt;How to implement it?&lt;br&gt;
First, we create a class with the instructor&lt;br&gt;
in a separate dart file, the class should represent our received data, the more objects you receive the more classes you will need to add for each.&lt;br&gt;
For our example, this is the structure of our received data, its simple, no nesting's.&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%2Fuploads%2Farticles%2Fqp10wjp552ptdvxow47r.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%2Fuploads%2Farticles%2Fqp10wjp552ptdvxow47r.PNG" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So now add the following to the class&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class ToDoModel {
  int userId;
  int id;
  String title;
  bool completed;

  ToDoModel(
      {required this.userId,
        required this.id,
        required this.title,
        required this.completed
      });
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then create a fromjson method, this method is going to handle the actual process of mapping the received data into dart model, all inside the same class, be careful not to misspell the names in the method with the names in the received JSON structured data&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;factory ToDoModel.fromJson(Map&amp;lt;String, dynamic&amp;gt; data){
    return ToDoModel(
        userId: data["userId"],
        id : data["id"],
        title: data["title"],
        completed: data["completed"]
    );
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The last step is we have to call this method after receiving the data, as you can see because the data received is a list, we will loop through this list converting each entry into a dart object then add that object to our list of dart model&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  bodyData.forEach((toDo) {
      ToDoModel task = ToDoModel.fromJson(toDo);
      myToDosParsed.add(task);
    });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now our data is fully rested in our app and ready to be used!&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%2Fuploads%2Farticles%2Fqhqw925le7u80rl75f1i.gif" 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%2Fuploads%2Farticles%2Fqhqw925le7u80rl75f1i.gif" alt="very excited"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Summary
&lt;/h3&gt;

&lt;p&gt;So in this article, we went through the whole process, Communicating with the back-end using HTTP get request, mapping received data, and making a tiny app that views all to-do lists in a listView.builder widget.&lt;br&gt;
Now you can do the same, or continue trying and manipulating this app by cloning &lt;a href="https://github.com/SaraAli26/TodoListApp" rel="noopener noreferrer"&gt;App Repo&lt;/a&gt;.&lt;br&gt;
Keep in mind that sometimes the steps might vary slightly when it comes to casting the received response from the server, based on the data structure of your JSON result. like list, maps, doc snapshot if you using firebase...etc.&lt;/p&gt;

&lt;p&gt;Feel Free to ask for further details about the process or about using the other HTTP requests :)&lt;br&gt;
I have added some sections to the article in my personal website's blog, you can find it here &lt;a href="https://saraahmed.net/?p=165" rel="noopener noreferrer"&gt;The full article&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Notes
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;The process of converting a Dart object to a JSON one is called JSON encoding and the reverse process i.e. converting JSON object to Dart one is called decoding.&lt;/li&gt;
&lt;li&gt;Instructions above works with any back-end, the only thing that will differ is the decoding of the received data into the dart model because sometimes you might need to do more casting according to the received data.&lt;/li&gt;
&lt;li&gt;Article focus is on the process of converting received data into PODO, that's why the rest of HTTP requests; POST, DELETE, PUT were not discussed with their respective PODO operations.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Further Reading &amp;amp; Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://pub.dev/packages/http" rel="noopener noreferrer"&gt;HTTP Package&lt;/a&gt; &lt;/li&gt;
&lt;li&gt;&lt;a href="https://jsonplaceholder.typicode.com/" rel="noopener noreferrer"&gt;jsonplaceholder API&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/flutter-community/parsing-complex-json-in-flutter-747c46655f51" rel="noopener noreferrer"&gt;Parsing Json Article&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=ek8ZPdWj4Qo" rel="noopener noreferrer"&gt;ListTile Widget&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://medium.com/swlh/the-alternative-easy-peasy-way-of-parsing-json-data-with-dart-flutter-8054a6720a95" rel="noopener noreferrer"&gt;Parsing Json Article&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>flutter</category>
      <category>podo</category>
      <category>http</category>
    </item>
    <item>
      <title>6 Learned Lessons From My First Year Working From Home &amp; Being a Freelancer. </title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Mon, 27 Jul 2020 22:19:22 +0000</pubDate>
      <link>https://forem.com/saraahmed626/6-learned-lessons-from-my-first-year-working-from-home-being-a-freelancer-589j</link>
      <guid>https://forem.com/saraahmed626/6-learned-lessons-from-my-first-year-working-from-home-being-a-freelancer-589j</guid>
      <description>&lt;p&gt;We have an Arabic saying that says: "An eyewitness is better than hearsay". &lt;br&gt;
During the past year, I was working from home as a freelancer, at first, I was so excited about the whole thing, especially that I was done with my previous work in a company, I hated 5-9 so much. But with the time, I figured that working from home has it's own challenges too, and they are not easy to deal with, one can not think about these challenges unless actually trying to work from home. &lt;br&gt;
So here are some really important aspects that you should put into consideration when working from home or as a freelancer. Even if not, because currently due to the Covid-19, a lot of people shifted to work from home. &lt;/p&gt;

&lt;h2&gt;
  
  
  1 Time management skills are essential
&lt;/h2&gt;

&lt;p&gt;In my opinion, this is the most important one, If you didn't pay attention to it, you will suffer greatly. &lt;br&gt;
Suddenly you will find yourself working 24/7. Even when you don't want to, and be strict with your self when the work time is over, then it's over, no excuses, you need these breaks so you won't lose your balance.  &lt;/p&gt;

&lt;h2&gt;
  
  
  2 Focus
&lt;/h2&gt;

&lt;p&gt;One technology at a time, one tool at a time... Etc. &lt;br&gt;
When the is no obvious boundaries like the ones that are required by the company you are working on, you can get tempted and distracted easily by all the technologies that come in your way! Then stretched too thin, so end result will not be that good. &lt;/p&gt;

&lt;h2&gt;
  
  
  3 Make reasonable goals
&lt;/h2&gt;

&lt;p&gt;Setting small consistent goals is a must because it will make you motivated each time you accomplish a task or take a small step. Setting one big goal might be so frightening at the beginning and not so digestible. &lt;br&gt;
Remember that our industry is changing rapidly, it's hard to even the very experienced developers to know it all. &lt;br&gt;
So just relax, and set them small goals at first.&lt;/p&gt;

&lt;h2&gt;
  
  
  4 Celebrate the small wins and treat your self very well.
&lt;/h2&gt;

&lt;p&gt;While working in a company, a salary raise, a promotion, a nice word from your boss, all are nice acts that will motivate you to provide more. But when you are a freelancer you have to do all this by your self; will  We are human beings, we need to reward our selves always to keep us moving forward and motivated, don't underestimate the power of rewarding yourself. Be kind to it. &lt;/p&gt;

&lt;h2&gt;
  
  
  5 Change your work environment as much as you can
&lt;/h2&gt;

&lt;p&gt;Working from home will make you mess the chance of communicating with people in the work environment, so change your routine often so you don't get bored. &lt;br&gt;
Even though am more of an introvert, but staying at home for this amount of time is too much,  &lt;/p&gt;

&lt;h2&gt;
  
  
  6 Have some physical outside activities
&lt;/h2&gt;

&lt;p&gt;Coding is a mind activity, exhausting your brain and setting in front of the computer for long hours is bad for your health. Keep moving, balance the mind activeness with the body activeness.&lt;/p&gt;

</description>
      <category>freelancing</category>
      <category>productivity</category>
      <category>tips</category>
    </item>
    <item>
      <title>8 Ways To Test &amp; Debug Your Web Apps Using Web Browsers</title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Thu, 16 Jul 2020 18:58:18 +0000</pubDate>
      <link>https://forem.com/saraahmed626/8-way-to-test-debug-your-web-apps-using-browsers-39pj</link>
      <guid>https://forem.com/saraahmed626/8-way-to-test-debug-your-web-apps-using-browsers-39pj</guid>
      <description>&lt;p&gt;Testing and Debugging are essential activities during the software development life cycle, specifically in the software development and maintenance phases, it is a fundamental step to produce a high-quality product.&lt;br&gt;
While Testing is performed to check if the code contains errors, debugging is done to locate and fix these errors.&lt;/p&gt;

&lt;p&gt;Among the many ways and methods to perform debugging and testing, Browser offers comprehensive tools, which are so powerful. &lt;br&gt;
It allows developers designers or testers to work with a variety of web technologies, including HTML, CSS, the DOM, JavaScript, and other components that are handled by the web browser.&lt;br&gt;
Due to increasing demand from web browsers to do more, Popular web browsers have included more features for developers.&lt;/p&gt;

&lt;p&gt;The tools we are are talking about are called web development tools or web tools and can be used with web applications. &lt;br&gt;
It comes as browser add-ons or built-in features in it.&lt;/p&gt;

&lt;p&gt;Most popular web browsers, such as Google Chrome, Firefox, Internet Explorer, Safari, and Opera, have built-in tools, and many additional add-ons can be found in their respective plugin download centers.&lt;/p&gt;

&lt;p&gt;In this article, we are going to explain 8 ways for you to use these tools, which will save you time and make your test experience more efficient and fun.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Please note that Web browser screenshots that are taken for examples below are taken from Microsoft Edge web browser, however differences are not that much between all broswers development tools. &lt;/li&gt;
&lt;/ul&gt;

&lt;h1&gt;
  
  
  How can I access these tools?
&lt;/h1&gt;

&lt;p&gt;Open up your browser, and then right-click the mouse then select inspect elements, or just open up your browser then press Ctrl+ Shift+I. &lt;br&gt;
Below is the screen that you will get after performing this step&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%2Fi0e6wee7u8g8srujmz4t.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%2Fi0e6wee7u8g8srujmz4t.PNG" alt="Web Development tools"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Pointer. Used to point on the wep app elements (for example: an image or any other DOM element). &lt;/li&gt;
&lt;li&gt;Change the screen display for your web app (pointed in #6).&lt;/li&gt;
&lt;li&gt;Tools Bar.&lt;/li&gt;
&lt;li&gt;Change the tools display, which has 4 options 2 horizontal (Upper horizontal part of the screen / Lower horizontal part of the screen)options and 2 vertical options(Left side of the screen/ right side of the screen). &lt;/li&gt;
&lt;li&gt;The display for the selected tool chosen from the tools bar (pointed by #3).&lt;/li&gt;
&lt;li&gt;The display for your web app.&lt;/li&gt;
&lt;/ol&gt;

&lt;h1&gt;
  
  
  8 Ways to debug and test using the web browser
&lt;/h1&gt;

&lt;h2&gt;
  
  
  I. Console Tab.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fhzqpwb2oxlyn5c5vvs0m.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%2Fhzqpwb2oxlyn5c5vvs0m.PNG" alt="Console"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mainly its benefits when using Javascript, you can use console.log() to trace your variable in your code, and know what are the actual variables are holding, values that you log out using console object and log method will be found in the console tab.&lt;br&gt;
The consoles allow developers to type in JavaScript commands and call functions, or view errors that may have been encountered during the execution of a script.&lt;br&gt;
Developer can get the results in the console display as shown in the image above. &lt;/p&gt;

&lt;h2&gt;
  
  
  II. Network Tab.
&lt;/h2&gt;

&lt;p&gt;When you have a function that returns a result from a backend, but somehow you are not receiving anything in the program view, just open the browser, get to the tools and click on the network tool in the tools bar, then refresh your page and watch all the coming requests through the network.&lt;br&gt;
then trace and check if you are really calling that method, sending the desired parameters, and if it's really returning the result that you are looking for, this way you will be able to figure out if it's view related error or back-end related error. &lt;br&gt;
as you can see in the screenshot below, all requests are listed in the left side of the display screen&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%2Ftyfaegazfdm9jbf1hxsx.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%2Ftyfaegazfdm9jbf1hxsx.PNG" alt="Network Tab"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Just double click on the request that you want to check, and another display on the right side of the screen will be shown, where you can examine the details of the request(eg; response, header, time is taken to execute...etc), just like in the screenshot below&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%2Fcfb0z5v5z3sk53tcs6ky.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%2Fcfb0z5v5z3sk53tcs6ky.PNG" alt="Request details"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  III. Application Tab.
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F7ada43hojwbs62czheap.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%2F7ada43hojwbs62czheap.PNG" alt="Application Tool"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This tool will help you to view all data stored in your application(Eg, Cookies, Local Storage, sessions...etc)&lt;br&gt;
For Example; Using local storage is common to save some simple data, if you need to check what are the actual values currently stored in your app local storage, you can check it by using the browser application tab. &lt;/p&gt;

&lt;h2&gt;
  
  
  IV. Edit your element's CSS or HTML.
&lt;/h2&gt;

&lt;p&gt;It allows you to edit your CSS or html and see the results live in the browser, but your original file will not be affected by these changes, as soon as you refresh the page it will be back to the original style. &lt;br&gt;
To Perform this one, you have to click on the pointer (#I As described in the first screenshot in the article), then hover over the element you want to manipulate or just you want to check.&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%2Ffb8he6wx84ifhnbiq1tl.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%2Ffb8he6wx84ifhnbiq1tl.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As in the Screenshot above&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is where the pointer is pointing.&lt;/li&gt;
&lt;li&gt;The CSS of element pointed to in point number 1 above.&lt;/li&gt;
&lt;li&gt;The Html code of the element pointed to. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  V. Inspect to know what CSS classes your DOM element is really holding.
&lt;/h2&gt;

&lt;p&gt;-You can refer to the screen shot in the previous point (#IV).&lt;/p&gt;

&lt;p&gt;Just like what we have viewed in the previous point, This helps A looooot when you can't determine what classes are affecting your Html element or tag! Sometimes you are applying edits but somehow it's not being implemented! The reason is that these elements are inheriting some CSS classes from a parent elements, locating these parents elements to help you un-inherited their CSS class can easily be traced using the pointer, just point to the element using pointer, and all the CSS code that is applied to that element will be displayed in the css section, check it carefully, also you can check and uncheck CSS classes and properties and see the direct effect on the element, how cool is that? &lt;/p&gt;

&lt;h2&gt;
  
  
  VI. Inspect to view what each DOM element is actually holding (js values).
&lt;/h2&gt;

&lt;p&gt;-You can refer to the screen shot in point (#IV).&lt;/p&gt;

&lt;p&gt;Let's say you are passing JS values  to be views in an Html element or tag, and need to view what is the exact value being passed because for a reason it's not showing up right in your app. Using the browser pointer it can help you see the values and determine the cause of the issue.By pointing to the required Html element, and the value that is holded will be displayed in the code part. &lt;/p&gt;

&lt;h2&gt;
  
  
  VII. Color Picker tool.
&lt;/h2&gt;

&lt;p&gt;Although it's so simple this one is really one of my favorites, by using this brush you can get the code or RGB of any color you came across while browsing the web.&lt;br&gt;
All That you need to do is to inspect any of the elements in the page, then in the CSS part click on color (the color rectangle itself, you will get a small screen with a color picker icon, click that icon and then press on any color you want to get in the page, details of the color will be displayed in the color rectangle) just like shown in the screenshot below.&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%2Fuwyew9ue3h7xhsx0p195.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%2Fuwyew9ue3h7xhsx0p195.png" alt="Toggle Color Picker"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  VIII. Profiling and auditing
&lt;/h2&gt;

&lt;p&gt;This one I personally don't use a lot, but you should also know about it. &lt;br&gt;
Edit Profiling allows developers to capture information about the performance of a web page or web application. With this information, developers can improve the performance of their scripts. Auditing features may provide developers suggestions, after analyzing a page, for optimizations to decrease page load time and increase responsiveness. Web development tools typically also provide a timeline features that provide a record of the time it takes to render the page, memory usage, and the types of events that are taking place.&lt;br&gt;
These features allow developers to optimize their web pages or web application.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;With all that being said, ways explained above are only a part of what you can do using these amazing tools, so practice the one mentioned above, and then explore the rest to develop your testing and debugging skills even more.&lt;/p&gt;

&lt;h2&gt;
  
  
  What about your favorite web tools?
&lt;/h2&gt;

&lt;p&gt;Do you have a favorite web tool? Or web tools?! Please share it with us in the comments section below. &lt;/p&gt;

</description>
      <category>testing</category>
      <category>debugging</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Technical Interview Questions For A Back-End Job Position</title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Wed, 08 Jul 2020 23:02:42 +0000</pubDate>
      <link>https://forem.com/saraahmed626/technical-interview-questions-for-a-back-end-job-position-320o</link>
      <guid>https://forem.com/saraahmed626/technical-interview-questions-for-a-back-end-job-position-320o</guid>
      <description>&lt;p&gt;What questions one should expect when applying for a back-end job position?&lt;br&gt;
For a developer with 2 years of experience in programming.&lt;/p&gt;

&lt;p&gt;Job Description contained Microservices, unit testing, automation, Message Queues, RPC, Caching...etc&lt;/p&gt;

</description>
      <category>help</category>
      <category>jobhunting</category>
      <category>backend</category>
    </item>
    <item>
      <title>Managing your time as a junior software developer who wants to make a progress. </title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Sun, 01 Dec 2019 17:32:08 +0000</pubDate>
      <link>https://forem.com/saraahmed626/managing-your-time-as-a-freelance-software-developer-p6a</link>
      <guid>https://forem.com/saraahmed626/managing-your-time-as-a-freelance-software-developer-p6a</guid>
      <description>&lt;p&gt;Lately I have been struggling to make a good balance between my coding gools and my work as a software developer freelancer, so I have started to question my self? What am I doing wrong? &lt;br&gt;
Is it a bad time management, gools are not realistic? Lack of motivation? &lt;br&gt;
I can't find an answer till now...&lt;/p&gt;

&lt;p&gt;Another factor is that I have to use number of technologies because the team am working with are using it, it's good for me to find this environment, and I have been learning a lot by coding projects with team, however sometimes I feel like am not doing enough, or am not able to be as good as them, I know they have much more experience than I do have but the feeling I get can not be ignored. &lt;br&gt;
At the same time I want to learn the newest technologies, am taking two course to do so. &lt;/p&gt;

&lt;p&gt;Sometimes I feel like am distracting my self instead of focusing on a couple of things at a time. &lt;/p&gt;

&lt;p&gt;Now I have completed one year as a software developer. But I need some advice on how to balance between my personal coding gools and my work. &lt;/p&gt;

</description>
      <category>discuss</category>
      <category>help</category>
      <category>career</category>
    </item>
    <item>
      <title>Solutions To Store Data Temporally (local storage). </title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Thu, 24 Oct 2019 21:33:30 +0000</pubDate>
      <link>https://forem.com/saraahmed626/solutions-to-store-data-temporally-local-storage-1mk8</link>
      <guid>https://forem.com/saraahmed626/solutions-to-store-data-temporally-local-storage-1mk8</guid>
      <description>&lt;h2&gt;
  
  
  What are we talking about?
&lt;/h2&gt;

&lt;p&gt;While we are developing a &lt;strong&gt;web app&lt;/strong&gt; or &lt;strong&gt;mobile app&lt;/strong&gt;, Some of the data that needs to be stored will have to be permanent and hence should be saved in the Database, But other times you will need just to store it temporally and not for a long time, that's were you will need a client side solution that offers data storage possibilities to store values temporally. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Local storage. &lt;/li&gt;
&lt;li&gt;Sessions. &lt;/li&gt;
&lt;li&gt;Cookies.&lt;/li&gt;
&lt;li&gt;SQLite.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In this article we are going to go discuss using local storage.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a local storage?
&lt;/h2&gt;

&lt;p&gt;A type of web storage that allows JavaScript websites and apps to store and access data right in the browser with no expiration date.&lt;/p&gt;

&lt;h2&gt;
  
  
  How it really works?!
&lt;/h2&gt;

&lt;p&gt;Keep it mind that its in Key, Value format, with the use of methods:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;setItem()&lt;/strong&gt;: Add key and value to localStorage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;getItem()&lt;/strong&gt;: Retrieve a value by the key from localStorage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;removeItem()&lt;/strong&gt;: Remove an item by key from localStorage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;clear():&lt;/strong&gt; Clear all localStorage.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;key()&lt;/strong&gt;: Passed a number to retrieve nth key of a localStorage.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
js&lt;br&gt;
//To set Student data&lt;br&gt;
function SetStudentData() {&lt;br&gt;
  window.localStorage.setItem('Name', 'Sara');&lt;br&gt;
  window.localStorage.setItem('Age', '22');&lt;br&gt;
  window.localStorage.setItem('Gender', 'Female');&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;// To get Student Data&lt;br&gt;
function GetStudentData() {&lt;br&gt;
  var name = window.localStorage.getItem('Name');&lt;br&gt;
  var age = window.localStorage.getItem('Age');&lt;br&gt;
  var gender = window.localStorage.getItem('Gender');&lt;br&gt;
}&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  How Can i view local storage saved data?
&lt;/h2&gt;

&lt;p&gt;To View saved data, while on browser after running your program, press right click --&amp;gt; Inspect or Inspect elements in some browsers --&amp;gt; Then based on your browser type, look for storage or Application --&amp;gt; you will then find a tab or a link with name: local storage. &lt;/p&gt;

&lt;p&gt;Chrome &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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjnb46cpb6fwgqixdsh96.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fjnb46cpb6fwgqixdsh96.PNG" alt="Chrome"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;FireFox&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbn53xnesc0soir4qid5t.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fbn53xnesc0soir4qid5t.PNG" alt="FireFox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Example for a Scenario that requires using local storage
&lt;/h2&gt;

&lt;p&gt;At this point you might be wondering? what possible scenario would a good fit to use local storage solution!&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Furvjobioy97z1tmtjqun.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Furvjobioy97z1tmtjqun.png" alt="XO Game"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;let's say you are developing an X/O Game, We will have to store the value of each Square (Will assume that squares ranged from value 0 to 8) to be able to compare it later, So one possible solution is to save it by setting the value selected for each square in localstorage, and then compare it later by getting values and compare it using one of the conditional statements and loops.   &lt;/p&gt;

&lt;h2&gt;
  
  
  Advantages
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;It is very handy for key-value pairs.&lt;/li&gt;
&lt;li&gt;Stores data with no expiration date unlike session where is loses data after a specific amount of time. &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Disadvantages
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;If user deleted or re-install app all data will be lost.&lt;/li&gt;
&lt;li&gt;If user deleted the data of application it will be lost. &lt;/li&gt;
&lt;li&gt;Hard to store complex data&lt;/li&gt;
&lt;li&gt;You cannot "query" your data&lt;/li&gt;
&lt;li&gt;If you are using more than 1 webview on your mobile app you need your HTML5 content to came from the same domain, otherwise the LocalStorage data will not be shared across webviews.&lt;/li&gt;
&lt;li&gt;Storage limitation (~5MB) depend on browser. (for more info here)&lt;/li&gt;
&lt;li&gt;Only store string so you will end up convert into json (JSON.stringify) and query through JSON object&lt;/li&gt;
&lt;li&gt;Once the mobile storage is full, it will force pure all the data inside storage.&lt;/li&gt;
&lt;li&gt;Insecure as it has no form of data protection and can be accessed by any code on your web page.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Ps.
&lt;/h2&gt;

&lt;p&gt;Before using web storage, check browser support for localStorage and sessionStorage:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
js&lt;br&gt;
if (typeof(Storage) !== "undefined") {&lt;br&gt;
  // Code for localStorage/sessionStorage.&lt;br&gt;
} else {&lt;br&gt;
  // Sorry! No Web Storage support..&lt;br&gt;
}&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;So from what has been declared above, if your application store small amount of data or mostly do transaction or processes with online database. local Storage is likely a good option.&lt;/p&gt;

&lt;p&gt;After all that have been said what is your favorite way to store values? And why do you prefer it? also in what scenario you prefer to use such solutions? Please share it with us in the comments section below. &lt;/p&gt;

</description>
      <category>mobileapps</category>
      <category>storage</category>
    </item>
    <item>
      <title>I can't find my Reading list on dev.to</title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Fri, 09 Aug 2019 17:10:17 +0000</pubDate>
      <link>https://forem.com/saraahmed626/i-can-t-find-my-reading-list-on-dev-to-3jia</link>
      <guid>https://forem.com/saraahmed626/i-can-t-find-my-reading-list-on-dev-to-3jia</guid>
      <description>&lt;p&gt;It's been a while since this is happening, I can't find my reading list although it contains a number of articles&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---nPp_-1t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mn29ghyvsdqxkuki9zrs.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---nPp_-1t--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/mn29ghyvsdqxkuki9zrs.PNG" alt="reading list"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;but whenever i visit the link this is what am getting, an empty reading list.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5c9RTumk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xdhc0un5mwgh00x0zj7a.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5c9RTumk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/xdhc0un5mwgh00x0zj7a.PNG" alt="Empty Reading list"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Can any body help!&lt;/p&gt;

</description>
      <category>help</category>
    </item>
    <item>
      <title>Visualize Data using chart.js library (Tutorial)</title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Fri, 12 Jul 2019 19:55:41 +0000</pubDate>
      <link>https://forem.com/saraahmed626/visualize-data-using-chart-js-library-tutorial-49bp</link>
      <guid>https://forem.com/saraahmed626/visualize-data-using-chart-js-library-tutorial-49bp</guid>
      <description>&lt;p&gt;Sometimes in the software we build we find that we have to deal with data sets which cannot be viewed clearly unless we visualize it, we don't get the chance to have a bird-eye view to what's really happening in our project's data, here where comes the importance of Data visualization, using charts is one of the ways to visualize data. &lt;/p&gt;

&lt;p&gt;" A chart can take a large variety of forms, however there are common features that provide the chart with its ability to extract meaning from data.&lt;/p&gt;

&lt;p&gt;Typically the data in a chart is represented graphically, since humans are generally able to infer meaning from pictures quicker than from text. Text is generally used only to annotate the data.&lt;/p&gt;

&lt;p&gt;One of the most important uses of text in a graph is the title. A graph's title usually appears above the main graphic and provides a succinct description of what the data in the graph refers to.&lt;/p&gt;

&lt;p&gt;Dimensions in the data are often displayed on axes. If a horizontal and a vertical axis are used, they are usually referred to as the x-axis and y-axis respectively. Each axis will have a scale, denoted by periodic graduations and usually accompanied by numerical or categorical indications. Each axis will typically also have a label displayed outside or beside it, briefly describing the dimension represented. If the scale is numerical, the label will often be suffixed with the unit of that scale in parentheses. For example, "Distance traveled (m)" is a typical x-axis label and would mean that the distance traveled, in units of meters, is related to the horizontal position of the data within the chart. "&lt;/p&gt;

&lt;p&gt;This blog is a tutorial on using the JS library chart.js.&lt;/p&gt;

&lt;h2&gt;
  
  
  Chart.js
&lt;/h2&gt;

&lt;p&gt;Chart.js is a JavaScript &lt;strong&gt;open source&lt;/strong&gt; library that allows you to draw different types of charts by using the &lt;strong&gt;HTML5 canvas&lt;/strong&gt; element. Since it uses HTML5 canvas , you have to include a polyfill to support older browsers. &lt;br&gt;
Its &lt;strong&gt;responsive&lt;/strong&gt;, have &lt;strong&gt;Interactivity features&lt;/strong&gt; (Mouse over - on click),and also use &lt;strong&gt;legend&lt;/strong&gt; also known as a key. A legend contains a list of the variables appearing in the chart and an example of their appearance. This information allows the data from each variable to be identified in the chart.&lt;/p&gt;
&lt;h2&gt;
  
  
  Types of charts supported
&lt;/h2&gt;

&lt;p&gt;Line Chart&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fy1hrsssltvaiae6pg6lv.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fy1hrsssltvaiae6pg6lv.png" alt="Line Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bar Chart&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ffjp2li6ginmq6dtlf7n0.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ffjp2li6ginmq6dtlf7n0.png" alt="Bar Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Radar Chart&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkub1z9meqsa0h3mypwpl.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkub1z9meqsa0h3mypwpl.jpg" alt="Radar Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Pie &amp;amp; Doughnut Charts&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F72zui77rbq15rdmvvaa4.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F72zui77rbq15rdmvvaa4.png" alt="Doughnut &amp;amp; Pie Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Polar Area Chart&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F1sumc9zcja83nv75e23f.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F1sumc9zcja83nv75e23f.png" alt="Polar Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Bubble Chart&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fpveypm755d3ea5j7lzr9.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fpveypm755d3ea5j7lzr9.png" alt="Bubble Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Scatter Chart&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkwkpsu39uwvcff21zx8d.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fkwkpsu39uwvcff21zx8d.png" alt="Scatter Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Area Chart&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ffmu41ljdp06j89ck7d1r.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ffmu41ljdp06j89ck7d1r.png" alt="Area Chart"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Mixed: With Chart.js, it is possible to create mixed charts that are a combination of two or more different chart types.&lt;/p&gt;
&lt;h2&gt;
  
  
  How to use chart.js in your project
&lt;/h2&gt;

&lt;p&gt;Below two examples, one with Dynamic data that is passed from a controller to a view via JSON. In second example data is fixed, not passed from anywhere. &lt;/p&gt;
&lt;h3&gt;
  
  
  Example (1) Data Passed from a controller
&lt;/h3&gt;

&lt;p&gt;If we decided to use charts then we have some data sets, chart.js deals with data in form of data sets.&lt;/p&gt;

&lt;p&gt;In the beginning include chart.js library to your project.&lt;br&gt;
In example below, we used Ajax along with JSON object of lists to pass the data from a Controller called Charts to our view, it's up to you to decide how to send the data to the canvas. Or if Data is fixed then no need to JSON or Ajax just add data sets in form of fixed arrays/lists. Type of chart used is Doughnut.&lt;/p&gt;

&lt;p&gt;Usually we will have 3 data sets that can be represented using an array or a list:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Data set of the labels.&lt;/li&gt;
&lt;li&gt;Data set for the Quantity or value that represents each of the labels.&lt;/li&gt;
&lt;li&gt;Data set for the colors that represents each of the labels.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In controller, Method that process and send data from controller to view&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
html&lt;br&gt;
[AllowCrossSiteJson]&lt;br&gt;
    public ActionResult PieChartData()&lt;br&gt;
    {&lt;br&gt;
      List labelsList = new List();&lt;br&gt;
      List dataList = new List();&lt;br&gt;
      List colorsList = new List();&lt;/p&gt;

&lt;p&gt;//Add the code that process data from Database to be added to the three lists&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;return Json(new { labelsList, colorsList, dataList }, JsonRequestBehavior.AllowGet);
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In View, add canvas tag that the chart will be displayed in later.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
html&lt;/p&gt;




&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
html&lt;/p&gt;


   
   
      $(document).ready(function () {
      $.ajax({
      type: "get",
      //Charts is the controller
      // doughnutChartData is the Actionresult method that sends the JSON data                     to the view 
      url: "/Charts/doughnutChartData",
      dataType: 'json',
       //When success, data is the JSON object of lists passed from doughnutChartData method
      success: function (data) {
      //Making chart by using new Chart, and the canvas element with the id: doughnut-chart
             new Chart(document.getElementById("doughnut-chart"), {
               //Specify type of chart
                type: 'doughnut',
                data: {
               // First data set that contain labels, its accessed through JSON object data.
                labels: data.labelsList,
                datasets: [{
                label: "",
                //Second data set which contains a list of colors that will represent each label  
                backgroundColor: data.colorsList,
                 // Third data set which contains the value of each labe
                data: data.dataList
                        }]
                    },
                 // using Configuration Options, one can customize the chart, its explained below in a separate paragraph 
                options: {
                legend: {
                    display: false
                         },
                tooltips: {
                    enabled: true
                  },
                 maintainAspectRatio: false,
                 title: {
                    display: true,
                    text: 'Sales/ Item for Current Month'
                         }
                        }
                      });
           }, error: function (error) {
           console.log(error.responseText);
                                }
                                    });
                                });
    
 


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;In code above, first, the three data sets that represents our data was declared, and its ready to be displayed in the view, but making adjustments and customization can be done using Configuration options.&lt;/p&gt;
&lt;h2&gt;
  
  
  Configuration
&lt;/h2&gt;

&lt;p&gt;The configuration is used to change how the chart behaves. There are properties to control styling, fonts, the legend, etc.&lt;/p&gt;
&lt;h2&gt;
  
  
  Global configuration
&lt;/h2&gt;

&lt;p&gt;This concept was introduced in Chart.js 1.0 to keep configuration DRY, and allow for &lt;strong&gt;changing options globally&lt;/strong&gt; across chart types, avoiding the need to specify options for each instance, or the default for a particular chart type.&lt;/p&gt;
&lt;h2&gt;
  
  
  Configuration options:
&lt;/h2&gt;
&lt;h4&gt;
  
  
  Animation
&lt;/h4&gt;

&lt;p&gt;A number of options are provided to configure how the animation looks and how long it takes.&lt;/p&gt;
&lt;h4&gt;
  
  
  Layout
&lt;/h4&gt;

&lt;p&gt;Padding. If this value is a number, it is applied to all sides of the chart (left, top, right, bottom). If this value is an object, the left property defines the left padding. Similarly the right, top and bottom properties can also be specified.&lt;/p&gt;
&lt;h4&gt;
  
  
  legend
&lt;/h4&gt;

&lt;p&gt;The chart legend displays data about the datasets that are appearing on the chart.&lt;/p&gt;
&lt;h4&gt;
  
  
  Title
&lt;/h4&gt;

&lt;p&gt;The chart title defines text to draw at the top of the chart.&lt;/p&gt;
&lt;h4&gt;
  
  
  Tooltip
&lt;/h4&gt;

&lt;p&gt;Tooltips are the labels that appear when users hover over data points on your chart.&lt;/p&gt;
&lt;h4&gt;
  
  
  Elements
&lt;/h4&gt;

&lt;p&gt;While chart types provide settings to configure the styling of each dataset, you sometimes want to style all datasets the same way. A common example would be to stroke all of the bars in a bar chart with the same colour but change the fill per dataset. Options can be configured for four different types of elements: arc, lines, points, and rectangles. When set, these options apply to all objects of that type unless specifically overridden by the configuration attached to a dataset.&lt;/p&gt;
&lt;h3&gt;
  
  
  Resulted Chart after applying code above:
&lt;/h3&gt;

&lt;p&gt;When applying code Hovering over each color will display the label of each value.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmzc4ijjllx4q692wiaue.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmzc4ijjllx4q692wiaue.PNG" alt="Doughnut Chart "&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Example(2) Fixed Data
&lt;/h3&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
html&lt;br&gt;
&lt;br&gt;
&lt;/p&gt;





&lt;p&gt;var ctx = document.getElementById('myChart');&lt;br&gt;
var myChart = new Chart(ctx, {&lt;br&gt;
    type: 'bar',&lt;br&gt;
    data: {&lt;br&gt;
        labels: ['Red', 'Blue', 'Yellow', 'Green', 'Purple', 'Orange'],&lt;br&gt;
        datasets: [{&lt;br&gt;
            label: '# of Votes',&lt;br&gt;
            data: [12, 19, 3, 5, 2, 3],&lt;br&gt;
            backgroundColor: [&lt;br&gt;
                'rgba(255, 99, 132, 0.2)',&lt;br&gt;
                'rgba(54, 162, 235, 0.2)',&lt;br&gt;
                'rgba(255, 206, 86, 0.2)',&lt;br&gt;
                'rgba(75, 192, 192, 0.2)',&lt;br&gt;
                'rgba(153, 102, 255, 0.2)',&lt;br&gt;
                'rgba(255, 159, 64, 0.2)'&lt;br&gt;
            ],&lt;br&gt;
            borderColor: [&lt;br&gt;
                'rgba(255, 99, 132, 1)',&lt;br&gt;
                'rgba(54, 162, 235, 1)',&lt;br&gt;
                'rgba(255, 206, 86, 1)',&lt;br&gt;
                'rgba(75, 192, 192, 1)',&lt;br&gt;
                'rgba(153, 102, 255, 1)',&lt;br&gt;
                'rgba(255, 159, 64, 1)'&lt;br&gt;
            ],&lt;br&gt;
            borderWidth: 1&lt;br&gt;
        }]&lt;br&gt;
    },&lt;br&gt;
    options: {&lt;br&gt;
        scales: {&lt;br&gt;
            yAxes: [{&lt;br&gt;
                ticks: {&lt;br&gt;
                    beginAtZero: true&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 plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Just Copy paste the second example and View result in your browser ;)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Further reading&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://www.chartjs.org/" rel="noopener noreferrer"&gt;Chart.js&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.jsdelivr.com/package/npm/chart.js" rel="noopener noreferrer"&gt;Download chart.js&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.chartjs.org/docs/latest/configuration/animations.html" rel="noopener noreferrer"&gt;Configurations Options&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Comparison_of_JavaScript_charting_libraries" rel="noopener noreferrer"&gt;Comparison of JavaScript charting libraries&lt;/a&gt;&lt;br&gt;
&lt;a href="https://en.wikipedia.org/wiki/Chart#Features_of_a_chart" rel="noopener noreferrer"&gt;Features of a chart&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>charts</category>
      <category>datavisualization</category>
    </item>
    <item>
      <title>Your feedback on my website portfolio!</title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Tue, 25 Jun 2019 23:10:08 +0000</pubDate>
      <link>https://forem.com/saraahmed626/your-feedback-on-my-website-portfolio-3118</link>
      <guid>https://forem.com/saraahmed626/your-feedback-on-my-website-portfolio-3118</guid>
      <description>&lt;p&gt;Here is the first draft of my portfolio that i have created using CSS, HTML, and JS, i need your feedback before publishing it.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;One thing am planning to add is a logo.&lt;/li&gt;
&lt;li&gt;Also am not satisfied yet with the projects section design, any ideas?&lt;/li&gt;
&lt;li&gt;What you think about the font?&lt;/li&gt;
&lt;li&gt;Do i need to add more sections, like CV? &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Projects listed are Imaginary i didn't create any of them, but will add later when i finish developing&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Kindly find the link:&lt;br&gt;
&lt;a href="https://codepen.io/saraahmed626/full/aXEyog"&gt;My Portfolio&lt;/a&gt;&lt;/p&gt;

</description>
      <category>help</category>
    </item>
    <item>
      <title>Thoughts on first Technology meetup I've attended...</title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Sat, 22 Jun 2019 22:58:04 +0000</pubDate>
      <link>https://forem.com/saraahmed626/thoughts-on-first-technology-meetup-i-ve-attended-2g57</link>
      <guid>https://forem.com/saraahmed626/thoughts-on-first-technology-meetup-i-ve-attended-2g57</guid>
      <description>&lt;p&gt;As a Computer science graduate, previous technical support, and a current programmer, i have been into tech related events before, but this one was a little bit different.&lt;br&gt;
Following up my plan to grow my network, i decided to go to this meetup, i look it up in &lt;a href="https://www.meetup.com/" rel="noopener noreferrer"&gt;Meetup&lt;/a&gt; website.&lt;/p&gt;

&lt;p&gt;This meetup was in Egypt &lt;strong&gt;Damanhour&lt;/strong&gt; a small city that is one hour away from Alexandria, I didn't have any geek Egyptian friends, and it's my first time to come to Egypt, so i was excited and a little bit nervous at the same time because i didn't have the slightest idea about the Egyptian technology community, haven't been in touch with any of its members, or searched about it online! and visit to Egypt was originally for a family vacation.&lt;br&gt;
That's why it was different. &lt;/p&gt;

&lt;h3&gt;
  
  
  Organizer of the meetup?
&lt;/h3&gt;

&lt;p&gt;Google Developers Group Damanhour (GDG Damanhour).&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"GDGs are local groups of developers who are specifically interested in Google products and APIs. Each local group is called a GDG chapter and can host a variety of technical activities for developers - from just a few people getting together to watch our latest videos, to large gatherings with demos and tech talks, to hackathons.&lt;br&gt;
Google Developers supports and recognizes GDG chapters, but doesn’t own or manage them."&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Topics that were covered?
&lt;/h3&gt;

&lt;p&gt;It contained 3 parts, each of which was an introduction for the topic.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Flutter by: Tarek Alabd.&lt;/li&gt;
&lt;li&gt;AI by: Gihad Naguib.&lt;/li&gt;
&lt;li&gt;Google Cloud Platform by: Wessam El-shaarawy.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;For a complete beginner in each of the topics above with a little of basic knowledge in technology in general, content presented was very good, speakers have impressive CV's and very good experiences.&lt;/p&gt;

&lt;h3&gt;
  
  
  Did i like it?
&lt;/h3&gt;

&lt;p&gt;Yes i did, i got to know about the tech community and tech market in Egypt, Speakers, organizers and participants were so nice, welcoming and welling to answer all questions.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fw3f4ylgwetm4bh6bh1e3.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fw3f4ylgwetm4bh6bh1e3.jpg" alt="GDG Damanhour"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And it was good to see another side, which is google products, a side that i didn't work with any of its technologies yet. &lt;/p&gt;

&lt;p&gt;I've even got my first Programmer stickers :D &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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2omn3ujn8ahpx94h6kda.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F2omn3ujn8ahpx94h6kda.jpg" alt="Technology Stickers"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Attending 2 Tech related events outside Sudan: half Checked ;)&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>network</category>
      <category>collaboration</category>
      <category>google</category>
    </item>
    <item>
      <title>Contributing to open source for beginners. How and Where!</title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Sun, 16 Jun 2019 09:43:26 +0000</pubDate>
      <link>https://forem.com/saraahmed626/contributing-to-open-source-for-beginners-how-and-where-7ob</link>
      <guid>https://forem.com/saraahmed626/contributing-to-open-source-for-beginners-how-and-where-7ob</guid>
      <description>&lt;p&gt;As am improving my coding skills in every way possible, and after making a research of it's benefits. I have found that one should contribute to open source projects. &lt;/p&gt;

&lt;p&gt;How ever; i didn't know what's really happening in that world! Or how should i enter it.&lt;/p&gt;

&lt;p&gt;Do you have some practical tips or recommendations for a beginner to start dive in the open source world? a side from learning Git.&lt;/p&gt;

&lt;p&gt;And if you know some beginners friendly projects kindly share the link in the comments section below.&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Gridbox vs Flexbox.</title>
      <dc:creator>Sara °°°</dc:creator>
      <pubDate>Fri, 14 Jun 2019 14:12:01 +0000</pubDate>
      <link>https://forem.com/saraahmed626/gridbox-vs-flexox-3jg0</link>
      <guid>https://forem.com/saraahmed626/gridbox-vs-flexox-3jg0</guid>
      <description>&lt;p&gt;In web development we have two main front-end technologies, and they complete each other, combined they handle the job of structuring and designing our webpages view, which are: HTML and CSS, along with other technologies such as JavaScript frameworks that are not mentioned in this post.&lt;br&gt;
Let's say we have a house, we first have to build the structure of the building, the walls, floor and the ceiling, then later we will be painting the walls, decorating the house and getting the furniture in the second step.&lt;br&gt;
HTML (Hyper Text Markup Language) is our structure for our webpage, CSS (Cascading Style Sheets) is the filling, decor and the furniture of the webpage. &lt;/p&gt;
&lt;h2&gt;
  
  
  CSS
&lt;/h2&gt;

&lt;p&gt;In this post we are going to go through the two layout methods that are used in CSS to make our layout in the webpage or the software pages respectively. &lt;/p&gt;
&lt;h2&gt;
  
  
  Gridbox and Flexbox
&lt;/h2&gt;

&lt;p&gt;Both are used to set the layout, we will need to have a parent element first to contain Child element(s), child elements of the parent container automatically becomes Flex/Grid items. &lt;/p&gt;
&lt;h3&gt;
  
  
  Gridbox
&lt;/h3&gt;

&lt;p&gt;Grid based layout system that distribute the pages for rows and columns&lt;br&gt;
A Grid Layout must have a parent element with the display property set to grid or inline-grid, child element(s) of the grid container automatically becomes grid items.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
css&lt;/p&gt;


    .element1{background:gold;}
  .element2{background:Gray;}
  .element3{background:gold;}
  .element4{background:Gray;}
  .element5{background:gold;}
  .element6{background:Gray;}
  
  .container {
    font-size: 40px;
    width: 100%;
    background: LightGray;
    display: grid;
    grid-template-columns: 100px 100px 100px;
    grid-template-rows: 50px 50px 50px;
  }

  


  1
  2
  3
  4
  5
  6



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Result:&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F07c9vpuaeldvlljnfirj.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F07c9vpuaeldvlljnfirj.PNG" alt="Gridbox"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Flexbox
&lt;/h3&gt;

&lt;p&gt;Flex based layout system distribute the elements of a row or a column&lt;br&gt;
A Flex Layout must have a parent element with the display property set to Flex child element(s) of the grid container automatically becomes flex items.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;br&gt;
css&lt;/p&gt;


  #box-container {
    height: 600px;
    display: flex;
  }  
  #element1 {
    background-color: gold;
    width: 50%;
    height: 50%;  
  }
  #element2 {
    background-color: gray;
    width: 50%;
    height: 50%;
  }



  
  



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Result:&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fg3mjg6qeu3btmrn3ywr1.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fg3mjg6qeu3btmrn3ywr1.png" alt="FlexBox"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then using different &lt;strong&gt;proprieties&lt;/strong&gt; for the parent container, or for the child element(s) one can manipulate layout further, with more enhancements and adjustments in a very flexible way.&lt;/p&gt;
&lt;h3&gt;
  
  
  Properties used with Gridbox:
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Parent element (Container) Properties:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;grid-gap property: The spaces between each column/row are called gaps&lt;/li&gt;
&lt;li&gt;grid-template-columns property: defines the number of columns in your grid layout, and it can define the width of each column.&lt;/li&gt;
&lt;li&gt;grid-template-rows property: defines the height of each row.&lt;/li&gt;
&lt;li&gt;justify-content property: is used to align the whole grid inside the container.&lt;/li&gt;
&lt;li&gt;align-content property: is used to vertically align the whole grid inside the container.&lt;/li&gt;
&lt;/ul&gt;
&lt;h4&gt;
  
  
  Child element(s)(Items) Properties:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;grid-column property: defines on which column(s) to place an item,You define where the item will start, and where the item will end.&lt;/li&gt;
&lt;li&gt;grid-row property: defines on which row to place an item, You define where the item will start, and where the item will end.&lt;/li&gt;
&lt;li&gt;grid-area property: can be used as a shorthand property for the grid-row-start, grid-column-start, grid-row-end and the grid-column-end properties.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Properties used with Flexbox:
&lt;/h3&gt;
&lt;h4&gt;
  
  
  Parent element (Container) Properties:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;flex-direction property: defines in which direction the container wants to stack the flex items.&lt;/li&gt;
&lt;li&gt;flex-wrap property: specifies whether the flex items should wrap or not.&lt;/li&gt;
&lt;li&gt;flex-flow property: is a shorthand property for setting both the flex-direction and flex-wrap properties.&lt;/li&gt;
&lt;li&gt;justify-content property: is used to align the flex items.&lt;/li&gt;
&lt;li&gt;align-items property: is used to align the flex items vertically.&lt;/li&gt;
&lt;li&gt;align-content property: is used to align the flex lines.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Flexbox Vs Gridbox
&lt;/h2&gt;

&lt;p&gt;So the core different between two ways is that Grid Layout is a two-dimensional system , it can handle both columns and rows, but Flexbox on the other hand is a one-dimensional system (either in a column or a row).&lt;/p&gt;

&lt;p&gt;In a more &lt;strong&gt;practical Example&lt;/strong&gt;, you can use Gridbox, Flexbox, parent and child elements properties combined to make a real layout of webpage just like in the example below.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fx248jwun7yo635u4hvor.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fx248jwun7yo635u4hvor.PNG" alt="Gridbox vs Flexbox Structure"&gt;&lt;/a&gt; &lt;/p&gt;
&lt;h4&gt;
  
  
  HTML Code
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
html&lt;/p&gt;


  
    Home
    Features
    About
    contact Us
    Logout
  
  Side Bar
  Section 1
  Section 2
  Section 3
   Section 4
  Footer



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h4&gt;
  
  
  CSS Code
&lt;/h4&gt;


&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;p&gt;&lt;br&gt;
css&lt;br&gt;
.wrapper { &lt;br&gt;
  display: grid; &lt;br&gt;
  grid-gap: 20px;&lt;br&gt;
  grid-template-columns: repeat(3, 1fr); &lt;br&gt;
  grid-auto-rows: 100px; &lt;br&gt;
} &lt;/p&gt;

&lt;p&gt;.box1 { &lt;br&gt;
  grid-column-start: 1; &lt;br&gt;
  grid-column-end: 4; &lt;br&gt;
  grid-row-start: 1; &lt;br&gt;
  grid-row-end: 2; &lt;br&gt;
  align: center;&lt;br&gt;
  display: flex;&lt;br&gt;
  gap: 20px;&lt;br&gt;
  align-items: center;&lt;br&gt;
}&lt;br&gt;
.box1 &amp;gt; div:nth-child(5) {&lt;br&gt;
    margin-left: auto;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;.box2 { &lt;br&gt;
  grid-column-start: 1; &lt;br&gt;
  grid-row-start: 2; &lt;br&gt;
  grid-row-end: 5; &lt;br&gt;
}&lt;br&gt;
.box3{&lt;br&gt;
 grid-row-start: 2; &lt;br&gt;
 grid-row-end: 5; &lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;.box7 { &lt;br&gt;
  grid-column-start: 1; &lt;br&gt;
  grid-column-end: 4; &lt;br&gt;
  grid-row-start: 5; &lt;br&gt;
  grid-row-end: 6; &lt;br&gt;
}&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;{box-sizing: border-box;}&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;.wrapper {&lt;br&gt;
  border: 2px solid gray;&lt;br&gt;
  border-radius: 5px;&lt;br&gt;
  background-color: #fff4e6;&lt;br&gt;
}&lt;/p&gt;

&lt;p&gt;.wrapper &amp;gt; div {&lt;br&gt;
  border: 2px solid gray;&lt;br&gt;
  border-radius: 5px;&lt;br&gt;
  background-color: gold;&lt;br&gt;
  padding: 1em;&lt;br&gt;
  color: #444444;&lt;br&gt;
}&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  What else you can benefit from using Gridbox or Flexbox?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Responsiveness, so you will have a dynamic layout.&lt;/li&gt;
&lt;li&gt;Widely supported across all platforms &amp;amp; modern browsers. &lt;/li&gt;
&lt;li&gt;Easy to use. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  For further reading
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://www.w3schools.com/css/css3_flexbox.asp" rel="noopener noreferrer"&gt;Flexbox&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.w3schools.com/css/css_grid.asp" rel="noopener noreferrer"&gt;Gridbox&lt;/a&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>frontend</category>
      <category>webdesign</category>
    </item>
  </channel>
</rss>
