What am I doing wrong with this Angular "get" example?

I'm going through the W3 course on Angular and I'm working through this example: https://www.w3schools.com/angular/tryit.asp?filename=try_ng_customers_mysql

Here's my "term_list_json.php" code:

<?php

header("Access-Control-Allow-Origin: *");
header("Content-Type: application/json; charset=UTF-8");

require_once("term_class_pdo.php");

$current_discipline="";
$new_list= new TermAdmin;
$term_display=$new_list->term_list();

$output="";

foreach($term_display as $term)
{
	if($output !="") 
	{
		{$output.= ", ";}
	}
	$output.= '{"disicpline": "' . stripslashes($term['discipline']) .'", ';
	$output.= '"term": "' .stripslashes($term['term']) .'", ';
	$output.='"definition"; "'. stripslashes($term['definition']).'"}';
}
$output = '{"records": ['.$output.']}';

echo $output;

?>

Open in new window


You can see it live at http://brucegust.com/adm/term_list_json.php

Now, here's my code on the Angular side:

<!DOCTYPE html>
<html lang="en">
<head>
<title>Angular Tutorial</title>
<link href="css/stylesheet.css" rel="stylesheet" type="text/css" />
<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.6.4/angular.min.js"></script>
<style>
table, th , td {
  border: 1px solid grey;
  border-collapse: collapse;
  padding: 5px;
}
table tr:nth-child(odd) {
  background-color: #f1f1f1;
}
table tr:nth-child(even) {
  background-color: #ffffff;
}
</style>
</head>
<body style="white-space: normal;">

<div ng-app="myApp" ng-controller="myCtrl">

<table>
	<tr ng-repeat="x in terms">
		<td>{{x.discipline}}</td>
		<td>{{x.term}}</td>
	</tr>
</table>

</div>

<script>
var app=angular.module("myApp", []);
app.controller('myCtrl', function($scope, $http) {
	$http.get("http://brucegust.com/adm/term_list_json.php")
	.then(function (response) {$scope.terms = response.data.records});
});
</script>

<p>With the "ng-options" directive, the selected value can be an object...</p>

</body>
</html>

Open in new window


When you run the page at http://brucegust.com/adm/angular/json_retrieval.php, you get a blank screen, save some text. But there's a huge error that I've got pictured below.

Now sure what I'm doing wrong or how to process that error.

What do I need to change?

Thanks!
brucegustPHP DeveloperAsked:
Who is Participating?
 
Jim RiddlesPrepress/OMS SpecialistCommented:
The output from your PHP script that is generating your JSON is not correct.

Perform the following actions:
  • View source, and copy the entire source
  • Paste your JSON into the available box, don't worry about the two options to the right
  • Click Process

Once it has completed processing your JSON, it will generate a report with any errors.  Read this carefully.  It looks like in each of your records, you have a ";" separating your definition key from the value, where it should be a ":".  Correct your PHP script, and try again.
0
 
Jim RiddlesPrepress/OMS SpecialistCommented:
That error is indicating that there is a problem with the call, and you are not handling the error.  Alter your code to the following:
var app=angular.module("myApp", []);
app.controller('myCtrl', function($scope, $http) {
	$http.get("http://brucegust.com/adm/term_list_json.php")
	.then(function (response) { $scope.terms = response.data.records; })
	.catch(function (error) { console.error(error); });
});

Open in new window

This will show the actual error in the console.  Once you have modified your code, if you are unable to troubleshoot the problem, check back here.
0
 
brucegustPHP DeveloperAuthor Commented:
Hey, Jim!

I did your suggestion and this is what I had in my console (I apologize for the volume, but I wanted you to see what was there...)

json_retrieval.php:40 Error: [$http:baddata] http://errors.angularjs.org/1.6.4/$http/baddata?p0=%7B%22records%22%3A%20%5B%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22Boilerplate%22%2C%20%22definition%22%3B%20%22A%20Plugin%20is%20a%20JQuery%20object%20that%20does%20something%20cool.%20When%20you%20determine%20that%20you%20want%20to%20build%20your%20own%20plugin%2C%20which%20is%20very%20likely%2C%20you'll%20use%20what's%20called%20a%20%22Boilerplate%22%20to%20encapsulate%20your%20code%20so%20any%20potential%20redundancy%20between%20the%20syntax%20you%20use%20and%20code%20that%20exists%20elsewhere%20in%20your%20app%20doesn't%20conflict%20with%20one%20another.%20%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AThis%20is%20fairly%20verbose%2C%20but%20it's%20not%20that%20difficult.%20Just%20buckle%20up...%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%2F%2F%20the%20semi-colon%20before%20function%20invocation%20is%20a%20safety%20net%20against%20concatenated%3Cbr%3E%0D%0A%2F%2F%20scripts%20and%2For%20other%20plugins%20which%20may%20not%20be%20closed%20properly.%3Cbr%3E%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%3Cb%3E%3B(function%20(%20%24%2C%20window%2C%20undefined%20)%20%7B%3C%2Fb%3E%0D%0A%0D%0A%2F%2F%20undefined%20is%20used%20here%20as%20the%20undefined%20global%20variable%20in%20ECMAScript%203%20is%3Cbr%3E%0D%0A%2F%2F%20mutable%20(ie.%20it%20can%20be%20changed%20by%20someone%20else).%20undefined%20isn't%20really%20being%3Cbr%3E%0D%0A%2F%2F%20passed%20in%20so%20we%20can%20ensure%20the%20value%20of%20it%20is%20truly%20undefined.%20In%20ES5%2C%20undefined%3Cbr%3E%0D%0A%2F%2F%20can%20no%20longer%20be%20modified.%3Cbr%3E%0D%0A%2F%2F%20window%20and%20document%20are%20passed%20through%20as%20local%20variables%20rather%20than%20globals%3Cbr%3E%0D%0A%2F%2F%20as%20this%20(slightly)%20quickens%20the%20resolution%20process%20and%20can%20be%20more%20efficiently%3Cbr%3E%0D%0A%20%2F%2F%20minified%20(especially%20when%20both%20are%20regularly%20referenced%20in%20your%20plugin).%3Cbr%3E%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%2F%2F%20Create%20the%20defaults%20once%3Cbr%3E%0D%0A%20%20%20%20%3Cb%3Evar%20pluginName%20%3D%20%22defaultPluginName%22%2C%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20document%20%3D%20window.document%2C%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20defaults%20%3D%20%7B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20propertyName%3A%20%22value%22%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%7D%3B%3C%2Fb%3E%3Cbr%3E%3Cbr%3E%0D%0A%0D%0AThe%20first%20thing%20you%20should%20notice%20is%20that%20these%20variable%20are%20defined%20outside%20of%20any%20functions%20%EF%BF%BD%20the%20IIFE%20doesn%EF%BF%BDt%20count%20%EF%BF%BD%20which%20limits%20the%20number%20of%20instances%20to%201%20(as%20opposed%20to%201%20for%20each%20time%20the%20plugin%20is%20called%20or%20a%20plugin%20object%20is%20instantiated)%20and%20it%20makes%20them%20available%20to%20everything%20within%20the%20IIFE.%20The%20first%20variable%20is%20pluginName%2C%20which%20should%20be%20the%20name%20of%20the%20function%20that%20you%20are%20extending%20jQuery%20with.%20It%EF%BF%BDs%20referenced%20on%20lines%2032%2C%2045%2C%2047%2C%20and%2048.%20This%20allows%20you%20to%20change%20the%20name%20of%20your%20plugin%20in%20one%20place%20rather%20than%20in%20all%204%20of%20those%20places%20mentioned%20(and%20more%20places%20if%20you%20need%20to%20reference%20it%20within%20the%20code%20you%20write).%20The%20next%20variable%20is%20document%2C%20which%20is%20just%20a%20reference%20to%20the%20document%20%EF%BF%BD%20often%20used%20in%20jQuery%20plugins%20%EF%BF%BD%20which%20allows%20it%20to%20be%20shortened%20by%20minifiers%20again.%20The%20final%20variable%20is%20defaults.%20Most%20plugins%20give%20users%20options%20that%20they%20can%20send%20in%20to%20the%20plugin%20and%20this%20variable%20contains%20the%20default%20values%20for%20each%20of%20the%20options%20you%20offer.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%20%2F%2F%20The%20actual%20plugin%20constructor%3Cbr%3E%0D%0A%20%20%20%3Cb%3E%20function%20Plugin(%20element%2C%20options%20)%20%7B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20this.element%20%3D%20element%3B%3C%2Fb%3E%3Cbr%3E%3Cbr%3E%0D%0A%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20jQuery%20has%20an%20extend%20method%20which%20merges%20the%20contents%20of%20two%20or%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20more%20objects%2C%20storing%20the%20result%20in%20the%20first%20object.%20The%20first%20object%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20is%20generally%20empty%20as%20we%20don't%20want%20to%20alter%20the%20default%20options%20for%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20future%20instances%20of%20the%20plugin%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%3Cb%3Ethis.options%20%3D%20%24.extend(%20%7B%7D%2C%20defaults%2C%20options)%20%3B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20this._defaults%20%3D%20defaults%3B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20this._name%20%3D%20pluginName%3B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20this.init()%3B%3Cbr%3E%0D%0A%20%20%20%20%7D%3C%2Fb%3E%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AThis%20is%20the%20constructor%20for%20the%20object%20that%20will%20be%20doing%20all%20the%20heavy%20lifting%20in%20the%20plugin.%20The%20constructor%20is%20pretty%20minimal%2C%20mostly%20just%20creating%20a%20few%20instance%20properties%20and%20then%20leaving%20the%20rest%20up%20to%20init.%20Walking%20through%2C%20this.element%20holds%20the%20DOM%20element%20that%20this%20plugin%20is%20supposed%20to%20manipulate%2C%20this.options%20holds%20an%20object%20with%20all%20of%20the%20options%20that%20the%20user%20sent%20in%20and%20any%20defaults%20that%20weren%EF%BF%BDt%20overridden%20by%20the%20user.%20The%20rest%20are%20pretty%20self-explanatory.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%3Cb%3EPlugin.prototype.init%20%3D%20function%20()%20%7B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20Place%20initialization%20logic%20here%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20You%20already%20have%20access%20to%20the%20DOM%20element%20and%20the%20options%20via%20the%20instance%2C%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%2F%2F%20e.g.%2C%20this.element%20and%20this.options%3Cbr%3E%0D%0A%20%20%20%20%7D%3B%3C%2Fb%3E%3Cbr%3E%3Cbr%3E%0D%0A%0D%0AThe%20init%20function%20where%20all%20the%20logic%20associated%20with%20this%20plugin%EF%BF%BDs%20initialization%20should%20be%20placed.%20%3Cbr%3E%3Cbr%3E%0D%0A%0D%0AAnd%20finally...%3Cbr%3E%3Cbr%3E%0D%0A%0D%0A%2F%2F%20A%20really%20lightweight%20plugin%20wrapper%20around%20the%20constructor%2C%3Cbr%3E%0D%0A%20%20%20%20%2F%2F%20preventing%20against%20multiple%20instantiations%3Cbr%3E%0D%0A%20%20%20%20%3Cb%3E%24.fn%5BpluginName%5D%20%3D%20function%20(%20options%20)%20%7B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20return%20this.each(function%20()%20%7B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20if%20(!%24.data(this%2C%20'plugin_'%20%2B%20pluginName))%20%7B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%20%24.data(this%2C%20'plugin_'%20%2B%20pluginName%2C%20new%20Plugin(%20this%2C%20options%20))%3B%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%20%20%20%20%7D%3Cbr%3E%0D%0A%20%20%20%20%20%20%20%20%7D)%3B%3Cbr%3E%0D%0A%20%20%20%20%7D%3C%2Fb%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22CDN%22%2C%20%22definition%22%3B%20%22When%20you%20load%20the%20JQuery%20library%20into%20your%20page%2C%20rather%20than%20have%20the%20actual%20library%20sitting%20on%20your%20personal%20server%2C%20you'll%20refer%20to%20it%20using%20a%20CDN.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0ACDN%20stands%20for%20Content%20Development%20Network.%20It's%20a%20series%20of%20servers%20scattered%20around%20the%20world.%20When%20you%20use%20a%20URL%20such%20as%20this%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%26lt%3Bscript%20src%3D%22https%3A%2F%2Fajax.googleapis.com%2Fajax%2Flibs%2Fjquery%2F3.2.1%2Fjquery.min.js%22%26gt%3B%26lt%3B%2Fscript%26gt%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A...you're%20system%20is%20defaulting%20to%20the%20closest%20server%20in%20the%20network%20to%20access%20the%20JQuery%20library.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AClick%20%3Ca%20href%3D%22http%3A%2F%2Fwww.webopedia.com%2FTERM%2FC%2FCDN.html%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%20for%20more%20info.%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22Constructor%22%2C%20%22definition%22%3B%20%22A%20constructor%20is%20used%20to%20for%20initializing%20new%20objects.%20In%20really%20simplistic%20terms%2C%20it%20looks%20like%20this%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Afunction%20Account%20()%20%7B%3Cbr%3E%0D%0A%3Ci%3Eyour%20logic%3C%2Fi%3E%3Cbr%3E%0D%0A%7D%3Cbr%3E%3Cbr%3E%0D%0A%0D%0A%26%238203%3B%2F%2F%20This%20is%20the%20use%20of%20the%20Account%20constructor%20to%20create%20the%20userAccount%20object.%26%238203%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%26%238203%3Bvar%20userAccount%20%3D%20new%20Account%20()%3B%20%2F%2Fnotice%20the%20use%20of%20the%20word%20%22new%22%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22DOM%22%2C%20%22definition%22%3B%20%22DOM%20stands%20for%20%22Document%20Object%20Model.%22%20%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AIn%20an%20HTML%20document%2C%20you've%20got%20any%20one%20of%20number%20of%20elements%3B%20%26lt%3Bdiv%26gt%3B%2C%20%26lt%3Btr%26gt%3B%2C%20%26lt%3Bspan%26gt%3B%20etc.%20The%20way%20those%20things%20are%20represented%20and%20organized%20on%20a%20page%20is%20the%20%22Document%20Object%20Model.%22%20In%20JQuery%2C%20that's%20significant%20because%20you're%20usually%20interacting%20with%20specific%20elements%20within%20the%20DOM%20and%20it's%20because%20of%20the%20structure%20and%20organization%20of%20the%20DOM%20that%20JQuery%20can%20be%20so%20useful.%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22Function%20Expression%20vs%20Function%20Declaration%20and%20IIFE%22%2C%20%22definition%22%3B%20%22In%20JavaScript%2C%20there%20are%20two%20basic%20ways%20of%20invoking%20a%20function.%20The%20most%20common%20way%20is%20%22declaration...%22%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Afunction%20myFunction()%20%7B%20%3Ci%3Elogic%20here%3C%2Fi%3E%20%7D%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AThe%20other%20way%20to%20do%20is%20referred%20to%20as%20an%20%22expression%22%20where%20the%20function%20is%20part%20of%20a%20larger%20chunk%20of%20syntax.%20Like%20this%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Avar%20somethingSpecial%20%3D%20function()%20%7B%20%3Ci%3Elogic%20here%3C%2Fi%3E%20%7D%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AYou%20can%20also%20assign%20a%20function%20to%20a%20property%20(notice%20the%20placement%20of%20the%20curly%20braces)%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Avar%20myObject%20%3D%20%7B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%20%20%20%20%20myFunction%3A%20function)%20%7B%3Ci%3Elogic%20here%3C%2Fi%3E%20%7D%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%7D%3Cbr%3E%3Cbr%3E%0D%0A%0D%0ARegardless%20if%20you're%20using%20the%20Definition%20or%20the%20Expression%20approach%2C%20in%20both%20instances%20you're%20having%20to%20instantiate%20it%20with%20a%20var%20or%20some%20kind%20of%20systemic%20step.%20%3Cbr%3E%3Cbr%3E%0D%0A%0D%0AWith%20IIFE%20(Immediately%20Invoked%20Function%20Expressions)%2C%20you're%20%22immediately%22%20invoking%20the%20functionality.%20So%2C%20just%20as%20soon%20as%20the%20page%20is%20accessed%2C%20BOOM!%20All%20that%20code%20kicks%20on%20and%20you're%20up%20and%20running.%20%0D%0A%0D%0AThe%20big%20thing%2C%20however%2C%20is%20that%20with%20IIFE%20you're%20able%20to%20isolate%20your%20code%20in%20a%20way%20where%20you%20can%20use%20%22var%22%20throughout%20and%20not%20worry%20about%20how%20%22var%22%20is%20used%20in%20other%20sections%20of%20your%20app%20causing%20name%20collisions.%0D%0A%0D%0AThe%20code%20you%20would%20use%20for%20that%20would%20look%20like%20this%3A%0D%0A%0D%0A(function()%20%7B%0D%0A%0D%0A%3Ci%3Elogic%20here%3C%2Fi%3E%0D%0A%0D%0A%7D)()%3B%0D%0A%0D%0AClick%20%3Ca%20href%3D%22http%3A%2F%2Fadripofjavascript.com%2Fblog%2Fdrips%2Fan-introduction-to-iffes-immediately-invoked-function-expressions.html%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%20for%20more%20information.%20And%20here's%20another%20%3Ca%20href%3D%22https%3A%2F%2Fjavascriptweblog.wordpress.com%2F2010%2F07%2F06%2Ffunction-declarations-vs-function-expressions%2F%22%20target%3D%22_blank%22%3Elink%3C%2Fa%3E%20as%20well...%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22IIFE%22%2C%20%22definition%22%3B%20%22IIFE%20stands%20for%20%22Immediately%20Invoked%20Function%20Expression.%20It's%20an%20anonymous%20function%20(no%20name%20attached%20to%20it)%20that%20is%20wrapped%20inside%20of%20a%20set%20of%20parentheses%20and%20called%20(invoked)%20immediately.%20This%20is%20some%20of%20the%20foundational%20logic%20that%20the%20Boilerplate%20dynamic%20is%20built%20upon.%20%0D%0A%0D%0AFor%20more%20info%2C%20click%20%3Ca%20href%3D%22http%3A%2F%2Fgregfranko.com%2Fblog%2Fi-love-my-iife%2F%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E.%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22JQuery%22%2C%20%22definition%22%3B%20%22Jquery%20is%20a%20library%20of%20JavaScript.%20What%20would%20otherwise%20represent%20mountains%20of%20code%20is%20now%20simply%20referred%20to%20in%20the%20context%20of%20JQuery%20functions.%20%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AYou'll%20load%20the%20JQuery%20library%20in%20your%20header%20like%20this%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%26lt%3Bscript%20src%3D%22jquery-3.2.1.min.js%22%26gt%3B%26lt%3B%2Fscript%26gt%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0ANow%2C%20you've%20got%20access%20to%20all%20kinds%20of%20functionality%20that%20would%20otherwise%20require%20thousands%20of%20lines%20of%20code.%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22min%22%2C%20%22definition%22%3B%20%22%26quot%3Bmin%26quot%3B%20stands%20for%20%26quot%3Bminify.%26quot%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AThe%20Jquery%20library%20with%20all%20of%20the%20expected%20white%20space%20and%20line%20breaks%20equates%20to%20a%20pretty%20big%20file.%20%22min%22%20removes%20all%20of%20the%20white%20space.%20It's%20really%20hard%20to%20read%2C%20but%20it%20takes%20up%20less%20room.%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22Object%22%2C%20%22definition%22%3B%20%22A%20JQuery%20object%20is%20a%20var%2C%20but%20a%20whole%20lot%20more.%20%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AFor%20example%2C%20if%20you%20have%203%20TEXTAREA%20elements%20on%20the%20page%20and%20you%20do%20this%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Avar%20j%20%3D%20%24('textarea')%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Athen%20this%20j%20jQuery%20object%20will%20contain%20these%20properties%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A0%20-%20reference%20to%20the%20first%20TEXTAREA%20element%3Cbr%3E%0D%0A1%20-%20reference%20to%20the%20second%20TEXTAREA%20element%3Cbr%3E%0D%0A2%20-%20reference%20to%20the%20third%20TEXTAREA%20element%3Cbr%3E%0D%0Alength%20-%20which%20is%203%3Cbr%3E%0D%0Acontext%20-%20reference%20to%20the%20document%20object%3Cbr%3E%0D%0Aselector%20-%20which%20is%20'textarea%3Cbr%3E'%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22Plugin%22%2C%20%22definition%22%3B%20%22A%20plugin%20is%20a%20piece%20of%20JQuery%20code%20that%20does%20something%20cool.%20There's%20a%20whole%20registry%20of%20them%20that%20you%20can%20access%20but%20sometimes%20you%20want%20to%20create%20your%20own%20plugin%20in%20that%20you're%20able%20to%20create%20a%20piece%20of%20functionality%20once%20and%20then%20use%20it%20repeatedly%20without%20having%20to%20rewrite%20it%20every%20time.%20%0D%0A%3Cbr%3E%3Cbr%3E%0D%0ALet's%20say%20we%20want%20to%20create%20a%20plugin%20that%20makes%20text%20within%20a%20set%20of%20retrieved%20elements%20green.%20All%20we%20have%20to%20do%20is%20add%20a%20function%20called%20greenify%20to%20%24.fn%20and%20it%20will%20be%20available%20just%20like%20any%20other%20jQuery%20object%20method.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%24.fn.greenify%20%3D%20function()%20%7B%3Cbr%3E%0D%0A%20%20%20%20this.css(%20%22color%22%2C%20%22green%22%20)%3B%3Cbr%3E%0D%0A%7D%3B%3Cbr%3E%3Cbr%3E%0D%0A%20%0D%0A%24(%20%22a%22%20).greenify()%3B%20%2F%2F%20Makes%20all%20the%20links%20green.%3Cbr%3E%3Cbr%3E%0D%0A%0D%0ACool!%20Click%20%3Ca%20href%3D%22https%3A%2F%2Flearn.jquery.com%2Fplugins%2Fbasic-plugin-creation%2F%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%20for%20more%20info.%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22Property%22%2C%20%22definition%22%3B%20%22A%20Property%20is%20a%20variable%20defined%20within%20a%20function.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AClick%20%3Ca%20href%3D%22https%3A%2F%2Fwww.w3schools.com%2Fjs%2Fjs_properties.asp%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%20for%20more%20detailed%20info.%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22Scope%22%2C%20%22definition%22%3B%20%22%3Ci%3EScope%3C%2Fi%3E%20in%20JavaScript%20is%20similar%20to%20%22visibility%22%20in%20OOP%20in%20that%20it%20refers%20to%20accessibility%20within%20your%20app.%20%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%3Cu%3EGlobal%3C%2Fu%3E%20means%20that%20whatever%20it%20is%20that%20you're%20creating%20or%20defining%20is%20available%20and%20accessible%20anywhere%2C%20anytime%20throughout%20your%20entire%20application.%20An%20example%20would%20be%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%2F%2F%20global%20scope%3Cbr%3E%0D%0Avar%20name%20%3D%20'Todd'%3B%3Cbr%3E%3Cbr%3E%0D%0A%0D%0A%3Cu%3ELocal%3C%2Fu%3E%20means%20that%20the%20entity%20in%20question%20is%20available%20only%20within%20the%20function%20it%20was%20created%20in.%20Like%20this%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%2F%2Fglobal%20scope%20out%20here...%3Cbr%3E%3Cbr%3E%0D%0A%0D%0Avar%20myFunction%20%3D%20function%20()%20%7B%3Cbr%3E%0D%0A%2F%2Flocal%20scope%20in%20here%3Cbr%3E%0D%0A%20%20var%20name%20%3D%20'Todd'%3B%3Cbr%3E%0D%0A%20%20console.log(name)%3B%20%2F%2F%20Todd%3Cbr%3E%0D%0A%7D%3B%3Cbr%3E%3Cbr%3E%0D%0A%0D%0A%2F%2F%20Uncaught%20ReferenceError%3A%20name%20is%20not%20defined%20because%20you're%20referring%20to%20a%20var%20that%20is%20%22local%22%20in%20scope%0D%0Aconsole.log(name)%3B%0D%0A%0D%0AFor%20more%20info%2C%20click%20%3Ca%20href%3D%22https%3A%2F%2Ftoddmotto.com%2Feverything-you-wanted-to-know-about-javascript-scope%2F%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22Selector%22%2C%20%22definition%22%3B%20%22A%20Selector%20in%20JQuery%20is%20what%20you're%20using%20systemically%20to%20grab%20a%20particular%20element%20within%20the%20DOM%2C%20like%20a%20%3Cdiv%3E%20or%20a%20specific%20field%20that%20has%20a%20unique%20id.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0ALike%20this%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Avar%20theDiv%20%3D%20%24(%22%23theDiv%22)%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0ANow%2C%20remember%2C%20%22theDiv%22%20is%20a%20JQuery%20object%20which%20is%20very%20cool%20in%20that%20it's%20more%20than%20just%20a%20variable.%20It%20has%20properties%20and%20other%20systemic%20features%20that%20can%20be%20very%20cool%20when%20it%20comes%20to%20programming.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AClick%20%3Ca%20href%3D%22http%3A%2F%2Ftutorials.jenkov.com%2Fjquery%2Fselectors.html%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%20for%20more%20info.%22%7D%2C%20%7B%22disicpline%22%3A%20%22JQuery%22%2C%20%22term%22%3A%20%22use%20strict%22%2C%20%22definition%22%3B%20%22%22use%20strict%22%20is%20a%20piece%20of%20code%20that%20tells%20the%20system%20not%20to%20be%20sloppy%20in%20the%20way%20it%20processes%20your%20code.%20In%20this%20way%2C%20you're%20able%20to%20avoid%20some%20errors%20that%20might%20otherwise%20occur%20if%20the%20system%20is%20being%20too%20forgiving.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AStrict%20mode%20makes%20it%20easier%20to%20write%20%22secure%22%20JavaScript.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AStrict%20mode%20changes%20previously%20accepted%20%22bad%20syntax%22%20into%20real%20errors.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AAs%20an%20example%2C%20in%20normal%20JavaScript%2C%20mistyping%20a%20variable%20name%20creates%20a%20new%20global%20variable.%20In%20strict%20mode%2C%20this%20will%20throw%20an%20error%2C%20making%20it%20impossible%20to%20accidentally%20create%20a%20global%20variable.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AIn%20normal%20JavaScript%2C%20a%20developer%20will%20not%20receive%20any%20error%20feedback%20assigning%20values%20to%20non-writable%20properties.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AIn%20strict%20mode%2C%20any%20assignment%20to%20a%20non-writable%20property%2C%20a%20getter-only%20property%2C%20a%20non-existing%20property%2C%20a%20non-existing%20variable%2C%20or%20a%20non-existing%20object%2C%20will%20throw%20an%20error.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AClick%20%3Ca%20hrer%3D%22https%3A%2F%2Fwww.w3schools.com%2Fjs%2Fjs_strict.asp%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%20for%20more%20info.%22%7D%2C%20%7B%22disicpline%22%3A%20%22Laravel%22%2C%20%22term%22%3A%20%22Installation%22%2C%20%22definition%22%3B%20%22definition%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22API%22%2C%20%22definition%22%3B%20%22%22Application%20Programming%20Interface.%22%20A%20fancy%20term%20to%20describe%20all%20of%20the%20builiding%20blocks%20that%20combine%20to%20form%20a%20computer%20program%20of%20some%20sort.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%0D%0A%3Cdiv%20class%3D%22quote%22%3EIn%20computer%20programming%2C%20an%20application%20programming%20interface%20(API)%20is%20a%20set%20of%20subroutine%20definitions%2C%20protocols%2C%20and%20tools%20for%20building%20application%20software.%20In%20general%20terms%2C%20it's%20a%20set%20of%20clearly%20defined%20methods%20of%20communication%20between%20various%20software%20components.%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20What%20makes%20API%20such%20an%20advantage%20is%20the%20way%20it%20serves%20as%20a%20%22one%20stop%20shop%22%20for%20your%20business%20logic%20so%20you're%20not%20having%20to%20reinvent%20the%20wheel%20for%20every%20browser%2C%20OS%20etc.%3C%2Fdiv%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22double%22%2C%20%22definition%22%3B%20%22%3Cem%3Edouble%3C%2Fem%3E%20refers%20to%20numbers%20with%20decimal%20points.%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22floating%20point%22%2C%20%22definition%22%3B%20%22Numbers%20in%20the%20computer%20world%20are%20stored%20as%20Binary%20values.%20In%20Binary%20(1's%20and%200's)%2C%20you've%20got%20a%20decimal%20point%20that%20%22floats.%22%20It's%20not%20like%20your%20typical%20decimal%20point%20in%20the%20way%20it%20affects%20the%26nbsp%3Bprecision%20of%20the%20number.%20Rather%2C%20it's%20defining%20the%20number%20itself.%3Cbr%20%2F%3E%3Cbr%20%2F%3EFor%20example%2C%20the%20number%20%224%22%20could%20potentially%20look%20like%20this%20as%20a%20Binary%20value%3A%200000101100.%20The%20placement%20of%20a%20decimal%20point%20affects%20the%20value%20of%20that%20number%20in%20whole%20integers.%20Compare%20that%20to%20a%20regular%20decimal%20point%20where%20you're%20reflecting%20precision.%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22HTTP%22%2C%20%22definition%22%3B%20%22Hypertext%20Transport%20Protocol.%20This%20is%20the%20set%20of%20rules%20and%20protocols%20the%20web%20uses%20to%20transport%20information%20over%20the%20web.%3Cbr%20%2F%3E%3Cbr%20%2F%3E%0D%0A%3Cdiv%20class%3D%22quote%22%3EHTTP%20(Hypertext%20Transfer%20Protocol)%20is%20the%20set%20of%20rules%20for%20transferring%20files%20(text%2C%20graphic%20images%2C%20sound%2C%20video%2C%20and%20other%20multimedia%20files)%20on%20the%20World%20Wide%20Web.%20As%20soon%20as%20a%20Web%20user%20opens%20their%20Web%20browser%2C%20the%20user%20is%20indirectly%20making%20use%20of%20HTTP.%20HTTP%20is%20an%20application%20protocol%20that%20runs%20on%20top%20of%20the%20TCP%2FIP%20suite%20of%20protocols%20(the%20foundation%20protocols%20for%20the%20Internet)%20(%3Ca%20href%3D%22http%3A%2F%2Fsearchwindevelopment.techtarget.com%2Fdefinition%2FHTTP%22%20target%3D%22_blank%22%3Etechtarget%3C%2Fa%3E).%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20Basically%2C%20you're%20looking%20at%20a%20hierarchy%20of%20digital%20platforms%20that%20combine%20to%20provide%20a%20web%20based%20experience.%20It%20looks%20like%20this%3A%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%0D%0A%3Cdiv%20style%3D%22text-align%3A%20center%3B%22%3ETCP%20%2F%20IP%20(%3Ca%20href%3D%22http%3A%2F%2Fsearchnetworking.techtarget.com%2Fdefinition%2FTCP-IP%22%20target%3D%22_blank%22%3ETransport%20Control%20Protocol%20%2F%20Internet%20Protocol%3C%2Fa%3E)%20-%26gt%3B%20HTTP%20-%26gt%3B%20HTML%3C%2Fdiv%3E%0D%0A%3C%2Fdiv%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22JSON%22%2C%20%22definition%22%3B%20%22Javascript%20Object%20Notation.%20It's%20Javascript's%20way%20of%20packaging%20data...%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%0D%0A%3Cdiv%20class%3D%22quote%22%3EJSON%20(JavaScript%20Object%20Notation)%20is%20a%20lightweight%20data-interchange%20format.%20It%20is%20easy%20for%20humans%20to%20read%20and%20write.%20It%20is%20easy%20for%20machines%20to%20parse%20and%20generate.%20It%20is%20based%20on%20a%20subset%20of%20the%20JavaScript%20Programming%20Language%2C%20Standard%20ECMA-262%203rd%20Edition%20-%20December%201999.%20JSON%20is%20a%20text%20format%20that%20is%20completely%20language%20independent%20but%20uses%20conventions%20that%20are%20familiar%20to%20programmers%20of%20the%20C-family%20of%20languages%2C%20including%20C%2C%20C%2B%2B%2C%20C%23%2C%20Java%2C%20JavaScript%2C%20Perl%2C%20Python%2C%20and%20many%20others.%20These%20properties%20make%20JSON%20an%20ideal%20data-interchange%20language.%20(%3Ca%20href%3D%22http%3A%2F%2Fjson.org%22%20target%3D%22_blank%22%3EJSON.org%3C%2Fa%3E)%3C%2Fdiv%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22LAMBA%22%2C%20%22definition%22%3B%20%22This%20is%26nbsp%3Bsomething%20you'll%20encounter%20from%20time%20to%20time%20as%20part%20of%20the%20%22app.run%22%20portion%20of%20the%20Configure%20Construct%20in%20your%20Startup%20Class.%20%3Ca%20href%3D%22https%3A%2F%2Fwww.codeproject.com%2Ftips%2F298963%2Funderstand-lambda-expressions-in-minutes%22%20target%3D%22_blank%22%3ECode%20Project%3C%2Fa%3E%20defines%20it%20like%20this%3A%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%0D%0A%3Cdiv%20class%3D%22quote%22%3EA%20lambda%20expression%20is%20an%20anonymous%20function%20and%20it%20is%20mostly%20used%20to%20create%20delegates%20in%20LINQ.%20Simply%20put%2C%20it's%20a%20method%20without%20a%20declaration%2C%20i.e.%2C%20access%20modifier%2C%20return%20value%20declaration%2C%20and%20name.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20Convenience.%20It's%20a%20shorthand%20that%20allows%20you%20to%20write%20a%20method%20in%20the%20same%20place%20you%20are%20going%20to%20use%20it.%20Especially%20useful%20in%20places%20where%20a%20method%20is%20being%20used%20only%20once%2C%20and%20the%20method%20definition%20is%20short.%20It%20saves%20you%20the%20effort%20of%20declaring%20and%20writing%20a%20separate%20method%20to%20the%20containing%20class.%3C%2Fdiv%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22LINQ%22%2C%20%22definition%22%3B%20%22LINQ%20(Language%20Integrated%20Query)%20is%20a%20Microsoft%20programming%20model%20and%20methodology%20that%20essentially%20adds%20formal%20query%20capabilities%20into%20Microsoft%20.NET-based%20programming%20languages.%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22Object%22%2C%20%22definition%22%3B%20%22An%20Object%20is%20an%20Instance%20of%20a%20Class.%20Here's%20the%20hierarchy%3A%3Cbr%20%2F%3E%3Cbr%20%2F%3EClass%20-%26gt%3B%20Instance%20-%26gt%3B%20Object%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cstrong%3EClass%3C%2Fstrong%3E%20-%20a%20mountain%20of%20functionality%20that%20is%20off%20stage.%3Cbr%20%2F%3E%3Cstrong%3EInstance%3C%2Fstrong%3E%20-%20creating%20a%20digital%20placeholder%20for%20that%20%22mountain%20of%20functionality%22%20that%20equates%20to%20me%20bringing%20all%20of%20that%20on%20to%20the%20stage.%3Cbr%20%2F%3E%3Cstrong%3EObject%3C%2Fstrong%3E%20-%20engaging%20that%20%22mountain%20of%20functionality%22%20in%20a%20way%20that%20translates%20to%20an%20actual%20task%20or%20value.%3Cbr%20%2F%3E%3Cbr%20%2F%3EYou'll%20often%20see%20%22Instance%22%20and%20%22Object%22%20used%20interchangably.%20That's%20not%20a%20criminal%20thing%20to%20do%20but%20be%20aware%20of%20how%20%22object%22%20refers%20to%20a%20unique%20%22instance%22%20of%20a%20class%20because%20of%20the%20way%20an%20object%20has%20a%20the%20functionality%20in%20that%20Class%20actually%20%3Cspan%20style%3D%22text-decoration%3A%20underline%3B%22%3Edoing%3C%2Fspan%3E%26nbsp%3Bsomething.%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22REST%22%2C%20%22definition%22%3B%20%22This%20is%20similiar%20to%20the%20protocol%20that%20you%20see%20in%20apps%20such%20as%20Code%20Igniter.%20The%20URL%20of%20the%20site%20isn't%20your%20typical%20%22.htm%22%20or%20%22.php.%22%20Rather%2C%20it's%20a%20cue%20represented%20by%20some%20text%20that%20tells%20your%20program%20what%20to%20do.%20You%20see%20this%20a%20lot%20with%20the%20.NET%20architecture%20you're%20using.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%0D%0A%3Cdiv%20class%3D%22quote%22%3EREST%20stands%20for%20%22Representational%20State%20Transfer%22%20and%20it%20is%20an%20architectural%20pattern%20for%20creating%20an%20API%20that%20uses%20HTTP%20as%20its%20underlying%20communication%20method.%20REST%20was%20originally%20conceived%20by%20Roy%20Fielding%20in%20his%202000%20dissertation%20paper%20entitled%20%22Architectural%20Styles%20and%20the%20Design%20of%20Network-based%20Software%20Architectures%22%2C%20chapter%205%20cover%20REST%20specifically%3A%20http%3A%2F%2Fwww.ics.uci.edu%2F~fielding%2Fpubs%2Fdissertation%2Frest_arch_style.htm%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20Almost%20every%20device%20that%20is%20connected%20to%20the%20internet%20already%20uses%20HTTP%3B%20it%20is%20the%20base%20protocol%20that%20the%20internet%20is%20built%20on%20which%20is%20why%20it%20makes%20such%20a%20great%20platform%20for%20an%20API.%20(%3Ca%20href%3D%22https%3A%2F%2Fblogs.msdn.microsoft.com%2Fmartinkearn%2F2015%2F01%2F05%2Fintroduction-to-rest-and-net-web-api%2F%22%20target%3D%22_blank%22%3Emicrosoft.com%3C%2Fa%3E)%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20You%20can%20see%20this%20referenced%20as%20one%20of%20several%20options%20a%20Microsoft%20Developer%20meight%20consider%2C%20as%20far%20as%20the%20infrastructure%20they%20would%20build%20atop%20the%20%3Ca%20href%3D%22%23soap%22%3ESOAP%3C%2Fa%3E%20philosophical%20foundation.%3C%2Fdiv%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22Service%20Layer%22%2C%20%22definition%22%3B%20%22%3Ca%20href%3D%22images%2Fservice_layer.jpg%22%20target%3D%22_blank%22%3E%3Cimg%20style%3D%22float%3A%20right%3B%22%20src%3D%22images%2Fservice_layer.jpg%22%20alt%3D%22%22%20width%3D%22192%22%20height%3D%22205%22%20border%3D%220%22%20%2F%3E%3C%2Fa%3EThe%20%22layer%22%20that%20exists%20between%20the%20client%20and%20the%20data%20that%20client%20is%20interacting%20with%20in%20the%20context%20of%20their%20visit%20to%20your%20website.%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22SOAP%22%2C%20%22definition%22%3B%20%22Simple%20Object%20Access%20Protocol.%20Bottom%20line%3A%20This%20allows%20different%20computer%20langu%3Ca%20href%3D%22images%2Fapi_why.jpg%22%20target%3D%22_blank%22%3E%3Cimg%20style%3D%22float%3A%20right%3B%22%20src%3D%22images%2Fapi_why.jpg%22%20alt%3D%22%22%20width%3D%22368%22%20height%3D%22251%22%20border%3D%220%22%20%2F%3E%3C%2Fa%3Eages%20and%20platforms%20to%20%22talk%22%20with%20one%20another...%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%0D%0A%3Cdiv%20class%3D%22quote%22%3ESOAP%20(Simple%20Object%20Access%20Protocol)%20is%20a%20messaging%20protocol%20that%20allows%20programs%20that%20run%20on%20disparate%20operating%20systems%20(such%20as%20Windows%20and%20Linux)%20to%20communicate%20using%20Hypertext%20Transfer%20Protocol%20(HTTP)%20and%20its%20Extensible%20Markup%20Language%20(XML).%20Since%20Web%20protocols%20are%20installed%20and%20available%20for%20use%20by%20all%20major%20operating%20system%20platforms%2C%20HTTP%20and%20XML%20provide%20an%20at-hand%20solution%20that%20allows%20programs%20running%20under%20different%20operating%20systems%20in%20a%20network%20to%20communicate%20with%20each%20other.%20SOAP%20specifies%20exactly%20how%20to%20encode%20an%20HTTP%20header%20and%20an%20XML%20file%20so%20that%20a%20program%20in%20one%20computer%20can%20call%20a%20program%20in%20another%20computer%20and%20pass%20along%20information.%20SOAP%20also%20specifies%20how%20the%20called%20program%20can%20return%20a%20response.%20Despite%20its%20frequent%20pairing%20with%20HTTP%2C%20SOAP%20supports%20other%20transport%20protocols%20as%20well.%20(%3Ca%20href%3D%22http%3A%2F%2Fsearchsoa.techtarget.com%2Fdefinition%2FSOAP%22%20target%3D%22_blank%22%3Etechtarget%3C%2Fa%3E)%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3C%2Fdiv%3E%0D%0ASOAP%20is%20the%20foundation%20upon%20which%20various%20Microsoft%20web%20paradigms%20have%20been%20built.%20All%20of%20them%20seek%20to%20streamline%20syntax%20as%20much%20as%20possible%20while%20simultaneously%20providing%20a%20universal%20way%20to%20communicate%20data%2C%20text%20and%20graphics%20to%20different%20operating%20systems.%20Among%20those%20platforms%20you%20have%20the%20following%3A%0D%0A%3Cul%3E%0D%0A%3Cli%3EWeb%20Service%0D%0A%3Cul%3E%0D%0A%3Cli%3EIt's%20based%20on%20SOAP%20and%20returns%20data%20in%20XML%20form.%3C%2Fli%3E%0D%0A%3Cli%3EIt%20supports%20only%20HTTP%20protocol.%3C%2Fli%3E%0D%0A%3Cli%3EIt%20is%20not%20open%20source%20but%20can%20be%20consumed%20by%20any%20client%20that%20understands%20xml.%3C%2Fli%3E%0D%0A%3Cli%3EIt%20can%20be%20hosted%20only%20on%20IIS.%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0A%3C%2Fli%3E%0D%0A%3Cli%3E%3Cimg%20style%3D%22float%3A%20right%3B%22%20src%3D%22images%2Fapi_because.jpg%22%20alt%3D%22%22%20width%3D%22342%22%20height%3D%22144%22%20%2F%3EWCF%0D%0A%3Cul%3E%0D%0A%3Cli%3EIt%20is%20also%20based%20on%20SOAP%20and%20returns%20data%20in%20XML%20form.%3C%2Fli%3E%0D%0A%3Cli%3EIt%20is%20the%20evolution%20of%20the%20web%20service(ASMX)%20and%20supports%20various%20protocols%20like%20TCP%2C%20HTTP%2C%20HTTPS%2C%20Named%20Pipes%2C%20MSMQ.%3C%2Fli%3E%0D%0A%3Cli%3EThe%20main%20issue%20with%20WCF%20is%20it's%20tedious%20and%20extensive%20configuration.%3C%2Fli%3E%0D%0A%3Cli%3EIt%20is%20not%20open%20source%20but%20can%20be%20consumed%20by%20any%20client%20that%20understands%20xml.%3C%2Fli%3E%0D%0A%3Cli%3EIt%20can%20be%20hosted%20with%20in%20the%20applicaion%20or%20on%20IIS%20or%20using%20window%20service.%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0A%3C%2Fli%3E%0D%0A%3Cli%3EWCF%20Rest%0D%0A%3Cul%3E%0D%0A%3Cli%3ETo%20use%20WCF%20as%20WCF%20Rest%20service%20you%20have%20to%20enable%20webHttpBindings.%3C%2Fli%3E%0D%0A%3Cli%3EIt%20support%20HTTP%20GET%20and%20POST%20verbs%20by%20%5BWebGet%5D%20and%20%5BWebInvoke%5D%20attributes%20respectively.%3C%2Fli%3E%0D%0A%3Cli%3ETo%20enable%20other%20HTTP%20verbs%20you%20have%20to%20do%20some%20configuration%20in%20IIS%20to%20accept%20request%20of%20that%20particular%20verb%20on%20.svc%20files%3C%2Fli%3E%0D%0A%3Cli%3EPassing%20data%20through%20parameters%20using%20a%20WebGet%20needs%20configuration.%20The%20UriTemplate%20must%20be%20specified%3C%2Fli%3E%0D%0A%3Cli%3EIt%20support%20XML%2C%20JSON%20and%20ATOM%20data%20format.%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0A%3C%2Fli%3E%0D%0A%3Cli%3EWeb%20API%0D%0A%3Cul%3E%0D%0A%3Cli%3EThis%20is%20the%20new%20framework%20for%20building%20HTTP%20services%20with%20easy%20and%20simple%20way.%3C%2Fli%3E%0D%0A%3Cli%3EWeb%20API%20is%20open%20source%20an%20ideal%20platform%20for%20building%20REST-ful%20services%20over%20the%20.NET%20Framework.%3C%2Fli%3E%0D%0A%3Cli%3EUnlike%20WCF%20Rest%20service%2C%20it%20use%20the%20full%20featues%20of%20HTTP%20(like%20URIs%2C%20request%2Fresponse%20headers%2C%20caching%2C%20versioning%2C%20various%20content%20formats)%3C%2Fli%3E%0D%0A%3Cli%3EIt%20also%20supports%20the%20MVC%20features%20such%20as%20routing%2C%20controllers%2C%20action%20results%2C%20filter%2C%20model%20binders%2C%20IOC%20container%20or%20dependency%20injection%2C%20unit%20testing%20-%20all%20of%20which%20makes%20it%20more%20simple%20and%20robust.%3C%2Fli%3E%0D%0A%3Cli%3EIt%20can%20be%20hosted%20with%20in%20the%20application%20or%20on%20IIS.%3C%2Fli%3E%0D%0A%3Cli%3EIt%20has%20a%20lightweight%20architecture%20and%20is%20good%20for%20devices%20which%20have%20limited%20bandwidth%20like%20smart%20phones.%3C%2Fli%3E%0D%0A%3Cli%3EResponses%20are%20formatted%20by%20Web%20API's%20MediaTypeFormatter%20into%20JSON%2C%20XML%20or%20whatever%20format%20you%20want%20to%20add%20as%20a%20MediaTypeFormatter.%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0A%3C%2Fli%3E%0D%0A%3C%2Ful%3E%0D%0AWhen%20to%20choose%20either%20WCF%20or%20WEB%20API%0D%0A%3Cul%3E%0D%0A%3Cli%3EChoose%20WCF%20when%20you%20want%20to%20create%20a%20service%20that%20should%20support%20special%20scenarios%20such%20as%20one%20way%20messaging%2C%20message%20queues%2C%20duplex%20communication%20etc.%3C%2Fli%3E%0D%0A%3Cli%3EChoose%20WCF%20when%20you%20want%20to%20create%20a%20service%20that%20can%20use%20fast%20transport%20channels%20when%20available%2C%20such%20as%20TCP%2C%20Named%20Pipes%2C%20or%20maybe%20even%20UDP%20(in%20WCF%204.5)%2C%20and%20you%20also%20want%20to%20support%20HTTP%20when%20all%20other%20transport%20channels%20are%20unavailable.%3C%2Fli%3E%0D%0A%3Cli%3EChoose%20Web%20API%20when%20you%20want%20to%20create%20a%20resource-oriented%20services%20over%20HTTP%20that%20can%20use%20the%20full%20features%20of%20HTTP%20(like%20URIs%2C%20request%2Fresponse%20headers%2C%20caching%2C%20versioning%2C%20various%20content%20formats).%3C%2Fli%3E%0D%0A%3Cli%3EChoose%20Web%20API%20when%20you%20want%20to%20expose%20your%20service%20to%20a%20broad%20range%20of%20clients%20including%20browsers%2C%20mobiles%2C%20iphone%20and%20tablets.%20(%3Ca%20href%3D%22http%3A%2F%2Fwww.dotnettricks.com%2Flearn%2Fwebapi%2Fdifference-between-wcf-and-web-api-and-wcf-rest-and-web-service%22%20target%3D%22_blank%22%3Edotnettricks%3C%2Fa%3E)%3C%2Fli%3E%0D%0A%3C%2Ful%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22WCF%22%2C%20%22definition%22%3B%20%22One%20of%20several%20platforms%20that%20Microsoft%20offers%20that's%20built%20upon%20the%20SOAP%20philosophical%20foundation.%20See%20the%20%22%3Ca%20href%3D%22%23soap%22%3ESOAP%3C%2Fa%3E%22%20link%20at%20the%20top%20of%20this%20page.%22%7D%2C%20%7B%22disicpline%22%3A%20%22NET%22%2C%20%22term%22%3A%20%22XML%22%2C%20%22definition%22%3B%20%22Extensible%20Markup%20Language.%20%22Extensible%22%20means%2C%20%22capable%20of%20being%20extended.%22%20To%20understand%20XML%2C%20you've%20got%20to%20go%20back%20to%20HTML%20and%20unpack%20what%20HTML%20stands%20for.%20%22HTML%20stands%20for%20%22Hypertext%20Markup%20Language.%22%20%22Markup%20Language%22%20refers%20to%20a%20series%20of%20symbols%20or%20characters%20that%20are%20inserted%20in%20the%20context%20of%20a%20website%20or%20a%20Word%20Processing%20program%20that%20programmatically%20dictate%20how%20that%20text%20is%20to%20appear.%20%26lt%3Bstrong%26gt%3B%26lt%3B%26lt%3Bstrong%26gt%3B%2C%20for%20example%2C%20is%20inserted%20prior%20to%20a%20word%20to%20cue%20the%20system%20that%20it%20needs%20to%20display%20a%20text%20in%20bold.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20XML%20does%20the%20same%20kind%20of%20thing%20with%20data.%20And%20what%20makes%20that%20so%20useful%20is%20that%20it%20not%20only%20%22communicates%22%20data%2C%20it%20also%20communicates%20how%20that%20data%20is%20to%20be%20formatted...%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%0D%0A%3Cdiv%20class%3D%22quote%22%3EXML%20code%2C%20a%20formal%20recommendation%20from%20the%20World%20Wide%20Web%20Consortium%20(W3C)%2C%20is%20similar%20to%20Hypertext%20Markup%20Language%20(HTML).%20Both%20XML%20and%20HTML%20contain%20markup%20symbols%20to%20describe%20page%20or%20file%20contents.%20HTML%20code%20describes%20Web%20page%20content%20(mainly%20text%20and%20graphic%20images)%20only%20in%20terms%20of%20how%20it%20is%20to%20be%20displayed%20and%20interacted%20with.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20XML%20data%20is%20known%20as%20self-describing%20or%20self-defining%2C%20meaning%20that%20the%20structure%20of%20the%20data%20is%20embedded%20with%20the%20data%2C%20thus%20when%20the%20data%20arrives%20there%20is%20no%20need%20to%20pre-build%20the%20structure%20to%20store%20the%20data%3B%20it%20is%20dynamically%20understood%20within%20the%20XML.%20The%20XML%20format%20can%20be%20used%20by%20any%20individual%20or%20group%20of%20individuals%20or%20companies%20that%20want%20to%20share%20information%20in%20a%20consistent%20way.%20XML%20is%20actually%20a%20simpler%20and%20easier-to-use%20subset%20of%20the%20Standard%20Generalized%20Markup%20Language%20(SGML)%2C%20which%20is%20the%20standard%20to%20create%20a%20document%20structure.%20(%3Ca%20href%3D%22http%3A%2F%2Fsearchsoa.techtarget.com%2Fdefinition%2FXML%22%20target%3D%22_blank%22%3Etechtarget%3C%2Fa%3E)%3C%2Fdiv%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22Networking%22%2C%20%22term%22%3A%20%22file%3A%2F%2F%20scheme%22%2C%20%22definition%22%3B%20%22You%20have%20the%20option%20of%20using%20%22file%3A%2F%2F%22%20as%20opposed%20to%20%22http%3A%2F%2F%22%20in%20the%20context%20of%20your%20web%20address%20syntax%2C%20but%20you%20will%20generally%20use%20%22file%3A%2F%2F%22%20when%20you're%20retrieving%20files%20from%20your%20computer%20or%20drives%20that%20are%20mapped%20to%20your%20computer.%20In%20other%20words%2C%20you're%20not%20venturing%20out%20into%20the%20world%20wide%20web%20(www)%20to%20get%20your%20content.%0D%0A%0D%0AClick%20%3Ca%20href%3D%22https%3A%2F%2Fen.wikipedia.org%2Fwiki%2FFile_URI_scheme%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%20for%20more%20info.%22%7D%2C%20%7B%22disicpline%22%3A%20%22Networking%22%2C%20%22term%22%3A%20%22IP%20address%22%2C%20%22definition%22%3B%20%22%22IP%22%20stands%20for%20%22Internet%20Protocol.%22%20When%20you're%20talking%20about%20an%20%22IP%20address%2C%22%20you're%20referring%20to%20the%20numerical%20label%20that's%20put%20on%20every%20computer%20that's%20connected%20to%20a%20network.%20That%20could%20be%20a%20local%20network%20or%20it%20could%20be%20a%20server%20on%20the%20web.%20Everything%20has%20its%20own%20IP%20and%20that's%20what%20allows%20it%20to%20communicate%20and%20interact%20with%20other%20computers.%0D%0A%0D%0AClick%20%3Ca%20href%3D%22http%3A%2F%2Fwhatismyipaddress.com%2Fip-facts%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%20for%20more%20info.%22%7D%2C%20%7B%22disicpline%22%3A%20%22Networking%22%2C%20%22term%22%3A%20%22Permissions%22%2C%20%22definition%22%3B%20%22Every%20website%2C%20every%20computer%20%2F%20server%2C%20has%20%22permissions.%22%20Different%20users%20have%20different%20levels%20of%20accessibility%20and%20those%20are%20dictated%20by%20the%20network%20administrator.%20%0D%0A%0D%0A%3Ca%20href%3D%22https%3A%2F%2Fwww.digitalocean.com%2Fcommunity%2Fquestions%2Fproper-permissions-for-web-server-s-directory%22%20target%3D%22_blank%22%3EDigital%20Ocean%3C%2Fa%3E%20and%20%3Ca%20href%3D%22https%3A%2F%2Fsupport.microsoft.com%2Fen-us%2Fhelp%2F313075%2Fhow-to-configure-web-server-permissions-for-web-content-in-iis%22%20target%3D%22_blank%22%3EMicrosoft%3C%2Fa%3E%20has%20some%20good%20info%20on%20this%20topic.%22%7D%2C%20%7B%22disicpline%22%3A%20%22Networking%22%2C%20%22term%22%3A%20%22Ping%22%2C%20%22definition%22%3B%20%22When%20you're%20wanting%20to%20determine%20whether%20a%20particular%20IP%20address%20is%20valid%20and%20there's%20a%20legitimate%20presence%20on%20the%20other%20side%20of%20that%20value%2C%20you%20use%20%22ping.%22%0D%0A%0D%0AOpen%20up%20your%20command%20line%20interface%20and%20type%20in%20%22ping%20your%20web%20address.%22%20If%20it's%20a%20valid%20site%20%2F%20resource%2C%20you'll%20get%20a%20return%20%22package%22%20that%20qualifies%20it%20as%20legitimate.%20%0D%0A%0D%0AClick%20%3Ca%20href%3D%22http%3A%2F%2Fsmallbusiness.chron.com%2Fping-website-cmd-53939.html%22%20target%3D%22_blank%22%3Ehere%3C%2Fa%3E%20for%20more%20info.%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22Class%22%2C%20%22definition%22%3B%20%22Some%20use%20the%20illustration%20of%20a%20%22blueprint.%22%20Bottom%20line%3A%20It's%20a%20bunch%20of%20functionality%20that%20typically%20includes%20several%20methods%20as%20well%20as%20some%20other%20optional%20%22helps%22%20like%20Constructors%20and%20Properties%20etc.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3EI%20like%20to%20think%20of%20it%20as%20a%20mini-machine.%20It's%20represented%20by%20a%20greyed-out%20button%20that%20you%20have%20to%20activate%20in%20order%20for%20the%20machine%20to%20start%20running.%20You%20activate%20it%20by%20something%20called%20%22instantiation.%22%20At%20that%26nbsp%3Bpoint%2C%20the%20button%20is%20no%20longer%20greyed%20out%20and%20you%20can%20start%20taking%20advantage%20of%20whatever%20functionality%20it's%20bringing%20to%20the%20table!%3Cbr%20%2F%3E%3Cbr%20%2F%3EExamples%20of%20Classes%20are%20found%20thoughout%20the%20samples%20I've%20included%20below.%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22Constructor%22%2C%20%22definition%22%3B%20%22A%20Constructor%26nbsp%3Bassigns%20some%20values%26nbsp%3Bfor%20you%20automatically%20as%20soon%20as%20the%20Class%20is%20instantitated.%20So%2C%20by%20default%20you%20have%20some%26nbsp%3Bdata%20established%20that%20can%20be%20used%20by%20your%20Class%20or%20any%20%22children%2C%22%20should%20you%20position%20your%20Class%20to%20be%20something%20another%20Class%20might%20inherit.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3EYou'll%20need%20to%20set%20up%20some%20%22Properties%22%20first%20and%20then%20use%20your%20Constructor%20to%20assign%20values%20to%20those%20Properties.%3Cbr%20%2F%3E%3Cbr%20%2F%3EHere's%20an%20example%3A%0D%0A%3Cp%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3Eclass%20Spreadsheet%20%7B%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20public%20%24name%3B%20%3Cspan%20style%3D%22color%3A%20%23008000%3B%22%3E%2F%2Fhere's%20your%20property%3Cbr%20%2F%3E%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20function%20__construct()%20%7B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24this-%26gt%3Bname%3D%22Bruce%22%3B%20%3Cspan%20style%3D%22color%3A%20%23008000%3B%22%3E%2F%2Fhere's%20your%20constructor%20giving%20the%20value%20%22Bruce%22%20to%20your%20%22name%22%20property%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2Fspan%3E%20%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%26nbsp%3B%24this-%26gt%3Bname%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%3Cbr%20%2F%3E%7D%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%24new_spreadsheet%20%3D%20new%20Spreadsheet()%3B%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%23000000%3B%22%3EWhen%20you%20run%20this%20code%2C%20you'll%20get%20%22Bruce.%22%3C%2Fspan%3E%3C%2Fspan%3E%3C%2Fp%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22Encapsulation%22%2C%20%22definition%22%3B%20%22Encapsulation%20refers%20to%20the%20way%20in%20you%20systemically%20organize%20and%20protect%20data%20within%20a%20class%20so%20it's%20not%20accessible%20to%20anyone%20other%20than%20methods%20within%20the%20same%20class.%20In%20other%20words%2C%20it's%20how%20you%20keep%20your%20data%20and%20functionality%20in%20the%20yard%20so%20it%20doesn't%20go%20running%20all%20over%20the%20neighborhood.%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22Instance%22%2C%20%22definition%22%3B%20%22In%20order%20to%20bring%20the%20functionality%20represented%20by%20a%20Class%20to%20bear%2C%20you%20have%20to%20%22instantiate%22%20it.%20That%20is%2C%20you%20have%20to%20create%20a%20Instance%20of%20that%20Class.%20Once%20you%20do%20that%2C%20the%20%22greyed%20out%22%20button%20that%20was%20that%20Class%20is%20now%20an%20%22active%22%20button.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3EIt%20looks%20like%20this%3A%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3Eclass%20NewClass%20%7B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20public%20function%20something_wonderful()%20%7B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%20%22bring%20it%22%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%7D%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%24say_something%3Dnew%20NewClass%3B%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%23339966%3B%22%3E%2F%2Fthis%20is%20an%20%22Instance%22%20of%20the%20NewClass%20class%3C%2Fspan%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22JQuery%22%2C%20%22definition%22%3B%20%22bring%20it%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22MCRYPT_RIJNDAEL_128%22%2C%20%22definition%22%3B%20%22You%20would%20think%20that%20MCRYPT_RIJNDAEL_256%20specifies%20256-bit%20encryption%2C%20but%20that%20is%20wrong.%20The%20three%20choices%20specify%20the%20block-size%20to%20be%20used%20with%20Rijndael%20encryption.%20They%20say%20nothing%20about%20the%20key%20size%20(i.e.%20strength)%20of%20the%20encryption.%20%20(Read%20further%20to%20understand%20how%20the%20strength%20of%20the%20AES%20encryption%20is%20set.)%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%20The%20Rijndael%20encyrption%20algorithm%20is%20a%20block%20cipher.%20%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%3Cdiv%20style%3D%22border-radius%3A10pt%3B%20border%3A1px%20solid%20%23cccccc%3B%20width%3A600px%3B%20height%3Aauto%3B%20padding%3A10px%3B%20margin%3Aauto%3B%20box-shadow%3A10px%2010px%205px%20%23cccccc%3B%22%3EA%20%22cipher%22%20is%20a%20computer%20term%20that%20%20refers%20to%20an%20algorithm%20for%20performing%20encryption.%20A%20%22block%20cipher%22%20refers%20an%20algorithm%20that's%20performed%20on%20a%20fixed-length%20group%20of%20%22bits.%22)%3C%2Fdiv%3E%20%0D%0A%3Cbr%3E%0D%0A%20It%20operates%20on%20discrete%20blocks%20of%20data.%20%20Padding%20MUST%20be%20added%20such%20that%20the%20data%20to%20be%20encrypted%20has%20a%20length%20that%20is%20a%20multiple%20of%20the%20block%20size.%20(PHP%20pads%20with%20NULL%20bytes)%20Thus%2C%20if%20you%20specify%20MCRYPT_RIJNDAEL_256%2C%20your%20encrypted%20output%20will%20always%20be%20a%20multiple%20of%2032%20bytes%20(i.e.%20256%20bits).%20%20If%20you%20specify%20MCRYPT_RIJNDAEL_128%2C%20your%20encrypted%20output%20will%20always%20be%20a%20multiple%20of%2016%20bytes.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%3Cdiv%20style%3D%22border-radius%3A10pt%3B%20border%3A1px%20solid%20%23cccccc%3B%20width%3A600px%3B%20height%3Aauto%3B%20padding%3A10px%3B%20margin%3Aauto%3B%20box-shadow%3A10px%2010px%205px%20%23cccccc%3B%22%3EA%20%22bit%22%20is%20the%20smallest%20unit%20of%20information%20that%20a%20computer%20can%20store.%20A%20%22byte%22%20is%20a%20collection%20of%20bits.%3C%2Fdiv%3E%3C%2Fbr%3E%0D%0A%20%0D%0ANote%3A%20Strictly%20speaking%2C%20AES%20is%20not%20precisely%20Rijndael%20(although%20in%20practice%20they%20are%20used%20interchangeably)%20as%20Rijndael%20supports%20a%20larger%20range%20of%20block%20and%20key%20sizes%3B%20AES%20has%20a%20fixed%20block%20size%20of%20128%20bits%20and%20a%20key%20size%20of%20128%2C%20192%2C%20or%20256%20bits%2C%20whereas%20Rijndael%20can%20be%20specified%20with%20key%20and%20block%20sizes%20in%20any%20multiple%20of%2032%20bits%2C%20with%20a%20minimum%20of%20128%20bits%20and%20a%20maximum%20of%20256%20bits.%20In%20summary%3A%20If%20you%20want%20to%20be%20AES%20compliant%2C%20always%20choose%20MCRYPT_RIJNDAEL_128.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%3Cdiv%20style%3D%22border-radius%3A10pt%3B%20border%3A1px%20solid%20%23cccccc%3B%20width%3A600px%3B%20height%3Aauto%3B%20padding%3A10px%3B%20margin%3Aauto%3B%20box-shadow%3A10px%2010px%205px%20%23cccccc%3B%22%3EAES%20stands%20for%20%22%3Ca%20href%3D%22https%3A%2F%2Fwww.boxcryptor.com%2Fen%2Fencryption%2F%22%20target%3D%22_blank%22%3EAdvanced%20Encryption%20Standard%3C%2Fa%3E%22%20and%20is%20used%20by%20the%20NSA.%20You%20generally%20have%20two%20types%20of%20encryption%3A%20Aesymetric%20and%20Symetric.%20Aesymetric%20refers%20to%20the%20fact%20that%20you%20have%20both%20a%20public%20and%20a%20private%20key.%20Symetric%20is%20just%20one%20private%20key.%3C%2Fdiv%3E%3Cbr%3E%0D%0A%20%0D%0ASo%20the%20first%20step%20is%20to%20create%20the%20cipher%20object%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%24cipher%20%3D%20mcrypt_module_open(MCRYPT_RIJNDAEL_128%2C%20''%2C%20MCRYPT_MODE_CBC%2C%20'')%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AWe're%20using%20CBC%20mode%20(cipher-block%20chaining).%20%20Block%20cipher%20modes%20are%20detailed%20here%3A%20%3Ca%20href%3D%22http%3Aen.wikipedia.org%2Fwiki%2FBlock_cipher_modes_of_operation%22%20target%3D%22_blank%22%3Ehttp%3Aen.wikipedia.org%2Fwiki%2FBlock_cipher_modes_of_operation%3C%2Fa%3E%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%0D%0ACBC%20mode%20requires%20an%20initialization%20vector.%20%20The%20size%20of%20the%20IV%20(initializationvector)%20is%20always%20equal%20to%20the%20block-size.%20%20(It%20is%20NOT%20equal%20to%20the%20key%20size.)%20Given%20that%20our%20block%20size%20is%20128-bits%2C%20the%20IV%20is%20also%20128-bits%20(i.e.%2016%20bytes).%20Thus%2C%20for%20AES%20encryption%2C%20the%20IV%20is%20always%2016%20bytes%20regardless%20of%20the%20strength%20of%20encryption.%0D%0A%3Cbr%3E%3Cbr%3E%20%0D%0AHere's%20some%20PHP%20code%20to%20verify%20our%20IV%20size%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%24iv_size%20%3D%20mcrypt_enc_get_iv_size(%24cipher)%3B%3Cbr%3E%0D%0Aprintf(%22iv_size%20%3D%20%25dn%22%2C%24iv_size)%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AHow%20do%20you%20do%20256-bit%20AES%20encryption%20in%20PHP%20vs.%20128-bit%20AES%20encryption%3F%3F%3F%20The%20answer%20is%3A%20%20Give%20it%20a%20key%20that's%2032%20bytes%20long%20as%20opposed%20to%2016%20bytes%20long.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AFor%20example%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%24key256%20%3D%20'12345678901234561234567890123456'%3B%3Cbr%3E%0D%0A%24key128%20%3D%20'1234567890123456'%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AHere's%20our%20128-bit%20IV%20which%20is%20used%20for%20both%20256-bit%20and%20128-bit%20keys.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%24iv%20%3D%20%20'1234567890123456'%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Aprintf(%22iv%3A%20%25sn%22%2Cbin2hex(%24iv))%3B%3Cbr%3E%0D%0Aprintf(%22key256%3A%20%25sn%22%2Cbin2hex(%24key256))%3B%3Cbr%3E%0D%0Aprintf(%22key128%3A%20%25sn%22%2Cbin2hex(%24key128))%3B%3Cbr%3E%3Cbr%3E%0D%0A%0D%0AThis%20is%20the%20plain-text%20to%20be%20encrypted%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%24cleartext%20%3D%20'The%20quick%20brown%20fox%20jumped%20over%20the%20lazy%20dog'%3B%3Cbr%3E%0D%0Aprintf(%22plainText%3A%20%25snn%22%2C%24cleartext)%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0AThe%20mcrypt_generic_init%20function%20initializes%20the%20cipher%20by%20specifying%20both%20the%20key%20and%20the%20IV.%20The%20length%20of%20the%20key%20determines%20whether%20we're%20doing%20128-bit%2C%20192-bit%2C%20or%20256-bit%20encryption.%20Let's%20do%20256-bit%20encryption%20here%3A%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Aif%20(mcrypt_generic_init(%24cipher%2C%20%24key256%2C%20%24iv)%20!%3D%20-1)%3Cbr%3E%0D%0A%7B%3Cbr%3E%0D%0A%2F%2F%20PHP%20pads%20with%20NULL%20bytes%20if%20%24cleartext%20is%20not%20a%20multiple%20of%20the%20block%20size..%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%24cipherText%20%3D%20mcrypt_generic(%24cipher%2C%24cleartext%20)%3B%3Cbr%3E%0D%0Amcrypt_generic_deinit(%24cipher)%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0ADisplay%20the%20result%20in%20hex.%0D%0A%3Cbr%3E%3Cbr%3E%0D%0Aprintf(%22256-bit%20encrypted%20result%3An%25snn%22%2Cbin2hex(%24cipherText))%3B%3Cbr%3E%0D%0A%7D%0D%0A%3Cbr%3E%3Cbr%3E%0D%0ANow%20let's%20do%20128-bit%20encryption%3A%3Cbr%3E%3Cbr%3E%0D%0Aif%20(mcrypt_generic_init(%24cipher%2C%20%24key128%2C%20%24iv)%20!%3D%20-1)%3Cbr%3E%0D%0A%7B%3Cbr%3E%3Cbr%3E%0D%0A%2F%2F%20PHP%20pads%20with%20NULL%20bytes%20if%20%24cleartext%20is%20not%20a%20multiple%20of%20the%20block%20size..%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%24cipherText%20%3D%20mcrypt_generic(%24cipher%2C%24cleartext%20)%3B%3Cbr%3E%0D%0Amcrypt_generic_deinit(%24cipher)%3B%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%2F%2F%20Display%20the%20result%20in%20hex.%3Cbr%3E%0D%0Aprintf(%22128-bit%20encrypted%20result%3An%25snn%22%2Cbin2hex(%24cipherText))%3B%3Cbr%3C%0D%0A%7D%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%20%3Chr%3E%3Cbr%3E%0D%0A%20Results%3Cbr%3E%0D%0A%20%3Chr%3E%3Cbr%3E%3Cbr%3E%0D%0A%20You%20may%20use%20these%20as%20test%20vectors%20for%20testing%20your%20AES%20implementations...%0D%0A%20%3Cbr%3E%3Cbr%3E%0D%0A%3Chr%3E%0D%0A256-bit%20key%2C%20CBC%20mode%3Cbr%3E%0D%0A%3Chr%3E%3Cbr%3E%0D%0AIV%20%3D%20'1234567890123456'%20%20%3Cbr%3E%0D%0A(hex%3A%2031323334353637383930313233343536)%3Cbr%3E%0D%0AKey%20%3D%20'12345678901234561234567890123456'%20%3Cbr%3E%0D%0A(hex%3A%203132333435363738393031323334353631323334353637383930313233343536)%3Cbr%3E%3Cbr%3E%0D%0APlainText%3A%3Cbr%3E%0D%0A'The%20quick%20brown%20fox%20jumped%20over%20the%20lazy%20dog'%3Cbr%3E%0D%0ACipherText(hex)%3A%3Cbr%3E%0D%0A2fddc3abec692e1572d9b7d629172a05caf230bc7c8fd2d26ccfd65f9c54526984f7cb1c4326ef058cd7bee3967299e3%0D%0A%3Cbr%3E%3Cbr%3E%0D%0A%3Chr%3E%0D%0A128-bit%20key%2C%20CBC%20mode%0D%0A%3Chr%3E%0D%0A%3Cbr%3E%0D%0AIV%20%3D%20'1234567890123456'%20%3Cbr%3E%0D%0A(hex%3A%2031323334353637383930313233343536)%3Cbr%3E%0D%0AKey%20%3D%20'1234567890123456'%20%3Cbr%3E%0D%0A(hex%3A%2031323334353637383930313233343536)%3Cbr%3E%0D%0APlainText%3A%3Cbr%3E%0D%0A'The%20quick%20brown%20fox%20jumped%20over%20the%20lazy%20dog'%3Cbr%3E%0D%0ACipherText(hex)%3A%3Cbr%3E%0D%0Af78176ae8dfe84578529208d30f446bbb29a64dc388b5c0b63140a4f316b3f341fe7d3b1a3cc5113c81ef8dd714a1c99%3Cbr%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22Object%22%2C%20%22definition%22%3B%20%22Although%20you'll%20sometimes%20hear%20Instance%20and%20Object%20used%20interchangeably%2C%20there%20are%20different.%3Cbr%20%2F%3E%3Cbr%20%2F%3EAn%20Instance%20of%20a%20Class%20is%20my%20having%20put%20the%20key%20in%20the%20ignition%20and%20fired%20it%20up.%20It's%20no%20longer%20a%20dormant%20piece%20of%20machinery%2C%20it's%20running%20and%20ready%20to%20be%20engaged.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3EAn%20Object%20is%20something%20that%20machine%20has%20made%20-%20it's%20a%20result%20of%20that%20functionality.%20It%20looks%20like%20this%3A%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3Eclass%20NewClass%20%7B%20%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20public%20function%20something_wonderful()%20%7B%3Cbr%20%2F%3E%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%20%22bring%20it%22%3B%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2Fspan%3E%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%7D%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%24say_something%3Dnew%20NewClass%3B%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%23339966%3B%22%3E%2F%2Fthis%20is%20an%20%22Instance%22%20of%20the%20NewClass%20class%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%24shout%20%3D%20%24say_something-%26gt%3Bsomething_wonderful()%3B%3C%2Fspan%3E%20%3Cspan%20style%3D%22color%3A%20%23339966%3B%22%3E%2F%2F%24shout%20is%20an%20Object%20of%20the%20NewClass%20Class%26nbsp%3B%3C%2Fspan%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22PDO%22%2C%20%22definition%22%3B%20%22PHP%20Data%20Objects.%20There%20are%20several%20advantages%20to%20using%20PDO.%20Here%20are%20a%20couple%3A%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20%3Cspan%20style%3D%22text-decoration%3A%20underline%3B%22%3EDatabase%20Abstraction%20Layer%3C%2Fspan%3E%20-%20an%20API%20that%20allows%20you%20to%20connect%20with%20any%20one%20of%20a%20number%20of%20databases.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20%3Cspan%20style%3D%22text-decoration%3A%20underline%3B%22%3EPrepared%20Statements%3C%2Fspan%3E%20-%20here%20you're%20executing%20your%20SQL%20without%20any%20data%20battached%20to%20it.%20This%20is%20how%20you%20avoid%20SQL%20Injection.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20So%2C%20this%3A%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%24sql%20%3D%20%22SELECT%20*%20from%20users%20where%20email%3D'%24email'%20AND%20status%3D'%24status'%22%3C%2Fspan%3E%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20Becomes%20this%3A%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%24sql%3D%22SELECT%20*%20FROM%20users%20where%20email%3D%3F%20AND%20status%3D%3F%22%3B%3C%2Fspan%3E%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20...and%20then%20you%20would%20run%20the%20EXECUTE%20method%20of%20this%20object%2C%20so%20it%20would%20look%20like%20this%3A%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%24stmt%3D%24pdo-%26gt%3Bprepare(%22SELECT%20*%20FROM%20users%20WHERE%20email%3D%3F%20AND%20status%3D%3F%22)%3B%20%24stmt-%26gt%3Bexecute(%5B'email%3D%26gt%3B%24email%2C%20'status%3D%26gt%3B%24status%5D)%3B%20%24user%3D%24stmt-%26gt%3Bfetch()%3B%3C%2Fspan%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22Scope%22%2C%20%22definition%22%3B%20%22Scope%20is%20a%20term%20that%20refers%20to%20the%20extent%20to%20which%20a%20variable%20makes%20sense.%20In%20other%20words%2C%20how%20logical%20does%20that%20variable%20appear%20to%20another%20method%20-%20one%20that%20didn't%20create%20the%20variable%20to%20begin%20with%3F%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3EYou've%20got%20four%20different%20types%20of%20%22scope...%22%3Cbr%20%2F%3E%3Cbr%20%2F%3Elocal%3Cbr%20%2F%3Efunction%3Cbr%20%2F%3Eglobal%3Cbr%20%2F%3Esuperglobal%3Cbr%20%2F%3E%3Cbr%20%2F%3EScope%20is%20similiar%20to%20Visibility%2C%20but%20with%20Visibility%20you've%20got%20%3Cbr%20%2F%3E%3Cbr%20%2F%3Epublic%3Cbr%20%2F%3Eprotected%3Cbr%20%2F%3Eprivate%3Cbr%20%2F%3E%3Cbr%20%2F%3ESo%2C%20there%20is%20a%20difference%20in%20that%20scope%20is%20more%20about%20variables%20whereas%20you'll%20see%20visibility%20describing%20the%20accessibility%20of%20methods%20and%20properties%20more%20so%20than%20variables.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3EOne%20definition%20that%20struck%20me%20as%20being%20especially%20clear%20was%2C%20%22Scope%20can%20be%20defined%20as%20the%20range%20of%20availability%20a%20variable%20has%20to%20the%20program%20in%20which%20it%20is%20declared.%22%20(%3Ca%20href%3D%22https%3A%2F%2Fwww.tutorialspoint.com%2Fphp%2Fphp_static_variables.htm%22%20target%3D%22_blank%22%3Etutorialspoint.com%3C%2Fa%3E)%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22Static%22%2C%20%22definition%22%3B%20%22On%20occasion%2C%20in%20addition%20to%20seeing%20a%20variable%20or%20a%20method's%20visibility%20qualified%20in%20terms%20of%20either%20private%2C%20protected%20or%20public%2C%20you%20may%20also%20see%20it%20referenced%20as%20%22static.%22%0D%0A%0D%0A%22Static%22%20is%20a%20handy%20tool%20in%20that%20it%20doesn't%20have%20to%20be%20instantiated.%20It%20can%20directly%20accessed%20using%20the%20Scope%20Resolution%20Operator(%3A%3A).%20For%20example%3A%0D%0A%0D%0A%24con%3DDatabaseFactory%3A%3ACreateLegacyAegisHealthConnection()%3B%0D%0A%0D%0ACreateLegacyAegisHealthConnection()%20is%20a%20static%20function%20in%20the%20DatabaseFactory%20Class.%20I%20didn't%20have%20to%20write%3A%0D%0A%0D%0A%24new_con%3Dnew%20DatabaseFactory()%3B%0D%0A%24new_connection%3D%24new_con-%3ECreateLegacyHealthConnection().%0D%0A%0D%0AI%20just%20used%20the%20Scope%20Resolution%20Operator%20and%2C%20%22BAM!%22%20it's%20right%20there!%0D%0A%0D%0ASame%20dynamic%20applies%20to%20both%20Methods%20and%20Properties.%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22Superglobal%20Variable%22%2C%20%22definition%22%3B%20%22%3Cp%3EGlobal%26nbsp%3Bvariables%20are%26nbsp%3Baccessible%20from%20any%20class%2C%20method%20or%20function%20from%20anywhere%20in%20the%20application.%20Public%2C%20Private%2C%20Protected%2C%20Child%2C%20Parent%20-%20doesn't%20matter.%20If%20it's%20a%20Superglobal%20variable%2C%20you%20can%20grab%20it%20and%20use%20it%20and%20you%20only%20have%20to%20define%20it%20once.%3Cbr%20%2F%3E%3Cbr%20%2F%3EAn%20example%20would%20be%20%24_SESSION.%20That's%20considered%20a%20Superglobal%20variable%20in%20that%20PHP%20knows%20what%20%24_SESSION%20is.%20You%20still%20have%20to%20give%20it%20a%20value%2C%20but%20you%20don't%20have%20to%20%22define%22%20%24_SESSION%20anymore%20than%20you%20have%20to%20%22define%22%20%24_POST%20or%20%24_GET.%20PHP%20knows%20what%20those%20variables%20are.%20Again%2C%20you%20still%20have%20to%20give%20them%20a%20value%2C%20but%20systemically%2C%20PHP%26nbsp%3Bis%20not%20looking%20for%20that%20variable%2C%20it%20already%20knows%20what%20it%20is.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3EYou%20have%20the%20same%20kind%20of%20utility%20available%20to%20you%20with%20a%20%22Global%22%20variable%2C%20but%2C%20unlike%20a%20Superglobal%20variable%2C%20you%20have%20to%20define%20it.%20Whereas%20%24_SESSION%20is%20understood%20by%20PHP%2C%20%24george%2C%20on%20the%20other%20hand%2C%20is%20a%20total%20mystery.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%24george%20could%20be%20your%20database%20connection%2C%20but%20in%20order%20to%20give%20it%20%22wings%22%20so%20it%20can%20fly%20freely%20throughout%20your%20app%2C%20you%20have%20to%20make%20it%20a%20global%20variable%20like%20this%3A%3Cbr%20%2F%3E%3Cbr%20%2F%3EHere's%20your%20database%20connection%20script%3A%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%24mysqli%20%3D%20new%20mysqli(%24host%2C%24user%2C%24password%2C%24database)%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%20if(%24mysqli-%26gt%3Bconnect_errno)%20%7B%20%26nbsp%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%24err%3D%22CONNECT%20FAIL%3A%20%22%20%26nbsp%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E.%24mysqli-%26gt%3Bconnect_errno%20%26nbsp%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E.%20'%20'%20%26nbsp%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E.%24mysqli-%26gt%3Bconnect_error%20%26nbsp%3B%3B%20%26nbsp%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3Etrigger_error(%24err%2C%20E_USER_ERROR)%3B%20%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%7D%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3ENow%20here's%20my%20class%3A%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3Eclass%20List%20%7B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20public%26nbsp%3Bspreadsheet%20()%20%7B%3C%2Fspan%3E%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3Eglobal%20%3Cstrong%3E%3Cspan%20style%3D%22color%3A%20%23ff0000%3B%22%3E%24mysqli%3B%3C%2Fspan%3E%3C%2Fstrong%3E%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24sql%3D%22select%20*%20from%20table%22%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%24query%3D%3Cspan%20style%3D%22color%3A%20%23ff0000%3B%22%3E%3Cstrong%3E%24mysqli%3C%2Fstrong%3E-%26gt%3B%3C%2Fspan%3Equery(%24sql)%3B%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%233366ff%3B%22%3E%7D%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3EI've%20just%20told%20my%20code%20to%20go%20look%20for%20%24mysqli.%20It%20could%20be%20anywhere%2C%20but%20by%20prefacing%20%24mysqli%20with%20%22global%2C%22%20I'm%20giving%20my%20code%20permission%20to%20go%20and%20look%20anywhere%20and%20everywhere%20for%20the%20%24mysqli%20variable.%3C%2Fp%3E%22%7D%2C%20%7B%22disicpline%22%3A%20%22PHP%22%2C%20%22term%22%3A%20%22Visibility%22%2C%20%22definition%22%3B%20%22Visibily%20is%20something%20similiar%20to%20Scope%2C%20but%20it's%20more%20for%20methods%20and%20properties.%20%3Cbr%20%2F%3E%3Cbr%20%2F%3EThere%20are%20three%20types%20of%20visibility%20which%20are%20described%20below%3A%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3C!--%3Fphp%20%3C%2Fspan--%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F**%20%26nbsp%3B*%26nbsp%3BDefine%26nbsp%3BMyClass%20%26nbsp%3B*%2F%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3Eclass%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3EMyClass%20%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%7B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%3Cbr%20%2F%3Epublic%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24public%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3D%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23dd0000%3B%22%3E'Public'%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3Eprotected%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24protected%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3D%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23dd0000%3B%22%3E'Protected'%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3Eprivate%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24private%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3D%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23dd0000%3B%22%3E'Private'%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20function%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3EprintHello%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E()%7B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24this%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Epublic%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24this%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Eprotected%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24this%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Eprivate%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%3Cbr%20%2F%3E%7D%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%3Cbr%20%2F%3E%24obj%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3D%26nbsp%3Bnew%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3EMyClass%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E()%3B%20%3Cbr%20%2F%3Eecho%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24obj%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Epublic%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F%2F%26nbsp%3BWorks%20%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3Eecho%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24obj%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Eprotected%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F%2F%26nbsp%3BFatal%26nbsp%3BError%20%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3Eecho%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24obj%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Eprivate%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F%2F%26nbsp%3BFatal%26nbsp%3BError%20%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24obj%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3EprintHello%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E()%3B%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F%2F%26nbsp%3BShows%26nbsp%3BPublic%2C%26nbsp%3BProtected%26nbsp%3Band%26nbsp%3BPrivate%3Cbr%20%2F%3E%20%3Cbr%20%2F%3E%2F**%20%26nbsp%3B*%26nbsp%3BDefine%26nbsp%3BMyClass2%20%26nbsp%3B*%2F%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3Eclass%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3EMyClass2%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3Eextends%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3EMyClass%20%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%7B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F%2F%26nbsp%3BWe%26nbsp%3Bcan%26nbsp%3Bredeclare%26nbsp%3Bthe%26nbsp%3Bpublic%26nbsp%3Band%26nbsp%3Bprotected%26nbsp%3Bmethod%2C%26nbsp%3Bbut%26nbsp%3Bnot%26nbsp%3Bprivate%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3Epublic%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24public%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3D%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23dd0000%3B%22%3E'Public2'%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3Bprotected%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24protected%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3D%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23dd0000%3B%22%3E'Protected2'%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20function%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3EprintHello%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E()%7B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24this%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Epublic%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24this%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Eprotected%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20echo%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24this%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Eprivate%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%20%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%3Cbr%20%2F%3E%26nbsp%3B%26nbsp%3B%26nbsp%3B%26nbsp%3B%20%7D%20%3Cbr%20%2F%3E%7D%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%3Cbr%20%2F%3E%24obj2%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3D%26nbsp%3Bnew%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3EMyClass2%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E()%3B%20%3Cbr%20%2F%3Eecho%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24obj2%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Epublic%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F%2F%26nbsp%3BWorks%20%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3Eecho%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24obj2%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Eprotected%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F%2F%26nbsp%3BFatal%26nbsp%3BError%20%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3Eecho%26nbsp%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24obj2%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3Eprivate%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E%3B%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F%2F%26nbsp%3BUndefined%20%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%24%3Cbr%20%2F%3E%3Cbr%20%2F%3Eobj2%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E-%26gt%3B%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3EprintHello%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%23007700%3B%22%3E()%3B%26nbsp%3B%3C%2Fspan%3E%3C%2Fspan%3E%3Cspan%20style%3D%22font-family%3A%20Courier%20New%3B%22%3E%3Cspan%20style%3D%22color%3A%20%23ff8000%3B%22%3E%2F%2F%26nbsp%3BShows%26nbsp%3BPublic2%2C%26nbsp%3BProtected2%2C%26nbsp%3BUndefined%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3C%2Fspan%3E%3Cspan%20style%3D%22color%3A%20%230000bb%3B%22%3E%3F%26gt%3B%3C%2Fspan%3E%20%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cstrong%3E%3Cimg%20style%3D%22float%3A%20right%3B%22%20src%3D%22%2Fimages%2Fproperties.jpg%22%20alt%3D%22%22%20width%3D%22300%22%20height%3D%22300%22%20%2F%3E%3Cspan%20style%3D%22font-family%3A%20arial%2Chelvetica%2Csans-serif%3B%22%3Epublic%3A%3C%2Fspan%3E%3C%2Fstrong%3E%3Cspan%20style%3D%22font-family%3A%20arial%2Chelvetica%2Csans-serif%3B%22%3E%20Public%20properties%20and%20methods%20can%20be%20accessed%20anywhere%20in%20a%20script%20after%20the%20object%20has%20been%20instantiated%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22font-family%3A%20arial%2Chelvetica%2Csans-serif%3B%22%3E%3Cstrong%3Eprotected%3A%3C%2Fstrong%3E%20Protected%20properties%20and%20methods%20can%20be%20accessed%20only%20within%20the%20class%20that%20defines%20them%2C%20parent%20classes%2C%20or%20inherited%20classes%3C%2Fspan%3E%3Cbr%20%2F%3E%3Cbr%20%2F%3E%3Cspan%20style%3D%22font-family%3A%20arial%2Chelvetica%2Csans-serif%3B%22%3E%3Cstrong%3Eprivate%3A%3C%2Fstrong%3E%20Private%20properties%20and%20methods%20can%20only%20be%20accessed%20by%20the%20class%20that%20defines%20them%3C%2Fspan%3E%3Cbr%20%2F%3E%3C%2Fspan%3E%3C%2Fspan%3E%22%7D%5D%7D%09%09%09%09&p1=%7B%7D
    at angular.js:38
    at nc (angular.js:11177)
    at angular.js:11270
    at q (angular.js:403)
    at xd (angular.js:11269)
    at f (angular.js:12090)
    at angular.js:16832
    at m.$digest (angular.js:17971)
    at m.$apply (angular.js:18269)
    at l (angular.js:12387)
(anonymous) @ json_retrieval.php:40
(anonymous) @ angular.js:16832
$digest @ angular.js:17971
$apply @ angular.js:18269
l @ angular.js:12387
A.onload @ angular.js:12541
XMLHttpRequest.send (async)
(anonymous) @ angular.js:12587
p @ angular.js:12332
(anonymous) @ angular.js:12084
(anonymous) @ angular.js:16832
$digest @ angular.js:17971
$apply @ angular.js:18269
(anonymous) @ angular.js:1917
invoke @ angular.js:5003
c @ angular.js:1915
Sc @ angular.js:1935
ue @ angular.js:1820
(anonymous) @ angular.js:33367
b @ angular.js:3431

Open in new window


What do you think?

baddata?
0
 
brucegustPHP DeveloperAuthor Commented:
Here's a screenshot of the console...

screenshot
0
 
brucegustPHP DeveloperAuthor Commented:
Thanks, Jim!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.