Thursday, 24 December 2015

How to install Zend Framework 2 in windows


How to install Zend Framework 2 in windows

  1. Add PHP.exe Path to Your Windows Path Variable.
    Means we need to add php.exe's path to windows path variable So that you can execute php commands.
    (My php.exe Path: E:\wamp\bin\php\php5.4.3)
    Not understand OR any Doubt 
  2. Make sure you have >=PHP5.4 Version.
  3. Now download Zend Framework 2.3.2 From https://github.com/zendframework/ZendSkeletonApplication/releases/tag/release-2.3.2
  4. Unzip this zipped file .
  5. Rename ZendSkeletonApplication to zf2.
  6. Copy this zf2 folder to E:\wamp\www
  7. Login to command prompt & Go to www folder of wamp (Path: E:\wamp\www\zf2)
  8. Now download composer with following command.
    php -r "readfile('https://getcomposer.org/installer');" | php
    If the above fails, enable php_openssl.dll in php.ini & Restart wamp Server.
  9. Now execute following command to install the composer
    php composer.phar install
  10. Apache Setup  (Path: E:\wamp\bin\apache\apache2.2.22\conf\extra)
    <virtualhost> DocumentRoot "D:\wamp\www\zf2\public" ServerName zf2.loc <directory public="" wamp="" www="" zf2=""> Options FollowSymLinks MultiViews AllowOverride All Order allow,deny Allow from all </directory> </virtualhost>
  11. Append following line in host File (Path:C:\Windows\System32\drivers\etc)
    127.0.0.1       zf2.loc
  12. ReStart your wamp Server.
  13. http://zf2.loc in Web Browser

Wednesday, 16 December 2015

EmberJS Interview Questions and Answers

EmberJS Interview Questions and Answers


Question: What is npm install?
NPM is a NodeJS package manager. It is used to install the node programs.


Question: How to install NPM on windows?
Download MSI from https://nodejs.org/download/release/ for 32bit|64bit system.


Question: How to update NPM on windows?
npm install npm
OR
Download Latest MSI from https://nodejs.org/download/release/latest/ for 32bit|64bit system.


Question: How to install Ember using npm?
npm install -g ember-cli



Question: How to get to know the Version of Ember?
ember -v


Question: How to get the Version of node?
node -v


Question: How to create a new project?
ember new my-newproject



Question: How to go inside new project for execute project based commands?
cd my-newproject



Question: What are different commands available in ember-cli?
ember g route about
It will give you list of commands available for Ember.


Question: How to define view.?
Ember.View.create({
   templateName: 'NameOfTemplate',   
});



Question: How to implement IF,ELSE,NOT in ember handlebar?
{{#unless isValid}}
  
{{else}}
    
{{/unless}}



Question: How to add/Delete data in Array?
//In JS
App.obj = Ember.Object.create({
    "things": Ember.A(["Testing1", "Testing2"])
});
App.obj.things.pushObject("3"); // Add data

// HTML + Handlebars
{{#with App.obj}}
    
    {{#each things}}
  • {{this}}
  • {{/each}}
{{/with}}



Question: Explain the core concept of EmberJS
  1. Store: It is central repository and cache of all records available in an application. It can be accessed by controller and admin.
  2. Models: A model is a class which defines the data of properties and behavior.
  3. Records: A record is an instance of a model which contains information that is loaded from a server.
  4. Adapter: It is responsible for translating requested records into the appropriate calls t
  5. Serializer: Translating JSON data into a record object.
  6. Automatic Caching:Used for caching



Question: What is Ember-data?
Ember-Data is a library that retrieve records from a server, store them, update them in the browser and save them back to the Server.


Question: What is Application Template?
Application Template have header, footer and contents which display on page. there can be many Template in one application.


Question: What is ember.mixin class?
Ember.mixin class can create objects, whose functions and properties can be shared among other instances and classes.