Polymer affects react render cycler - browser

Am using polymer components in a react + flux app I am writing. I plan to use Polymer for abt 60% of the functionality. Any way Polymer can intervene with react render cycle ? (making it less performant) .
P.S. - i am using the shadow DOM

Related

Using Vue Material UI Components with Bootstrap Layout

I am starting my first Vue 2 project and would like to mix Vue Material Components with Bootstrap layout. I have enough experience with Angular Material components to know that mixing them with Bootstrap causes problems. I would like to use Vue Material and integrate it with a Bootstrap theme template. Is this going to be a problem? Thanks in advance.
No problem, you can install the material and the bootstrap without a problem, just be careful when calling the styles, because whoever is last

Can airbnb's hypernova tool be used for angularjs web seo?

Now Airbnb have a tool Hypernova for server side rendering of javascript views. I would like to know if it can be used for enhancing SEO of Ajax based website like the tool Prerender is used for. If not then why?
A quick way to figure out the way how a tool works is to check its dependencies. It doesn't contain phantom or other adapter for headless browser, so it just evaluates client-side scripts in Node.js.
hypernova runs client-side scripts in Node.js and renders them to HTML. In order to make this possible, scripts should be universal and don't depend on browser-specific features. This allows to avoid the overhead that is caused by rendering in headless browser (like Prerender does).
hypernova documentation is focused on using React components because they are naturally universal and most time don't require real DOM when being rendered in Node.js, They are rendered with hypernova-react package, which is a thin wrapper over React's own SSR features.
AngularJS was developed to run in a browser and relies on real DOM. It is guaranteed to work properly only on client side. It's possible (at least in theory) to render AngularJS application in Node.js with DOM emulation (jsdom) or jQuery emulation (cheerio), but hypernova doesn't offer a suitable adapter for that.

Polymer web component bundling

I am using node/express to develop a web application. I am currently using connect-assets (https://github.com/adunkman/connect-assets) which internally uses mincer (https://github.com/nodeca/mincer), to manage css, js assets. Can it be extended to manage bundling polymer components using vulcanize? Any directions on how to get this working is highly appreciated.

How to use SVGs and image fallbacks with ReactJs?

I am currently using ReactJs for one of my project. Since we all thing in terms of components when it comes to ReactJs, how do we approach having SVGs/fallbacks in React application?
Do we build component for each SVG? or is there a different way you React users build them? I just want to approaching it with the best practise!
I would be really happy if someone helps :)
Have a look at the material-ui library's approach to SVG support. They have a SvgIcon component which you should be able to reuse. Their approach is having the common implementation separated out in the SvgIcon component and then having individual component wrappers for each unique SVG icon.

How the React have better performance as compare with JSF

I am new in React js. Previously i used JSF framework for building the web application. According to my knowledge in JSF actually what does is, from the server side it will generate the html code for the corresponding JSF tag and send it to browser and display it. If you are using JSF 2 the corresponding front end html portion can replace through AJAX also.
I think the same thing we can done through React framework. In react JS you can generate the client side html code from server and it will render in frontend by using some Javascript Engine (Nashorn Javascript Engine).
So in both case the working is almost same (The response created from the server). Now a days everyone talks like the React JS is a high performance framework. So can anyone explain how it provide better performance?
I repeat i am new in React JS
I believe performance all depends on the implementation, you can get both React and JSF to do the same thing. JSF came before React, and React in my opinion adopted many concepts of JSF anyway. React has not made any breakthrough that hasn't already been there with web templating engines since JSF 1.2. JSF is a templating technology which React recreates with Javascript.
For a mobile device its better to get the complete HTML to save on battery initially... both React and JSF can do Single Page Apps (SPA) to use Ajax and update only a portion of the DOM while the User is interacting with the application.
For pages with user interaction, JSF will send the Javascript needed that will interact with one DOM directly, for React it will use its shadow DOM and the browser DOM.
Both can define custom UI components, JSF speedier sends the rendered HTML directly to the client, while React will have to build it using the client computer cpu.
We can compromise performance for faster UIs, changing UIs faster, software engineers vs scripting folks salary. For any large scale, I'd prefer JSF because of reusable Java libraries in microservices, AI, Machine Learning, Android, and other things that has a JVM. For the UI, maybe we can let a scripting person whip up a UI in React while we focus on the bigger solution?
Internally, ReactJS uses a virtual DOM that will be "mapped" to the "real" DOM. In React you give your variables as state or props to the react component. React uses a special algorithm to detect changes in the components state or props and will only rerender the affected parts by synchronize the virtual with the "real" DOM.
JSF is an MVC framework that takes advantage of server side rendering and makes use of many markup files.
React is a library for building graphical interfaces for applications according to the SPA (Single Page Application) model.
The strength of React lies in its ability to update the dom very quickly because it has a virtual one.
The final app can fit all in a single file.
As said React is only a library, it is not productive to use it alone to create an application.
(Similarly JSF is just a spec, without Rich Faces, Prime Faces, Omni Faces, Boots Faces and 3rd parts libraries it would be difficult to create an application)
In the SPA model, the session is stored with the user, the backend is just a set of services that are called up by the frontend.
There is a first authentication call which produces a token (JWT) which is stored on the client side and which will then be used to
invoke the server's (stateless) REST services. This is how the server can understand that it is the same user.
The key information for the session is stored on the client side, this fact already makes you understand that the server is relieved of the task of
keep in memory the sessions of all connected users.
In practice, when the user interacts on a SPA application, what travels is the data, not the markup since all or most of the markup is already on the client,
this implies a nice saving in data transfer. The REST paradigm uses json to structure the data to be exchanged with the client.
A json object (Javascript Object Notation) that arrives at the client is a string representing a Javascript object, The latter offers native functions
to convert Json strings to Javascript objects and vice versa. React has nothing more to do than use this object to "go there to that specific point" and update the displayed data
and it does it very quickly.
JSF requires the presence of its own and third-party Java libraries on the server side (configured as a part of an Application Server) so it requires configuration time
higher and has a rigid scalability compared to a React application ready for deployment which consists of only javscript files (even one would be enough)
which only needs a web server like Nginx to run. It is easy to understand how easily this last solution is scalable since the configuration is reduced to zero.
To scale, just create a nginx docker image with our React app inside and we are ready to move from the development pc to the various cloud solutions on the internet
ready to replicate our image across multiple on-demand instances.

Resources