September 29, 2015
Reactjs - Let's learn the Reactjs - Part 1
What is Reactjs?
React is a UI library developed at Facebook to facilitate the creation of interactive, stateful & reusable UI components. It is used at Facebook in production, and Instagram.com is written entirely in React.
Below are the features of the React:
- It is the 'view 'in the application
- It use the concept of the components
- It use the concept of the virtual DOM
- It works on the Client as well as server side too
How to start?
- Download the reactjs library (react.js)
- Download the JSX library (JSXTransformer.js)
JSX - Javascript XML syntax
It lets you write the code not in the pure Javascript and behind the scene JSX converts it to Javascript. It helps in speeding the work and lesser the code.
How to use in code:
Below is the snippet how you can use the JSX in your Reactjs application
** @jsx React.DOM */
<script type="text/jsx">
//your code goes here
</script>
This is for now. In next post we will look into the building blocks of reactjs which are components.
Feedback and suggestions are welcome
Source: Google.com
Doodle Day inspired from TVF - The Pitchers
If you haven't seen the TVF's The Pitchers then please go and watch it is awesome and inspiration behind my this doodle is only The Pitchers. The pen I used is Parker - borrowed by a friend (:p)
September 28, 2015
Javascript Best Practise
#1 - Reduce the HTTP request
Every HTTP request is over head on the server which slow the response time. Always keep the HTTP request to smaller
#2 - Placement of the JS File
<script> tag on the page will block the rendering of the HTML page until the execution of the code in inline <script> tag is done or the JS file is loaded. It is the best practise to place the JS files at the bottom of the page or use Defer or other loading method of JS file to avoid the loading of the page.
#3- Combine JS files
If you are having multiple JS file combine them to one. So, that we have only 1 http request. It is always better to load one 10KB file instead of hitting 25kb four times HTTP request.
#4 - Minify your JS file
The larger the file, longer time it will take to execute and which will result in again slowing the response time. Hence, make it the best practise to minify your JS file
#5- Cache the JS file
It is always the best approach to cache the JS file request
#7- Compress the JS file using gzip encoding
#6- Use CDN
It will not only improve performance but also handle caching and compression
Comments, suggestions and feedbacks are welcome.
Happy Learning!!
Every HTTP request is over head on the server which slow the response time. Always keep the HTTP request to smaller
#2 - Placement of the JS File
<script> tag on the page will block the rendering of the HTML page until the execution of the code in inline <script> tag is done or the JS file is loaded. It is the best practise to place the JS files at the bottom of the page or use Defer or other loading method of JS file to avoid the loading of the page.
#3- Combine JS files
If you are having multiple JS file combine them to one. So, that we have only 1 http request. It is always better to load one 10KB file instead of hitting 25kb four times HTTP request.
#4 - Minify your JS file
The larger the file, longer time it will take to execute and which will result in again slowing the response time. Hence, make it the best practise to minify your JS file
#5- Cache the JS file
It is always the best approach to cache the JS file request
#7- Compress the JS file using gzip encoding
#6- Use CDN
It will not only improve performance but also handle caching and compression
Comments, suggestions and feedbacks are welcome.
Happy Learning!!
Subscribe to:
Posts (Atom)

