Monday, 29 May 2017

Angularjs 2 Interview Questions and Answers

Angularjs 2 Interview Questions and Answers


Question: Why AngualrJS2 over AngualrJS1?
  1. Angular 2 is simpler and faster than Angular 1.
  2. You can update the large data sets with minimal memory overhead.
  3. It will speed up the initial load through server side rendering.



Question: What are the feature of AngualrJS2?
  1. Angular 2 is faster than Angular 1
  2. Angular 2 is easier than Angular 1
  3. It supports old browsers also including IE9+ and Android 4.1+.
  4. It is a cross platform framework.
  5. Angular 2 is mainly focused on mobile apps.
  6. Code structure is very simplified than the previous.



Question: How to install AngualrJS2 in NodeJS?
  1. Create an folder and go inside that folder using command line.
  2. Create en empty file package.json and add following contents.
    {
      "name": "angular2-demo",
      "version": "1.0.0",
      "scripts": {
        "start": "concurrent \"npm run tsc:w\" \"npm run lite\" ",
        "tsc": "tsc",
        "tsc:w": "tsc -w",
        "lite": "lite-server",
        "typings": "typings",
        "postinstall": "typings install"
      },
      "license": "ISC",
      "dependencies": {
        "angular2": "2.0.0-beta.7",
        "systemjs": "0.19.22",
        "es6-promise": "^3.0.2",
        "es6-shim": "^0.33.3",
        "reflect-metadata": "0.1.2",
        "rxjs": "5.0.0-beta.2",
        "zone.js": "0.5.15"
      },
      "devDependencies": {
        "concurrently": "^2.0.0",
        "lite-server": "^2.1.0",
        "typescript": "^1.7.5",
        "typings":"^0.6.8"
      }
    }
  3. Create an empty file tsconfig.json and add following contents.
    {
      "compilerOptions": {
        "target": "es5",
        "module": "system",
        "moduleResolution": "node",
        "sourceMap": true,
        "emitDecoratorMetadata": true,
        "experimentalDecorators": true,
        "removeComments": false,
        "noImplicitAny": false
      },
      "exclude": [
        "node_modules",
        "typings/main",
        "typings/main.d.ts"
      ]
    }
  4. Create an empty file typings.json and add following contents.
    {
      "globalDependencies": {
        "core-js": "registry:dt/core-js",
        "jasmine": "registry:dt/jasmine",
        "node": "registry:dt/node"
      }
    }
  5. Execute following command from command line.
    npm install

Monday, 1 May 2017

What is Web Server?

What is Web Server


Queston: What is Web Server?
A Web server is a program that uses HTTP to serve the data in form Web pages to users.
When client (like browser OR App), hit an http URL (like http://www.web-technology-experts-notes.in/2016/08/what-is-rtmp-rtmpt-rtmpe-rtmpte-and-rtmps-protocol.html), An request goes to Web Server (domain's server), Web server execute the request and return the data.
Note: Dedicated computers and appliances may be referred to as Web servers as well.


Queston: Giv example of Web Server?
A computer can be converted to web server, for this they need to connect to the internet install the web server software.
Following are web server software.
  1. Apache HTTP Server
  2. Microsoft Internet Information Services (IIS)
  3. Apache Tomcat
  4. Nginx
  5. Oracle iPlanet Web Server
  6. Lighttpd
  7. Mobile Web Server
  8. Mongoose (web server)
  9. Jetty
  10. Wamp Server
  11. Boa web server
  12. CERN httpd
  13. Gunicorn
  14. Kloxo-MR
  15. Roxen
  16. AOLserver
  17. Tornado (web server)
  18. Adobe JRun
  19. Hiawatha (web server)
  20. enhydra
  21. WEBrick



Question: What is the difference between web server and application server?
  1. Web Server is a server that serves content to the web using http/https protocol.
    Application server you can write the business login and It can also be work like web server.
  2. Web Server is used for serve the content whereas application server is used for hosts and exposes business logic and processes.



Question: Why port 80 for web services?
Hypertext Transfer Protocol, port 80 is the port (default port) that the server "listens to" or expects to receive from a Web client.
A port can be specified in the range from 0-65536 on the NCSA server.
However, the server administrator configures the server so that only one port number can be recognized.


Question: What is default port for https?
443


Question: What are the different ports used in Web Development?
  1. 20 FTP (File Transfer Protocol)
  2. 21 SFTP (Secure File Transfer Protocol)
  3. 22 Secure Shell (SSH) Connection
  4. 23 Shell connection like ssh but its not reliable.
  5. 25 Simple Mail Transfer Protocol (SMTP)
  6. 50 Hypertext Transfer Protocol (HTTP)
  7. 110 Post Office Protocol (POP)
  8. 143 Internet Message Access Protocol (IMAP)
  9. 443 Hypertext Transfer Protocol over SSL/TLS (HTTPS)
  10. 989 FTP over TLS/SSL