Nov 19

Creating simple chat with node.js and socket.io

1. Create a new directory folder called ‘node’ in any of the partitioned local drive.
2. Open command prompt and open the ‘node’ directory.
3. Paste the code to install socket.io, express, and jade files

node.js1
And wait until the installation get completed.

4. Create app.js file and fill it with the following code.

5. Create index.html file and fill it with the following code.

6. Open the command prompt.
Choose the directory, and Use the code to execute the server

node.js2

7. Open a browser and use ‘localhost:8080’ this to run.

8. Open another new window with the same url to see the changes

ex_nodechat

Nov 19

jquery deprecation functions and new functions

Introduction:

-Fast, small, javascript library.
-traversal, manipulation
-Event handling, animation, ajax, easy to use API
– multitude of browsers
– versatility and extensibility.
– millions of people to write javascript.

Deprecated Functions from new Release

Overview:
jQuery 1.9 removes or modifies several APIs that behaved inconsistently or inefficiently in the past. The majority of these changes have been foreshadowed by their deprecation in previous versions of jQuery, particularly 1.7 and 1.8.

jQuery Migrate Plugin

This plugin can be used to detect and restore APIs or features that have been deprecated in jQuery and removed as of version 1.9.

https://github.com/jquery/jquery-migrate

Ideally this would only be used as a short-term solution.

Continue reading

Nov 19

MYSQL databases engines MYISAM Vs INNODB

MYISAM:

1. MYISAM supports Table-level Locking
2. MyISAM designed for need of speed
3. MyISAM does not support foreign keys hence we call MySQL with MYISAM is DBMS
4. MyISAM stores its tables, data and indexes in diskspace using separate three different files. (tablename.FRM, tablename.MYD, tablename.MYI)
5. MYISAM not supports transaction. You cannot commit and rollback with MYISAM. Once you issue a command it’s done.
6. MYISAM supports fulltext search
7. You can use MyISAM, if the table is more static with lots of select and less update and delete.

INNODB:

1. InnoDB supports Row-level Locking
2. InnoDB designed for maximum performance when processing high volume of data
3. InnoDB support foreign keys hence we call MySQL with InnoDB is RDBMS
4. InnoDB stores its tables and indexes in a tablespace
5. InnoDB supports transaction. You can commit and rollback with InnoDB
6. InnoDB is slower when it comes to SELECT
7. InnoDB enforces referential integrity (which is as very good thing)