Skip to main content

Posts

AngularJs Tutorials : Bootstrap

Every application starts with bootstrap process which initialize application and wire it other with dependencies and configurations. AngularJs is not different from other application. It also starts application with bootstrap process. Following operation happens inside AngularJs bootstrap process. Load application module. Create dependency injector and load dependencies. Compile HTML and create scope for application. All these steps happens inside angular.js scripting file. therefore we need to include it first. we can include it inside HEAD tag or at end of BODY tag. Note: Adding angular.js file at end of body tag will allow browser to load of HTML elements without any delay and afterwards load angular.js and begin bootstrapping process. You can get angular.js source file from https://code.angularjs.org/ <script src= ”https://code.angularjs.org/1.3.0/angular.js” type= ”text/javascript” > AngularJs bootstrap process happens on docum

MongoDB Tutorials : Aggregation Framework

MongoDB Aggregation Framework groups set of documents together and performs certain operation on this grouped documents and returns results in the form of documents. MongoDB aggregation answer to those query which requires grouping of documents. Aggregation framework works on three type of model Aggregation pipeline Map Reduce Single Purpose Aggregation Operations Now let see how MongoDB Aggregation Framework works with simple example. Suppose you are MongoDB application developer in a respected company and you have been given a MongoDB database that holds information about human population which is distributed according to cities and their states. here is one sample document. { "city" : "ACMAR" , "loc" : [ - 86.51557 , 33.584132 ], "pop" : 6055 , "state" : "AL" , "_id" : "3500

PHP Tutorials : Autoload PHP Classes

With some examples, this tutorial post will teach the PHP autoloader and namespace concepts. What is Autoloading in PHP? PHP autoload's primary function is to load PHP files into the application context. The import statement is the default method to include PHP file into context. However, we may avoid the issue by using the PHP autoload capability to autoload essential PHP files, which keeps your code clean and composable. Why do we need auto loading? When creating object-oriented applications, many developers create one PHP source file per class declaration. One of the major inconveniences is having to start each script with a huge list of required includes. Autloading allows us to include an arbitrary number of PHP files in the application context if they aren't already included by other include statements.  PHP Autoloading Methods PHP uses two functions; one is the magic method spl_autoload_register  and the other is   __autoload . Although __autoload has been

JSON Tutorials : Getting Started

JSON is widely accepted text formatted structured data. JSON stands for " JavaScript Object Notation ". In general JSON can represent 1. Object of database record. 2. Object to represent a list of HTML elements. 3. Result of search query. 4. Response of an Ajax call. Here you can see JSON is used in many different areas and for many different scenarios. This means it has simple data structure. most of programming languages adopt it and it can flow easily from one connection to another. You can find JSON office definition here JSON Official Site . JSON is represented by two structural types, which includes two primitive types. Structural types Array : A sequential list of primitive data types between square brackets [ ] Object : Collection of key, value pair stored inside curly braces { }, where value would be primitive data type Primitive types : There are two primitive types key and value. " key " should be string and " value (data type)

Subscribe for latest tutorial updates

* indicates required