I had a chance to try Node.js framework last month; I decided to build REST APIs using Node.js and express.js. Regularly I'm using JavaScript in my daily work besides using Django to build Web Applications, but many times I need to develop a front-end feature, This when I need to use JavaScript. I'm always using JavaScript to write front-end logic, but I never wrote back-end logic using it. I took the challenge to develop a simple REST APIs using express.js.

November 2015 I left my comfort zone, and I started my journey with Python, it was not an easy start. I was a Windows/Microsoft guy, I was using Microsoft Visual Studio on a daily basis, and Windows was my primary OS. I switched to macOS and Pycharm; I picked these to make my transition easier than using Linux (Ubuntu) and Vim.

After 2 months of figuring out what are virtualenv, pip, python version, and environment variable. I started another milestone of how to write a pythonic code while that I went to DjangoCon, and I saw how awesome this community is. WOW 🤗, this community is very welcoming for newcomers, and since this day I'm in ❤️ with this community.

Like someone said to me "You are staying because of people not because of the language." Indeed, the community is excellent 👍🏻, and it is what makes this language impressive and always adopting the future.

I want to thank all human beings in this community form leaders to the starters (welcome BTW 😉), thank you for being a part of this community and making this community.

First, let me acknowledge you that my answers are just my experience, what I missed during my career as software developer, and I wished someone told me this advice.

Be humble be foolish be patient, you have a long journey of learning, so keep learning. Technologies are changing so fast, so fast that you can't master everything, but you need to read about everything in software development, read blogs, news, etc. Invest your learning time in what you'll be master in.

Don’t be afraid to fail. Making mistakes is a part of the learning, so please don’t be afraid to make mistakes, but learn from them. Even great software developers got fired, made mistakes, and they feel down, but what makes them great that they get up and learn from mistakes.

Discovery

After many years of developing web applications, I found my passion is building Web APIs. so why I like it, I like it because I think it's giving your application a power to integrate with other apps (desktop, mobile apps, etc.), other devices (Amazon Dot, Google Home, etc.), sensors (RaspberryPi, Arduino, etc.), and bots (Slack, Telegram, Facebook Messanger, etc.).
Can you feel the power that Web API that can add to your apps?

Let's build something

After I found my passion and start to search for a project to ably what I like and keep developing it. I found that there is no Web API for Quran Tafseer/Translation. What can Quran Tafseer API do for developers? If you want to develop an application for Quran and you want to provide a Tafseer/Translation to the application users, you need to gather the information from more than one source. I found most of the existing applications done it and after that work, app developers will keep this information available to their app only, so I thought of doing this work for the community and provide Tafseer/Translation for free as Web API.

Stages

Stage I

The Start

In September 2017 I left my job and my life in Kuwait and traveled to the Netherlands to join Veneficus as Software developer, one of the reasons I moved to the Netherlands is to work in a team and I started to feel being a solo developer is bad for my career.

I joined a team of 7 developers mixed between full-time and part-time, and start to fell there are some missing skills I need to develop, and yes I was correct I worked alone for almost 7 years. What is it mean working alone? it means no need for communication, no need for development plans, no need for technical debates, no need to manage your time or other team member's time. In the beginning, I feel so bad and stressed with that change, to be honest, I made many mistakes, but with a growth mindset you need to learn from mistakes and grow and fix them, os what I did?

Community Help!

First, I asked for community help, I went to PythonistaCafe forum and posted my situation and the members gave me great answers regarding my situation, and one member point me to something …

One day I realized that Microsoft technologies are not for what I'm looking for. what I'm looking for is working in startup that developing its own product like Instagram, Shopify, or Pinterest. So I've done some research and I found that Microsoft technologies are not made for this purpose, Microsoft technologies made for enterprises, I worked with Microsoft Dynamics AX, Microsoft SharePoint, ASP.NET WebForms, and ASP.NET Web Services you won't find a startup work with these or built their business around these kind of products, so I start to research for another technology to use.

After long time of research and Q&A with my friend Burhan, I switched to Python, I didn't pick Node.js or Ruby on Rails, because I don't like to pick a new shinny tool/framework for sake of it's new, I picked Python and Django one of it's web framework. I found during my research many people recommended Node.js because it's the new thing, again I don't like to pick the new shinny tool, this is common between developer community, developer will be proud if someone ask Which language/framework are you using? and the developer answer is the …

Why Another Post about this?

I found each time I start new Django project, I need to create Login HTML page, and with that I need to write Django View and Form. Each time I tried to Google how to do it, I found many posts about how to do it from scratch, yep as you read, posts telling you how to build a Django View and Form for login page. And there are already built-in Django login View and Form (please check links).
So I decided to write my own recipe on how to create Login page in your Django app using the built-in view and form to save time and stop reinvent the wheel.

How to do it?

Actually it’s an easy one, because we’ll use already built-in View and Form, so we will build the Template for it, that it. We have a Form and View ready, so first thing first, we’ll write a template to show HTML form for login, I'm assuming you have another template called base.html and we’ll just write the container block part only, and we are using Boostrap framework and crispy_form app.

I wrote a post on how to add client side validation for Django Forms. In this post I’ll show you how to add custom client validation to Django Forms. I mean by custom validation is a validation that isn't available in django-parsley, like username availability, password strength, email duplication, etc.. let’s see how to add custom client side validation to Django Form.

@parsleyfyclassUserRegistrationForm(forms.ModelForm):classMeta:...parsley_extras={'password':{'remote':reverse_lazy('validate-password-parsley'),'remote-message':"Password is invalid"},'username':{'remote':reverse_lazy('validate_username_uniqueness'),'remote-message':"User with this username is already exists."},'email':{'remote':reverse_lazy('validate_email_uniqueness'),'remote-message':"User with this email is already exists."},}

In the code above we are adding client custom validation as remote to password, username, and email fields, Did you notice that remote key is holding a URL to Django View? let’s create a complete sample to get our head around it.

Django Password …

Last month I had small trip to Netherlands, Rotterdam, at night I went to have a dinner with friends at EuroMast, it was windy day, we putted our bags in my friend’s car trunk, but unfortunately someone broken inside the car and took 2 bags and one of them was my bag. My travel backpack is stolen and I lost most of my gadgets (MacBook Pro, iPad, Amazon Kindle, Wallet, etc..)

After a night at the police station to report the incident, I went to hotel to get some sleep before flying back to home, next day I woke up, prepared my bags and headed to airport, but on my way to the airport I was thinking what to do during my long flight, I thought let’s read a book, so once I reached the airport I went to bookstore and bought The Subtle Art of Not Giving a F**k.

So Emad, Why you are telling us these story? Because while I'm reading this book I found this part

We don't always control what happens to us. But we always control how we interpret what happens to us, as well as how er respond.