This is a creation in Article, where the information may have evolved or changed.
2017 our company needs to quickly iterate a product, at that time, our team's back-end framework is spring MVC, the framework is clear and quick to get started, but because of our product iteration speed, the underlying database operation interface changes frequently, resulting in a huge service layer workload, patience. In addition, with the development of the project, the code volume is increasing, the project starts more and more slowly, which seriously affects the development debugging speed.
In this case, we want to find a new framework or programming language, we expect him to have simple debugging, Quick Start, fast startup speed, high confidentiality, and suitable for high concurrency and web programming, superior performance and other advantages. At that time, the alternative frame has spring boot and Golang, a comprehensive comparison, in the great regret, we chose the Springboot, related selection reference information as follows.
1, from the functional satisfaction of the comparison
In the launch of the product development, we combed their own needs, mainly in three aspects, one is to support the high-performance RESTful API services, the second is to support the Web page services, third, support rapid fall generation. Both spring boot and GOLANBG are supported for restful interfaces and performance, and the performance difference is small. In terms of page services, spring boot encapsulates the SPRINGMVC, is relatively mature, and because of the long-term accumulation of a large number of Javaer, the framework is very mature, and go lang, there is also a molded framework, such as Beego, but the framework is not highly used. The reason is because Beego does not form a PHP framework like the ecology, such as the industry PHP Open source framework thinkphp, currently based on the framework has formed a large number of CMS, mall, ERP, management and other software, which is why I write this article reasons, I hope that through this series of articles, more people will be aware of the go language, and participate in the ecological construction of Golang. Return to the point, functional satisfaction, spring boot is better.
2. Study Cost
We need to take into account the team's learning costs, when the team is already very familiar with the Spring MVC framework, if you switch spring boot, the learning cost is almost zero, but if you switch to Golang, the learning cost is relatively high. In addition, the network on the Golang framework, the recommendation is not much, such as Gin,decho, and Beego, we focus on the Beego framework, there is a lot of controversy. All of this gives us some discount on whether to use the go language or not.
3. Project Migration Cost
We also consider our integration costs when choosing a framework. Our objective situation is: The company's technology stack and the accumulation of these technology stacks of projects, almost all Java, if we switch to Golang, then the product operation and maintenance costs will be relatively high, in addition to the current industry class Golang practitioners less, if we adopt go, It will be very difficult for our project team to build artificially.
4. Community activity
Go language Community activity is not high, specific can see the following aspects
L Baidu Search Index
is Golang and Java and PHP search index, the recent period of time, Golang concern has been declining, has reached the daily average of 1000PV, if golang do not hatch ecological circle, will face elimination. In fact, the search for Golang on Baidu, many of them are 2014 old.
L Go Technology Forum
The author 2018-02-10 18:11 visited the https://studygolang.com/homepage as follows
The community in Baidu Search Go Language forum ranked first, but the daily update no more than 20 articles, a sad floating in the heart.
For Golang csdn Community Forum, less than 10 posts within a week, the hearts of the half cold.
L Github Go activity
The programming language released for GitHub is ranked Nineth in the go language in 2017. This means there is still a global activity, but go has a long way to go than Php,java.
4. What do I plan to do?
Personally think Golang is a very good language, but very sorry, is not the best choice for our team, in order to make up for this regret, we need to do something. In order to promote the go language, I have made the following work plan
1. Write a series of articles demonstrating how to integrate the Golang Web framework.
The purpose of these articles is not to integrate a golangweb framework, but to demonstrate how to integrate a Golang framework for the following reasons
- The Golang framework has been numerous. Abroad, such as Matini,revel,gin, domestic also has beego. These frameworks are excellent and have strengths, but it is precisely because of these, so there is ruin and reputation, of course, this is not the point.
- We tend to encounter many scenarios where existing frameworks can solve our problems, but not the best solution and need to customize our own framework.
- We want the framework to be simple and easy to use, while at the same time want to have a high level of scalability and developmental.
- We see the advantages of these various frameworks, and we want to integrate them into the Yangzhangbuduan.
Based on the above reasons, I decided not to reinvent the wheel, but to give you an example of how to make a wheel. Similarly, because of these factors, we will use a lot of third-party excellent results in the construction process, which fundamentally determines the openness of our products.
2, enrich the Golang application ecosystem.
Golang is easy to get started with, and PHP is a bit similar, and some people even think Golang is an explanatory language. Golang high efficiency, natural support concurrency, good performance, and can be packaged into executable files, without containers, safe and reliable, but why such a language, why did not get the same high usage of PHP? I think the main Golang application ecosystem is not enriched.
- For a long time, people think that Golang is only suitable for high-concurrency, high-tech things, which may be because Golang born Noble Bar, Golang in the cloud to get a large-scale use, and cloud computing edge, a little highbrow taste.
- L analogy PHP, we will find that the blog software has Wordpress,cms dream Empire, the mall has Ecshop, Ecmall, Kaiyuan Framework has thinkphp,laravel,yii, and Golang language, we have what? Application ecosystems are desperately lacking.
- Analogy Java, Java has a huge ecosystem and middleware, Java is already the preferred language for enterprise applications, not only because Java performance is good, cross-platform, but also because Java has several generations of users, is a loyal fan, and Golang, users are surfers.
The above points can be seen, rich Golang ecology is the Golang promotion of the most serious.
3, vigorously publicize and promote Golang.
I plan to vigorously publicize and promote Golang, as follows
- Promote and promote Golang traditional industry application scenarios, mainly including CMS application, personal blog application, mall application, management backend and other five basic areas.
- To promote and promote Golang mobile Internet applications, Golang has natural high concurrency advantages and rapid iterative advantages, we can golang to the Internet scene applications, such as small games.
- Excavation of new Golang use scene, make Golang more ground gas, such as second kill, auction, big data collection and processing scenes are golang.
- Other channels such as search engine SEO promotion, industry hot promotion
The following series of articles are part of this work, detailed list below, click to access, follow-up I will continue to provide open source code
- Restgo Background Management Framework
- Daily Task List Applet
- Industrial Big Data acquisition
- Restgo CMS
- Restgo thousand Big Group
Source code get address http://www.imwinlion.com
Golang actual combat using Gin+xorm to build a Go language web framework Restgo detailed 1.1 go language dilemma
Golang actual combat use Gin+xorm to build a Go language web framework Restgo 1.2 What I'm going to do.
Golang use Gin+xorm to build a Go language Web framework Restgo detailed 2 framework basic architecture
Golang use Gin+xorm to build a Go language Web framework restgo detailed 3 system configuration parameters
Golang actual combat use Gin+xorm to build a Go language Web framework restgo detailed 4 routing configuration
Golang use Gin+xorm to build a Go language Web framework Restgo detailed 5 controller C
Golang actual combat use Gin+xorm to build a Go language web framework Restgo 5.2 Jump and redirect
Golang use Gin+xorm to build a Go language web framework Restgo detailed 5.3 resource controller
Golang actual combat use Gin+xorm to build a Go language web framework Restgo detailed 5.4 Controller parameter bindings
Golang use Gin+xorm to build a Go language web framework Restgo detailed 5.5 controller model bindings
Golang actual combat use Gin+xorm build Go language Web frame RESTGO build detailed 5.6 Controller parameter check
Golang Go Language Integration Gin+xorm build a web framework Restgo build a detailed 5.7 controller data response
Golang actual combat use Gin+xorm to build a Go language web framework Restgo detailed 5.9 controller controllers programming
Golang use Gin+xorm to build a Go language web framework restgo detailed 6.1 model M and ORM
Golang use Gin+xorm to build a Go language web framework Restgo detailed 6.4 recommended programming methods
Golang actual combat use Gin+xorm to build the Go Language Web framework Restgo 7 View Layer V
Golang actual combat use Gin+xorm to build a Go language web framework restgo detailed 8 about templates
Golang use Gin+xorm to build a Go language web framework Restgo detailed 9 session, log, authentication
Author profile: Hu Wenlin, continuing entrepreneurs, long-term engaged in technical open source work. Number Jiepool-winlion
1540 Reads