Beginner advice for migrating from Django

Hello All,

I am Django developer for 2 years now , recently started to be interested in GO ,especially for rapid web app
My question is there any Go web framework similar or equivalent to Django that helps for building rapid web app?
If yes will be glad to get reference for them
Thanks

Unfortunately I’m not very familiar with Django so I can’t be much help in terms of advice for a similar paradigm. But this is a good getting started guide on web apps in general:

https://gowebexamples.com/

That guide uses gorilla/mux, which is pretty widely used. I use both gorilla/mux and julienschmidt/httprouter. The official docs also have a getting started guide using only stdlib:

https://golang.org/doc/articles/wiki/

I mostly write RESTful APIs and find that go really excels there. Are you creating a SPA + REST API or looking to use templates to create a multi-page app?

1 Like

Thank you for the answer, currently i am with Django using templates to create a multi-page app, but i know REST API is the way to go
Thanks

see this list of frameworks like django (full stack),

there are some one more famous, like Buffalo, Beego, Gin, but I never used

1 Like

Go also use templates (see Templates - Go Web Examples and template package - html/template - pkg.go.dev).

2 Likes

I am trying to avoid frameworks. Because the built in tools are good enough and frameworks are not always helping you. I have tested Angular and found that basically everything in Angular is built-in Go. Templating and sub templating is a touch of Angular but way simpler. I have created menus and submenus by using sub templates. All without frameworks. Create Navigation

To write web applications you must decide first if you are going on server side style or your application is splitted in frontend and backend.

In the first case every http handler you made return a template populated with your data (from databases or whatever). The templates are your frontend and should include JS and CSS libraries and frameworks (eg, AngularJS, Vue, Bootstrap,etc).

In the second case http handlers are simple endpoints for other frontend applications (written in Angular,React, etc) and return data in well known data exchange formats (like JSON).

In the both cases is better to use a framework (eg. gorilla toolkit to avoid reinventing the wheel for routes and subroutes, middlewares, cookies, sessions, etc.

However, take a look over this server side application skeleton that I wrote a while ago, maybe it helps.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.