Answer the question
In order to leave comments, you need to log in
Is Golang good for building websites?
Hi everybody!
I want to start learning golang to create websites. But there are questions a lot of questions at the moment I create sites in php and all my questions are based on knowledge
of
php
create in php)
2. Does golang somehow affect seo optimization-issuance
(if you don’t take angularjs for the frontend admin panel, then the site will not be indexed)
3. Which bundle to choose for the server is there nginx or apache in support for golang ( or go has its own server and how it compares to the others)
4. Does golang support mysql and what is the speed
5. Perhaps there are good frameworks written in golang for creating sites
6. Is golang suitable for small or large sites at all
7. Are there any pitfalls in development
Perhaps just someone has already made sites in golang just share your experience please just for development sites will be very grateful, and sorry for stupid questions =(
Answer the question
In order to leave comments, you need to log in
1) Go is compiled, of course, the speed is higher, but if you run into code execution speed on a small site, then the problem is more likely in the code, and choosing a faster language will only save you from the symptom, but not from the disease
2) only that affects seo WHAT are you giving to the spider. It doesn't matter what language the program is written in, which gives html
3) The program written in go itself works as a server. Moreover, this is not some kind of application server, such as tomcat, no, you yourself will write a loop for processing incoming connections - i.e. you need to implement this very server. Unlike php + apache, where apache acts as a server, which, if necessary, calls php. Whether to put apache or nginx in front of the go server is up to you.
4) Supports. The speed of the DBMS is not affected by the language in which the program that accesses it is written.
5) There are no Yii2 or Symfony-level frameworks. The situation is the same as with NodeJS - there is something, but there are no combines.
6) If something can listen to a socket, you can write a website on this. Any. Another thing is that business card sites are not written in Go (just for fun), and large sites generally have a complex architecture, such that the language no longer matters.
7) For php developer - yes. At a minimum, you change the scripting language to a compiled one. This means that any change to the code requires compiling, stopping the running server, downloading the binary in its place, and running it. In addition, you are changing the Stateless code model to a fully functional program. If in php your script was launched anew with each http request, then the go program is launched once and after that it receives many requests.
Golang is used to build websites. Only expensive sites. Let's say I have a project - the owner has already dumped the cost of a fresh Land Cruiser into it and everything continues to pay and pay.
You are not the person who will be hired for this.
And in a cheap niche, you will not be able to compete on price with PCPists.
1. How things are with performance in comparison with php I watched benchmark go outperforms php by 2 times in speed
(maybe I should continue to create sites in php)
Some of the most heavily loaded sites in the world are built with PHP - Facebook, for example.
Or Vkontakte
Formally, Go is faster. If your server and client are only 10 meters apart.
But in the world of the web, there are very large delays - this is the connection between the server and the browser, there are completely different distances and a different order of delays. And it does not depend on the programming language.
Against their background, if you have programmed the site normally, it should not slow down either in PHP or in Go.2. Does golang somehow affect seo optimization-issuance
(if you don’t take angularjs for the frontend admin panel, then the whole site will not be indexed)
With such a level of understanding, it’s too early for you to decide something.
Do what the elders say.
It has nothing to do with language. It has to do with administration, design, system architecture, but not language.
Yes.
The speed of working with a DBMS is limited, as a rule, by the DBMS itself - this is always a bottleneck.
From the programming language using this or that DBMS - depends weakly.
Revel, Beego.me, gin and dozens more.
Only they are not needed.
Everything you need is already included in the Golang standard library.
To facilitate the work, it is worth looking at the frameworks - Gorilla, Martini....
It's all about whether the customer can pay.
Go is more expensive to do than PHP.
Therefore, you will simply fly by with orders.
There are many more cheap orders.
To take expensive orders, you need to have that other qualification, to which, judging by the wording, you have another 7 years to practice programming.
For you - it is important that there is little information, and especially little - in Russian.
Judging by the questions, you don't need it.
1) yes, faster, but depends on the color scheme. In puff the requirements are below.
2) does puff affect? In both cases, it's up to you.
3) the server is built in but sometimes they put mind.
6) for small ones in general, no. It's like writing on a fish without a framework or cms.
7) naturally.
IMHO, it's better then to write on the node.
And do not forget that the whole hemorrhagic will find a job.
The unanswered googles.
suitable, take beego.me and go (there are about 3-4 frameworks), only with php there is one nuance
Golang is another development pole. Complex projects.
A typical PHP site is the cheapest developers, the simplest sites.
This does not beg the merits of PHP - after all, both Facebook and VKontakte are based on PHP.
1. How things are with performance in comparison with php I watched benchmark go outperforms php by 2 times in speed
(maybe I should continue to create sites in php)
For rendering HTML pages, it is extremely doubtful that there is such a gap.
For some server side calculations - yes of course Go has an advantage.
However, in 90% of cases, it limits all the speed of the Internet. Not a server side programming language.2. Does golang somehow affect seo optimization-issuance
(if you don’t take angularjs for the frontend admin panel, then the whole site will not be indexed)
What?
Rather, your skill or inability affects.
You need to program on what you know best - then everything will be fine with SEO.
Apache is not needed, since golang allows you to do a completely independent full-fledged web server. Nginx is wise to keep in front of it. To relieve load on slow connections with the client. And for SSL.
Again, not to the point.
Everything rests here only on whether you know how to use it or not.
golang has mysql support.
But speed depends on what your mysql database structure is, what your queries are and what your DBMS tuning is and what kind of hardware you have on your server - NONE of that has anything to do with PHP or Go.
Beego.me can be recommended.
But a much more modern and trendy use of Go is not done in a classical architecture with any web framework, but rather in a microservice one. You can use the go-micro framework.
6. Is golang generally suitable for small or large sites
Everything rests only on whether you know how or not.
For small ones, the high competition from PHP will be a limitation.
For large - your inability to program.
Less community, less advice from Go.
Fewer customers.
Since Go is used mainly in large projects, where is the path for you so far.
It’s hard to answer your questions clearly, but here’s what I personally can say about Go -
go solves certain difficulties that arise when developing a backend in C ++, why sometimes they come to pluses in this area (performance is needed, real-time multithreading applications) Google employees previously developing JVM and Java compiler, decided that instead of using C ++ which was compiled on their hardware for 10 hours, create their own language for their constant tasks. We wrote down a highly specialized language for multi-threaded data processing from standard functions for working with arrays and other basic logic, we created standard libraries for abstraction from low-level interaction with equipment and OS , I mean, we solved our problems Personally, I think that in order to understand what the language is really worth, where and where it is really really beautiful to embed it, you need to work hard with Java or C # or C ++ for a couple of years. Although those who are told at the company at the stage of junstvo to work with civil defense are not destined to understand this. I just don’t see the point in taking and learning Go or Erlang ,
1. it must be taught when forced by those who understand why to do it (seniors in the company)
2. or when he himself has grown to understand what piece of the project to cut on it.
------ And what to learn??? - what materials are at hand and what you know where and how to implement. JS PHP JAVA ObjC or Pros doesn't matter... Let's
suppose you make a search engine for certain data, or even your own search engine like google.
You need to flatter 200 database servers for one request, in parallel put it all into one array from the cache server for popular queries, 10,000 users at a time, you need to carry out all search processes for the data update cache in separate threads, + reduce analytics according to data , implement sorting by requests, page rank analysis for example, + parser for new sites. Here is a project worth rewriting from Java, for example, to Go. Or the situation, let’s say webinars fall on Jave, mass distribution of video streams can be sent through ErlyVideo, and one can be sent through Wowza (Java) since the API is simple, and mass dubbing through Erlyvideo is already Erlang which is somewhat similar to Go. Later, it’s more competent to put it all into a CDN and also through WebRTC so that, like a torrent, data goes between viewers of a webinar or conference participant, and at the same time, let’s say the process is written on the server. GO for optimizing the backend instead of C++ is my personal conclusion.
Here's a fresh tutorial on building a website in Golang : https://golangs.org/go/web-app-go
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question