Golang's web

Source: Internet
Author: User

         Web development frameworks on most programming languages follow the MVC process to develop Web applications: Model part encapsulates data, Controller Partial processing of business logic, View part of the implant variable fill template page. And most of the WEB framework about the three parts of MVC is server-side processing, such as the View part of the processing is in the Server-side through the program dynamically evaluated template variables and then assembled into HTML page output to the browser to render. The Go Development Web application, does not rely on any web development framework, with the built-in standard library can be easily implemented: for example, using the Net/http standard library can be a number of lines of code to build a complete Web skeleton application, for example, the keyword struct encapsulates a data structure can express the original The part of the MVC framework that needs to be expressed with a heavy ORM (object-relational Mapping). Boulevard to Jane, which can be said to be the philosophy of Go. In the view layer, Go also has the corresponding standard library to provide support, but the more recommended approach is the current more popular MVVM (Model-view-viewmodel): server-side only output JSON, browser DOM as the View layer, the front Javascrip T acts as the contoller part; This not only reduces the server-side resource consumption, but also the intermediate transmission of network traffic, and the front end can be more flexible and richer, the backend can be lighter and more efficient, but also more conducive to project division and collaboration. And the go to JSON generation and output, there are data tests show exceptionally efficient (on the I7-2600K processor for all programming languages including the development framework total of about 100 test comparisons, Go performance indicators ranked first, see: Http://t.cn/RvZHyKI). To my personal liking, the backend with Go front end with AngularJS can be said to be a popular MVVM way of Web development of the swan song combination. So, if there is any doubt that Go is not suitable for WEB development, I think the answer is quite certain: not only can it be easier to do better at the same time but even more can be done.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.