<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Rose Kamal Love</title>
    <description>The latest articles on DEV Community by Rose Kamal Love (@rosekamallove).</description>
    <link>https://dev.to/rosekamallove</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%2F860212%2F7463421c-4b85-4041-9272-c4aacb646ea2.jpeg</url>
      <title>DEV Community: Rose Kamal Love</title>
      <link>https://dev.to/rosekamallove</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/rosekamallove"/>
    <language>en</language>
    <item>
      <title>Introduction to FHIR - The Standard for data exchange in healthcare</title>
      <dc:creator>Rose Kamal Love</dc:creator>
      <pubDate>Thu, 16 Jun 2022 22:31:17 +0000</pubDate>
      <link>https://dev.to/rosekamallove/introduction-to-fhir-the-standard-for-data-exchange-in-healthcare-fh0</link>
      <guid>https://dev.to/rosekamallove/introduction-to-fhir-the-standard-for-data-exchange-in-healthcare-fh0</guid>
      <description>&lt;p&gt;I have recently been accepted as an open source contributor for &lt;a href="https://librehealth.io"&gt;LibreHealthIO&lt;/a&gt; under the&lt;br&gt;
&lt;a href="https://summerofcode.withgoogle.com"&gt;Google Summer of Code&lt;/a&gt; Program and my project for this summer is to rewrite the&lt;br&gt;
whole UI of the &lt;a href="https://radiology.librehealth.io"&gt;lh-toolkit&lt;/a&gt; as an &lt;a href="https://github.com/openmrs/openmrs-module-owa"&gt;Open Web App&lt;/a&gt;&lt;br&gt;
using the pre-existing &lt;a href="https://gitlab.com/librehealth/toolkit/lh-toolkit-webcomponents"&gt;lh-toolkit-webcomponents&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;These web components are built with &lt;strong&gt;Polymer.js&lt;/strong&gt; and follow what is called the &lt;strong&gt;FHIR Standard&lt;/strong&gt; which is the&lt;br&gt;
ultimate standard when it comes to data exchange in healthcare. My UI re-write is supposed to be compliant with this&lt;br&gt;
standard. So, I figured why not write a blog about everything I learn about &lt;a href="https://www.hl7.org/fhir/"&gt;FHIR&lt;/a&gt; Standard&lt;br&gt;
so that people that come after me have a place to look for, and my understanding solidifies while writing this.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;FYI: FHIR is pronounced as Fire, weird I know but it is what it is.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Checkout &lt;a href="https://www.youtube.com/watch?v=YbQcJj1GqH0"&gt;Intro to FHIR&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Before FHIR and what led to its creations
&lt;/h2&gt;

&lt;p&gt;In the ancient times (the 2000s) it was very hard to have applications that we take for granted today, IE5 was the explorer that&lt;br&gt;
people used back then. Developers back then had to solve really basic problems to even do things as basic as creating a&lt;br&gt;
web portal that links two hospitals' data together and shows it on a web page.&lt;/p&gt;

&lt;p&gt;Getting access to data, designing asynchronous web applications, and reloading the web page when new data comes in,&lt;br&gt;
we're really crazy problems for developers back then. Think of writing a frontend for &lt;strong&gt;IE5&lt;/strong&gt; that updates with the data,&lt;br&gt;
yeah we do take a lot of things for granted that developers in the early 2000s had to do themselves.&lt;/p&gt;

&lt;p&gt;The technology that the developer from the 2000s used as a protocol known as &lt;strong&gt;HL7 V2&lt;/strong&gt;, is a bit hard to understand&lt;br&gt;
but once you are used to it, HL7 V2 really makes it a lot easier to quickly scan the data and tell what's it trying to tell&lt;br&gt;
you. It was &lt;em&gt;very dense&lt;/em&gt; so allows for a lot of information in smaller transfers.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This is what a typical &lt;em&gt;HL7 V2&lt;/em&gt; payload looked like:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RopU_P8G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/69139607/173615554-dcf4d59c-bcb6-4668-ac07-63ab50bd8c80.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RopU_P8G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/69139607/173615554-dcf4d59c-bcb6-4668-ac07-63ab50bd8c80.jpg" alt="HL7 V2 Payload" width="880" height="257"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I know this looks hilarious, but isn't building web apps for &lt;strong&gt;IE5&lt;/strong&gt; hilarious in itself? Even though this looks very&lt;br&gt;
old fashioned (because it is) but it really was a groundbreaking technology because it allowed for web apps to be built&lt;br&gt;
which could dynamic, asynchronously querying a bunch of backend systems using these v2 queries and dynamically updating&lt;br&gt;
itself when new data comes in.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Me thinking about &lt;code&gt;useEffect&lt;/code&gt; while writing this 😆&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;After the &lt;strong&gt;HL7 V2&lt;/strong&gt; there was a large effort to replace it with something more modern than something that was built in&lt;br&gt;
the 90s. That led to the creation of a protocol known as the &lt;strong&gt;HL7 V3&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;This here is an example of HL7 V3's XML Payload&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--unVMHCD---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/69139607/173617674-66a9fce8-b81b-4b43-b973-7b0fedd44d9f.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--unVMHCD---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/69139607/173617674-66a9fce8-b81b-4b43-b973-7b0fedd44d9f.jpg" alt="HL7 V3 Payload" width="880" height="196"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Even though this was a great effort with some really good ideas in it, it utterly failed to attract any kind of mind&lt;br&gt;
share. The main reason that I found it on the internet is that it was too complex and intense to understand and the make&lt;br&gt;
something useful out of it. So it never really managed to take off as a useful standard.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Basic Technology as a Barrier&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Basic concepts of getting data out of EHRs and agreeing on formats across jurisdictions were completely preventing large&lt;br&gt;
scale interop.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A lot of amazing things were done using the &lt;strong&gt;HL7 V2&lt;/strong&gt; and &lt;strong&gt;V1&lt;/strong&gt; but at the same time a lot of amazing things were not&lt;br&gt;
done, just because the technology hadn't caught up, it really wasn't usable by modern approaches to build applications,&lt;br&gt;
things like building apps that work on your phone and tablet, or work across slow distributed mobile networks, there are&lt;br&gt;
all kinds of barriers there.&lt;/p&gt;

&lt;p&gt;All of this leads to the creation of 🔥 HL7 &lt;strong&gt;FHIR&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;FHIR was created as a response to these old technologies, as a&lt;br&gt;
fresh attempt to build standards that could meet modern needs for interoperability and most importantly that it&lt;br&gt;
would be picked up by people who needed to build technology to solve healthcare problems so &lt;strong&gt;let's dive in&lt;/strong&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Introduction 🔥 HL7 FHIR
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;I still can't get over FHIR being pronounced as fire 😆&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;F&lt;/strong&gt;ast &lt;strong&gt;H&lt;/strong&gt;ealthcare &lt;strong&gt;I&lt;/strong&gt;nteroperablity &lt;strong&gt;R&lt;/strong&gt;esources the &lt;em&gt;H&lt;/em&gt; and the &lt;em&gt;I&lt;/em&gt; are fundamentally what they wanted to build. So, no question about why they chose those two letters.&lt;/p&gt;

&lt;p&gt;They chose the word &lt;em&gt;fast&lt;/em&gt; kind of deliberately, and fast in this context doesn't mean that the data exchange in itself is fast. The idea behind it are that it is &lt;em&gt;fast to adopt&lt;/em&gt; which translates to, you don't need tonnes of experience, PHDs or anything like that to get started with the &lt;strong&gt;FHIR Standard&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;It is intended to be a standard that you can pick up, quickly learn, and very quickly become productive as well as proficient in. And I gotta say, they have succeeded in making it fast.&lt;/p&gt;

&lt;p&gt;The work &lt;strong&gt;resources&lt;/strong&gt; comes from the &lt;strong&gt;HTTP spec&lt;/strong&gt;, the language that they (HTTP) use describes the entire &lt;em&gt;world wide web&lt;/em&gt; in terms of &lt;strong&gt;addressable resources&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;For example, you go to google and type in your query term in the form input, and then you pull down a page with a bunch of search results on it, what you have actually done is you have downloaded a resource, that &lt;em&gt;resource&lt;/em&gt;, in this case, is &lt;em&gt;search results&lt;/em&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The HTTP spec describes the entire web in terms of these addressable , fetchable, resources.&lt;br&gt;
FHIR is taking all of that context and applying it to Health Care&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Hl7&lt;/strong&gt; is a standards development organization and &lt;strong&gt;FHIR&lt;/strong&gt; is a standard. &lt;em&gt;(V2 and CDA are also separate standards)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Just a heads up almost none of the actual work of standards development happens by &lt;strong&gt;HL7&lt;/strong&gt; the corporate entity, what it brings to the table is a process and a governance framework and they organize events, the standard itself is created by volunteers who are spread entirely around the globe.&lt;/p&gt;

&lt;p&gt;The amazing stuff, all of it is &lt;strong&gt;free and open source&lt;/strong&gt;, this is honestly is great.&lt;/p&gt;
&lt;h2&gt;
  
  
  So, What is FHIR?
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;FHIR&lt;/strong&gt; is a free and open source standard for health interoperability, based on modern approaches. It consists of &lt;strong&gt;five things&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;A robust &lt;strong&gt;data model&lt;/strong&gt; for describing health and administrative data&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A &lt;strong&gt;RESTful API&lt;/strong&gt; for interacting with the data using either JSON or XML&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A set of &lt;strong&gt;open source tools&lt;/strong&gt; to implement and test FHIR applications&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A collection of &lt;strong&gt;FHIR Servers&lt;/strong&gt; around the world that you can interact with&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;A &lt;strong&gt;community&lt;/strong&gt; of implementers working together&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;FHIR also has its own free and open source implementation of the standards in the &lt;strong&gt;Java&lt;/strong&gt; programming language.&lt;br&gt;
But if you're not a Java developer, there are open source libraries of excellent quality in all kinds of other languages as well.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  The FHIR Manifesto
&lt;/h2&gt;

&lt;p&gt;One of the primary aims of FHIR was to not repeat the mistakes of the past, and a lot of that led to the creat of &lt;strong&gt;The FHIR Manifesto&lt;/strong&gt; which is a set of guiding principles that was key in terms of decision-making, in order to create and maintain a standard that can be implemented quickly.&lt;/p&gt;

&lt;p&gt;Here are a few points from that manifesto&lt;/p&gt;
&lt;h3&gt;
  
  
  Implementer Focus
&lt;/h3&gt;

&lt;p&gt;This sounds trivial I know, a, of course, a technical standard is going to target developers and implementers, but a lot of people who contributed to the FHIR standard aren't Computer Scientists or doesn't come from a computer background at all, they are clinicians, doctors or PHDs. The vocabulary that they use can be a bit hard to comprehend for the "technical" folks.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The specification is targeted at &lt;strong&gt;developers and implementers&lt;/strong&gt; (not clinicians)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Every detail of the specification is tested at &lt;strong&gt;connectathon events&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;When creating a standard it is crucial to test its implementations because it can and does happen that we come up with standards, think that they are the optimal ones and then they turn out to be unworkable this is why &lt;strong&gt;connectathon events&lt;/strong&gt; help a lot in testing the standards before making them &lt;strong&gt;normative&lt;/strong&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Common Scenarios
&lt;/h3&gt;

&lt;p&gt;The &lt;strong&gt;HL7 V3&lt;/strong&gt; tried to be comprehensive, it was trying to be &lt;strong&gt;the&lt;/strong&gt; standard that can be usable for &lt;em&gt;every&lt;/em&gt; use case. So it becomes bloated with a lot of stuff that one person needed, or a small group of people needed.&lt;/p&gt;

&lt;p&gt;So, FHIR places a heavy emphasis on the &lt;strong&gt;80:20 rule&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;80%&lt;/strong&gt; - Specification covers only what is needed by 80% of systems worldwide&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;20%&lt;/strong&gt; - FHIR is easy to extend for your use case&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Be Open
&lt;/h3&gt;

&lt;p&gt;FHIR is &lt;strong&gt;free to use&lt;/strong&gt; and free to contribute to&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Specification is licensed under Creative Commons CC0&lt;/li&gt;
&lt;li&gt;Many tools are open source (MIT / The APACHE License (Apache License)&lt;/li&gt;
&lt;li&gt;Many tutorials are free as well&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  Be Easy to Adopt
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Being easy to learn is critical to the success of FHIR&lt;/li&gt;
&lt;li&gt;Many organizations have adopted FHIR in &lt;strong&gt;weeks&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Parts of FHIR
&lt;/h2&gt;
&lt;h3&gt;
  
  
  FHIR: Data Model
&lt;/h3&gt;

&lt;p&gt;As I mentioned earlier the &lt;strong&gt;R&lt;/strong&gt; in FHIR stands for &lt;em&gt;resource&lt;/em&gt;, and resource ofc is that &lt;em&gt;http&lt;/em&gt; concept of a resource. In the world of FHIR, an individual resource is a &lt;strong&gt;data model&lt;/strong&gt; for some specific purpose.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;FHIR defines a set of roughly &lt;strong&gt;150 resources&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;These are the building blocks of the specification, example include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Patient&lt;/strong&gt; (the person who receives healthcare)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Encounter&lt;/strong&gt; (a doctor's appointment or hospital say)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Observation&lt;/strong&gt; (e.g. a device reading, or lab value)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Diagnostic Report&lt;/strong&gt; (e.g. a whole lab or X-Ray report)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medication Prescription&lt;/strong&gt; (Rx for meds)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let's look into the &lt;strong&gt;Patient&lt;/strong&gt; resource a little deeper,&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8_BhgKXd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/69139607/173682952-6bb2cb19-d2aa-482f-b3cd-2e481e73b479.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8_BhgKXd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/69139607/173682952-6bb2cb19-d2aa-482f-b3cd-2e481e73b479.jpg" alt="Patient Resource Type" width="880" height="355"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is the structure of the &lt;strong&gt;Patient&lt;/strong&gt; resource type which you can find on the &lt;a href="https://www.hl7.org/fhir/patient.html"&gt;FHIR Website&lt;/a&gt;, this website is in itself a highly comprehensive documentation of everything &lt;strong&gt;FHIR&lt;/strong&gt; and even everything &lt;strong&gt;HL7&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;One of the things in this website/documentation that I think is great but may sound trivial to you is that everything that can be explained has a link attached to it, which you can click to learn more about what it is.&lt;/p&gt;

&lt;p&gt;For example, what do you think that little sigma symbol in the 2nd grid represents? Well, click on it and find out.&lt;/p&gt;

&lt;p&gt;One other thing that I have noticed myself is that the documentation is written in a way that I (a developer) don't have a hard time understanding. It does be following the manifesto XD&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Type: Primitives&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Much like any other programming language, FHIR has defined its own set of data types. These data types are very similar to the ones used in general programming languages so no worries there.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Types&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Example&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;string&lt;/td&gt;
&lt;td&gt;Patient is awake&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;td&gt;true&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;date&lt;/td&gt;
&lt;td&gt;2016-02-19&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;decimal&lt;/td&gt;
&lt;td&gt;12.347000&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;integer&lt;/td&gt;
&lt;td&gt;500&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;uri&lt;/td&gt;
&lt;td&gt;&lt;a href="http://snomed.info/sct"&gt;http://snomed.info/sct&lt;/a&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;base64&lt;/td&gt;
&lt;td&gt;rwr39o9h=&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;dateTime&lt;/td&gt;
&lt;td&gt;2015-01-26t15:33:13-05:00&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;instant&lt;/td&gt;
&lt;td&gt;2015-01-26t15:33:13.099-05:00&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;In the FHIR spec, &lt;em&gt;uris&lt;/em&gt; and &lt;em&gt;urls&lt;/em&gt; are very widely used hence there is a whole data type for that only, &lt;strong&gt;base64&lt;/strong&gt; here is used for things like images and all.&lt;/p&gt;

&lt;p&gt;There are two types of dates in the FHIR spec, the &lt;em&gt;dateTime&lt;/em&gt; represents the human time, which can have variable precision. &lt;em&gt;instant&lt;/em&gt; on the other hand stores the system time, with the precision of seconds/milliseconds.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Data Type: General Purpose (composite)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;General purpose datatypes are mini structures that are reused in a different part of the models&lt;/p&gt;



&lt;p&gt;&lt;strong&gt;Here's an example of a general purpose data type: Human Name&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FWA6hF_7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/69139607/173908476-cf634875-c094-4643-b233-01c7ef4824d4.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FWA6hF_7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://user-images.githubusercontent.com/69139607/173908476-cf634875-c094-4643-b233-01c7ef4824d4.jpg" alt="HumanName" width="880" height="293"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  FHIR Data Model - Resources
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Meta Data&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Resource ID&lt;/li&gt;
&lt;li&gt;Resource Version&lt;/li&gt;
&lt;li&gt;Tags&lt;/li&gt;
&lt;li&gt;Profile&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Extensiosn&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Any information that doesn't fit into the 80% (Remember the 80:20 rule?)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Narrative&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Human-readable version of the content (optional but encouraged)&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;CDA&lt;/em&gt; has taught them that this is very important&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Body&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Raw Structured Data&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  FHIR Encodings
&lt;/h3&gt;

&lt;p&gt;FHIR has defined as of today 3 encodings, 3 means of serializing data and sending it across the wire,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;JSON:&lt;/strong&gt; The most popular with modern internet APIs&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;XML:&lt;/strong&gt; Still very popular with great tools available&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;RDF/Turtle:&lt;/strong&gt; Only generally used in some research contexts&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A JSON encoding example of the &lt;em&gt;Patient&lt;/em&gt; resource&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"resourceType"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"Patient"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Resource:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;meta&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;implicitRules&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;language&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;from&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;DomainResource:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;text&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;contained&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;extension&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;and&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;modifierExtension&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"identifier"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Identifier&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;An&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;identifier&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"active"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;boolean&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Whether&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient's&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;record&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;in&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;active&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;use&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;HumanName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;associated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"telecom"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;ContactPoint&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;contact&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;detail&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;individual&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"gender"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;code&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;male&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;female&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;other&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;unknown&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"birthDate"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;date&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;date&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;birth&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;individual&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;deceased&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;x&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Indicates&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;if&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;individual&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;deceased&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;not.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;One&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;these&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"deceasedBoolean"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;boolean&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"deceasedDateTime"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;dateTime&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"address"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Address&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;An&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;address&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;individual&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maritalStatus"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;CodeableConcept&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Marital&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;(civil)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;status&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;multipleBirth&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="err"&gt;x&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Whether&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;part&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;a&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;multiple&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;birth.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;One&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;these&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="err"&gt;:&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"multipleBirthBoolean"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;boolean&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"multipleBirthInteger"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;integer&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"photo"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Attachment&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Image&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"contact"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;contact&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;party&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;(e.g.&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;guardian&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;partner&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;friend)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"relationship"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;CodeableConcept&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;kind&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;relationship&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"name"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;HumanName&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;name&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;associated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;contact&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;person&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"telecom"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;ContactPoint&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;contact&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;detail&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;person&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"address"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Address&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Address&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;for&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;contact&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;person&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"gender"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;code&amp;gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;male&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;female&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;other&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;unknown&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"organization"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Reference(Organization)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;C?&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Organization&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;associated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;contact&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"period"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Period&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;period&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;during&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;contact&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;person&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;organization&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;valid&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;contacted&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;relating&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;this&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"communication"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;A&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;language&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;may&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;used&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;communicate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;about&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;his&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;her&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;health&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"language"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;CodeableConcept&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;R!&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;language&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;which&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;can&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;be&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;used&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;communicate&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;with&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;about&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;his&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;her&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;health&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"preferred"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;&amp;lt;boolean&amp;gt;&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Language&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;preference&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;indicator&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"generalPractitioner"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Reference(Organization|Practitioner|&lt;/span&gt;&lt;span class="w"&gt;
   &lt;/span&gt;&lt;span class="err"&gt;PractitionerRole)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;}],&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Patient's&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;nominated&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;primary&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;care&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;provider&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"managingOrganization"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Reference(Organization)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Organization&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;is&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;custodian&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;of&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;record&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"link"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;[{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Link&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;another&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;resource&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;concerns&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;same&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;actual&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;person&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"other"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;Reference(Patient|RelatedPerson)&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;},&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;R!&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;The&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;other&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;patient&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;or&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;related&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;person&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;resource&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;that&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;the&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;link&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;refers&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;to&lt;/span&gt;&lt;span class="w"&gt;
    &lt;/span&gt;&lt;span class="nl"&gt;"type"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"&amp;lt;code&amp;gt;"&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;//&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;R!&lt;/span&gt;&lt;span class="w"&gt;  &lt;/span&gt;&lt;span class="err"&gt;replaced-by&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;replaces&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;refer&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;|&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="err"&gt;seealso&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="p"&gt;}]&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Model Concepts
&lt;/h3&gt;

&lt;p&gt;To work with the understanding we should get a basic understanding of some concepts that are defined by the folks who create FHIR, so that's what we&lt;br&gt;
re gonna do it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Model Concepts: Indentifiers&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Identifies in FHIR have two important parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;system&lt;/strong&gt; is a URI indicating the kind of identifier&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;value&lt;/strong&gt; is the actual identifier
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "system": "http://ehealthontario.ca/NamingSystem/ca-on-patient-hcn",
  "value": "0123456789"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Model Concepts: Codes&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In health we often draw values from a set of allowable codes (e.g. standards like LOINC and local code systems)&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Codes in FHIR have two important parts:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;system&lt;/strong&gt; is a URI indicating the kind of code&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;code&lt;/strong&gt; is the actual code&lt;/li&gt;
&lt;li&gt;The &lt;em&gt;display&lt;/em&gt; is a human-readable display name
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "system": "http://loinc.org",
  "code": "718-7",
  "display": "Hemoglobin mass/volume in blood"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Model Concepts: Extensions&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Extensions are the way we include out &lt;em&gt;20%&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;An extension is really just a simple key-value pair

&lt;ul&gt;
&lt;li&gt;The &lt;strong&gt;key&lt;/strong&gt; is a URL&lt;/li&gt;
&lt;li&gt;The &lt;strong&gt;value&lt;/strong&gt; is an FHIR datatype or more extensions&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Extensions can also include child extensions which are also called Child Extensions
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;{
  "url": "http://hl7.org/fhir/StrucureDefinition/patient-birthTime",
  "valueDateTime": "2020-01-13T10:12:00+08:00"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Resource URLs&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;code&gt;http://hapi.fhir.org/baseR4/Patient/example&lt;/code&gt; is a Resource URL, if we look closely the pattern here is that the URL starts with a base URL &lt;code&gt;http://hapi.fhir.org/baseR4&lt;/code&gt; in this case followed by the &lt;strong&gt;type&lt;/strong&gt; of the resource, &lt;code&gt;Patient&lt;/code&gt; here followed by the &lt;strong&gt;ID&lt;/strong&gt; which here is &lt;code&gt;example&lt;/code&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  REST API: Overview
&lt;/h2&gt;

&lt;p&gt;The FHIR REST API is very expansive and covers many &lt;strong&gt;many&lt;/strong&gt; use cases and features, I will be covering a few of them in this blog post but if you want to learn more you can do that by going to the following links&lt;/p&gt;

&lt;p&gt;Here's an example of CRUD for the &lt;code&gt;patient&lt;/code&gt; resource&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="http://hl7.org/fhir/http.html"&gt;http://hl7.org/fhir/http.html&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://hl7.org/fhir/sarch.html"&gt;http://hl7.org/fhir/sarch.html&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Operation&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Verb&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Base URL&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Type&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;ID&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Read&lt;/td&gt;
&lt;td&gt;GET&lt;/td&gt;
&lt;td&gt;&lt;a href="http://hapi.fhir.org/baseR4"&gt;http://hapi.fhir.org/baseR4&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;/Patient/&lt;/td&gt;
&lt;td&gt;/123&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Create&lt;/td&gt;
&lt;td&gt;POST&lt;/td&gt;
&lt;td&gt;&lt;a href="http://hapi.fhir.org/baseR4"&gt;http://hapi.fhir.org/baseR4&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;/Patient/&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Update&lt;/td&gt;
&lt;td&gt;PUT&lt;/td&gt;
&lt;td&gt;&lt;a href="http://hapi.fhir.org/baseR4"&gt;http://hapi.fhir.org/baseR4&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;/Patient/&lt;/td&gt;
&lt;td&gt;/123&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;Delete&lt;/td&gt;
&lt;td&gt;DELETE&lt;/td&gt;
&lt;td&gt;&lt;a href="http://hapi.fhir.org/baseR4"&gt;http://hapi.fhir.org/baseR4&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;/Patient/&lt;/td&gt;
&lt;td&gt;/123&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;blockquote&gt;
&lt;p&gt;The request body in POST/PUT is FHIR resources, in FHIR DELETE doesn't destroy the data, instead it flags the data as deleted&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h3&gt;
  
  
  FHIR Searching (the Search API)
&lt;/h3&gt;

&lt;p&gt;One of the very powerful features of the FHIR spec is the &lt;code&gt;search&lt;/code&gt; API which allows us to get data using various &lt;em&gt;searchParams&lt;/em&gt;. If we're building any applications that are being used for a purpose, it gotta have search functionality, and FHIR provides that.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Verb&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Base URL&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Type&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Search Parameter&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;Get&lt;/td&gt;
&lt;td&gt;&lt;a href="http://hapi.fhir.org/baseR4"&gt;http://hapi.fhir.org/baseR4&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;/Patient?&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="http://hapi.fhir.org/baseR4"&gt;http://hapi.fhir.org/baseR4&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;/Patient?&lt;/td&gt;
&lt;td&gt;name=smith&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;&lt;a href="http://hapi.fhir.org/baseR4"&gt;http://hapi.fhir.org/baseR4&lt;/a&gt;&lt;/td&gt;
&lt;td&gt;/Patient?&lt;/td&gt;
&lt;td&gt;birthdate=gt1970&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The search parameter can even be empty, which means to the server that we want all it sends the data of all the patients, not all servers support this however because this is a security concern.&lt;/p&gt;

&lt;p&gt;That's cool and all but how do we know what all search parameters are available for a particular resource? Well, every resource definition has a table of default search parameters at the bottom of the resource definition.&lt;/p&gt;

&lt;p&gt;You can just go to the FHIR website and look for a resource, then at the bottom of the resource definition table, you will find the Search Parameters. There are a couple of columns for every search param table.&lt;/p&gt;

&lt;p&gt;The first one is the part that goes in the URL so, baseUrl/Patient?&lt;strong&gt;birthDate&lt;/strong&gt;=2020 here, the &lt;em&gt;birthDate&lt;/em&gt; is the name that will be present in the first column of every resource.&lt;/p&gt;

&lt;p&gt;The second column is an &lt;strong&gt;expression&lt;/strong&gt;, and an expression is a &lt;strong&gt;"FHIRPath"&lt;/strong&gt; expression determining what is indexed, often times these are very intuitive and one-to-one.&lt;/p&gt;

&lt;p&gt;Search parameters have &lt;strong&gt;datatypes&lt;/strong&gt;, which are related to (but &lt;em&gt;NOT&lt;/em&gt; the same as) regular datatypes&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;FHIR Search Datatypes: String&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The search param datatypes determine the semantics&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://hapi.fhir.org/baseR4/Patient?name=rob
http://hapi.fhir.org/baseR4/Patient?name:exact=Robby
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;FHIR Search Datatypes: Token&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The search param index identifier and coded fields&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://hapi.fhir.org/baseR4/Patient?identifier=http://foo|1234
http://hapi.fhir.org/baseR4/Patient?identifier=1234
http://hapi.fhir.org/baseR4/Patient?identifier=http://foo|
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;FHIR Search Datatypes: Date&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Date parameters index dates and times&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;http://hapi.fhir.org/baseR4/Encounter?date=2020
http://hapi.fhir.org/baseR4/Encounter?date=gt2020
http://hapi.fhir.org/baseR4/Encounter?date=2020-10-10
http://hapi.fhir.org/baseR4/Encounter?date=ge2020-10-10T12:12:00Z

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

&lt;/div&gt;



&lt;p&gt;Phew!&lt;/p&gt;

&lt;p&gt;So, that's FHIR for you in a lot more than 100 seconds, I will next be blogging about consuming an FHIR API (HAPI FHIR to be exact) which I will be doing in a &lt;em&gt;typeScript&lt;/em&gt; &lt;code&gt;React.js&lt;/code&gt; app will be using &lt;code&gt;Axios + ReactQuery&lt;/code&gt; for data fetching.&lt;/p&gt;

&lt;p&gt;Until then, bye 👋🏻&lt;/p&gt;

</description>
      <category>gsoc</category>
      <category>fhir</category>
      <category>rest</category>
      <category>webdev</category>
    </item>
    <item>
      <title>please take some time to appreciate how beautifully remix's website tells us its features</title>
      <dc:creator>Rose Kamal Love</dc:creator>
      <pubDate>Tue, 07 Jun 2022 19:44:53 +0000</pubDate>
      <link>https://dev.to/rosekamallove/please-take-some-time-to-appreciate-how-beautifully-remixs-website-tells-us-its-features-2mll</link>
      <guid>https://dev.to/rosekamallove/please-take-some-time-to-appreciate-how-beautifully-remixs-website-tells-us-its-features-2mll</guid>
      <description>&lt;p&gt;&lt;a href="https://remix.run/"&gt;https://remix.run/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>forum</category>
      <category>webdev</category>
      <category>remix</category>
      <category>react</category>
    </item>
    <item>
      <title>My goals for GSoC 22' Community Bonding Period (LibreHealthIO)</title>
      <dc:creator>Rose Kamal Love</dc:creator>
      <pubDate>Thu, 26 May 2022 00:00:00 +0000</pubDate>
      <link>https://dev.to/rosekamallove/my-goals-for-gsoc-22-community-bonding-period-librehealthio-c8b</link>
      <guid>https://dev.to/rosekamallove/my-goals-for-gsoc-22-community-bonding-period-librehealthio-c8b</guid>
      <description>&lt;p&gt;&lt;em&gt;Originally published on my &lt;a href="https://rosekamallove.vercel.app/blogs/5-gsoc-community-boding"&gt;personal blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I have been selected as an &lt;em&gt;Open Source Contributor&lt;/em&gt; for &lt;a href="https://librehealth.io"&gt;LibreHealthIO&lt;/a&gt; under the &lt;a href="https://summerofcode.withgoogle.com"&gt;Google Summer&lt;br&gt;
of Code Program&lt;/a&gt; and I am extremely excited to work with the amazing mentors that are assigned to mentor me for the&lt;br&gt;
the project, &lt;a href="https://forums.librehealth.io/t/project-complete-ui-rewrite-or-radiology-and-toolkit-as-an-open-web-application/4323/59"&gt;Complete UI Re-Write of the Toolkit and Radiology&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  My Project
&lt;/h2&gt;

&lt;p&gt;During the 2018 GSoC period, web components of FHIR Resource using &lt;strong&gt;Polymer.js&lt;/strong&gt; were written. This project is to use&lt;br&gt;
those web components to completely re-write the UI of &lt;strong&gt;LibreHealth Radiology&lt;/strong&gt; and &lt;strong&gt;LibreHealth Toolkit&lt;/strong&gt; and make them&lt;br&gt;
Open Web App modules.&lt;/p&gt;

&lt;p&gt;The result would be a complete Open Web App with Spring Data on the backend and Polymer.js web components as&lt;br&gt;
the frontend.&lt;/p&gt;

&lt;p&gt;Discussion Thread: &lt;a href="https://forums.librehealth.io/t/project-complete-ui-rewrite-or-radiology-and-toolkit-as-an-open-web-application/4323/59"&gt;Complete UI Re-Write of the Toolkit and Radiology&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Community Bonding Period [May 21st to June 13th]
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;The period of time between when accepted GSoC contributors are announced and the time they are expected to start coding.&lt;br&gt;
This time is an excellent one to introduce your GSoC contributors to the community, get them on the right mailing&lt;br&gt;
lists, introduce them to the codebase and discuss how they will work with their mentors on their timeline for the&lt;br&gt;
program, etc.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The community bonding period has already started (started 6 days ago), I haven't been able to participate in&lt;br&gt;
the community because I have been involved in some personal issues. I was having my exams during the time the projects&lt;br&gt;
got announced, so was involved in them for a couple of days after the projects were announced. But then on the last day of my&lt;br&gt;
exams, I got the news that &lt;strong&gt;my grandpa died&lt;/strong&gt; 😔. I was devastated. Then, got involved in all the rituals surrounding the death of a&lt;br&gt;
family member in India.&lt;/p&gt;

&lt;p&gt;I am now over all of that and can finally start participating in the community and get to know fellow open source&lt;br&gt;
contributors, understand the different time zones/communication mediums for the mentors.&lt;/p&gt;

&lt;p&gt;I had already planned out my &lt;strong&gt;Community Bonding Period&lt;/strong&gt; back when I was writing the proposal for the project, and I am&lt;br&gt;
going to strictly stick to that only.&lt;/p&gt;

&lt;h3&gt;
  
  
  My Targets for This Period
&lt;/h3&gt;

&lt;p&gt;I have divided this period into two parts, one for the first week of the remaining days and the next for the second week&lt;br&gt;
of the remaining days.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Part 1 (May 26 to June 2)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Since I have never actually used the &lt;strong&gt;Toolkit&lt;/strong&gt; or the &lt;strong&gt;Radiology&lt;/strong&gt;, (me not being in the medical field) I will&lt;br&gt;
start by &lt;strong&gt;understanding the workflows&lt;/strong&gt; that are present in the application.&lt;/p&gt;

&lt;p&gt;And while I am at it it would make a lot of sense if I create these workflows in the form of charts using&lt;br&gt;
the &lt;a href="https://www.lucidchart.com/pages/landing?utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=branded_sitelink_en_lucidchart&amp;amp;km_CPC_CampaignId=1484560207&amp;amp;km_CPC_AdGroupID=60168114191&amp;amp;km_CPC_Keyword=lucid%20charts&amp;amp;km_CPC_MatchType=e&amp;amp;km_CPC_ExtensionID=21193716975&amp;amp;km_CPC_Network=g&amp;amp;km_CPC_AdPosition=&amp;amp;km_CPC_Creative=442433234360&amp;amp;km_CPC_TargetID=aud-536921399221:kwd-64262996435&amp;amp;km_CPC_Country=9302050&amp;amp;km_CPC_Device=c&amp;amp;km_CPC_placement=&amp;amp;km_CPC_target=&amp;amp;gclid=CjwKCAjwyryUBhBSEiwAGN5OCI4NStq17xA2UmsfNMW1J-MvNR5Q59Iu5u5LKdWVWJc9ilEYn77A-BoCEAgQAvD_BwE"&gt;Lucid Charts&lt;/a&gt;&lt;br&gt;
Web app.&lt;/p&gt;

&lt;p&gt;Once I get a good understanding of how a potential user uses the Toolkit and Radiology I will start &lt;strong&gt;exploring the codebase&lt;/strong&gt;&lt;br&gt;
and get an idea of how the style of the code and the basic flow of the codebase. I will also try to change a few things and&lt;br&gt;
see if it causes any errors or something to solidify my understanding of the codebase.&lt;/p&gt;

&lt;p&gt;One good way to get a good grasp of the codebase is to work on some issues on the project, so I will try to shortlist&lt;br&gt;
some issues and start working on them. The deliverables for this would be that I get a couple of MRs merged at&lt;br&gt;
least and get a good understanding of the codebase&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Part 2 (June 2 to June 12)&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now that I have a good understanding of the user side of the project (the user workflows I have created using &lt;a href="https://www.lucidchart.com/pages/landing?utm_source=google&amp;amp;utm_medium=cpc&amp;amp;utm_campaign=branded_sitelink_en_lucidchart&amp;amp;km_CPC_CampaignId=1484560207&amp;amp;km_CPC_AdGroupID=60168114191&amp;amp;km_CPC_Keyword=lucid%20charts&amp;amp;km_CPC_MatchType=e&amp;amp;km_CPC_ExtensionID=21193716975&amp;amp;km_CPC_Network=g&amp;amp;km_CPC_AdPosition=&amp;amp;km_CPC_Creative=442433234360&amp;amp;km_CPC_TargetID=aud-536921399221:kwd-64262996435&amp;amp;km_CPC_Country=9302050&amp;amp;km_CPC_Device=c&amp;amp;km_CPC_placement=&amp;amp;km_CPC_target=&amp;amp;gclid=CjwKCAjwyryUBhBSEiwAGN5OCI4NStq17xA2UmsfNMW1J-MvNR5Q59Iu5u5LKdWVWJc9ilEYn77A-BoCEAgQAvD_BwE"&gt;Lucid Charts&lt;/a&gt;)&lt;br&gt;
as well as the developer side of the project (the codebase). I can now start working on the designs for all the pages&lt;br&gt;
of the projects.&lt;/p&gt;

&lt;p&gt;I have already created wireframes for most of the pages when I was writing the proposal, but they are just wireframes&lt;br&gt;
and lack a lot of details. I will start &lt;strong&gt;implementing full fledged designs&lt;/strong&gt; which will follow the &lt;a href="https://material.io/design"&gt;Material Design&lt;/a&gt; philosophy&lt;br&gt;
and will be implemented using the &lt;a href="https://github.com/material-components/material-web"&gt;Material Web Components&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After each section of the project, I will get feedback from the mentors and community members and incorporate the&lt;br&gt;
feedbacks immediately.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deliverables
&lt;/h3&gt;

&lt;p&gt;So, by the end of the community bonding period:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I will be having a good understanding of the project's UI workflows as well as the code workflows.&lt;/li&gt;
&lt;li&gt;I would have created a couple of MRs at least.&lt;/li&gt;
&lt;li&gt;I will be done with detailed designs of all the pages present in &lt;strong&gt;Toolkit&lt;/strong&gt; and &lt;strong&gt;Radiology&lt;/strong&gt; which would
have been revised too on the bases of the feedback I get from the community and the mentors.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I will be updating how all this went and the percentage completion of the tasks that I decided, so stay tuned on &lt;a href="https://dev.to/rosekamallove"&gt;dev.to&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;You can reach me out on &lt;a href="https://twitter.com/RoseKamalLove1"&gt;twitter&lt;/a&gt; meanwhile 🙂&lt;/p&gt;

</description>
      <category>opensource</category>
      <category>gsoc</category>
      <category>librehealth</category>
      <category>webdev</category>
    </item>
    <item>
      <title>This is how you become "Internship Ready" as a Web Developer [in 2022] (Part 1: Front-End)</title>
      <dc:creator>Rose Kamal Love</dc:creator>
      <pubDate>Thu, 19 May 2022 14:47:05 +0000</pubDate>
      <link>https://dev.to/rosekamallove/this-is-how-you-become-internship-ready-as-a-web-developer-in-2022-part-1-front-end-449g</link>
      <guid>https://dev.to/rosekamallove/this-is-how-you-become-internship-ready-as-a-web-developer-in-2022-part-1-front-end-449g</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally posted on my &lt;a href="https://rosekamallove.vercel.app/blogs/3-getting-started-web-dev" rel="noopener noreferrer"&gt;personal blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In this blog post we're gonna dive into, how one who has zero experience in Web Development can become an &lt;strong&gt;internship ready Web Developer&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;We'll first understand the difference between the backend and frontend of a web application, then we'll start by learning the frontend which will include firstly the basics &lt;em&gt;html&lt;/em&gt;, &lt;em&gt;css&lt;/em&gt;, and &lt;em&gt;js&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;Once we're done with these we'll have the choice to move further with the frontend or start exploring the backend I'll recommend moving forward with a &lt;em&gt;Frontend JavaScript Framework&lt;/em&gt; like &lt;em&gt;react.js&lt;/em&gt;, or one can move forward with a &lt;em&gt;Backend JavaScript Framework&lt;/em&gt; like &lt;em&gt;express.js&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The resources are going to be opinionated in this post to solve the issue of &lt;strong&gt;abundance of resources&lt;/strong&gt;. It is an issue because if we are exposed to too many resources we tend to procrastinate&lt;/p&gt;

&lt;p&gt;Even though this post is opinionated, you can still choose your own resources and swap them with the ones I recommend. Because it is possible that you don't understand the ones I have recommended&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Why Web-Development?
&lt;/h3&gt;

&lt;p&gt;The answer to this question is fairly straightforward, Web Development has proven itself to be a valuable skill to learn from time and time again.&lt;br&gt;
I can tell this by my experience and from the experience of my fellow developers, that the number of opportunities in Web Development is far greater than they are in say Mobile Development or Machine Learning Development. The pay is pretty nice too, although it highly depends on the level of your skill.&lt;br&gt;
The stipend is anywhere from &lt;em&gt;10k INR&lt;/em&gt; to &lt;em&gt;60K INR&lt;/em&gt; depending on the quality and relevance of the skills you have. &lt;em&gt;(your year of college doesn't matter)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Apart from all this, the barrier to entry for Web Development is comparatively way less. You start to see the result of all that you've been learning quickly which motivates us, we learn more and get more results. This &lt;em&gt;positive feedback loop&lt;/em&gt; takes more time to kick in, in other forms of development (say Mobile Development)&lt;/p&gt;

&lt;p&gt;All and all, spending time learning web development is going to be extremely rewarding.&lt;/p&gt;
&lt;h3&gt;
  
  
  Why JavaScript?
&lt;/h3&gt;

&lt;p&gt;The answer to this question is fairly complicated compared to the previous one. So let's divide it into two parts the &lt;em&gt;front-end&lt;/em&gt; and the &lt;em&gt;back-end&lt;/em&gt;.&lt;/p&gt;
&lt;h4&gt;
  
  
  Front-End
&lt;/h4&gt;

&lt;p&gt;If I had to tell someone why they need to learn &lt;em&gt;JavaScript&lt;/em&gt; to become a frontend developer in a single line, I would say:&lt;br&gt;
Because every browser has a &lt;em&gt;JavaScript Runtime&lt;/em&gt; built in by default.&lt;/p&gt;

&lt;p&gt;JavaScript Runtime being the platform on which the &lt;em&gt;. js&lt;/em&gt; code is executed. But no one would be using &lt;em&gt;. js&lt;/em&gt; if it didn't get the job done, because it does. And there is a huge number of &lt;em&gt;javaScript frameworks&lt;/em&gt; out there that make the ecosystem very developer friend (&lt;em&gt;at least virtually&lt;/em&gt;)&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Even if the website is built with a framework like &lt;strong&gt;Django&lt;/strong&gt; (python) the front-end is still written with &lt;strong&gt;javaScript&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h4&gt;
  
  
  Back-End
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;javaScript&lt;/em&gt; on the back-end is a different story entirely, there is no default recommendation for the back-end technologies, and using &lt;em&gt;javaScript&lt;/em&gt; on the backend is nothing more than a &lt;em&gt;personal recommendation&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;I recommend &lt;em&gt;javaScript&lt;/em&gt; for the backend for mainly two reasons, the community is great and the friction is way less. (by friction I mean the context switching one has to do when developing an application using two different languages)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The top 3 &lt;em&gt;back-end&lt;/em&gt; frameworks:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PHP – Laravel, CakePHP&lt;/li&gt;
&lt;li&gt;Python – Django, Flask&lt;/li&gt;
&lt;li&gt;JavaScript – Express.js, Spring&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A newbie can learn either of the above-mentioned frameworks for the &lt;em&gt;back-end&lt;/em&gt; but my recommendation still lies with &lt;em&gt;javaScript&lt;/em&gt;, the blog post being about &lt;em&gt;internship-ready web-developer&lt;/em&gt;. This statement doesn't mean that these technologies don't have opportunities, it is simply implying the &lt;em&gt;javaScript&lt;/em&gt; has more.&lt;br&gt;
With all that out of the way let's dive in.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h2&gt;
  
  
  Index
&lt;/h2&gt;
&lt;h3&gt;
  
  
  [ Featured: Learning on YouTube ]
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Basics:&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.vox.com/2014/6/16/18076282/the-internet" rel="noopener noreferrer"&gt;Internet&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="http://web.stanford.edu/class/msande91si/www-spr04/readings/week1/InternetWhitepaper.htm" rel="noopener noreferrer"&gt;How does the internet work, and what is HTTP?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.mozilla.org/en-US/firefox/browsers/what-is-a-browser/#:~:text=When%20the%20web%20browser%20fetches,and%20experience%20on%20the%20internet." rel="noopener noreferrer"&gt;Browsers and how they work?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cloudflare.com/en-in/learning/dns/glossary/what-is-a-domain-name/" rel="noopener noreferrer"&gt;What's a Domain Name?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.cloudflare.com/en-in/learning/dns/what-is-dns/" rel="noopener noreferrer"&gt;Working of a DNS, and what is hosting?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;HTML&lt;/li&gt;
&lt;li&gt;CSS&lt;/li&gt;
&lt;li&gt;JavaScript&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://dev.totools"&gt;Tools:&lt;/a&gt;&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;
Package Mangers (like npm),&lt;/li&gt;
&lt;li&gt;build tools&lt;/li&gt;
&lt;li&gt;npm scripts&lt;/li&gt;
&lt;li&gt;webpack&lt;/li&gt;
&lt;li&gt;esbuild&lt;/li&gt;
&lt;li&gt;Version Control&lt;/li&gt;
&lt;li&gt;Basic usage of Git and GitHub&lt;/li&gt;
&lt;li&gt;Repo hosting service (GitHub)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;strong&gt;Additional front-end:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
JavaScript Front-end Frameworks (&lt;strong&gt;react.js&lt;/strong&gt;, angular.js, vue.js, etc)&lt;/li&gt;
&lt;li&gt;
CSS Frameworks (&lt;strong&gt;tailwind&lt;/strong&gt;, bootstrap, etc)&lt;/li&gt;
&lt;li&gt;
SSR (&lt;strong&gt;next.js&lt;/strong&gt;, gatsby.js, nuxt.js, etc)&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;[Building Projects]&lt;/strong&gt; (Will be covered in a different blog post)&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;



&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Back-End:&lt;/strong&gt; (this section will be covered in Part 2)

&lt;ul&gt;
&lt;li&gt;OS and General Knowledge&lt;/li&gt;
&lt;li&gt;Basic Terminal Usage and CLI commands (grep, awk, sed, lsof, curl, etc)&lt;/li&gt;
&lt;li&gt;Process, Threads, Concurrency and Memory management&lt;/li&gt;
&lt;li&gt;I/O Management and POSIX (stdin, stdout, stderr, pipes)&lt;/li&gt;
&lt;li&gt;Basic Networking&lt;/li&gt;
&lt;li&gt;Programming Language (javaScript preferred)&lt;/li&gt;
&lt;li&gt;Server (node.js, express.js etc)&lt;/li&gt;
&lt;li&gt;DataBases&lt;/li&gt;
&lt;li&gt;Relational (&lt;strong&gt;PostgresSQL&lt;/strong&gt;, MySQL, MariaDB, etc)&lt;/li&gt;
&lt;li&gt;Document (MongoDB, Firebase)&lt;/li&gt;
&lt;li&gt;APIs&lt;/li&gt;
&lt;li&gt;REST&lt;/li&gt;
&lt;li&gt;JSON APIs&lt;/li&gt;
&lt;li&gt;gRPC&lt;/li&gt;
&lt;li&gt;Authentication&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;

&lt;p&gt;Don't get anxious looking at all the topics above, I am sorry if they look intimidating. This index is designed to &lt;em&gt;quick access&lt;/em&gt; all the &lt;em&gt;sections&lt;/em&gt; and &lt;em&gt;sub-sections&lt;/em&gt; of the blog post that corresponds to each of the topics. For some of the topics that are too small to explain I have directly linked resources to learn them. For example, &lt;em&gt;How does the internet work, and what is HTTP?&lt;/em&gt; is directly linked to a &lt;strong&gt;Stanford&lt;/strong&gt; web page explaining exactly that.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt; The first two steps (Basics and Tools) are basically &lt;strong&gt;mandatory (in order)&lt;/strong&gt; to move forward with the later steps, however the last two steps (Additional Frontend and Back-End) can be swapped to the interest, whichever interests you more.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  HTML &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;HyperText Markup Language&lt;/em&gt; is the foundation of all websites. It’s the main file type that is loaded in your browser when you look at a website. The HTML file contains all the &lt;em&gt;content on the page&lt;/em&gt;, and it uses &lt;em&gt;tags&lt;/em&gt; to denote different types of content.&lt;/p&gt;

&lt;p&gt;For example, you can use tags to create headline titles, paragraphs, bulleted lists, images, and so on. HTML tags by themselves do have some styles attached, but they are pretty basic, like what you would see in a Word document.&lt;/p&gt;

&lt;p&gt;HTML for beginners is very easy to pick up and can be learned fairly quickly. My sister is in &lt;em&gt;6th grade&lt;/em&gt; and she was getting the hang of it.&lt;/p&gt;

&lt;p&gt;But, unfortunately, many people are stuck in this phase, maybe they're just saying they have started learning and haven't really but in &lt;em&gt;fomo&lt;/em&gt; they say they're learning HTML. What I want to say is don't waste a lot of time on learning this, it is extremely easy to understand. It is basically &lt;em&gt;MS Word&lt;/em&gt; u&amp;gt;where the structure of the content is determined by &lt;em&gt;html tags&lt;/em&gt; instead of the &lt;strong&gt;bold&lt;/strong&gt; or &lt;em&gt;italic&lt;/em&gt; button in the &lt;em&gt;MS Word program&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;To learn &lt;em&gt;html&lt;/em&gt; I have two video recommendation&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=qz0aGYrrlhU" rel="noopener noreferrer"&gt;HTML Tutorial for Beginners: HTML Crash Course&lt;/a&gt; &lt;em&gt;[English]&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.youtube.com/watch?v=HcOc7P5BMi" rel="noopener noreferrer"&gt;HTML Tutorial for Beginners | Complete HTML with Notes &amp;amp; Code&lt;/a&gt; &lt;em&gt;[Hindi]&lt;/em&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Just watch either of the two videos and move ahead, without wasting any more time on this.&lt;/p&gt;
&lt;h2&gt;
  
  
  CSS &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;Cascading Style Sheets&lt;/em&gt;, lets you style that HTML content so it looks nice and fancy. You can add colors, custom fonts, and layout the elements of your website however you want them to look. You can even create &lt;em&gt;animations&lt;/em&gt; and shapes with CSS!&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;With great power comes great responsibility&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;There is a lot of depth to CSS, and sometimes people tend to gloss over it so they can move on to things like JavaScript. However, I can’t overestimate the importance of understanding how to convert a design into a website layout using CSS. If you want to specialize in front-end, it’s essential to have really solid CSS skills.&lt;/p&gt;

&lt;p&gt;Having said that, &lt;em&gt;css&lt;/em&gt; is easy in the beginning then as soon as it starts making sense, it gets harder and harder. So my personal recommendation would be to &lt;em&gt;learn the fundamentals&lt;/em&gt; in depth so you know what you're doing. 80% of the work can be get done with just these fundamentals.&lt;/p&gt;

&lt;p&gt;And to get these fundamentals in place I have the perfect resource for you, I bet you have at least heard of &lt;em&gt;freeCodeCamp&lt;/em&gt;. They have a &lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/" rel="noopener noreferrer"&gt;&lt;em&gt;interactive code along with tutorial&lt;/em&gt;&lt;/a&gt; which takes from &lt;em&gt;basic html&lt;/em&gt; to &lt;em&gt;responsive web design&lt;/em&gt;.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;The topics involve:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/#basic-html-and-html5" rel="noopener noreferrer"&gt;Basic HTML and HTML5&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/#basic-css" rel="noopener noreferrer"&gt;Basic CSS&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/#applied-accessibility" rel="noopener noreferrer"&gt;Applied Visual Design&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/#applied-accessibility" rel="noopener noreferrer"&gt;Applied Accessibility&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/#responsive-web-design-principles" rel="noopener noreferrer"&gt;Responsive Web Design Principles&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/#css-flexbox" rel="noopener noreferrer"&gt;CSS FlexBox&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/#css-grid" rel="noopener noreferrer"&gt;CSS Grid&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&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%2Fuser-images.githubusercontent.com%2F69139607%2F167907972-8838c53f-1cb0-4552-92c8-d7c07573f562.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%2Fuser-images.githubusercontent.com%2F69139607%2F167907972-8838c53f-1cb0-4552-92c8-d7c07573f562.jpg" alt="freeCodeCampLayout"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is what the layout of the website looks like, on the left, we have the tutorial &lt;em&gt;explaining the topic&lt;/em&gt; that we have learned. If the topic is from a previous module then it is linked here.&lt;br&gt;
In the middle, there is the &lt;em&gt;code editor&lt;/em&gt; in which we write our code, the output of which is shown at the right of the page.&lt;/p&gt;

&lt;p&gt;Wait there is more, when you complete the modules you will be greeted with &lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/#responsive-web-design-projects" rel="noopener noreferrer"&gt;&lt;em&gt;coding assignments&lt;/em&gt;&lt;/a&gt; in which you'll have to code out some projects to &lt;em&gt;solidify the CSS skills&lt;/em&gt; that you have learned.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;There are in total 5 coding assignments:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-tribute-page" rel="noopener noreferrer"&gt;Build a Tribute Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-survey-form" rel="noopener noreferrer"&gt;Build a Survey Form&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-product-landing-page" rel="noopener noreferrer"&gt;Build a Product Landing Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-technical-documentation-page" rel="noopener noreferrer"&gt;Build a Technical Documentation Page&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/responsive-web-design-projects/build-a-personal-portfolio-webpage" rel="noopener noreferrer"&gt;Build a Personal Portfolio Webpage&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Yeah, it even includes a &lt;strong&gt;personal portfolio&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;I can't recommend this &lt;a href="https://dev.to/bascodes/a-todo-app-with-pyscript-3435"&gt;interactive course&lt;/a&gt; enough!&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  JavaScript &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;JavaScript is a very interesting language (putting it mildly). It was designed in 10 days to run inside the browser. Using JavaScript we can make our website dynamic, meaning it will respond to different inputs from the user or other sources.&lt;/p&gt;

&lt;p&gt;For example, you can make a Weather widget showing the weather based on the input of the user, you can build a website that tracks the user's expenses and shows the stats in a chart form.&lt;/p&gt;

&lt;p&gt;It is &lt;em&gt;crucial&lt;/em&gt; to learn if you wanna go ahead to learn JavaScript frameworks like React, you'll have a better time learning those frameworks if you take the time to learn regular Vanilla JavaScript first.&lt;/p&gt;

&lt;p&gt;Even if you wanna go for backend development, you still can't gloss over JavaScript. You are also required to understand the fundamentals of this language. This is the only way we can interact with the browser like we do with a computer and &lt;em&gt;it is fun&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Now comes the resources part:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://www.youtube.com/watch?v=hNYzV87wocY" rel="noopener noreferrer"&gt;Learn JavaScript in 1 video - Advanced JavaScript Crash Course + Projects&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://www.youtube.com/playlist?list=PLRAV69dS1uWSxUIk5o3vQY2-_VKsOpXLD" rel="noopener noreferrer"&gt;Javascript Course - Hitesh Choudhry&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These are the two free courses that I will recommend, but watching videos while mindlessly copying the code is what everyone tends to do when we learn from videos.&lt;/p&gt;

&lt;p&gt;To solve this issue I would &lt;strong&gt;highly recommend&lt;/strong&gt; you follow the &lt;strong&gt;&lt;a href="https://javascript30.com/" rel="noopener noreferrer"&gt;30 Days of JavaScript Challenge&lt;/a&gt;&lt;/strong&gt;. In this challenge you will be given a unique challenge each day for 30 days, slowly increasing in difficulty.&lt;/p&gt;

&lt;p&gt;This is the perfect way to solidify your learning and make you fall in love with JavaScript.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Once you are done with this, you'll have to learn &lt;strong&gt;Asynchronous JavaScript&lt;/strong&gt; and the best course for that is &lt;a href="https://www.youtube.com/playlist?list=PLlasXeu85E9cQ32gLCvAvr9vNaUccPVNP" rel="noopener noreferrer"&gt;Namaste JavaScript - Akshay Saini&lt;/a&gt;, you don't have to watch the whole playlist at once, you can take your time and keep learning it slowly once you finished with the basics.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;h2&gt;
  
  
  Learning on YouTube &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Even though I am asking you to watch these playlists on &lt;em&gt;YouTube&lt;/em&gt;, it is not a good platform to &lt;em&gt;learn&lt;/em&gt;. There are a &lt;strong&gt;lot of distractions&lt;/strong&gt;, and a whole sidebar dedicated to making you &lt;strong&gt;watch unproductive content&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;I personally go from &lt;strong&gt;learning&lt;/strong&gt; to watching &lt;strong&gt;Tanmay Bhatt's Comedy videos&lt;/strong&gt; in no time.&lt;/p&gt;

&lt;p&gt;This is why I would recommend you to checkout &lt;strong&gt;&lt;a href="https://youtemy.tech" rel="noopener noreferrer"&gt;YouTemy&lt;/a&gt;&lt;/strong&gt; the project I built to fix these issues. Even though it is in its MVP stage, you'll still get a lot of use out of it.&lt;/p&gt;

&lt;p&gt;You can send feedback for the project to me personally on &lt;a href="https://twitter.com/RoseKamalLove1" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, or you can post an issue on &lt;strong&gt;&lt;a href="https://github.com/rosekamallove/youtemy" rel="noopener noreferrer"&gt;GitHub - YouTemy&lt;/a&gt;&lt;/strong&gt; and while you're at it, &lt;strong&gt;do give it a ⭐ on GitHub, I would Love ❤️ that&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/FiOLt_Fdd1U"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Tools &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Let’s get into some other front-end technologies now. As we mentioned, HTML, CSS, and JavaScript are the basic building blocks of front-end web development. In addition to them, there are a few other tools that you’ll want to learn.&lt;/p&gt;

&lt;h2&gt;
  
  
  Package Manager &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;Package managers are online collections of software, much of it open source. Each piece of software, called a package, is available for you to install and use in your own projects.&lt;/p&gt;

&lt;p&gt;You can think about them like plugins– instead of writing everything from scratch, you can use helpful utilities that other people have written already.&lt;/p&gt;

&lt;p&gt;The most popular package manager is called &lt;a href="https://www.npmjs.com/" rel="noopener noreferrer"&gt;npm&lt;/a&gt;, or Node Package Manager, but you can also use another manager called &lt;a href="https://classic.yarnpkg.com/en/" rel="noopener noreferrer"&gt;Yarn&lt;/a&gt;. Both are good options to know and use, although it’s probably best to start out with npm.&lt;/p&gt;

&lt;p&gt;If you’re curious to learn more, you can read this article on the &lt;a href="https://nodesource.com/blog/an-absolute-beginners-guide-to-using-npm/" rel="noopener noreferrer"&gt;basics of using npm&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;{ &lt;em&gt;&lt;a href="https://www.freecodecamp.org/news/beginners-roadmap-web-development/" rel="noopener noreferrer"&gt;Source of Above Section&lt;/a&gt;&lt;/em&gt; }&lt;/p&gt;

&lt;h2&gt;
  
  
  Build Tools &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Build tools are programs that automate the creation of executable applications from source code. The building incorporates compiling, linking, and packaging the code into a usable or executable form&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;By far the most widely used &lt;em&gt;build tool&lt;/em&gt; is &lt;strong&gt;&lt;a href="https://webpack.js.org/" rel="noopener noreferrer"&gt;WebPack&lt;/a&gt;&lt;/strong&gt; and I will recommend understanding how WebPack works. This knowledge will be easily transferable to other build tools.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://www.youtube.com/watch?v=aT1rkp1UJ00&amp;amp;t=7s" rel="noopener noreferrer"&gt;If You are Scared of Webpack, WATCH THIS!&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Version Control &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;This is something that you just can't skip, it is very important and will make you a decent developer single-handedly.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Version control (also called source control) is a system that keeps track of every code change that you make in your project files. You can even revert to a previous change if you make a mistake. It’s almost like having infinite save points for your project, and let me tell you, it can be a huge lifesaver.&lt;/p&gt;

&lt;p&gt;The most popular version control system is an open source system called Git. Using &lt;a href="https://git-scm.com/" rel="noopener noreferrer"&gt;Git&lt;/a&gt;, you can store all your files and their change history in collections called repositories.&lt;/p&gt;

&lt;p&gt;You may have also heard of &lt;a href="https://github.com" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;, which is an online hosting company owned by Microsoft where you can store all your Git repositories.&lt;/p&gt;

&lt;p&gt;To learn Git and GitHub, &lt;a href="https://lab.github.com/" rel="noopener noreferrer"&gt;GitHub.com&lt;/a&gt; has some &lt;a href="https://docs.github.com/en" rel="noopener noreferrer"&gt;online guides&lt;/a&gt; that explain how to get up and running. Traversy Media also has a &lt;a href="https://www.youtube.com/watch?v=SWYqp7iY_Tc" rel="noopener noreferrer"&gt;YouTube video&lt;/a&gt; explaining how Git works.&lt;/p&gt;

&lt;p&gt;And while you're at it, go ahead and learn &lt;a href="https://pages.github.com/" rel="noopener noreferrer"&gt;GitHub Pages&lt;/a&gt; the repo hosting service provided by GitHub which will allow you to host your websites for free. And there is nothing better than being able to show your friends what you have built through a live URL&lt;/p&gt;

&lt;h2&gt;
  
  
  Additional Frontend &lt;a&gt;&lt;/a&gt;
&lt;/h2&gt;

&lt;p&gt;First off &lt;em&gt;Congratulations&lt;/em&gt;, not a lot of people reach here. They quit before getting to the good part, the part where I fell in love with web development. The part where we finally start to see the output of the hard work that we've been doing.&lt;/p&gt;

&lt;p&gt;This is the part where you'll get the skills that will &lt;strong&gt;get you an internship&lt;/strong&gt; with good pay or good enough pay (depending on the quality of projects that you have).&lt;/p&gt;

&lt;p&gt;In this section, I'll be telling you about &lt;em&gt;CSS frameworks&lt;/em&gt;, &lt;em&gt;JavaScript front-end frameworks&lt;/em&gt; and then finally &lt;em&gt;SSR (Server Side Rendering)&lt;/em&gt;. And if you choose to not learn the backend just yet I'll also tell you how you can build a full-stack application without the overhead of learning the backend (spoiler alert: Firebase)&lt;/p&gt;

&lt;h3&gt;
  
  
  JavaScript Front-End Frameworks &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;JavaScript Frameworks&lt;/em&gt; 😆 this sure is a very interesting topic to write about. But we'll first go over why we need them anyway, what purpose they serve, what are the most popular ones and then finally the none that I'll recommend and then where can you learn them from.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;JavaScript frameworks are an essential part of modern front-end web development, providing developers with tried and tested tools for building scalable, interactive web applications. Many modern companies use frameworks as a standard part of their tooling, so many front-end development jobs now require framework experience.&lt;/p&gt;

&lt;p&gt;[ From &lt;a href="https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Client-side_JavaScript_frameworks" rel="noopener noreferrer"&gt;MDN Web Docs&lt;/a&gt; ]&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;So, when we use basic HTML, CSS, and JavaScript to build our application, there is a limit on how complex a website can be, and real-time updates aren't great either. As the application grows larger and larger, it gets harder and harder to understand the whole flow of the project.&lt;/p&gt;

&lt;p&gt;In the past there was a threshold of how complex a front-end can be, so most of the work was done using the back-end which served static HTML, CSS, and JavaScript files to the client, but now as the client's machines are getting better, Client Side frameworks have taken over the world.&lt;/p&gt;

&lt;p&gt;They are easier to scale, making complex DOM manipulations easier than ever. I mean just go and look the FaceBook's homepage. There is so much going on there, imagine building that with plain JS and HTML, and CSS. No, go there and actually start designing the front-end yourself (on paper obv)&lt;/p&gt;

&lt;p&gt;Now that we know why front-end frameworks exist, we can move forward and see what are the available options to learn.&lt;/p&gt;

&lt;p&gt;There are a huge number of front-end frameworks and new ones popping basically every month it seems. Maybe even every week, to what to learn and what not to learn? The answer is a bit complicated, let's first narrow down our list to the top 3&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Top 3 front-end JavaScript Frameworks&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://vuejs.org/" rel="noopener noreferrer"&gt;vue.js&lt;/a&gt;&lt;/strong&gt; [188k GH Stars]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://reactjs.org/" rel="noopener noreferrer"&gt;react.js&lt;/a&gt;&lt;/strong&gt; [175k GH Stars]&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;&lt;a href="https://angular.io/" rel="noopener noreferrer"&gt;angular.js&lt;/a&gt;&lt;/strong&gt; [55k GH Stars]&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Each of the above frameworks is great, &lt;em&gt;Vue is the most loved&lt;/em&gt;, &lt;em&gt;React is the most widely used&lt;/em&gt; and &lt;em&gt;Angular is the most hated 😆&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;My recommendation out of the above bunchy is &lt;strong&gt;React.js&lt;/strong&gt; the reason being, that it is very fun to write, the opportunities for React Developers are huge, and the knowledge of React can be then transferred to &lt;em&gt;Cross Platform: React Native&lt;/em&gt; which can be used to build mobile apps for both IOS and Android.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;I love ❤️ React.js (it is not a framework tho, though it is a library ping me on &lt;a href="https://twitter.com/RoseKamalLove1" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; if you wanna discuss this)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h4&gt;
  
  
  Resource to learn React.js
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://www.udemy.com/course/complete-react-developer-zero-to-mastery/" rel="noopener noreferrer"&gt;Complete React Developer in 2022 (w/ Redux, Hooks, GraphQL)&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;This is by far the best React course there is, it's &lt;strong&gt;only ₹500 or $10&lt;/strong&gt;,&lt;br&gt;
My friend learned from this and landed an internship in the first year and It is recommended by everyone that has watched it.&lt;/p&gt;

&lt;p&gt;There is no alternative to this course, so I would &lt;strong&gt;highly recommend&lt;/strong&gt; that you buy this course and complete it, and follow all the instructions the instructor gives you. &lt;em&gt;I am sure that you'll understand all the concepts very clearly.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;And by the end of the course, you will be in a position to build your own &lt;em&gt;full-stack project&lt;/em&gt; (using Firebase) or &lt;em&gt;apply to internships directly&lt;/em&gt;, that's how good this course is.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some Good Stuff on YouTube&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=bMknfKXIFA8" rel="noopener noreferrer"&gt;React Course - Beginner's Tutorial for React JavaScript Library - FreeCodeCamp&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/playlist?list=PLC3y8-rFHvwgg3vaYJgHGnModB54rxOk3" rel="noopener noreferrer"&gt;ReactJS Tutorial for Beginners - Codevolution&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/playlist?list=PLN3n1USn4xlntqksY83W3997mmQPrUmqM" rel="noopener noreferrer"&gt;Practical React - Ben Awad&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  CSS Frameworks &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;If you have followed this guide religiously, I recommended &lt;em&gt;the best&lt;/em&gt; CSS course that I could find (&lt;a href="https://www.freecodecamp.org/learn/responsive-web-design/" rel="noopener noreferrer"&gt;&lt;em&gt;FreeCodeCamp Interactive CSS Course&lt;/em&gt;&lt;/a&gt;) and you have completed it (at least I hope) but the problem with plain CSS is that it is not &lt;em&gt;scalable&lt;/em&gt; what I mean by that is, as the project grows larger and larger the maintainability of CSS decreases rapidly.&lt;/p&gt;

&lt;p&gt;Styles are overriding each other, new styles are making the old styles go nuts, the new guy just used &lt;code&gt;!important&lt;/code&gt; everywhere and, now everyone is holding their re-iterating their life choices. It is a disaster.&lt;/p&gt;

&lt;p&gt;Though many great developers have come up with various systems to fix all these issues (&lt;em&gt;&lt;a href="https://css-tricks.com/semantic-class-names/" rel="noopener noreferrer"&gt;symantic class names&lt;/a&gt; for example&lt;/em&gt;), plain CSS is still a disaster, especially for someone who hasn't worked on large scale projects.&lt;/p&gt;

&lt;blockquote&gt;
&lt;h3&gt;
  
  
  “Best practices” don’t actually work.
&lt;/h3&gt;

&lt;p&gt;I’ve written a &lt;strong&gt;few thousand words&lt;/strong&gt; on why traditional “semantic class names” are the reason CSS is hard to maintain, but the truth is you’re never going to believe me until you actually try it. If you can suppress the urge to retch long enough to give it a chance, I really think you’ll wonder how you ever worked with CSS any other way.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Adam Wathan&lt;/strong&gt; (Creator of Tailwind CSS)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;And this is where &lt;strong&gt;CSS Frameworks&lt;/strong&gt; come in, to solve all the issues I mentioned above, some do the job really well that I think why does CSS even exist, and some suck so bad that I start loving plain CSS. So, what is &lt;em&gt;my&lt;/em&gt; recommendation you may ask, well it is &lt;strong&gt;Tailwind CSS&lt;/strong&gt; duh.&lt;/p&gt;

&lt;p&gt;You can try using &lt;em&gt;bootstrap&lt;/em&gt; , &lt;em&gt;bulma&lt;/em&gt; or &lt;em&gt;skeleton&lt;/em&gt; but once you get your hands on experience using &lt;em&gt;Tailwind CSS&lt;/em&gt; I don't think you would even think of switching tailwind out for your next project (I certainly don't), that's how good it is.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;You don't need to go through an entire course to learn tailwind, &lt;em&gt;since you already know CSS&lt;/em&gt; you can just google how to do a certain CSS thing in tailwind as you go along with your project.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Learning Resources&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://tailwindcss.com/docs/installation" rel="noopener noreferrer"&gt;Official Getting Started&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://www.youtube.com/watch?v=UBOj6rqRUME" rel="noopener noreferrer"&gt;Tailwind CSS Crash Course&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  SSR (Server Side Rendering) &lt;a&gt;&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Damn, this has been a very long write-up, but we're finally approaching the end so &lt;em&gt;phew&lt;/em&gt; 😌.&lt;/p&gt;

&lt;h4&gt;
  
  
  What is Server Side Rendering?
&lt;/h4&gt;

&lt;p&gt;Server-side rendering (SSR) is an application’s ability to convert HTML files on the server into a fully rendered HTML page for the client. The web browser submits a request for information from the server, which instantly responds by sending a fully rendered page to the client. Search engines can crawl and index content prior to delivery, which is beneficial for Search Engine Optimization purposes.&lt;/p&gt;

&lt;p&gt;Popular examples of server-side rendering JavaScript frameworks include Angular server side rendering, ejs server side rendering, server-side rendering Express, Gatsby server side rendering, Google server-side rendering, NestJS server side rendering, Next server side rendering, Nuxt server side rendering, React server-side rendering, and Vue server side rendering.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages of SSR&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A server-side rendered application enables pages to load faster, improving the user experience.&lt;/li&gt;
&lt;li&gt;When rendering server-side, search engines can easily index and crawl content because the content can be rendered before the page is loaded, which is ideal for SEO.&lt;/li&gt;
&lt;li&gt;Webpages are correctly indexed because web browsers prioritize web pages with faster load times.&lt;/li&gt;
&lt;li&gt;Rendering server-side helps efficiently load webpages for users with a slow internet connections or outdated devices.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is Static Site Generation?
&lt;/h3&gt;

&lt;p&gt;A static site generator is a tool that generates a full static HTML website based on raw data and a set of templates. Essentially, a static site generator automates the task of coding individual HTML pages and gets those pages ready to serve to users ahead of time. Because these HTML pages are pre-built, they can load very quickly in users' browsers.&lt;/p&gt;

&lt;p&gt;Static site generators are an alternative to content management systems (CMS) — another type of tool for managing web content, generating webpages, and implementing templates. (A template is a reusable format for web content; developers use templates to avoid writing the same formatting over and over.) Static site generators are typically part of a JAMstack web development approach.&lt;/p&gt;

&lt;h4&gt;
  
  
  Why Next.js?
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;&lt;a href="https://nextjs.org/" rel="noopener noreferrer"&gt;Next.js&lt;/a&gt;&lt;/strong&gt; is a React Framework. A &lt;em&gt;React&lt;/em&gt; Framework? that doesn't make sense, the framework of a framework? Well, React is not a framework, it is the library. What this means is that React doesn't force you to use it in a certain way. You can use React for a single &lt;code&gt;div&lt;/code&gt; in an application built with plain HTML, CSS, and JavaScript.&lt;/p&gt;

&lt;p&gt;Next.js however is an opinionated set of tools, which allows the developer to build applications in a certain way. Let me tell you this, &lt;strong&gt;It is the best thing that has happened to React to build Production Applications&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Some of the amazing features of Next.js&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Automatic Routing (Frontend as well as API Routing)&lt;/li&gt;
&lt;li&gt;Code Splitting&lt;/li&gt;
&lt;li&gt;Server Side Rendering and Static Site Generation&lt;/li&gt;
&lt;li&gt;Image Optimisation and SEO (The &lt;code&gt;&amp;lt;Head/&amp;gt;&lt;/code&gt; element)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Resources to learn&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Next.js themselves has provided us with amazing documentation and code-along tutorials, so there is no need to wander around the internet to learn Next.js&lt;/p&gt;
&lt;/blockquote&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://nextjs.org/learn/foundations/about-nextjs?utm_source=next-site&amp;amp;utm_medium=homepage-cta&amp;amp;utm_campaign=next-website" rel="noopener noreferrer"&gt;Official Start Learning&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href="https://nextjs.org/docs" rel="noopener noreferrer"&gt;Official Documentation&lt;/a&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  We're finally done 🔥
&lt;/h2&gt;

&lt;p&gt;Congratulation to all those who have read this blog post till here, and best of luck for completing all this and building cool projects, and getting an awesome internship.&lt;/p&gt;

&lt;p&gt;Do let me know if you do see improvements, or want to ask for some advice or anything at all. &lt;a href="https://twitter.com/RoseKamalLove1" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt; is the best place to do this.&lt;br&gt;
Do give me a follow while you're at it 😅.&lt;/p&gt;

&lt;p&gt;What is next after this guide? I will be following up with Part: 2 of this blog post which will have a detailed guide explaining back-end development. After which or before this, I will post about what is the optimal way to come up with new project ideas and actually finish them till deployment (and avoiding &lt;strong&gt;Tutorial Hell&lt;/strong&gt; 👿)&lt;/p&gt;

&lt;p&gt;I am also working on React, and Next.js tutorials, and will also post about how you can actually apply for internships. Stay tuned for that.&lt;/p&gt;

&lt;p&gt;Thank you all for staying this far 🙂.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>webdev</category>
      <category>react</category>
      <category>node</category>
    </item>
    <item>
      <title>Cryptography in Node.js</title>
      <dc:creator>Rose Kamal Love</dc:creator>
      <pubDate>Thu, 12 May 2022 05:50:28 +0000</pubDate>
      <link>https://dev.to/rosekamallove/cryptography-in-nodejs-22ai</link>
      <guid>https://dev.to/rosekamallove/cryptography-in-nodejs-22ai</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally posted on &lt;a href="https://rosekamallove.vercel.app/blogs/cryptography-101"&gt;my personal blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=NuyzuNBFWxQ"&gt;Link to original Video&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The mysterious discipline of cryptography is the backbone of the internet. Without it,&lt;br&gt;
there would be no secrets and no privacy in the digital world. As a developer, you don’t&lt;br&gt;
need to understand the math that goes into cryptography, but it’s absolutely essential to&lt;br&gt;
know key concepts like hashes, salt, keypairs, encryption, and signing.&lt;/p&gt;

&lt;p&gt;The follow tutorial explains essential cryptography concepts and implements then with the builtin &lt;a href="https://nodejs.org/api/crypto.html"&gt;Node.js crypto module&lt;/a&gt;&lt;/p&gt;
&lt;h4&gt;
  
  
  1. &lt;strong&gt;Hash&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;The word hash actually has &lt;a href="https://softwareengineering.stackexchange.com/questions/108124/why-it-is-called-hash-table-or-hash-function-hash-doesnt-make-any-sense-t"&gt;culinary roots&lt;/a&gt;. It means to &lt;em&gt;chop and mix&lt;/em&gt; and that perfectly describes what a&lt;br&gt;
hashing function does. It takes an input value of any length and outputs a fixed length value. Hashing algorithms,&lt;br&gt;
like &lt;strong&gt;SHA&lt;/strong&gt; (Secure Hashing Algorithm), produce a random, unique, fixed-length string from a given input. They are&lt;br&gt;
often used to compare two values, like passwords, for equality.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The same input will always produce the same output.&lt;/li&gt;
&lt;li&gt;Fast to compute, but computationally expensive to find the original input&lt;/li&gt;
&lt;li&gt;Small probability of collision (unique)
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello World -&amp;gt; {Hashing Function} =&amp;gt; jibbrish(hashed stuff)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createHash&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// Create a string hash&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;createHash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sha256&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Compare two hashed passwords&lt;/span&gt;

&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hi-mom!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hash1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hash1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;// ... some time later&lt;/span&gt;

&lt;span class="nx"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hi-mom&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hash2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hash&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;match&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;hash1&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;hash2&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;match&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;good password&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password does not match&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h4&gt;
  
  
  2. &lt;strong&gt;Salt&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Hashes are great for making passwords unreadable, but because they always produce the same output,&lt;br&gt;
they are not very secure. A salt is a random string that is added to the input before hashing.&lt;br&gt;
This makes the hash more unique and harder to guess.&lt;/p&gt;

&lt;p&gt;Users often to use weak passwords, like “password123”. When a database is compromised, the attacker can easily find the value&lt;br&gt;
of an unsalted hash by searching precomputed &lt;a href="https://en.wikipedia.org/wiki/Rainbow_table"&gt;rainbow table&lt;/a&gt; of common hashes - salting fixes this.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Used to make a hash harder to guess&lt;/li&gt;
&lt;li&gt;Appends a random string to the input before hashing
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello World --(+random salt)--&amp;gt; {Hashing Function} =&amp;gt; jibbrish(salted hashed stuff)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Implementation&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;scryptSync&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;randomBytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;timingSafeEqual&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;signup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;salt&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;randomBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hashedPassword&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;scryptSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;password&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;:&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;hashedPassword&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;push&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;users&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;find&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;v&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;v&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;email&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;email&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;split&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;:&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hashedBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;scryptSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;salt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;64&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;keyBuffer&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;match&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;timingSafeEqual&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hashedBuffer&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;keyBuffer&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;match&lt;/span&gt; &lt;span class="p"&gt;?&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;login success&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt; &lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;login fail&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;signup&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;foo@bar.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pa$$word&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;login&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;foo@bar.com&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;password&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;result&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;





&lt;h4&gt;
  
  
  3. &lt;strong&gt;HMAC&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;HMAC is a keyed hash of data - like a hash with a password.&lt;br&gt;
To create a HMAC you need to have the key, therefore allowing you to verify both the authenticity and&lt;br&gt;
originator of the data. Using a different key produces a different output.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Think of HMAC as a hash with a password or key&lt;/li&gt;
&lt;li&gt;Only someone with the key can create an authentic hash
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello World  --&amp;gt; {Hashing Function} =&amp;gt; jibbrish(hashed stuff)
               |                    |
               |____ Shared Key ____|
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createHmac&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;super-secret!&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;🎃 hello jack&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;hmac&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createHmac&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;sha256&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;password&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;digest&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;hmac&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  4. &lt;strong&gt;Symmetric Encryption&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Encryption is the process making a message confidential (like a hash),&lt;br&gt;
while allowing it to be reversable (decrypted) with the proper key. Each time a message&lt;br&gt;
is encrypted it is randomized to produce a different output. In &lt;em&gt;symmetric encryption&lt;/em&gt;, the same key&lt;br&gt;
is used to encrypt and decrypt the message.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The same input will produce a different output, unlike hashes&lt;/li&gt;
&lt;li&gt;Encrypted message can be reversed with the key&lt;/li&gt;
&lt;li&gt;Same key used to encrypt and decrypt message
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello World  --encrypt--&amp;gt; {jibbrish} --decrypt--&amp;gt; Hello World
                 |                        |
                 |______ Shared Key ______|
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;&lt;br&gt;
Perform symmetric encryption in Node by creating a cipher. Encryption also has an initialization&lt;br&gt;
vector (IV) to randomize the pattern so a sequence of text won’t produce the same output as a previous sequence.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;createCipheriv&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;randomBytes&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;createDecipheriv&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;/// Cipher&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;i like turtles&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;randomBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;32&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;randomBytes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;16&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;cipher&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createCipheriv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aes256&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;/// Encrypt&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;encryptedMessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="nx"&gt;cipher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;message&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;cipher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;final&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Encrypted: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;encryptedMessage&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="c1"&gt;/// Decrypt&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decipher&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;createDecipheriv&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;aes256&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;key&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;iv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decryptedMessage&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="nx"&gt;decipher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;update&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encryptedMessage&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf-8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;decipher&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;final&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s2"&gt;`Deciphered: &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;decryptedMessage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf-8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h4&gt;
  
  
  5. &lt;strong&gt;KeyPairs&lt;/strong&gt;
&lt;/h4&gt;

&lt;p&gt;Using a shared key works for encryption works, but the problem is that both parties must agree upon the key.&lt;br&gt;
This is problematic in the real world because it’s not practical or secure to share across a network. The&lt;br&gt;
solution is to use an algoritm like &lt;a href="https://en.wikipedia.org/wiki/RSA_cryptosystem"&gt;RSA&lt;/a&gt; that generates a keypair containing a public and private key.&lt;br&gt;
As their names indicate, the private key should be kept secret, while the public key can be shared freely.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Public Key &amp;lt;---- Mathematically Linked ----&amp;gt; Private Key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;generateKeyPairSync&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;privateKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;publicKey&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;generateKeyPairSync&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;rsa&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;modulusLength&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;2048&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// the length of your key in bits&lt;/span&gt;
  &lt;span class="na"&gt;publicKeyEncoding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;spki&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// recommended to be 'spki' by the Node.js docs&lt;/span&gt;
    &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="na"&gt;privateKeyEncoding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pkcs8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="c1"&gt;// recommended to be 'pkcs8' by the Node.js docs&lt;/span&gt;
    &lt;span class="na"&gt;format&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;pem&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;privateKey&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  6. &lt;strong&gt;Asymetric Encryption&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Asymmetric encryption depends on two keys. Encrypt a message with the public key and decrypt it with the private key.&lt;/p&gt;

&lt;p&gt;Asymmetric encryption is used on the web whenever you use HTTPS to establish an encrypted connection to that website.&lt;br&gt;
The browser finds the public key of an SSL certificate installed on the website, which is used to encrypt any data&lt;br&gt;
you send, then the private key decrypts it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Hello World  --encrypt--&amp;gt; {jibbrish} --decrypt--&amp;gt; Hello World
                 |                        |
                 |                        |
              Public Key              Private Key
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Implementation:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;publicEncrypt&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;privateDecrypt&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;crypto&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;privateKey&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;require&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;./keypair&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;encryptedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;publicEncrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;publicKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;Buffer&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;from&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;secretMessage&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;encryptedData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;hex&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;decryptedData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;privateDecrypt&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;privateKey&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;encryptedData&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;decryptedData&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toString&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;utf-8&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>node</category>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Java and MySQL</title>
      <dc:creator>Rose Kamal Love</dc:creator>
      <pubDate>Tue, 10 May 2022 04:47:01 +0000</pubDate>
      <link>https://dev.to/rosekamallove/java-and-mysql-kp9</link>
      <guid>https://dev.to/rosekamallove/java-and-mysql-kp9</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally posted on my &lt;a href="https://rosekamallove.vercel.app/blogs/java-jdbc-mysql"&gt;personal blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Java DataBase Connectivity (JDBC)
&lt;/h2&gt;

&lt;h3&gt;
  
  
  What is JDBC ?
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://www.javatpoint.com/java-jdbc"&gt;Java Database Connectivity&lt;/a&gt; is tool or an application programming interface&lt;br&gt;
(API) that establishes a connection between a standard Database (&lt;em&gt;say MYSQL&lt;/em&gt;) and a Java Application that intends&lt;br&gt;
to use that database.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vAk6WXZa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static.javatpoint.com/images/core/jdbc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vAk6WXZa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static.javatpoint.com/images/core/jdbc.png" alt="JDBC Flow Chart" width="473" height="203"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Need for JDBC ?
&lt;/h3&gt;

&lt;p&gt;Before JDBC, ODBC API was the database API to connect and execute the query with the database. But, ODBC API uses ODBC driver which is written in C language (i.e. platform dependent and unsecured). That is why Java has defined its own API (JDBC API) that uses JDBC drivers (written in Java language)&lt;/p&gt;

&lt;p&gt;We can use JDBC API to handle database using Java program and can perform the following activities:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;strong&gt;Connect to the DataBase&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Execute Queries and update statements to the database&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Retrieve the result receive from the database&lt;/strong&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So, we can make an analogy of JDBC as the API which will allow us to create our own MySQL workbench of sorts, or more realistically allow us to create the controller for the database in our application. (&lt;em&gt;if we are building a &lt;a href="https://towardsdatascience.com/everything-you-need-to-know-about-mvc-architecture-3c827930b4c1"&gt;MVC application&lt;/a&gt;&lt;/em&gt;)&lt;/p&gt;

&lt;h3&gt;
  
  
  Wait wait, what the hell is an API anyway ?
&lt;/h3&gt;

&lt;p&gt;API (Application programming interface) is a document that contains a description of all the features of a product or software. It represents classes and interfaces that software programs can follow to communicate with each other. An API can be created for applications, libraries, operating systems, etc.&lt;/p&gt;

&lt;p&gt;Let's perform a thought experiment, we went to restaurant and ordered some &lt;strong&gt;food&lt;/strong&gt; the &lt;strong&gt;food&lt;/strong&gt; here is the data that we want in programming terms now we ask the &lt;strong&gt;waiter&lt;/strong&gt; to take our order and deliver a message to the &lt;strong&gt;kitchen&lt;/strong&gt; the &lt;strong&gt;backend&lt;/strong&gt; of an application. Tha &lt;strong&gt;backend&lt;/strong&gt; does it's magic and get back out &lt;strong&gt;food&lt;/strong&gt; or the &lt;strong&gt;data&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Here, the &lt;strong&gt;waiter&lt;/strong&gt; is the &lt;strong&gt;API&lt;/strong&gt;.&lt;/p&gt;




&lt;p&gt;Now that we have a basic understand of what &lt;strong&gt;JDBC&lt;/strong&gt; is let's move forward but before we can start coding there a few things that we need to know.&lt;/p&gt;

&lt;h4&gt;
  
  
  Data Types in JDBC
&lt;/h4&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;SQL&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Java&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;VARCHAR&lt;/td&gt;
&lt;td&gt;java.lang.String&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;CHAR&lt;/td&gt;
&lt;td&gt;java.sql.String&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;BIT&lt;/td&gt;
&lt;td&gt;boolean&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;NUMERIC&lt;/td&gt;
&lt;td&gt;java.math.BigDecimal&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;INTEGER&lt;/td&gt;
&lt;td&gt;int&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;REAL&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;FLOAT&lt;/td&gt;
&lt;td&gt;float&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DOUBLE&lt;/td&gt;
&lt;td&gt;double&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;More Data Types&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
    &lt;tr&gt;
        &lt;td&gt;BINARY&lt;/td&gt;
        &lt;td&gt;byte[]&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;DATE&lt;/td&gt;
        &lt;td&gt;java.sql.Date&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;TIMESTAMP&lt;/td&gt;
        &lt;td&gt;java.sql.Timestamp&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;ARRAY&lt;/td&gt;
        &lt;td&gt;java.sql.Array&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;REF&lt;/td&gt;
        &lt;td&gt;java.sql.Ref&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;STRUCT&lt;/td&gt;
        &lt;td&gt;java.sql.Struct&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;BIGINT&lt;/td&gt;
        &lt;td&gt;long&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;CLOB&lt;/td&gt;
        &lt;td&gt;java.sql.Clob&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
        &lt;td&gt;BLOB&lt;/td&gt;
        &lt;td&gt;java.sql.Blob&lt;/td&gt;
    &lt;/tr&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  JDBC Architecture
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Gty_J8S1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static.javatpoint.com/core/images/design-of-jdbc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Gty_J8S1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static.javatpoint.com/core/images/design-of-jdbc.png" alt="JDBC Architecture" width="650" height="409"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up the Dev Environment
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Setting up Java Environment&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download the &lt;a href="https://www.oracle.com/java/technologies/downloads/"&gt;Latest SDK&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Java_Home&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Set &lt;code&gt;Java Path&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Setting up MySQL Environment&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Download the Latest &lt;a href="https://www.mysql.com/downloads/"&gt;MySQL Workbench&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Extract the file&lt;/li&gt;
&lt;li&gt;Run the setup file&lt;/li&gt;
&lt;/ol&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Note:&lt;/strong&gt;&lt;br&gt;
You can use whichever Database application that you like as long as it is a &lt;strong&gt;SQL database&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Steps to Connect JDBC
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Importing Packages&lt;/strong&gt;
This procedure is followed to make sure the relevant packages are readily available for the API&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Load and Register Drivers&lt;/strong&gt;
The imported drivers need to be loaded and registered for establishing a connection between application and database&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Connecting Database&lt;/strong&gt;
After the first two steps, the next stage is to connect the data base. This can be done by &lt;strong&gt;getConnection()&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Writing the Queries&lt;/strong&gt;
Here, we write in the SQL Command or Query that we need to execute&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Executing the Queries&lt;/strong&gt;
Now the query from the API is executed using &lt;strong&gt;executeQuery()&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Processing Request&lt;/strong&gt;
After the above five request, the system basically does two things:

&lt;ul&gt;
&lt;li&gt;Process Output Value&lt;/li&gt;
&lt;li&gt;Retrieve Values&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Closing Statement&lt;/strong&gt;
The resultSet and statement need to be closed explicitly.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Closing Connections&lt;/strong&gt;
The last stage is to ourselves or the API from the Database&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Let's Start Coding then 😃
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Getting our Database Ready
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;First we need to &lt;a href="https://www.hivelocity.net/kb/how-to-start-stop-and-restart-mysql-server/"&gt;launch MySQL&lt;/a&gt;, which we can do by launching the &lt;strong&gt;MySQL&lt;/strong&gt; workbench or through the &lt;strong&gt;terminal&lt;/strong&gt; for the sake of simplicity of this tutorial we are gonna be using the &lt;strong&gt;terminal&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Now that MySQL is running, we can create a database named &lt;code&gt;university&lt;/code&gt; by typing in the command &lt;code&gt;CREATE DATABASE university;&lt;/code&gt;, and then to check whether the database is running or not we can execute &lt;code&gt;SHOW DATABASES;&lt;/code&gt; this is my output, notice the &lt;code&gt;university&lt;/code&gt; database.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql&amp;gt; show databases;
+--------------------+
| Database |
+--------------------+
| information_schema |
| University |
| customerdb |
| mysql |
| openmrs |
| performance_schema |
| sys |
+--------------------+
7 rows in set (0.02 sec)
mysql&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Next we will create a table named &lt;code&gt;engineeringStudents&lt;/code&gt; with &lt;strong&gt;{id, department, first_name, last_name, passout_year, uni_rank}&lt;/strong&gt; by executing the following command:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;CREATE&lt;/span&gt; &lt;span class="k"&gt;TABLE&lt;/span&gt; &lt;span class="nv"&gt;`customerdb`&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nv"&gt;`EngineeringStudents`&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
&lt;span class="nv"&gt;`student_id`&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nv"&gt;`department`&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nv"&gt;`first_name`&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nv"&gt;`last_name`&lt;/span&gt; &lt;span class="nb"&gt;VARCHAR&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;45&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nv"&gt;`passout_year`&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="nv"&gt;`university_rank`&lt;/span&gt; &lt;span class="nb"&gt;INT&lt;/span&gt; &lt;span class="k"&gt;NOT&lt;/span&gt; &lt;span class="k"&gt;NULL&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="k"&gt;PRIMARY&lt;/span&gt; &lt;span class="k"&gt;KEY&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;`student_id`&lt;/span&gt;&lt;span class="p"&gt;),&lt;/span&gt;
&lt;span class="k"&gt;UNIQUE&lt;/span&gt; &lt;span class="k"&gt;INDEX&lt;/span&gt; &lt;span class="nv"&gt;`student_id_UNIQUE`&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nv"&gt;`student_id`&lt;/span&gt; &lt;span class="k"&gt;ASC&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now the last step to make our Database ready is to insert some data into it, which we will be doing by the following commands
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="n"&gt;engineeringstudents&lt;/span&gt;
   &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10201&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'CSE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Kiran'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Acharya'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2018&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1272&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="n"&gt;engineeringstudents&lt;/span&gt;
   &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10202&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'ME'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Jayson'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Robert'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2020&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1249&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="n"&gt;engineeringstudents&lt;/span&gt;
   &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10203&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'CSE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Praveen'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Kumar'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2017&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1238&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="n"&gt;engineeringstudents&lt;/span&gt;
   &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10204&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'ECE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Rajesh'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Kumar'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2019&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1243&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="n"&gt;engineeringstudents&lt;/span&gt;
   &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10205&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'CSE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Trevor'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Krugar'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2018&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="n"&gt;engineeringstudents&lt;/span&gt;
   &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10206&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'CSE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Jogn'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Denver'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2018&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="k"&gt;insert&lt;/span&gt; &lt;span class="k"&gt;into&lt;/span&gt; &lt;span class="n"&gt;engineeringstudents&lt;/span&gt;
   &lt;span class="n"&gt;value&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;10207&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'ECE'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Jennifer'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'Charles'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;2019&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;13232&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  The Java Module 🥲
&lt;/h3&gt;

&lt;h3&gt;
  
  
  Creating the Module
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You can use any IDE/Text Editor that you want, although I would recommend you download and install &lt;a href="https://www.jetbrains.com/idea/download/#section=mac"&gt;IntelliJ IDEA CE&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Launch the IDE&lt;/li&gt;
&lt;li&gt;Next, create a &lt;strong&gt;Java Project&lt;/strong&gt; (Not a Maven or Gradle etc)&lt;/li&gt;
&lt;li&gt;I am going to call it &lt;strong&gt;jdbc-intro&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;And then create a &lt;code&gt;JDBC&lt;/code&gt; directory with a &lt;code&gt;JDBC.java&lt;/code&gt; class in it, the directory structure should look like this:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;|-- jdbc-intro
    |-- lib
    |-- src
        |-- JDBC
            |-- JDBC.java
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Creating a basic SQL query in Java
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Now, we would start writing the code in the &lt;code&gt;src/JDBC/JDBC.java&lt;/code&gt; file:
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;JDBC&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;java.sql.*&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;JDBC&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;[])&lt;/span&gt; &lt;span class="kd"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;SQLException&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"jdbc:mysql://localhost:3306/customerdb"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;uname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"root"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"password"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"select * from engineeringstudents"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;This code is pretty self explanatory, except for the &lt;code&gt;import java.sql.*;&lt;/code&gt; line.&lt;/li&gt;
&lt;li&gt;This is the line that provides us all of the function that are present in the &lt;strong&gt;JDBC Library/API&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;But we haven't added JDBC to our project, which we are going to using a &lt;code&gt;JAR&lt;/code&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;First we will download the Jar file for JDBC from &lt;a href="https://dev.mysql.com/downloads/connector/j/"&gt;this link&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Next, to add this JAR file to our project we can follow &lt;a href="https://www.geeksforgeeks.org/how-to-add-external-jar-file-to-an-intellij-idea-project/"&gt;this article&lt;/a&gt; on GFG&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Checking if our package is imported correctly by using the &lt;code&gt;try and catch&lt;/code&gt; block which find the package &lt;code&gt;className&lt;/code&gt;&lt;br&gt;&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;JDBC&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;java.sql.*&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;JDBC&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;[])&lt;/span&gt; &lt;span class="kd"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;SQLException&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"jdbc:mysql://localhost:3306/customerdb"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;uname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"root"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"password"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"select * from engineeringstudents"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

        &lt;span class="c1"&gt;// Checking if the package is present&lt;/span&gt;
        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;Class&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;forName&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ClassNotFoundException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;printStackTrace&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Connecting to the Database and printing the result to the console
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;To create a connection to the database we use the &lt;strong&gt;Connection&lt;/strong&gt; class present in the &lt;em&gt;JDBC Driver&lt;/em&gt; and pass the &lt;em&gt;url, uname and password&lt;/em&gt; to the &lt;strong&gt;getConnection()&lt;/strong&gt; method in the &lt;em&gt;DriverManager&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;Then to convert our query String into a JDBC Statement we are going to use the &lt;strong&gt;Statement&lt;/strong&gt; class and &lt;strong&gt;createStatement()&lt;/strong&gt; method
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;Connection&lt;/span&gt; &lt;span class="n"&gt;con&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DriverManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getConnection&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;uname&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="nc"&gt;Statement&lt;/span&gt; &lt;span class="n"&gt;statement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;con&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;createStatement&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now that we have created a &lt;strong&gt;Query Statement&lt;/strong&gt;, it need to be executed and result stored in a variable, which will be of the the type &lt;strong&gt;ResultSet&lt;/strong&gt; which is also provided by the &lt;em&gt;JDBC Driver&lt;/em&gt;
&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;statement&lt;/code&gt; is to be executed using the &lt;strong&gt;executeQuery()&lt;/strong&gt; method by providing it the query as a parameter
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nc"&gt;ResultSet&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;statement&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;executeQuery&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Now, the only thing remaining is to print the result obtained to the console.&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;while(result.next())&lt;/code&gt; this part is pretty self explanatory, &lt;em&gt;until the next result is null&lt;/em&gt;

&lt;ul&gt;
&lt;li&gt;We will will iterate over all the &lt;strong&gt;6 properties: {id, department, first_name, last_name, passout_year, uni_rank}&lt;/strong&gt; which can be accessed by the &lt;strong&gt;result.getString(index)&lt;/strong&gt; method by passing the index to it.&lt;/li&gt;
&lt;li&gt;Then we will concatenate this result into a temporary variable.&lt;/li&gt;
&lt;li&gt;When the iteration is completed &lt;em&gt;(no more properties of index: i remains)&lt;/em&gt; we can print this temporary variable
&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;next&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
      &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nc"&gt;UniversityData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
      &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
         &lt;span class="nc"&gt;UniversityData&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getString&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;":"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
      &lt;span class="o"&gt;}&lt;/span&gt;
      &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;UniversityData&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Final Code&lt;/strong&gt;&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="kn"&gt;package&lt;/span&gt; &lt;span class="nn"&gt;JDBC&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kn"&gt;import&lt;/span&gt; &lt;span class="nn"&gt;java.sql.*&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;JDBC&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kd"&gt;static&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;main&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;args&lt;/span&gt;&lt;span class="o"&gt;[])&lt;/span&gt; &lt;span class="kd"&gt;throws&lt;/span&gt; &lt;span class="nc"&gt;SQLException&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;url&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"jdbc:mysql://localhost:3306/customerdb"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;uname&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"root"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getenv&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"SQLPassword"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="n"&gt;query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s"&gt;"select * from engineeringstudents"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;

        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;Class&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;forName&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="s"&gt;"com.mysql.jdbc.Driver"&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;ClassNotFoundException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;printStackTrace&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;

        &lt;span class="k"&gt;try&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="nc"&gt;Connection&lt;/span&gt; &lt;span class="n"&gt;con&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;DriverManager&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getConnection&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;url&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;uname&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="n"&gt;password&lt;/span&gt; &lt;span class="o"&gt;);&lt;/span&gt;
            &lt;span class="nc"&gt;Statement&lt;/span&gt; &lt;span class="n"&gt;statement&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;con&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;createStatement&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;

            &lt;span class="nc"&gt;ResultSet&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;statement&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;executeQuery&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;query&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;

            &lt;span class="k"&gt;while&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;next&lt;/span&gt;&lt;span class="o"&gt;())&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                &lt;span class="nc"&gt;String&lt;/span&gt; &lt;span class="nc"&gt;UniversityData&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;  &lt;span class="s"&gt;""&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
                &lt;span class="k"&gt;for&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="kt"&gt;int&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&lt;/span&gt;&lt;span class="n"&gt;lt&lt;/span&gt;&lt;span class="o"&gt;;=&lt;/span&gt; &lt;span class="mi"&gt;6&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt; &lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
                    &lt;span class="nc"&gt;UniversityData&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="n"&gt;result&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;getString&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="s"&gt;":"&lt;/span&gt;&lt;span class="o"&gt;;&lt;/span&gt;
                &lt;span class="o"&gt;}&lt;/span&gt;
                &lt;span class="nc"&gt;System&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;out&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;println&lt;/span&gt;&lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;UniversityData&lt;/span&gt;&lt;span class="o"&gt;);&lt;/span&gt;
            &lt;span class="o"&gt;}&lt;/span&gt;

        &lt;span class="o"&gt;}&lt;/span&gt; &lt;span class="k"&gt;catch&lt;/span&gt; &lt;span class="o"&gt;(&lt;/span&gt;&lt;span class="nc"&gt;SQLException&lt;/span&gt; &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;)&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
            &lt;span class="n"&gt;e&lt;/span&gt;&lt;span class="o"&gt;.&lt;/span&gt;&lt;span class="na"&gt;printStackTrace&lt;/span&gt;&lt;span class="o"&gt;();&lt;/span&gt;
        &lt;span class="o"&gt;}&lt;/span&gt;
    &lt;span class="o"&gt;}&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>java</category>
      <category>mysql</category>
      <category>jdbc</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
