<?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: Abdallah hamouda</title>
    <description>The latest articles on DEV Community by Abdallah hamouda (@abdallahhamouda).</description>
    <link>https://dev.to/abdallahhamouda</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%2F479966%2Fbc454326-46af-4b48-8136-fe9b2136e84c.jpeg</url>
      <title>DEV Community: Abdallah hamouda</title>
      <link>https://dev.to/abdallahhamouda</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abdallahhamouda"/>
    <language>en</language>
    <item>
      <title>How I learned React in one Week as a vue developer</title>
      <dc:creator>Abdallah hamouda</dc:creator>
      <pubDate>Fri, 16 Sep 2022 15:56:06 +0000</pubDate>
      <link>https://dev.to/abdallahhamouda/how-i-learned-react-in-one-week-as-a-vue-developer-53n0</link>
      <guid>https://dev.to/abdallahhamouda/how-i-learned-react-in-one-week-as-a-vue-developer-53n0</guid>
      <description>&lt;p&gt;first to get a bit of understanding to my background I worked with Vue for more than 3 years so I got bored of it a little bit and I wanna made a new portfolio so I decided to pick react, react router and react material&lt;/p&gt;

&lt;h2&gt;
  
  
  1- Change your mindset Vue is separated to
&lt;/h2&gt;

&lt;p&gt;HTML, Style Script &lt;br&gt;
but React or JSX is HTML inside JavaScript you literally code inside JavaScript Function  with a return () like this&lt;br&gt;
you can write methods or the equivalent is normal arrow function above the return &lt;br&gt;
you can bind data {} single bracket and v-model is the same and&lt;br&gt;
the props is passed on the functions&lt;br&gt;
in the end you should export default the function &lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;`import {useState, useEffect} from 'react'
const MyFunction = ({myProp})=&amp;gt;{
const myMethod = ()=&amp;gt;{
console.log("working react method")
}
return(
&amp;lt;div&amp;gt;
&amp;lt;h1&amp;gt;working {myPorp}&amp;lt;/h1&amp;gt;
&amp;lt;/div&amp;gt;
)
}
export default MyFunction
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;`&lt;/p&gt;

&lt;h2&gt;
  
  
  2- Learn Hooks
&lt;/h2&gt;

&lt;p&gt;I just used useState and useEffect basically useEffect is the same as mounted in vue&lt;br&gt;
useState is to change the value of the variable this is way more different than anything in vue&lt;br&gt;
       &lt;strong&gt;useState&lt;/strong&gt;&lt;br&gt;
       first you have to declare a variable but not the normal way you declare&lt;br&gt;
       let [variableName, ChangeFunction] = useState('your Value')&lt;/p&gt;

&lt;p&gt;then you can change it by ChangeFunction(variableName = 'my new Value')&lt;/p&gt;

&lt;p&gt;that's it is react from a vue developer perspective I am still learning it and I really love it I will follow this roadmap&lt;br&gt;
&lt;a href="https://roadmap.sh/react"&gt;https://roadmap.sh/react&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;if you wanna see my project I developed in react &lt;br&gt;
&lt;a href="http://www.hamouda.tk"&gt;www.hamouda.tk&lt;/a&gt;&lt;br&gt;
still have room to work and improvement but I like to share my progress with you&lt;br&gt;
thanks for reading please tell me if there is something I missed&lt;/p&gt;

</description>
      <category>vue</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>How to Make Full-Stack Project with Nuxt and ExpressJs</title>
      <dc:creator>Abdallah hamouda</dc:creator>
      <pubDate>Sat, 03 Apr 2021 16:00:47 +0000</pubDate>
      <link>https://dev.to/abdallahhamouda/how-to-make-full-stack-project-with-nuxt-and-expressjs-c19</link>
      <guid>https://dev.to/abdallahhamouda/how-to-make-full-stack-project-with-nuxt-and-expressjs-c19</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;Before I knew this I was making the backend and the front-end separately and the  cors handle all the cross-origin requests,&lt;br&gt;
But here is the problem cause I am broke I can't afford to pay for a good server then I went with Heroku,&lt;br&gt;
 and the free plan has a sleeping time when the server isn't used they shut it down and rerun it when somebody uses it then the whole npm run this is a lot of time to wait for the user,&lt;br&gt;
  so I decided to go with the same origin to cut this downtime to half then I made my research and I didn't found  a lot so I decided to make one for me and the people beginners like me &lt;br&gt;
let's start &lt;br&gt;
If you wanna make the backend and the frontend of the same origin you can do it in two ways&lt;/p&gt;
&lt;h3&gt;
  
  
  From Nuxt Docs
&lt;/h3&gt;

&lt;p&gt;here basically you write a regular express app&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const app = require('express')() 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then identify your port the server will run on&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const port = process.env.PORT || 3000
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then you load nuxt and write a line of code to check are you in development or not&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const { loadNuxt, build } = require('nuxt');
const isDev = process.env.NODE_ENV !== 'production'
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then we make async function then use nuxt.render middleware&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;async function start(){

 // Render every route with Nuxt.js
 const nuxt = await loadNuxt(isDev ? 'dev' : 'start')

 //render Routes with nuxt render
 app.use(nuxt.render)

//build on dev mode because of hot reloading (reload the page when any change happens)
 if(isDev){
 build(nuxt)
 }

 //listen to port
 app.listen(port, '0.0.0.0')
 console.log("loading on "+ port)
}
start();
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;then go to nuxt.config.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;middleware:['name of your middleware']
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you are interested to use this method &lt;br&gt;
you can read more on &lt;br&gt;
&lt;a href="https://nuxtjs.org/docs/release-notes#-features"&gt;Nuxt Docs&lt;/a&gt;&lt;/p&gt;
&lt;h3&gt;
  
  
  Server Middleware
&lt;/h3&gt;

&lt;p&gt;this is the simpler way to do it you have to do three things&lt;br&gt;
1- Make api file and put all your express code on it&lt;br&gt;
2- add this to the end of your index.js code&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;module.exports = app

// Start standalone server if directly running

if (require.main === module) {

const port = process.env.PORT || 3001

app.listen(port, () =&amp;gt; {

// eslint-disable-next-line no-console

console.log(`API server listening on port ${port}`)

})

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

&lt;/div&gt;



&lt;p&gt;3- add serverMiddleware to nuxt.config.js&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;serverMiddleware: {

'/api': '~/api'

},
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;if you wanna use it directly without doing anything there is a ready to use the template on &lt;a href="https://github.com/nuxt-community/express-template"&gt;GitHub&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;in the last thanks for reading, I hope you found this helpful for you,&lt;br&gt;
 if you want me for work you can DM me on any of my social media on my profile &lt;/p&gt;

&lt;p&gt;Check my new Startup &lt;a href="//www.dremor.tk"&gt;Dremor&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>node</category>
      <category>codenewbie</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How I developed my Blog</title>
      <dc:creator>Abdallah hamouda</dc:creator>
      <pubDate>Tue, 05 Jan 2021 15:19:01 +0000</pubDate>
      <link>https://dev.to/abdallahhamouda/how-i-developed-my-blog-oml</link>
      <guid>https://dev.to/abdallahhamouda/how-i-developed-my-blog-oml</guid>
      <description>&lt;p&gt;I wanted to start my blog to learn about content marketing how the thing is done and working but I failed a lot of times today I will share how I did it.&lt;/p&gt;

&lt;h2&gt;
  
  
  my Back experience
&lt;/h2&gt;

&lt;p&gt;this part I will separate it into two part which are cms I tried and did not work for me and my back experience in programming&lt;/p&gt;

&lt;h3&gt;
  
  
  programming experience
&lt;/h3&gt;

&lt;p&gt;I am a self-taught programmer, I learned very slow and at the first, it was very hard to figure things out at the beginnings,&lt;br&gt;
 I didn't know what do I want to be, what should I learn or do so it ended up with me learning web development I tried angular, react, and Vue but I liked Vue in the end,&lt;br&gt;
I developed some portfolio projects &lt;/p&gt;

&lt;h3&gt;
  
  
  blogging
&lt;/h3&gt;

&lt;p&gt;I tried three cms (content management systems)&lt;/p&gt;

&lt;p&gt;#### Wordpress&lt;br&gt;
 I tried wordpress.com and .org,&lt;br&gt;
 the problem with the first one that I wanted to start for free and incrementally add more stuff gain a little bit of money to buy a domain, etc,&lt;br&gt;
 but I did not like it all free UI are suck I actually hate it the block editing in you WordPress I did not understand it.&lt;br&gt;
 with .org version of WordPress things was a little bit harder for me because I am a frontend/ javascript developer so it was hard I gave up immediately &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;#### Nuxt Content
With Nuxt content.
I didn't like the idea of markdown blogging,
I have to git commit every time I add a blog post, but the good part with it you don't need any backend, and the content loads very fast no API calls everything is pretty dope&lt;/li&gt;
&lt;li&gt; #### Strapi
I heard about headless cms,
I google it and Strapi first thing I found, 
you can consider Strapi as a prebuilt backend for your project,
it is highly customizable, it was simple to make a blog and customize API calls, you can use Graphql too it was great and I learned a lot about backend using it, especially for nodeJS, I made two websites with it 
but the dark side was deployment first time I deploy it supports SQL lite, but you can't deploy it with it, you have to integrate another database like MongoDB or PostgreSQL,
when I integrate it with MongoDB, I met a lot of problems in the Heroku console
### What I want
I began to develop everything by myself using mevn stack
MongoDB, ExpressJs, VueJs, NodeJs, and NuxtJs

&lt;ul&gt;
&lt;li&gt;#### Html Blogging
I think HTML is the perfect use for my case, for blogging because it's very simple to learn and use at the same time it's highly customizable.
you can add inline styles to anything you want, Change specific part put margins, make margins padding, put affiliates, you can add inline javascript too, and many more&lt;/li&gt;
&lt;li&gt;#### scale incrementally and be Simple at the same time
My blog system started small and increased incrementally as my knowledge increase,
For example, the first time I made it, it was only a plain blog, just some words in a website via API calls, then I learned about SEO, so I added keywords for every post, sitemap, dynamic title, and description. then I added a tool called AddThis, and the list goes on.
separate by making the backend separate from the frontend the development was easier than normal, and I can focus better on what are the different features I can add in the frontend and backend&lt;/li&gt;
&lt;li&gt;#### develop with familiar programming language for me
I developed by what I already know which is javascript in the form of vue or nuxt and nodejs.
that made development much easier and prevented mind shift from programming language to another&lt;/li&gt;
&lt;li&gt;#### don't have to git commit every time I want to post&lt;/li&gt;
&lt;/ul&gt;


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

&lt;p&gt;unlike Nuxt Content now I git commit when I just add a new feature or code &lt;br&gt;
that separate commits for adding features and commit for adding a new blog post&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;#### Free hosting and I can earn money from different sources anytime I want
this is done by Heroku but unlike the other points this point has a lot of cons 
Nuxt is SSG and SSR
1-subdomain .herokuapp but it is acceptable for free service like Heroku
2- HTTP, not HTTPS Netlify provide HTTPS with each project you make, and because of that PWA is not working because it requires HTTPS
3-addons needs a credit card to add
4-sometimes I met a problem with CDN in Heroku
5-website sleep if your website is not used Heroku will turn it off till someone visit your website and reactivated
after all of these points, Heroku is not bad but on the contrary, Heroku is good free cloud hosting for your full-stack projects &lt;/li&gt;
&lt;li&gt; #### easy relevant database I can work with
I don't know that much about back-end programming, in general, I worked before with few technologies like JWT and nodemailer, but what I don't know for most is a relational database so I need a hosted database easy to integrate and use and maintain so I chose MongoDB it is very easy to use just make schema and schema. save for inserting to the database schema. find and findOne to get 
### what are my upcoming plans
1-complete my website and improve it 
2- make a Hosted CMS like wordpress.com that target frontend developer (freedom frontend developer)
## Check out my blog&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://byhamouda.herokuapp.com/"&gt;Byhamouda&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Articles I wrote may help you
&lt;/h2&gt;

&lt;p&gt;&lt;a href="http://byhamouda.herokuapp.com/post/5ff1ef9813698c0017e8dd19"&gt;6 tips that will help you find the passion of your life&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://byhamouda.herokuapp.com/post/5fd663263c83800017e8eafb"&gt;5 Tips to get free mentors&lt;/a&gt;&lt;br&gt;
&lt;a href="http://byhamouda.herokuapp.com/post/5fdf8e23a1f3ad00172b8275"&gt;7 Tips to finish more Books&lt;/a&gt;&lt;/p&gt;

</description>
      <category>vue</category>
      <category>webdev</category>
      <category>node</category>
      <category>mongodb</category>
    </item>
  </channel>
</rss>
