Category Archives: MongoDB

MongoDB has the default CLI (command-line interface) which works fine until you need to execute complicated operations. Most of existing command lines in popular OS really suck with text input. And this is where RoboMongo comes up to help with a pretty GUI.

Robomongo is a user interface for interacting with MongoDB. It is pretty straight-forward and easy to understand. This tool simplifies the way of working with Mongo databases.

Download tool from the below URL

RoboMongo for Windows

It is a popular MongoDB management tool that makes it easy to create, edit, and retrieve collections and documents in your MongoDB databases.

First need to connet mongoDB via command line, after that create new connection using RoboMongo GUI. After that you will get window as like below

Creating new Database:


Click On Create->Enter DBName->Address as localhost and port as 27017–>Click on Test… Below is the screenshot

Connection Rmongo

Here I created new Database whose name is My First DataBase with port 27017After successful creation of database..Check the created database is available Or not.

2 RoboMongo

Database got created successfully. Now creating collections in to that database.

Creating new collection:

Right click on collection tab and click on create collection as like below.Enter a valid collection name an click on create button.

3 RoboMongo

Eg: Here, given collection name as Employee.

Check whether the created collection is created Or not like below.

4 RoboMongo

Collection got created sucessfully.Now, Inserting the documents into collection

Inserting documents in to collection:

Right click on collection name(Employee)->click on insert document.


Enter documents  JSON Data(name/value pairs) as like below.

insert documnts values

Need to check the given JSON data is valid Or not for that click on Validate button left corner of the bottom. If the given data is valid the window will be appeared like below.After the Click on Save button. The given document is successfully inserted.


If the given JSON data is not valid.will see the below exception.

Incorrect Data

Retrieve the Collection:

Retrive Collection

If the  data is available in the collection ,Key, Value will display with it’s corresponding fields. If it is not available in the collection it will display as like below.

Retrive Collection2

Updating Document:

Updating existing document. Here in the collection Employee we have a document eid with the value 123. Now I am updating from 123 to 456.. Same as like remaining documents whatever want you to update.


The final collection looks like below:

> db.Employee.findOne()
“_id” : ObjectId(“57dd6b2b6874b1eb0b907ae8”),
“eid” : 456,
“ename” : “abc”,
“eaddress” : “KondaPur”

Drop the Collection:

Select the collection whatever you want to drop and right click->select  Drop Collection.

Rename Collection:

Select the collection whatever you want to rename and right click->select  Rename Collection.

As a database tester, there are lot of functional/non functional parameters that need to be considered to ensure the db (along with the code thats working upon it) is doing the right thing.

Few points are outlined below that are helpful in performing the db checks:

1. UI to DB Mapping

To check whether the fields in the UI are mapped consistently with the fields in the corresponding DB table.

Whenever a certain action is performed in the front end of an application,
a corresponding CRUD (Create, Retrieve, Update and delete) action gets invoked at the back end.
QA will have to check if the right action is invoked and the invoked action in itself is successful or not.
ex: user name field accepts 30 char’s in the UI
db check : USERNAME datatype – varchar(30)

2. Usage of Autocommit feature:

Mysql comes with config to tweak autocommit to true or false, but while testing any DML queries – Update and Delete in particular –
we can set autocommit option to false, test your query and do an explicit commit or Rollback


mysql> set autocommit=0;
mysql> — run your DML query;
mysql> update USER set STATUS=’IA’ WHERE USER_ID=100;
mysql> — do your check now;
| status |
| IA |
1 row in set (0.00 sec)

mysql> COMMIT;
Query OK, 0 rows affected (0.00 sec)

3. Slow queries:

In some cases the application may be executing some slow queries against the db that inturn affects the performance of the db.

mysql> show processlist;

This gives the list of queries that are being executed against the db. The key is to watch those threads that are taking longer time and identify the query thats being used.

mysql > Explain SELECT * FROM USER;

Verify the performance of the query by using the explain

plan so that we arrive at  the cost of the query and improve it

4. Testing clustered db environments:

In a typical db clustered environment, during the release window the system will be
shutdown along with the master and/or slave db instances (there can be multiple slave instances).
when the system gets started post release, the slave will still be set down while the
master instance is up to verify the changes done on the master db instance.

QA then checks the data thats being written into the master db, if everything is fine,
the slave instance gets started to ensure it gets caught up in sync with master.

In the above case if the data thats updated post release is not correct or if its corrupt, we restore the data from slavedb

5. Data Migrations

There are different types of data migrations – migrating the data from one db to another db ( across same/different db types) , from one schema to another, from one table to another and so on

along with the CRUD checks, we have to take care of different params like the performance of migration, delta migrations, etc

6. configurations – binlogging,

Bin logging is extremely helpful when we want to debug the queries that are getting fired on the db

shell> mysqlbinlog binlog.0000003

this provides the details that are captured inside the binlog file

7. Using Information schema effectively:

Information schema gives us details of all the schema structure, its a best bet when we are unsure of the columns present in the

table and tables in the schema, procedures so on.
Database changed

| COUNT(*) |
| 5522 |
1 row in set (0.08 sec)

                        Before starting about Maven.. Want to share this with all..when i was in the initial stage of learning Automation, i always had a question?..How does the real time Automation framework looks like and what steps should i follow? This is a common question for each of us who starts learning QA Automation..

while learning and doing practice i usually use to do.. Create a java project from the IDE (Eclipse) and writing a test in selenium and execute it from the IDE..
After working for a client i came up knowing how it’s actually looks like..

Here I am going to show you from scratch how to Make a Automation project using Maven

About Maven – Description

  • Maven – a build tool which is distributed under Apache Software Foundation. It is mainly used for java projects. It makes build consistent with other project.
  • Maven downloades all project Library jars which ever are mentioned in pom.xml
  • Maven is used to manage the dependencies. For example if you are using selenium version 2.46 and any later point of time you have to use some other version, then same can be managed easily by Maven i.e just by giving the latest version
  • Maven provides pom.xml which is the core to any project. This is the configuration file where all required information’s are kept
  • Downloaded libraries are stored in local repository called m2. Maven uses the libraries available in m2 folder and if any new dependency added then maven downloads from central repository to local repository

Build Life Cycle:

Basic maven phases are used as below.

clean: deletes all artifacts and targets which are created already.
compile: used to compile the source code of the project.
test: test

the compiled code and these tests do not require to be packaged or deployed.
package: package is used to convert your project into a jar or war etc.
install: install the package into local repository for use of other project.

Maven Setup:

Step 1: To setup Maven, download the maven’s latest version form Apache depending upon  different OS.
Step 2: Unzip the folder and save it on the local disk.
Step 3: Create environment variable for MAVEN_HOME. Follow the below step:

Navigate to System Properties ->Advanced System Setting->Environment Variable ->System Variable ->New ->Add path of Maven folder



Step 4: Edit path variable and provide the bin folder path.


Step 5: Now verify the maven installation using command prompt and don’t forget to setup JAVA_HOME

Use mvn –version to verify maven version and output comes like below.


After successful installation of Maven and configuring it’s path..  Now we have to Install Eclipse

Download and install Eclipse
Url to Download :
Eg : eclipse-jee-helios-SR1-win32-x86_64

After successful installation.. Open the eclipse and add maven plugin into eclipse

  • In Eclipse: Help -> Install New Software…
  • Type the following URL in field Work with:
  • Click Add…
  • Give a name for the repository, such as: m2eclipse
  • Click OK
  • Select the checkbox Maven Integration for Eclipse
  • Click Next etc. to move forward and choose to restart Eclipse when prompted.Now Maven is all set in your local and as well integrated with Eclipse

    Create Maven project:
    Step 1:
    Navigate to File-> new->others->Maven->Maven Project->Click Next


    Step 2:
    Check Use Default workspace Location and click Nextpic6

    Step 3:
    Provide Group Id and Artifact Id .You can change the version of Jar as per your wish. Then  Click Finish.


    step 4:
    After finish you will find the project structure is created like below.
    pom.xml is created which is used to download all dependencies.


    pom.xml file looks like below:


    Step 5:  Add dependencies for Selenium.
    Step 6:  Final pom.xml will be like below:

    Step 7:  Maven will download all the dependency jars in to local repository called .m2.

    Build the Project:

  • Project can be built by both using IDE and command prompt.
    Using IDE you have to right click on POM-Run As-Maven Build
  • Enter goals like clean install etc. and click Run.
    Same can be done using command prompt. Navigate to project folder where pom.xml lies.
    And use below commands to clean, compile and installFor clean: mvn clean
    For compile: mvn compile
    For Install: mvn install

We will create a job in Jenkins, which picks up a simple application, builds and runs the application..

  • Go to the Jenkins dashboard and Click on New Item


  • you can see

    the below screen shot, enter the Item name like as Sample. Choose the ‘Freestyle project option’

  • The following screen will come up in which you can specify the details of the job.
  • Eenter the location of application which need to be built. In this example, we will assume that a local git repo(/Users/purnaraot/work/ss-work/) has been setup which contains a ‘Sample “ Application. Hence scroll down and click on the Git option and enter the URL of the local git repository.
    If the repository

    is hosted on Github, you need to the url of that repository. we would need to click on the Add button for the credentials to add a user name and password to the github repository, it will pull the code from the remote repository.


  • Now go to the Build section and click on Add build step → Set Build status to “pending” on GitHub commit then click on the Save button.


  • Once saved, you can click on the Build Now option to see if you have successfully defined the job.


  • Once the build is scheduled, it will run. The following Build history section shows that a build is in progress.
  • Once the build is completed, a status of the build will show if the build was successful or not and Click on the Console Output link to see the details of the build.


Stripe.js makes it easy to collect credit card—and other similarly sensitive-details without having the information touch your server.

With Stripe.js, you never have to handle sensitive card data. It’s automatically converted to a representative token that you can safely send to your servers and use to charge your customers.

Stripe.js can be used for collecting:

  • Credit card details
  • Bank account details
  • Personally identifiable information
  • Bitcoin payments

Including Stripe.js
However you’re using Stripe.js, you always begin by including the library and setting your API key. Add this script tag to your page to get started with Stripe.js:

Setting your

publishable key
Your publishable API key identifies your website to Stripe during communications. Set your publishable key withsetPublishableKey, after including Stripe.js and before making any requests to Stripe.

Create a single use token
After the code above, create an event handler that handles the submit event on the form. The handler should send the form data to Stripe for tokenization and prevent the form’s submission. (The form will be submitted by JavaScript later.)

Sending the token to your server:
The final step to securely collect your customer’s payment details is to submit the received token to your server for final use. When your script receives the response from Stripe’s servers, the stripeResponseHandler function is called:

For the full reference and examples, you can follow the official documentation here

An Oracle database is comprised of tablespaces , it stores data logically in tablespaces and physically in datafiles associated with the corresponding tablespace.


Tablespaces logically organize data that are physically stored in datafiles.

  • A tablespace belongs to only one database, and has at least one datafile that is used to store data for the associated tablespace.
  • The term “tablespaces” is misleading because a tablespace can store tables, but can also store many other database objects such as indexes, views, sequences, etc.
  • Datafiles are always assigned to only one tablespace and, therefore, to only one database.

There are three types of tablespaces:

(1) permanent tablespace
(2) undo tablespace
(3) temporary tablespace

Permanent Tablespace:
A permanent tablespace stores regular schema objects, such as tables and indexes that are permanent.

Undo Tablespace:
Undo tablespaces are special tablespaces used solely for storing undo information. You cannot create any other segment types (for example, tables or indexes) in undo tablespaces. Undo tablespaces are used only when the database is in automatic undo management mode (the default). A database can contain more than one undo tablespace, but only one can be in use at any time. Undo data is managed within an undo tablespace using undo segments that are automatically created and maintained by the database.

Temporary Tablespace:
You can manage space for sort operations more efficiently by designating one or more temporary tablespaces exclusively for sorts. A single SQL operation can use more than one temporary tablespace for sorting. For example, you can create indexes on very large tables, and the sort operation during index creation can be distributed across multiple tablespaces.

The smallest database is needed minimum two tablespaces.

  • SYSTEM tablespace– stores the data dictionary.
  • SYSAUX tablespace– stores data for auxiliary applications

A typical production database has numerous tablespaces.

 SYSTEM Tablespace: – A tablespace that is always used to store SYSTEM data that includes data about tables, indexes, sequences, and other objects – this metadata comprises the data dictionary.
· Every Oracle database has to have a SYSTEM tablespace—it is the first tablespace created when a database is created.
· Accessing it requires a higher level of privilege.
· You cannot rename or drop a SYSTEM tablespace.
· You cannot take a SYSTEM tablespace offline.
· The SYSTEM tablespace could store user data, but this is not normally done—a good rule to follow is to never allow allow the storage of user segments in the SYSTEM tablespace.
· This tablespace always has a SYSTEM Undo segment.

SYSAUX Tablespace: The SYSAUX tablespace stores data for auxiliary applications such as the LogMiner, Workspace Manager, Oracle Data Mining, Oracle Streams, and many other Oracle tools.
· This tablespace is automatically created if you use the Database Creation Assistant software to build an Oracle database.
· Like the SYSTEM tablespace, SYSAUX requires a higher level of security and it cannot be dropped or renamed.
· Do not allow user objects to be stored in SYSAUX. This tablespace should only store system specific objects.
· This is a permanent tablespace.

All other tablespaces are referred to as Non-SYSTEM. A different tablespace is used to store organizational data in tables accessed by application programs, and still a different one for undo information storage, and so on. There are several reasons for having more than one tablespace:
· Flexibility in database administration.
· Separate data by backup requirements.
· Separate dynamic and static data to enable database tuning.
· Control space allocation for both applications and system users.
· Reduce contention for input/output path access (to/from memory/disk).

To create a tablespace you must have the CREATE TABLESPACE privilege.
Tablespaces can be either Locally Managed to Dictionary Managed.
When you create a tablespace, if you do not specify extent management, the default is locally managed.

Locally Managed:
The extents allocated to a locally managed tablespace are managed through the use of bitmaps.
· Each bit corresponds to a block or group of blocks (an extent).
· The bitmap value (on or off) corresponds to whether or not an extent is allocated or free for reuse.

Locally managed tablespaces
· Reduced contention on data dictonary tables
· No undo generated when space allocatoin or deallocation occures
· No coalescing required

CREATE TABLESPACE wavelabs DATAFILE '/u01/oradata/wavelabs01.dbf' SIZE 500M EXTENET MANAGEMENT LOCAL; 


Local management is the default for the SYSTEM tablespace beginning with Oracle 10g.

· When the SYSTEM tablespace is locally managed, the other tablespaces in the database must also be either locally managed or read-only.
· Local management reduces contention for the SYSTEM tablespace because space allocation and deallocation operations for other tablespaces do not need to use data dictionary tables.
· The LOCAL option is the default so it is normally not specified.

· With the LOCAL option, you cannot specify any DEFAULT STORAGE, MINIMUM EXTENT , or TEMPORARY clauses.

Dictionary Managed:
· Extents are managed in the data dictionary
· Each segment stored in the tablaspace can have a different storage cluase
· Coalescing required



UNDO Tablespace:
· The Undo tablespace is used for automatic undo management.
· Used to store undo segments
· Cannot contain any other objects
· Extents are locally managed
· It can only use DATAFILE and EXTENT MANAGEMENT clauses

CREATE UNDO TABLESPACE undo1 DATAFILE '/u01/oradata/undo1.dbf' SIZE 40M;

· More than one UNDO tablespace can exist, but only one can be active at a time.
· A later set of notes will cover UNDO management in detail.

TEMPORARY Tablespace:
· A TEMPORARY tablespace is used to manage space for sort operations. Sort operations generate segments, sometimes large segments or lots of them depending on the sort required to satisfy the

specification in a SELECT statement’s WHERE clause.
· Sort operations are also generated by SELECT statements that join rows from within tables and between tables.
· Note the use of the TEMPFILE instead of a DATAFILE specification for a temporary tablespace in the figure shown below.

Temporary Tablespaces
· Used for sort operations
· Cannot contain any permanent objects
· Locally managed extents recommended



Default Temporary Tablespace:
· Each database needs to have a specified default temporary tablespace. If one is not specified, then any user account created without specifying a TEMPORARY TABLESPACE clause is assigned a temporary tablespace in the SYSTEM tablespace!
· This should raise a red flag as you don’t want system users to execute SELECT commands that cause sort operations to take place within the SYSTEM tablespace.
· If a default temporary tablespace is not specified at the time a database is created, a DBA can create one by altering the database.


After this, new system user accounts are automatically allocated temp as their temporary tablespace.  If you ALTER DATABASE to assign a new default temporary tablespace, all system users are automatically reassigned to the new default tablespace for temporary operations.

USERS, DATA and INDEXES Tablespaces:
Most Oracle databases will have a USERS permanent tablespace.
· This tablespace is used to store objects created by individual users of the database.
· At SIUE we use the USERS tablespace as a storage location for tables, indexes, views, and other objects created by students.
· All students share the same USERS tablespace.
Many Oracle databases will have one or more DATA tablespaces.
· A DATA tablespace is also permanent and is used to store application data tables such as ORDER ENTRY or INVENTORY MANAGEMENT applications.
· For large applications, it is often a practice to create a special DATA tablespace to store data for the application. In this case the tablespace may be named whatever name is appropriate to describe the objects stored in the tablespace accurately.
Oracle databases having a DATA (or more than one DATA) tablespace will also have an accompanying INDEXES tablespace.
· The purpose of separating tables from their associated indexes is to improve I/O efficiency.
· The DATA and INDEXES tablespaces will typically be placed on different disk drives thereby providing an I/O path for each so that as tables are updated, the indexes can also be updated simultaneously.

Bigfile Tablespaces:
A Bigfile tablespace is best used with a server that uses a RAID storage device with disk stripping – a single datafile is allocated and it can be up to 8EB (exabytes, a million terabytes) in size with up to 4G blocks.
Normal tablespaces are referred to as Smallfile tablespaces.
Why are Bigfile tablespaces important?
· The maximum number of datafiles in an Oracle database is limited (usually to 64K files) – think big here—think about a database for the internal revenue service.
· Bigfile tablespaces can only be locally managed with automatic segment space management except for locally managed undo tablespaces, temporary tablespaces, and the SYSTEM tablespace.
· If a Bigfile tablespace is used for automatic undo or temporary segments, the segment space management must be set to MANUAL.
· Bigfile tablespaces save space in the SGA and control file because fewer datafiles need to be tracked.

CREATE BIGFILE TABLESPACE graph01 DATAFILE '/u01/oradata/USER350graph01.dbf' SIZE 10g;


Tablespace Sizing:
Normally over time tablespaces need to have additional space allocated. This can be accomplished by setting the AUTOEXTEND option to enable a tablespace to increase automatically in size.
· This can be accomplished when the tablespace is initially created or by using the ALTER TABLESPACE command at a later time.

 CREATE TABLESPACE application_data DATAFILE '/u01/oradata/USER350data01.dbf' SIZE 200M AUTOEXTEND ON NEXT 48K MAXSIZE 500M; 

This query uses the DBA_DATA_FILES view to determine if AUTOEXTEND is enabled for selected tablespaces in the SIUE DBORCL database.

 SELECT tablespace_name, autoextensible FROM dba_data_files;
TABLESPACE_NAME                AUT
------------------------------ ---
SYSTEM                         NO
SYSAUX                         NO
UNDOTBS1                       YES
USERS                          NO

· Manually use the ALTER DATABASE command to resize a datafile.


This command looks similar to the above command, but this one resizes a datafile while the above command sets the maxsize of the datafile.

 ALTER DATABASE DATAFILE '/u01/oradata/USER350data01.dbf' RESIZE 600M; 

· Add a new datafile to a tablespace with the ALTER TABLESPACE command.

 ALTER TABLESPACE application_data ADD DATAFILE '/u01/oradata/USER350data01.dbf' SIZE 200M; 




What is React Js?
    React Js is front end library developed by Facebook. It is used to handling view layer for web and mobile apps. It’s allows us to

create reusable UI components. It is currently one of the most popular JavaScript libraries and it has strong foundation and large community behind it.

What do we know before going to learn ReactJs?
    If you want to work with ReactJS, We have solid knowledge on JavaScript, HTML5 and CSS. Even though ReactJS doesn’t use HTML, the JSX is similar so your HTML knowledge will be very helpful. We will also use EcmaScript 2015 syntax so any knowledge in this area can be helpful.


  • JSX − JSX is JavaScript syntax extension. It isn’t necessary to use JSX in React development, but it is recommended.
  • Components − React is all about components.

    You need to think of everything as a component. This will help you to maintain the code when working on larger scale projects.

  • Unidirectional data flow and Flux − React implements one way data flow which makes it easy to reason about your app. Flux is a pattern that helps keeping your data unidirectional.


  • React uses virtual DOM which is JavaScript object. This will improve apps performance since JavaScript virtual DOM is faster than the regular DOM.
  • React can be used on client and server side.
  • Component and Data patterns improve readability, which helps to maintain larger apps.
  • React can be used with other frameworks.


  • React only covers view layer of the app so you still need to choose other technologies to get a complete tooling set for development.
  • React is using inline templating and JSX. This can seem awkward to some developers.

Installation ReactJs
    How to set up environment for successful React development. Notice that there are many steps to be done but this will help you to speed up development process later. We will need NodeJS so if you don’t have it installed.
Installation steps for NodeJs:
    Download latest version of Node.js installable archive file from Node Js based on OS.
Installation on UNIX/Linux/Mac OS X
    Based on your OS architecture, download and extract the archive into /tmp, and then finally move extracted files into /usr/local/nodejs directory.
Add /usr/local/nodejs/bin to the PATH environment variable.

OS Output
Linux/ Mac export PATH=$PATH:/usr/local/ /bin/node

Installation on Windows
    Use the MSI file and follow the prompts to install the Node.js. By default, the installer uses the Node.js distribution in C:\Program Files\nodejs. The installer should set the C:\Program Files\nodejs\bin directory in window’s PATH environment variable. Restart any open command prompts for the change to take effect.
Verify installation: Executing a File
Create a js file named main.js on your machine (Windows or Linux) having the following code.

/* Hello, World! program in node.js */
console.log("Hello, World!")

Now execute main.js file using Node.js interpreter to see the result:

[12:21][NBOS@nbmac6:~/Desktop]$ node main.js
Hello, World!

Step 1 – Install Global Packages
    You will need to install several packages for this setup. We will need some of the babel plugins so let’s first install babel by running the following code in command prompt window.

[12:26][NBOS@nbmac6:~]$ sudo npm install -g babel
/usr/local/bin/babel -> /usr/local/lib/node_modules/babel/cli.js
/usr/local/bin/babel-node -> /usr/local/lib/node_modules/babel/cli.js
/usr/local/bin/babel-external-helpers -> /usr/local/lib/node_modules/babel/cli.js
babel@6.5.2 /usr/local/lib/node_modules/babel
[12:27][NBOS@nbmac6:~]$ sudo npm install -g babel-cli
> fsevents@1.0.12 install /usr/local/lib/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents
> node-pre-gyp install --fallback-to-build

[fsevents] Success: "/usr/local/lib/node_modules/babel-cli/node_modules/chokidar/node_modules/fsevents/lib/binding/Release/node-v46-darwin-x64/fse.node" is installed via remote

Step 2 – Create reactApp Folder
    The root folder will be named reactApp and we will place it on Desktop. After the folder is created we need to open it and create empty package.json file inside by running npm init from the command prompt and follow the instructions.

C:\Users\username\Desktop>mkdir reactApp
C:\Users\username\Desktop\reactApp>npm init

Screen Shot 2016-06-29 at 12.32.57 PM
Step 3 – Add plugins and Dependencies
    We will use webpack bundler in these tutorials so let’s install webpack and webpack-dev-server.

[12:34][NBOS@nbmac6:~]$ sudo npm install webpack --save
[12:35][NBOS@nbmac6:~]$ sudo npm install webpack-dev-server --save 

Since we want to use React, we need to install it first. The –save command will add these packages to package.json file.

[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ sudo npm install react --save
[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ sudo npm install react-dom --save

    We already mentioned that we will need some babel plugins so let’s install it too.

[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ sudo npm install babel-core
[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ sudo npm install babel-loader
[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ sudo npm install babel-preset-react
[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ sudo npm install babel-preset-es2015 

Step 4 – Sample files
    Let’s create several files that we need. You can add it manually or you can use command prompt.

[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ touch index.html
[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ touch App.jsx
[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ touch main.js
[12:39][NBOS@nbmac6:~/Desktop/reactApp]$ touch webpack.config.js 

Step 5 – Set Compiler, Server and Loaders
    Open webpack-config.js file and add the code below. We are setting webpack entry point to be main.js. Output path is the place where bundled app will be served. We are also setting development server to 8080 port. You can choose any port you want. And lastly, we are setting babel loaders to search for js files and use es2015 and react presets that we installed before.

var config = {
entry: './main.js',
output: {
path: './',
filename: 'index.js'
devServer: {
inline: true,
port: 7666
module: {
loaders: [{
test: /\.jsx?$/,
exclude: /node_modules/,
loader: 'babel',
query: {
presets: ['es2015', 'react']
module.exports = config;

   Open the package.json and delete “test” “echo \”Error: no test specified\” && exit 1″ inside “scripts” object. We are deleting this line since we will not do any testing in this tutorials. Let’s add the start command instead.
“start”: “webpack-dev-server –hot”
   Now we can use npm start command to start the server. –hot command will add live reload after something is changed inside our files so we don’t need to refresh the browser every time we change our code.
Step 6 – code in index.html
    This is just regular HTML. We are setting div id = “app” as a root element for our app and adding index.js script which is our bundled app file.

<!DOCTYPE html>
<html lang="en">
    <meta charset="UTF-8">
    <title>React App</title>

<div id="app"></div>

<script src="index.js"></script>

Step 7 – code in App.jsx and main.js
    This is the first react component. We will explain React components in depth in one of our later tutorials. This component will render Hello World!!!.

import React from 'react';
class App extends React.Component {
render() {
return ( &lt; div &gt; Hello World!!! &lt; /div&gt; );
export default App;

   We need to import this component and render it to our root App element so we can see it in browser.

import React from 'react';
import ReactDOM from 'react-dom';
import App from './App.jsx';
ReactDOM.render( &lt; App / &gt; , document.getElementById('app'));

Step 8 – Start the Server
   The setup is finished and we can start the server by running:

[14:41][NBOS@nbmac6:~/Desktop/reactApp]$ sudo npm start 

   It will show you the port we need to open in browser, in our case http://localhost:7777/. After we open it we will see the following output:

Screen Shot 2016-06-29 at 4.19.28 PM

MongoDB is an open source database that uses a document-oriented data model MongoDB Inc.
The MongoDB database consists of a set of databases in which each database contains multiple collections.
MongoDB is schema-less what it means is that every collection can contain different types of object.
Every object is also called document which is represented as a JSON (JavaScript Object Notation) structure: a list of key-value pairs.
The value can be of three types: a primitive value, an array of documents or again a list of key-value pairs.


MongoDB supports dynamic queries on documents using a document-based query language

Structure of Single element is clear.

No complex Joins

Basic Diagram

MongoD Architechture

Terminology and Concepts in MongoDB Continue reading

Today, every company is having a big challenge to ensure their website pages listed on first page and on the top most links when people do relevant search for the content with the keywords on search engines like Google, Yahoo and Bing etc.,

Undoubtedly, Google is the leader in search engines and people rely more than 90% in the United States alone.

For every business which is dependent on the websites, SEO has become an important aspect and given high priority right from the Designing, Coding and Marketing. Let’s look at the key approaches for SEO optimization.

Keyword Research

It’s the most important part of the SEO as most people search for the web pages with the required or relevant content. So, incorporating main words  that searchers can use with the keywords

Title Tag – Including your keywords which displays in the browser heading

Page URL –  Ensure that your URL includes your key phrase or keywords as close to the beginning of the URL as possible.

Image File Name – File Name should contain these keywords which should be addressing the content.

Image Alt Tag – Include keywords in your Image Alt Tag as search engines gives importance to images which have relevant tags that are matching with the content.

Meta Description – Include key words in meta description so that search engines can easily pull out these pages.

Create unique web pages

Its good practice to create separate pages for  each category or service or product can help to give an

excellent UI experience to the end user as searchers will come directly to these pages from the results of search engine and also it makes much easier for the users to look for the required content or information.  And the content of each page should be completely different from any other sites, but also any web pages of the same site.

If you publish any content that appears elsewhere on the Internet, search engines ignore these pages and sites because of the algorithm which looks for the unique content but not the repetitive.

It is also very important in pointing out snippets of information containing on other pages within the site to tempt the visitor to follow the link, you run the risk of being penalized for duplicate content. So it’s most crucial  of the wording used in the snippets which provides a summary without repeating any of the words actually used.

And implement the A/B tests architecture into your website design that  makes search engines to look for more unique pages randomly and

e.g  categorized links in a website

Add a blog

It would be ideal to have your own domain and hosted as the search engines look for websites which are serious about doing business and trustworthy. And ensure that you have relevant data published on blogs which are relates to your customer needs. More importantly post or update the blogs as frequent as you can. And add relevant Photos, Videos, Podcasts and Tool and helpful Plug-ins. And  add back links to your website wherever necessary.


Add footer links to every page

Another good approach to boost your site SEO rankings significantly is:  link between web pages using plain text links, with the target SEO keywords in the anchor text. Most of the good and popular websites forgot include anchor text and give importance graphical, Flash or Java script navigation. Add sitemap to your website most search engines look for sitemaps as these explains the hierarchy and structural design of the website

Make it easy to share

Good content is generally is worth to share thru social networks like Facebook and twitter. Incorporate Facebook sharing and  Flikes, Twitter’s tweeting and sharing and other popular social networks to share sites content or links. This actually helps to improve rankings in search engines’ index. Share buttons should be placed on the right areas and they should be highly visible to the user. And maximized and attractive images have a huge factor that can spread across social networks easily.


It is important to understand and remember that a website’s artistic and attractive design is for the people but not for the search engines.  The web design has to be well balanced with effective content and SEO elements in your technical design architecture

Attract and engage visitors spend more time on your website  by implementing a flat, simple and with clean simple design principles and strategies.

And more importantly implementing SEO practices for your site design should optimize search engines but shouldn’t be visible. The success of web designs requires a good approach with multi skilled and multi-functional and ensure to enhance the business.

What is squid proxy?

Squid is a caching and forwarding web proxy. It has a wide variety of uses, from speeding up a web server by caching repeated requests to caching web, DNS and other computer network lookups for a group of people sharing network resources to adding security by filtering traffic.

Squid proxy can be contained

  1. Simple proxy
  2. Caching web server
  3. Firewall


Packages: Squid*.rpm

Port Number: 3128

Configuration file: /etc/squid/squid.conf

Service: Squid

Proxy server Configuration

# Yum Install Squid*

Need to modify the following in file squid.conf

Open the file using vi editer
# vi /etc/squid/squid.conf

  1. change the port number
  2. set the cache_dir location
  3.  uncomment the line
  4. provide the domain name or ip address
  5. server access in mentioned time and dayofweek
  6. set permissions

Add the ip address in resolve.conf file

#vi  /etc/resolve.conf

#dig Domain name (

Restart the service to reload the changes and start
#service squid restart

Client side configuration

Open a browser

Go to edit —> Preferences—>connection settings—>manual proxy configuration—> 3128—>ok