DEV Community

instructured
instructured

Posted on

Go for Backend instead of Python/Django

Hi everyone. I've recently started to work at a trade company and they want me to replace their existing website with a new one. I am not a web developer, I do embedded work with C. I got this job without any web experience because owners of the company are my friends, they trust me personally and they are not in a hurry.
Current website is really simple, only activity on the client side is that users send price request forms for products they want to buy. No user accounts, no online purchases. All negotiation work is done via email by the dealers of the company. At the backend a database with thousands of products.
Each product has couple of images and a few specifications. Existing site is built on asp.net, mssql.

Now they want me to build enhanced version of this site. At first very similar functionality with the current site with improved SEO. But later in the future adding user accounts, online payment system and a mobile app.

Because I'm not a experienced Web developer I decided to build new site with Python and Django. Django provides a lot of useful features out of the box as I see. But my problem is Python, because I've been coding primarily in C, I'm struggling to understand Python way of coding. At first it seems way simpler but I feel fine tuning the code is much more difficult because of loose coding style. For a while I'm curious about the Go. It is closer to the C and I feel I can learn it better than Python. My question is, how hard will it be to build that website with Go without web dev experience. Does Go have enough tools to simplify development process. Does it create a lot of problems when adding new functionalities to the site?

Top comments (7)

Collapse
 
dogers profile image
Dogers

If you're not confident with web dev then you'll likely have the same problems in both Python and Go.

Go has a ton of modules which can help though, for example I'm playing with HTMX and Templ at the moment, but there's others like Fiber, Gin, Go-Zero, etc, etc :)

Collapse
 
go4webdev profile image
Go4WebDev • Edited

My question is, how hard will it be to build that website with Go without web dev experience.

I had no web developing experience besides CMS (WordPress / Drupal) . And I found Go simpler than customize a CMS. Yes, it takes time to grasp this, but when you are finished, you have a fast website. The difference between Python and Go is that Go is compiled and all dependencies are within the compiled executable.

Does Go have enough tools to simplify development process.

Yes and No. Go as web tool is simple enough and needs no further tools IMO. Note that Go have the HTML templates, but you still must use CSS and Javascript to make the site interactive.

Does it create a lot of problems when adding new functionalities to the site?

Rather the opposite. It may be harder to compile, but once compiled as an executable, it just works.

Collapse
 
kwnaidoo profile image
Kevin Naidoo • Edited

Try Laravel. PHP was initially a templating layer on top of C, so it's got some similarities with C.

Golang is great but things like CSRF tokens, and even templating for people not familiar with web development can be a challenge.

Laravel handles all the basic plumbing, so you don't have to roll out your own libraries and tooling.

Just be aware that Laravel is huge, so don't try to fiddle with Livewire, Intertia, etc... just learn these first:

  1. Models (Eloquent): How to create a migration, and a model and do basic querying.
  2. Routing.
  3. Controllers.
  4. Requests.
  5. Blade templates.
  6. Sessions.
  7. Console commands.

Here's a quick overview: youtube.com/watch?v=e7z6KJkGhmg
Here's a good overview of PHP: w3schools.com/php/

Collapse
 
zeedu_dev profile image
Eduardo Zepeda

Go has everything you need to create a web server, the new versions doesn't require you to install a routing library, and you can even return HTML directly. If you don't want to mess with the brand new javascript frameworks that pop out every week Go alone or Go+HTMX is the way to go. Also you will only need a single binary to run your application, low memory consumption and easy scalability

IMO django is an overkill if you are just sending forms. If you want to stick with Python consider fastapi (with Jinja templates), flask or pyramid instead.

Collapse
 
zeedu_dev profile image
Eduardo Zepeda

BTW I have go tutorials from super basic stuff just in case you want something more organized.

Collapse
 
litlyx profile image
Antonio | CEO at Litlyx.com

I can suggest to you, if you do not have experience in web development, to start with a BAAS like Supabase or Firebase to handle Auth and everything CRUD.

Try to reduce complexity of back-end at the start and use software like Supabase to create a back-end. They are amazing and support all tech stacks.

For Front-end you can use everything you want!

Hope this helped.

Antonio, CEO & Founder at Litlyx.com

Collapse
 
davidbmx profile image
David

I advise use Django if you don't have experience with web development because is easy to use and implement webs fast