Solved

Some high points and examples of what's great about Facebook React?

Posted on 2016-08-17
5
228 Views
Last Modified: 2016-11-08
I am interested in seeing a few examples that could get me to look at it more seriously.

Thanks
0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 57

Assisted Solution

by:Julian Hansen
Julian Hansen earned 500 total points
ID: 41759363
I am not a React expert - I have some experience with it - more with Angular. However, in my research into Single Page Applications naturally React does come up as there is a lot of common ground. My response is from the perspective of SPA's rather than React in particular.

Logic for the application is contained in one place and runs in the browser - no more having to worry about server side state and rendering pages. You build the application to run in the browser and feed it data from the server. This allows you to maintain state locally (aided with local storage if necessary) and respond to client interactions in a more structured way.
The old style of building applications was to have the client continually go back to the server and have the next page rendered out - now all of that logic is in the browser. Server code has become simpler as well - no need for an interface - you create your REST endpoints and deal with the data flow to and from the application as JSON or POST data.

If we look at the old style architecture. It was primarily HTML based which you wired to JS event handlers and DOM manipulation libraries. You then sent data back to the server where it was processed and the next view was sent back.

Web applications are more like traditional applications - rather than HTML pages that have loosely coupled JS or JQuery. Code is compiled (or transpiled) which makes for better bug checking and leverages off the new JS standards or languages like TypeScript which makes for a more structured and meaningful code base.

Here is the bottom line. Either you believe SPA's are going to be a big part of the Web landscape or you don't. If you do then getting on top of either React or Angular or both is a good move if you want to be current with where web applications are going. There is also React Native - I have not had much experience with it yet - allows you to build native applications for Mobile - roughly the same space as Cordova. So if you know React then React Native also comes into play which opens up some more doors.
0
 

Author Comment

by:newbieweb
ID: 41759416
So, SPA's can store data locally? That alone seems like a big step forward.

Please explain "transpiled" and what language you are taking about...
0
 
LVL 57

Accepted Solution

by:
Julian Hansen earned 500 total points
ID: 41759488
Not just SPA's - most browsers support local storage now - so you can store key value pairs (data json encoded if needed) in local storage.

Transpiled - means changing from one language into another as opposed to compiling to binary or byte code. In this case TypeScript is transpiled into JavaScript - same for CoffeeScript and a bunch of other languages. Because JS does not inherently support strong typing - languages like TypeScript do and provide a more robust development environment where bugs that typically might slip through on a normal JS build are caught by the transpiler as it is translated into JS.

You can read more about it here
https://scotch.io/tutorials/javascript-transpilers-what-they-are-why-we-need-them

Or just Google Transpiler
0
 

Author Closing Comment

by:newbieweb
ID: 41759502
Wow! Transpiled is an awesome concept. I am hopefully about to start a very big project (if I get the job), and at the interview I want to push the benefit of automation. This is a great idea.

Thanks!
0
 
LVL 57

Expert Comment

by:Julian Hansen
ID: 41759632
You are welcome.
0

Featured Post

The Ultimate Checklist to Optimize Your Website

Websites are getting bigger and complicated by the day. Video, images, custom fonts are all great for showcasing your product/service. But the price to pay in terms of reduced page load times and ultimately, decreased sales, can lead to some difficult decisions about what to cut.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question