Sunday, December 15, 2019

5 Things every front end developer must be aware about - short & sweet



Introduction

With advancement of technologies only knowing HTML, CSS, JQuery is not enough for a front end developer.

We have lot of tools and frameworks introduced to developers world that ease developers life as well as help to help make more reliable and bug free web applications.

Following are 10 things that every front-end developer should consider.


1. Frameworks

Frameworks are there to make developers life easy and to avoid some common problems developers face to start and continue a project.

Through a framework you can easily forget some common problems like browser compatibility, performance issues, since it is already addressed through the framework.
Level of already addressed problems may depend on framework to framework.

We have listed below best frameworks for front-end development which address most of the issues that front-end developers face.

React.js
Vue.js


2. GraphQL

While REST has long been consider the de facto standard for designing web APIs by offering great concepts like stateless servers, RESTful APIs are more and more considered inflexible when it comes to keeping up with the rapidly changing clients accessing them.
GraphQL was developed by Facebook to tackle the exact issues developers are facing when dealing with Restful APIs.
With REST APIs, developers would gather data by fetching it from multiple endpoints that have been created with a specific purpose — like, for example, a /users/<id> endpoint or a /tours/<id>/location endpoint.
Using GraphQL, this would work differently. Developers would send a query to a GraphQL server with their data requirements. The server would then return a JSON object with all the corresponding data.
Another benefit of using GraphQL is it uses a strong type system. Everything on the GraphQL server is defined via a schema using the GraphQL schema definition language (SDL). Once the schema has been created, both front-end and back-end developers can work quite independently from one another because they're aware of the defined data structure.
If you want to learn more about GraphQL, check out these great resources:
GraphQL


3. Code Editors/IDEs

Microsoft's VS Code will be the number one editor for most front-end engineers.
It offers almost IDE-like features, like code completion and highlighting, and can be extended almost infinitely via its extension marketplace.

The marketplace, in particular, is what makes VS Code so awesome. Here are some great extensions for you as a front-end developer:
JavaScript (ES6) code snippets
npm
Prettier
CSS Peek
Vetur
ESLint
Live Sass Compiler
Debugger for Chrome
Live Server
Beautify

Give it a try if you haven't used it already.


4. Testing

Testing is crucial.
Testing the app is the main thing when deliver to end user.
In real world applications money drives everything. Thus the untested code means the lose of money on the project.

Following flow of testing needs to be done before any project goes live

Unit tests
Testing a single component or function in isolation.

Integration tests
Testing interactions between components.

End-to-end test
Testing full-blown user flows in the browser.

There are more ways of testing, such as manual testing, snapshot testing, etc. If you want to move to a senior developer position or aim for a job with a large corporation that has some development standards, you should try to work on your testing skills.


5. Soft Skills

Even though soft skills are ignored much, following qualities needs to be in a front-end developer if a project needs to be success.
Even you are seasoned developer following qualities will make the project and every ones life easier.

Empathy
Communication
Teamwork
Easy approach and helpfulness
Patience
Open-mindedness
Problem-solving
Accountability
Creativity
Time management

Always remember: The most important deliverable for a senior developer is more senior developers :)

Sunday, February 17, 2013

Java Version Comparison - Java 1 to Java 8


Java SE 8 Expected Release on September 09, 2013
This version is only available as a development version only.
Whats New: (Note: This may very with the release)
-Improvement in java.lang package
-Annotations on Java Types
-DocTree API
-Parallel Array Sorting
-Bulk Data Operations for Collections
-Collections Enhancements from Third-Party Libraries
-Base64 Encoding and Decoding
-New HTTP Client
-More Security enhancements




Java SE 7 Released on July 28, 2011
Code Name used "Dolphin"
Whats New:
-Strings in switch
-Automatic resource management in try-statement (try statement without catch block)
-Catching multiple exception types (multiple catch blocks)
-Exceptions rethrowing with improved type checking
-JVM support for dynamic languages
-Compressed 64-bit pointers
-Improved type inference for generic instance creation
-Simplified varargs method declaration
-Binary integer literals
-Allowing underscores in numeric literals
-New file I/O library to enhance platform independence and add support for metadata and symbolic links
-Library-level support for Elliptic curve cryptography algorithms
-An XRender pipeline for Java 2D, which improves handling of features specific to modern GPUs
-Enhanced library-level support for new network protocols, including SCTP and Sockets Direct Protocol
-Upstream updates to XML and Unicode




Java SE 6 Released on December 11, 2006
Code Name used "Mustang"
Sun replaced the name "J2SE" with Java SE and dropped the ".0" from the version number.
Whats New:
-Generic API for tight integration with scripting languages, and built-in Mozilla JavaScript Rhino integration
-Dramatic performance improvements for the core platform and Swing.
-Improved Web Service support through JAX-WS
-Java Compiler API
-Support for pluggable annotations
-Java Kernel
-New skinnable look and feel, called Nimbus for Swing.




J2SE 5.0 Released on September 30, 2004
Code Name used "Tiger"
This is also a very significant release of Java as it introduced many number of new features.
Whats New:
-Generics
-Metadata / Annotations
-Autoboxing/unboxing
-Enumerations
-Varargs
-Enhanced for each loop - (for (Example e: examples))
-Static imports
-Automatic stub generation support for RMI objects.
-New skinnable look and feel, called synth for Swing.
-The concurrency utilities  in package java.util.concurrent
-Scanner class for parsing data from various input streams and buffers.




J2SE 1.4 Released on February 6, 2002
Cod Name used "Merlin"
Whats New:
-assert keyword
-regular expressions (modeled after Perl regular expressions)
-exception chaining (allows an exception to encapsulate original lower-level exception)
-Internet Protocol version 6 (IPv6) support
-logging API 
-image I/O API for reading and writing images in formats like JPEG and PNG
-integrated XML parser and XSLT processor (JAXP)
-integrated security and cryptography extensions (JCE, JSSE, JAAS)
-Java Web Start included 
-Preferences API




J2SE 1.3 Released on May 8, 2000
Code Name used "Kestrel"
Whats New:
-Modified RMI to support optional compatibility with CORBA
-JavaSound
-Java Naming and Directory Interface (JNDI) included in core libraries (previously available as an extension)
-Java Platform Debugger Architecture (JPDA)
-Synthetic proxy classes




J2SE 1.2 Released on December 8, 1998
Code Name used "Playground"
This was a very significant release of Java as it tripled the size of the Java platform.
This was so called Java 2 as and replaced the name JDK in order to represent three major platforms J2SE(Standard Edition), J2EE(Enterprise Edition), J2ME(Micro Edition).
Whats New:
-strictfp keyword
-Intergrated Swing graphical API
-Sun's JVM was equipped with a JIT compiler
-Java plug-in
-Java IDL, an IDL implementation for CORBA interoperability
-Collections framework




JDK 1.1 Released on  February 19, 1997
With major retooling of the AWT event model
Whats New:
-Inner classes 
-JavaBeans
-JDBC
-RMI
-reflection at Introspection only



JDK 1.0  Released on January 23, 1996
Code Name used "Oak". With first stable version JDK 1.0.2. it is called Java



Sunday, February 10, 2013

How to create a simple table with spearate colours on odd and even rows

This explains on how to style a table with different row colors one after the another.










Create the table using HTML
(If your using div to generate a table you can apply the same for relevant divs as well)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
  <table id="box-table-a" summary="Employee Pay Sheet">
    <thead>
      <tr>
        <th scope="col">Employee</th>

        <th scope="col">Salary</th>

        <th scope="col">Bonus</th>

        <th scope="col">Supervisor</th>

        
      </tr>
    </thead>

    <tbody>
      <tr>
        <td>Stephen C. Cox</td>

        <td>$300</td>

        <td>$150</td>

        <td>Bob</td>

        
      </tr>

      <tr>
        <td>..</td>
        
      </tr>
    </tbody>
  </table>


Create a CSS classes as folows
1
2
3
4
5
6
.odd{
  background-color :  #F1F1F1;
}
.even{
  background-color :  #666699;
}


Add Styling using JQuery
JQuery has an attribute to identify odd and even rows in a specified scope. '$('tr:odd')' will check the first odd and then will assign the 'odd' class defined in .addClass('odd').
1
2
3
4
$(document).ready( function(){
 $('tr:odd').addClass('odd');
 $('tr:even').addClass('even');
}

Autofill Dynamic Dropdowns Using Spring Jquery Ajax

This explains on how to populate values in a drop down based on a value selected on another drop down. But you can configure it load values dynamically when click on link or any other action performed (based on your requirment)

Include JSTL tag library in your JSP Page
1
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>


Use JSTL to call the required URL path through Spring bindings
1
<c:url var="findProductForCat" value="/products_ajax.do" />


HTML and EL code to enter in JSP page.
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
<select class="select-width" id="category_list_d">
<option value="">Select Category</option> 
  <c:forEach var="catList" items="${category_lst}">
   <option value="${catList.categoryId}">${catList.categoryName }</option>
  </c:forEach>
</select>

<select class="select-width" id="product_list_d">
<option value="">Select Product</option> 
</select>


Get data to JSP page after triggering first action using jQuery Ajax
(In this example after Selecting First Drop Down)
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
$().ready(
 function() {

  $('#category_list_d').change(
    function() {
     $.getJSON('${findProductForCat}', {
      categoryId : $(this).val(),
      ajax : 'true'
     }, function(data) {
      var html = '<option value="">Select Product</option>';
      var len = data.length;
      
      for ( var i = 0; i < len; i++) {
       html += '<option value="' + data[i].productId + '">'
         + data[i].productName + '</option>';
      }
      html += '</option>';
   
      $('#product_list_d').html(html);
     });
    });

});


Spring Controller Definition when called the mapped URL though JSTL
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
   @RequestMapping(value = "/products_ajax", method = RequestMethod.GET)
   public @ResponseBody
   List<Product> productsForCategory(
     @RequestParam(value = "categoryId", required = true) Integer categoryId) throws IllegalStateException, SystemException {
    
  //Change this as per you requirement to generate values according to business logics 
    ApplicationContext context = new ClassPathXmlApplicationContext("applicationContext.xml");
   BLProduct objProduct = (BLProduct) context.getBean("bl_product");
   
  //Specify the returning object you want here
    return objProduct.listProductNameByCategoryId(categoryId);
   }

How to Setup SFTP Server Using GCP VM With a Mounted GCP Bucket

SFTP is the secured method of implementing FTP where you can use a server or storage location as FTP location which you can transfer files f...