DEV Community

Abid Gul Shahid
Abid Gul Shahid

Posted on

#help Should I use Golang or Node.js for E-commerce

Hello Everyone
Hope you're all doing well.

I need a little help, I want to create an e-commerce for a startup, They gave me two options for a backend Golang and Node.js. I have no expereience in both. Previously I used a Django/Flask as backend. I am interested in Golang. So it is possible that can I use Golang for e-commerce as a backend?

I want to create a REST-API in golang and use it with react.js which we will be using for a frontend.

I am open for any kind suggestions.

Top comments (9)

Collapse
 
su_subh1 profile image
Subh • Edited

You know python (django & flask) , then nodejs will be easy for you, because :

  1. Node.js is dynamic type like python
  2. Flask routes and node-express routes are 90% similer to use
  3. For db(SQL and noSQL) related stuff , nodejs also has some greate ORM like python

Now come to golang :

  1. It is static type and complied lang (different from js and py)
  2. Although golang is not hard as c or c++ , still it may take some time to move from python or js to golang (my personal opinion)
  3. Golang is great and from performance wise can be better than both js and py (in real life those performance are not that much when think about network ,db calls ,cache etc)

If you are going to learn only one (node or go) , then node will be better because you do not have to spend too much time . For long run ,like 3-4 years , make some time to learn golang , it will really payoff oneday in comming years.

Collapse
 
su_subh1 profile image
Subh • Edited

Long run : means 3-4 years.

See , right now job market for node.js is in the peek , most of the company adopted it , huge number of modules to plug and play , community suport is very good , above all , node js developers are easily available in the market , so from company point of view , the risk of making a product in node is very low.

On the other hand , golang graph is upword but , market share is still not as much as node. Packages are in good amount but not as much as node , also finding a golang developer is 10x harder than node in current market. But it is changing day by day , as more companies are adopting golang also so as candidates are also adopting golang.

But for golang ,to reach the same market share like node , it will take approx 2,3 year or more(still debatable if it will happen or not) . So if till that time like 2 to 4 years ,you manage to learn and master golang , you may be able to get a very good job.

Disclaimer : my answer was from market point of view , not tech point of view. Tech wish golang is already a proven technology that can be used in any production env.

Collapse
 
abidgulshahid profile image
Abid Gul Shahid

Thank you so much.

Collapse
 
abidgulshahid profile image
Abid Gul Shahid

Thank you for the brilliant answer. I have a One question what do u mean by long run for a go and why?

Collapse
 
karanpratapsingh profile image
Karan Pratap Singh

Yes node would be great for velocity, and Go would be great in the 3-5yr timeline, great suggestions

Collapse
 
karanpratapsingh profile image
Karan Pratap Singh

I will say both are pretty good options.

Node would be great as you can develop in same stack as your frontend

Go has really well standard lib and it’s really easy to build and deploy go apps

I think Django is great too, not sure why they didn’t give you the option

Collapse
 
abidgulshahid profile image
Abid Gul Shahid

So what you are gonna suggest Node or Golang? They are also planing for a to build their own custom CRM. So I will be using the same lang as well for that.

Collapse
 
abigailnguyen profile image
CodingHabits • Edited

I think Golang is a good language to learn, and has good ecosystem. Having a bit a learning curve but once you figure it out, I find writing a program in go is enjoyable and you can also read the libraries quite easily too. So the learning curve in both adapting the language and writing a program pays off.

Collapse
 
karanpratapsingh profile image
Karan Pratap Singh

I think node might be a good fit here for you