How to create a programming project
Tags: webdev, programming, devops, security
Published: 2022-11-02 15:28:28

In this article, I will explain how to create a project that can quickly scale up, have low latency and high performance within less time. If you are a beginner, you can also go through this article, as it does not require any prerequisite.


## <u>Step-1</u> 📝 Write down all necessary functions of project
It would help if you wrote down all the necessary functionalities which define your project. In case of a complex project, first, create a [MVP (Minimum Viable Product)](https://en.wikipedia.org/wiki/Minimum_viable_product) and note down all features. For example, if you want to create an e-commerce platform, the key features are: 
1) **Login/Sign up**
2) **Display Products**
3) **Add Product to Cart**
4) **Place order**

## <u>Step-2</u> 🧑‍🔧 Choose Technologies to create project
In the case of an e-commerce application, you can divide the app into front-end, back-end and database. There are many tech stacks available for you to create projects like [MERN stack](https://www.mongodb.com/mern-stack), [MEAN stack](https://www.mongodb.com/mean-stack), and many more. I love to use [Spring Boot](https://spring.io) for the back end, [Next-js](https://nextjs.org) as the front end and [Mongo-DB](https://www.mongodb.com) as the database. You can also use Next-js to create the back-end as well. Nevertheless, it is your call to pick a tech stack.
## <u>Step-3</u> 🖇️ Break down project into small tasks
Before going to programming stuff, you need to divide your project into small tasks which are easy to achieve. For example, create data classes (like the user, product, and cart classes), define endpoints for applications, and many more. I often use [Jira](https://www.atlassian.com/software/jira) to organise my task.
## <u>Step-4</u> 🧪 Test application
Testing an application is very crucial. Make sure that while testing an application, you cover every corner case. In the case of a complex project, testing the entire application is very scary. To do this in a very effective way, you need to divide testing into stages. In the case of back-end development, I know a couple of testing stages which are unit testing (to test a small piece of code or feature), integration testing (first combining different modules and then testing them), and performance testing(It checks the overall performance of the product by creating mock traffic and calculating performance like latency). You can also use software like [Postman](https://www.postman.com) to check the response of API calls on different-different parameters.
## <u>Step-5</u> 👨‍💻 Maintain code-base
To maintain your code, you can use [Git] (https://git-scm.com). After that, you can push your code to platforms like [Github](https://github.com/) or [Gitlab](https://about.gitlab.com/). These platforms will help you to maintain code, set up CICD(going to talk about this later), integrate with Jira, and many more.
## <u>Step-6</u> 🌐 Deployment
Deployment is significant, and sometimes it is tough to deploy your project at the last moment. Previously, deployment was a nightmare for me as I faced tons of errors, and due to this, I spent days deploying even simple applications. However, now I use CI/CD to deploy applications on platforms like Azure, Heroku and many more. CI/CD (or Continuous Integration Continuous Deployment) is an automation which deploys an application to a given server or groups of servers, and this is a one-time process; you have to define rules like if you push code or merge a branch into the master/main then deploy given code to production server else deploy code to preview server. To deploy the spring boot project, I use Azure and setup up [Github Actions](https://github.com/features/actions) to deploy the project to production. You can use GitHub actions to do more than that. Before merging a PR(Pull Request) to master/main, you need to check whether the application is passing all tests and can build without an error; you can set up an action to do so.
## <u>Step-6</u> 🔒 Security
Creating a secure application is essential, primarily when your application handles sensitive data like email, passwords, credit cards or payment details. Also, it would be best if you made sure that it is not storing any secrets like database credentials or API keys in any version control system. While storing sensitive details on a database, first encrypt them so that even if someone gets access to your database, they should not be able to get your users' sensitive information.
These are some basic steps which can make your project development journey more simple. Please let me know if I missed any information or wrote something wrong. 
Thanks
Harsh Verma
{% embed https://dev.to/harsh3305 %}