Facebook's web Development kick: react.js, relay, and GRAPHQL

Source: Internet
Author: User

2015-02-26 Sun Jiantao InfoQ

Eric Florenzano recently published an article on his blog titled "Facebook teaches us how to build a website," and he thinks software development sometimes requires a big leap, which will be staged again in 2015, with the protagonist being Facebook's react.js , Relay and GRAPHQL.

Eric Florenzano said in the article: 2003 Brad Fitzpatrick released the Memcached, which opened the LiveJournal architecture of the era, 2004 Google published a mapreduce paper, This resulted in Hadoop and began to sweep the world; 2007 Amazon released the Dynamo storage system, letting us know how to make the database and the application work together in a linear scale, leading to the generation of databases such as Cassandra, Riak, etc. ; 2010 Twitter teaches us how to make a server-side template a simple API through client templates and another big shift in Web applications, and in 2012 Google released Angular.js 1.0, which eventually became a popular web development framework, All this has one thing in common, that is: the company or the entrepreneurial team from the production of the painful lesson, from the failure to find a way forward, and then in their own technological breakthroughs to share the time triggered a series of changes. Fitzpatrick believes that in 2015, Facebook will trigger another leap in Web application development through the react.js, relay and GRAPHQL three swords.

Fitzpatrick's reason for making such judgments is based primarily on the Web development philosophy that Facebook employees have revealed in some of their speeches. Pete Hunt, for example, made a speech at Jsconf in 2013 titled "React: Rethinking Best Practices," which explains why Facebook avoids some "best practices", and Pete Hunt thinks JS templates separate technology, but there's no separation of concerns. And the framework does not know how to separate the concerns, the solution to this problem is the component, to make full use of JavaScript's ability to weaken the role of the template; Daniel Schafer and Jing Chen in 2015 react.js conf on how Facebook can change existing data acquisition methods through GRAPHQL, making it easier for developers to get data in React applications; Christopher Chedeau in "React:css in JS" Describes the problems faced when using CSS on a large scale and how to solve them through JS.

Overall, Facebook's web development philosophy can be summarized as: The application is decomposed into separate components, and the style, markup, validation, and data requirements associated with the component are placed inside the component definition, each component of all data required for self-rendering is explicitly declared and stored inside the component, and for which behavior changes the state of the component, What happens when a component's state changes and is clearly defined. A component written in this way encapsulates its own logic, making components highly cohesive, low-coupling between components, enhancing reusability, and reducing the operational difficulty and complexity of the developer.

There is no doubt that Facebook's technology and ideas for most of the Web site development team still have a certain reference, the idea of which is worthy of our thinking and learning, but Fitzpatrick's judgment is really going to happen, Facebook's react.js, Whether relay and GRAPHQL will cause another revolution in web development, only waiting time to validate.

Facebook's web Development kick: react.js, relay, and GRAPHQL

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.