Search This Blog

Sunday, 20 December 2015

Decoding "this" in the Javascript World

 A lot of developers have not known about the very different Object Oriented Programming techniques of Javascript. A lot of them stumble upon it or have transpilers to autogenerate javascript code from modern javascript framework. In this article, let’s try to decode “this” in a unique way.

What is the “this” keyword? A common answer is it is defined as the current context. It is commonly known that “this” keyword has been used for the longest time since C++ while defining properties and functions in classes.

I have a slightly different perception about “this” here. I shall be using the following diagram to give it an analogy of the active application workspace given to a process on the RAM.

Here, I am trying to use this analogy for browsers that interpret and execute Javascript and HTML applications. I’m sure this analogy will help you understand “this” better.


In the above diagram, I’m using the outer box to denote the Browser’s active memory (very synonymous to the RAM on desktops). When we load our Web application which essentially renders to having

HTML, Javascript, CSS on the client side (the user’s browser).

Take the example of the following code. Let’s relate it to the diagram in the box MyClientApp. The following code uses the “this” keyword at different levels.

1.       It uses it for GlobalPrefix, myClass

2.       It uses it to define the properties and functions inside myClass


Hence, what we can infer from the above example is

1.       “this” is used to indicate the global space in the application workspace of the browser’s memory

2.       “this” behaves like a public access specifier when scoped inside a class

3.       “this” is used to indicate the current context (as per textbooks)

Hope this article clears your perspective on “this” in javascript.


Sunday, 28 June 2015

SQL Server Installation Error: Rule "SQL Server 2005 Express tools" failed - RESOLVED

Scenario


  • I have a VMWare with Windows 2008 Server, running MS SQL 2005.
  • The requirement was to install MS SQL 2008 version in the same VM.
  • While installing MS SQL 2008, I chose all the features (DB Engine, Analysis Services, Reporting Services, Business Intelligence & All Client Tools)
  • The connection to these servers is done from the host system.

Problem

Since MS SQL 2005 was already installed, the installation wizard failed at the Installation rules section, with the following error




Possible Solutions


Solution #1

  1. Go to Add Remove Programs and uninstall MS SQL 2005 client tools
  2. I want the client tools of MS SQL 2005, as I am using it for another project demo

Solution #2

To avoid the process of uninstalling, we need to change certain registry keys.
    1. Open Run Menu and type regedit.
    2. It will open Registry Editor
    3. Now go to following location.
      1. (32Bit) HKEY_LOCAL_MACHINE > Software > Microsoft > Microsoft SQL Server > 90
      2. (64Bit) HKEY_LOCAL_MACHINE > Software > Wow6432Node > Microsoft > Microsoft SQL Server > 90
    4. ** Remove Registry Key 90 which maps to MS SQL 2005. There is a folder and key generated for compatibility. If my database should be made compatible with MS SQL 2005 it should have a compatibility code of 90, for MS SQL 2008 it should be 100 and so on. The standard values are given below
      • 90 = SQL Server 2005 
      • 100 = SQL Server 2008 
      • 110 = SQL Server 2012 
      • 120 = SQL Server 2014
      • 130 = SQL Server 2016 Community Technology Preview 2 (CTP2)
    • ** If you are not comfortable to delete the key from the registry, try renaming it. If installation goes on well, you can delete it.

Solution #3

For me the above solutions did not make too much difference, as I was using a VMware for installation of SQL Server 2008.
I decided, to finally not add the client components of SQL Server 2008 as there is some dependency on SQL Server 2005 client tools.
The final attempt was just install server components on the VMware and install Client tools in the host machine.
This method worked well for me.

In a lot of cases, Solution #2 works absolutely fine.

# Option 4

It is also suggested (This was what I saw in msdn discussions) while installing two versions of MS SQL Server, 
to keep the installation & data base directories different.
Although this trick did not work for me, I do not suggest this as a solution

Hope you find one of the above solutions useful



   

Friday, 19 June 2015

Training opportunity - Technical training, Chennai - CLOSED


Looking for a trainer who can deliver trainings on the following topics.
Level: Freshers
Location: Chennai
Duration: 8 days
Dates: 24-Jun-15 thru 7-Jul-15

This requirement will be closed on 21-Jun-15.
If you think you could be a potential trainer this is your chance to freelance for this requirement

To get in touch for this requirement, use the the contact us form in the blog.

TECH-1
A. Operating System & Computer Architecture
i) Basics of O.S.
ii) Process Management
iii) Process Communication and Synchronization
iv) Memory Management
v) I/O and File Management
vi) Computer Architecture
TECH-2
Computer Networks
i) Basics of Computer Networks & Communication
ii) Routing
iii) Reference Network Model and Protocol
TECH-3
DBMS
i) Basic concept, Data model, Views, Operation, TRC, DRC, Architecture
ii) Normalization, Generalization, ERD, Key, Database, SQL, Joins, Indexing
TECH-4
Process Migrations
i) Algorithms and types of process migration
TECH-5
Mobility
 Mobility Basics
i) Types of devices
ii) Types of OS
TECH-6
Techniques used in mobile networks
i) CDMA
ii) 3GSM, GSM
iii) 4GLTE
Physical Mobility
i) Mobile IP, IPv4, IPv6
TECH-7
Development technology landscape - Native apps, Hybrid apps, Mobile Web Android
i) Basic android features
ii) XML/ JSON Processing
IOS
i) Basic development requirements
TECH-8
HTML 5/ Phonegap basics
i) Creating UI
ii) Accessing Device features
iii) Connecting to Social networking apps - Facebook, Linked In etc.
Advanced
i) Securing Mobile apps
TECH-9
Introduction to Cloud Computing
i) What is the cloud
 ii) History of Cloud Computing
iii) How Cloud Computing Works
 iv) Advantages & Disadvantages
v) Applications for Businesses
vi) Cloud Service Providers
vii) Amazon Web Services
viii) Microsoft Azure
 ix) Google Appengine
TECH-10
x) Cloud Computing Architecture & Cloud Computing Terminology
Private Clouds
 i) What is it?
ii) Advantages & Disadvantages
iii) Installing a Private Cloud
 iv) Eucalyptus
v) Open Nebula
vi) Open Stack
TECH-11
Virtualization
  i) Virtualization Basics
 ii) Objectives
 iii) Benefits of Virtualization
iv) Emulation & Virtualization for Enterprise
v) VMware, Xen, KVM
TECH-12
BYOD Model
i) Examples/Challenges/Solutions of implementation