Thursday, 21 July 2016

Interfaces vs Abstracts

Abstract classes and Interfaces plays a major role in making our solution design. I had some time to analyse the best fit for business scenarios and differences.
Interfaces vs Abstracts:
  • Abstract classes specify the commonality in frame and function between multiple classes
  • Interfaces provide a frame for multiple class.
  • Abstract class contains member definition, Interface can only hold declaration.
  • Methods in a interface should be always defined in the derived class, but its not mandatory in abstract class.
  • Abstract classes can be used with classes which share same functionality
  • Interfaces can be used with classes that share different functionalities but similar blueprint.
  • Interfaces are used for dependency inversions and loose coupling
There is an interesting article from Microsoft regarding the same. Please refer https://msdn.microsoft.com/en-us/library/scsyfw1d(v=vs.71).aspx

Saturday, 16 July 2016

Translate Excel sheet content

Globalization, a powerful word that changed the whole way of doing business. Support for multiple languages is must if we develop a product for global audience.
Manual process of converting texts from one language to another is time consuming and error prone process. Recently, we faced a scenario where we had to convert some excel files from Chinese to English. We tried using MS EXCEL and dictionaries available in the same but it resulted in failure. After some research, an add-on available for google spread sheet solved our issue.
Steps to use translate add-on
  • Open google spreadsheet
  • Go to this link and click install/add button available on top right hand side cornerTranslate1
  • Once installed, you will be able to see the translate option at add-on tab available in google spreadsheet. If the same is not available try refreshing the page.
  • After selecting the translate option, you will get options to translate language for a particular excel sheet / for selected range.
The tool worked well for our business scenario.
Note: This tool is suggested based on the business scenario we faced. Please validate the translation before using the output.

HTML Jquery – Text(InnerHTL) vs Value

In JQuery we have two functions called text and val which confuses most of the developers while we try to update an element(Div,Span,input,select)

The following are the breif usage of text and val
text[.text()] – This will return the inner html of an element. Text method is not supported in input elements. Mostly used with Div/Span
value[.val()] – It will return the value of the element. Its mostly used with input and select elements. Val cannot be used with DIV as value is not a supported property of DIV

If interested please go through the following JQuery article’s
http://api.jquery.com/val/
http://api.jquery.com/text/

Contact Form

Name

Email *

Message *