<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1029276025775361197</id><updated>2026-04-03T00:48:38.502-07:00</updated><category term="DotNetNuke"/><category term="Front Web"/><category term="Reprint"/><category term="Web Development"/><category term="jQuery"/><category term="ASP.NET"/><category term="Bootstrap"/><category term="Entity Framework"/><category term="ORM"/><title type='text'>Code Ciel</title><subtitle type='html'>HUB of thoughts and learnings</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default?redirect=false'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>18</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-4841515450333678906</id><published>2012-04-11T08:09:00.005-07:00</published><updated>2012-04-11T08:09:51.490-07:00</updated><title type='text'>JavaScript Object Literal</title><content type='html'>&lt;h1 style=&quot;background-color: white; border-bottom-color: rgb(221,221,221); border-bottom-style: solid; border-bottom-width: 1px; clear: right; color: #0d2878; font-family: verdana,arial,helvetica,sans-serif; font-size: 1.4em; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 10px;&quot;&gt;

 JavaScript Object Literal&lt;/h1&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The latest best practices in javascript recommend that object literal notation be used to create a namespace feature of sorts. Object literal notation is ridiculously easy to use and gives a great deal of power to the developer. Here is an example-laden crash course.&amp;nbsp;&lt;/span&gt;&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(221,221,221); border-bottom-style: solid; border-bottom-width: 1px; clear: right; color: #0d2878; font-family: verdana,arial,helvetica,sans-serif; font-size: 1.3em; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;

 Introduction: Definition and Purpose&lt;/h2&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
What is an object literal? In nontechnical terms, it is a means of containing a lot of data in one tidy package. It is a comma separated list of name value pairs wrapped in curly braces. In JavaScript an object literal is declared or defined as follows:&lt;/div&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; var myObject = {} &lt;/pre&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
An object literal with a few properties, from a&amp;nbsp;&lt;a href=&quot;http://www.dyn-web.com/code/rotate_images/&quot; style=&quot;border-bottom-color: rgb(255,255,255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255,255,255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255,255,255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255,255,255); border-top-style: solid; border-top-width: 1px; color: #667295; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 1px; padding-top: 0px;&quot;&gt;Rotating Images&lt;/a&gt;&amp;nbsp;example:&lt;/div&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; var myRotator = {    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;    path: &#39;images/&#39;,     &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;speed:  4500,    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;images: [&quot;smile.gif&quot;, &quot;grim.gif&quot;, &quot;frown.gif&quot;, &quot;bomb.gif&quot;]&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; } &lt;/pre&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Object literals are used as a means of encapsulating data, avoiding the use of global variables which can cause problems when combining code.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-color: rgb(221,221,221); border-bottom-style: solid; border-bottom-width: 1px; clear: right; color: #0d2878; font-family: verdana,arial,helvetica,sans-serif; font-size: 1.1em; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;

 How and Why We Use Object Literals&lt;/h3&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Objects literals enable us to write code that supports lots of features yet still make it a relatively straightforward for the implementers of our code. No need to invoke constructors directly or maintain the correct order of arguments passed to functions, etc.&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Object literals are also useful for unobtrusive event handling, as a way of holding data that would otherwise have been passed to functions called from HTML event handler attributes.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(221,221,221); border-bottom-style: solid; border-bottom-width: 1px; clear: right; color: #0d2878; font-family: verdana,arial,helvetica,sans-serif; font-size: 1.3em; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;

 Basic Syntax&lt;/h2&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Object literals are formed using the following syntax rules:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 2em; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;A colon separates property name from value.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; A comma separates each name/value pair from the next.&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;There should be no comma after the last name/value pair. Firefox won&#39;t object if you add it, but Internet Explorer will trigger an error: &#39;Expected identifier, string or number&#39;.&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Values can be of any data type, including array literals and object literals. Referring to the&lt;code style=&quot;color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 14px; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;myRotator&lt;/code&gt;&amp;nbsp;example above, the&amp;nbsp;&lt;code style=&quot;color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 14px; line-height: 1; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;images&lt;/code&gt;&amp;nbsp;property is an array literal. An array literal is a shortcut to create an array in JavaScript, just as the object literal is the shortcut to object creation:&lt;/div&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; var myArray = new Array(); // array literal form: var myArray = []; &lt;/pre&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
An example of an object literal with the value of the properties being object literals, from a&amp;nbsp;&lt;a href=&quot;http://www.dyn-web.com/code/tooltips/&quot; style=&quot;border-bottom-color: rgb(255,255,255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255,255,255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255,255,255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255,255,255); border-top-style: solid; border-top-width: 1px; color: #667295; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 1px; padding-top: 0px;&quot;&gt;Tooltip&lt;/a&gt;&amp;nbsp;demo:&lt;/div&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; dw_Tooltip.content_vars = {    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;link1: {        &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;   &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;img: &#39;images/dw-btn.gif&#39;,        &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;   &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;txt: &#39;dyn-web button&#39;,        &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;   &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;w: 100    &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;},    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;link2: {        &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;   &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;img: &#39;images/dot-com-btn.gif&#39;,        &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;   &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;txt: &#39;&lt;/span&gt;&lt;a href=&quot;http://dyn-web.com/&quot;&gt;dyn-web.com&lt;/a&gt;&lt;span style=&quot;background-color: white;&quot;&gt; button&#39;,        &amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;w: 184    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;}&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; } &lt;/pre&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
If any of the syntax rules are broken, such as a missing comma or colon or curly brace, a JavaScript error will be triggered. Both Firefox&#39;s and Internet Explorer&#39;s error messages are helpful in pointing out the general location of object literal syntax errors. They will not necessarily be completely accurate in pointing out the nature of the error though. If you are not sure where to find the error messages, see our tutorial on&amp;nbsp;&lt;a href=&quot;http://www.dyn-web.com/tutorials/js_errors.php&quot; style=&quot;border-bottom-color: rgb(255,255,255); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(255,255,255); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(255,255,255); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(255,255,255); border-top-style: solid; border-top-width: 1px; color: #667295; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 1px; padding-top: 0px;&quot;&gt;JavaScript Errors&lt;/a&gt;&amp;nbsp;for more information.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(221,221,221); border-bottom-style: solid; border-bottom-width: 1px; clear: right; color: #0d2878; font-family: verdana,arial,helvetica,sans-serif; font-size: 1.3em; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;

 Adding Properties to an Object&lt;/h2&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Once an object literal has been defined you can later add more properties to it as demonstrated below.&lt;/div&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; dw_Tooltip.content_vars = {&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;// May be empty at this point or already have properties, as shown above &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; }&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; // Add more properties using the following syntax: &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; dw_Tooltip.content_vars[&#39;link3&#39;] &lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;=&lt;/strong&gt; &#39;content for link 3&#39;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;;&lt;/strong&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; dw_Tooltip.content_vars[&#39;link4&#39;] &lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;=&lt;/strong&gt; {    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;caption: &#39;A Heron&#39;,    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;img: &#39;images/heron.gif&#39;,    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;txt: &#39;A heron image created from a character font.&#39;,    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;wrapFn: dw_Tooltip.wrapTextByImage,    &amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;    &lt;/span&gt;w: 210&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #aa3333; font-family: &#39;Courier New&#39;,Courier,monospace; font-size: 13px; line-height: 18px; margin-top: 0.5em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt; } &lt;/pre&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
Be sure to observe the syntax differences when adding properties this way: i.e., an equals sign rather than a colon separates property and value, and an optional semicolon ends the assignment rather than a comma.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-color: rgb(221,221,221); border-bottom-style: solid; border-bottom-width: 1px; clear: right; color: #0d2878; font-family: verdana,arial,helvetica,sans-serif; font-size: 1.3em; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 1.2em; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;

 Further Resources&lt;/h2&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0.8em; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: justify;&quot;&gt;
For more information on object literals and related issues see the following:&lt;/div&gt;
&lt;ul style=&quot;background-color: white; font-family: verdana,arial,helvetica,sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.5em; margin-left: 0px; margin-right: 0px; margin-top: 1em; padding-bottom: 0px; padding-left: 2em; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;List of links on the subject at&amp;nbsp;&lt;a class=&quot;external&quot; href=&quot;http://www.scripttags.com/tag/objectliteral/&quot; style=&quot;background-color: transparent; background-image: url(&#39;http://www.dyn-web.com/images/nav/external.gif&#39;); background-repeat: no-repeat no-repeat; border-bottom-color: rgb(75,99,170); border-bottom-style: dotted; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(255,255,255); border-left-style: none; border-left-width: 1px; border-right-color: rgb(255,255,255); border-right-style: none; border-right-width: 1px; border-top-color: rgb(255,255,255); border-top-style: none; border-top-width: 1px; border-width: initial; color: #0f2f8d; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1px; padding-right: 12px; padding-top: 0px; text-decoration: none;&quot;&gt;ScriptTags.com&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Patrick Hunlock&#39;s&amp;nbsp;&lt;a class=&quot;external&quot; href=&quot;http://www.hunlock.com/blogs/Mastering_JSON_(_JavaScript_Object_Notation_)&quot; style=&quot;background-color: transparent; background-image: url(&#39;http://www.dyn-web.com/images/nav/external.gif&#39;); background-repeat: no-repeat no-repeat; border-bottom-color: rgb(75,99,170); border-bottom-style: dotted; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(255,255,255); border-left-style: none; border-left-width: 1px; border-right-color: rgb(255,255,255); border-right-style: none; border-right-width: 1px; border-top-color: rgb(255,255,255); border-top-style: none; border-top-width: 1px; border-width: initial; color: #0f2f8d; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1px; padding-right: 12px; padding-top: 0px; text-decoration: none;&quot;&gt;Mastering JSON ( JavaScript Object Notation )&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Dustin Diaz on&amp;nbsp;&lt;a class=&quot;external&quot; href=&quot;http://www.dustindiaz.com/json-for-the-masses/&quot; style=&quot;background-color: transparent; background-image: url(&#39;http://www.dyn-web.com/images/nav/external.gif&#39;); background-repeat: no-repeat no-repeat; border-bottom-color: rgb(75,99,170); border-bottom-style: dotted; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(255,255,255); border-left-style: none; border-left-width: 1px; border-right-color: rgb(255,255,255); border-right-style: none; border-right-width: 1px; border-top-color: rgb(255,255,255); border-top-style: none; border-top-width: 1px; border-width: initial; color: #0f2f8d; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1px; padding-right: 12px; padding-top: 0px; text-decoration: none;&quot;&gt;JSON for the Masses&lt;/a&gt;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0.5em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Jonathan Snook on&amp;nbsp;&lt;a class=&quot;external&quot; href=&quot;http://www.digital-web.com/articles/objectifying_javascript/&quot; style=&quot;background-color: transparent; background-image: url(&#39;http://www.dyn-web.com/images/nav/external.gif&#39;); background-repeat: no-repeat no-repeat; border-bottom-color: rgb(75,99,170); border-bottom-style: dotted; border-bottom-width: 1px; border-color: initial; border-left-color: rgb(255,255,255); border-left-style: none; border-left-width: 1px; border-right-color: rgb(255,255,255); border-right-style: none; border-right-width: 1px; border-top-color: rgb(255,255,255); border-top-style: none; border-top-width: 1px; border-width: initial; color: #0f2f8d; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 1px; padding-right: 12px; padding-top: 0px; text-decoration: none;&quot;&gt;Objectifying JavaScript&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/4841515450333678906/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/04/javascript-object-literal.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/4841515450333678906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/4841515450333678906'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/04/javascript-object-literal.html' title='JavaScript Object Literal'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-2797700051034407319</id><published>2012-04-11T06:32:00.000-07:00</published><updated>2012-04-11T06:32:00.663-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Reprint"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Development"/><title type='text'>Helping increase your SEO - link juice</title><content type='html'>&lt;span style=&quot;color: #bbbbbb; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;Author :&amp;nbsp;&lt;/span&gt;&lt;/span&gt; &lt;a href=&quot;http://www.alexanderdickson.com/&quot;&gt;alexanderdickson.com&lt;/a&gt; &lt;br /&gt;
&lt;span style=&quot;color: #bbbbbb; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;line-height: 18px;&quot;&gt;Url :&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;background-color: white; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/span&gt;&lt;a href=&quot;http://www.alexanderdickson.com/articles/jquery-javascript/a-new-way-of-creating-objects-in-javascript/&quot;&gt;http://www.alexanderdickson.com/articles/jquery-javascript/a-new-way-of-creating-objects-in-javascript/&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.4em; margin-top: 1.2em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
These days, SEO is very important, and links on your page are an important part of improving your rankings. It is important to know a few things about the links on your page and how to improve them.&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.4em; margin-top: 1.2em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
It is generally accepted a few major points concerning links on a page.&lt;/div&gt;
&lt;ul style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; list-style-image: initial; list-style-position: inside; margin-bottom: 1em; margin-left: 1em; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Links placed higher up in the markup are worth more than those appear closer to the end.&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The text used as the anchor text is important (as is the&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;title&lt;/code&gt;&amp;nbsp;attribute).&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;The more links you have on your web page, the less juice they will receive.&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;You can tell search engines to not give link authority on a page by adding&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rel=&quot;external&quot;&lt;/code&gt;&amp;nbsp;to your anchors.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 16px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Location of links in markup&lt;/h3&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.4em; margin-top: 1.2em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The closer to the top your link is in the markup, the better it will be ranked. If you&#39;d like your links closer to the top, but don&#39;t want them to appear there in your layout, you can by using CSS to position them.&lt;/div&gt;
&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 16px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Anchor text&lt;/h3&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.4em; margin-top: 1.2em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Look at the 2 examples below.&lt;/div&gt;
&lt;div class=&quot;code html&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1em; margin-left: 0.3em; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0.8em; padding-left: 0.8em; padding-right: 0.8em; padding-top: 0.8em;&quot;&gt;
&lt;div class=&quot;container&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeffee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(109, 151, 67); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;Courier New&#39;, serif; font-size: 1em; font-style: inherit; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-y: hidden; padding-bottom: 0.8em; padding-left: 0.8em; padding-right: 0.8em; padding-top: 0.8em; white-space: pre;&quot;&gt;
&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;p&amp;gt;
    You can now buy the Awesome FooBar by clicking
    &amp;lt;a href=&quot;http://www.example.com&quot;&amp;gt;here&amp;lt;/a&amp;gt;
&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;span class=&quot;caption&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; display: block; font-family: inherit; font-size: 12px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Example 1:&lt;/strong&gt;&amp;nbsp;Poor choice of anchor text.&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;code html&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1em; margin-left: 0.3em; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0.8em; padding-left: 0.8em; padding-right: 0.8em; padding-top: 0.8em;&quot;&gt;
&lt;div class=&quot;container&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeffee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(109, 151, 67); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;Courier New&#39;, serif; font-size: 1em; font-style: inherit; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-y: hidden; padding-bottom: 0.8em; padding-left: 0.8em; padding-right: 0.8em; padding-top: 0.8em; white-space: pre;&quot;&gt;
&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;p&amp;gt;
    You can now buy the &amp;lt;a href=&quot;http://www.example.com&quot;&amp;gt;Awesome FooBar&amp;lt;/a&amp;gt;.
&amp;lt;/p&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;span class=&quot;caption&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; display: block; font-family: inherit; font-size: 12px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Example 2:&lt;/strong&gt;&amp;nbsp;Better choice of anchor text.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.4em; margin-top: 1.2em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In case it wasn&#39;t obvious, the second example is much better for SEO. Your linking text is important. You can also help by adding a title attribute, but remember to&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;not over do it&lt;/strong&gt;! The more words you try and cram in there, the less important they will become! I have a feeling small words like&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;the, and, a,&lt;/em&gt;etc won&#39;t be included because they don&#39;t provide any real meaning.&lt;/div&gt;
&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 16px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Quantity of links per page&lt;/h3&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.4em; margin-top: 1.2em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
To search engines,&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;less is more&lt;/strong&gt;. When selecting what to link to, make sure you link sparingly to good trusted (and if possible, related) sites.&lt;/div&gt;
&lt;h3 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 16px; line-height: 18px; margin-bottom: 0.8em; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Delegating link authority with rel=&quot;nofollow&quot;&lt;/h3&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.4em; margin-top: 1.2em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
One important thing to know is that if you add&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rel=&quot;nofollow&quot;&lt;/code&gt;&amp;nbsp;to an anchor, you&#39;ve effectively told search engines not to give it any authority. This is&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;very important&lt;/strong&gt;&amp;nbsp;when accepting user input that may contain links. I have purposely not done this on my own comments, as I am giving the users a chance to show they can be trusted. See the example below of a nofollow&#39;d link.&lt;/div&gt;
&lt;div class=&quot;code html&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1em; margin-left: 0.3em; margin-right: 0px; margin-top: 1em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0.8em; padding-left: 0.8em; padding-right: 0.8em; padding-top: 0.8em;&quot;&gt;
&lt;div class=&quot;container&quot; style=&quot;background-attachment: initial; background-clip: initial; background-color: #eeffee; background-image: initial; background-origin: initial; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-color: rgb(109, 151, 67); border-left-style: solid; border-left-width: 3px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: Consolas, Monaco, &#39;Lucida Console&#39;, &#39;Liberation Mono&#39;, &#39;Courier New&#39;, serif; font-size: 1em; font-style: inherit; line-height: 1.5em; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; overflow-y: hidden; padding-bottom: 0.8em; padding-left: 0.8em; padding-right: 0.8em; padding-top: 0.8em; white-space: pre;&quot;&gt;
&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;a href=&quot;http://www.pureevil.com&quot; rel=&quot;nofollow&quot;&amp;gt;I am an evil spam link.&amp;lt;/a&amp;gt;&lt;/code&gt;&lt;/div&gt;
&lt;span class=&quot;caption&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; display: block; font-family: inherit; font-size: 12px; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0.5em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Disuade spammers:&lt;/strong&gt;&amp;nbsp;Add&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rel=&quot;nofollow&quot;&lt;/code&gt;&amp;nbsp;to user entered links.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #222222; font-family: &#39;Lucida Grande&#39;, Verdana, Arial, &#39;Bitstream Vera Sans&#39;, sans-serif; font-size: 13px; line-height: 18px; margin-bottom: 1.4em; margin-top: 1.2em; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
On large volume sites, adding the nofollow is very important to disuade spammers. They are far less likely to add links to your comment box or similar if they know the links will be automatically nofollow&#39;d. Another imporant use is to not dilute your link juice. Instead of losing the juice because there are many links on your page, simply nofollow the links you care less about, and return the power to the links you love!&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/2797700051034407319/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/04/helping-increase-your-seo-link-juice.html#comment-form' title='2 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/2797700051034407319'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/2797700051034407319'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/04/helping-increase-your-seo-link-juice.html' title='Helping increase your SEO - link juice'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-832844795630476991</id><published>2012-04-10T15:36:00.001-07:00</published><updated>2012-04-10T15:36:33.625-07:00</updated><title type='text'>6 Ways Men and Women Communicate Differently</title><content type='html'>&lt;br /&gt;
&lt;div align=&quot;center&quot; style=&quot;background-color: white; color: #222222; font-family: verdana, sans-serif; font-size: 13px;&quot;&gt;
&lt;span class=&quot;author&quot; style=&quot;color: #446677; font-family: arial, helvetica, sans-serif; font-size: 11px;&quot;&gt;By&amp;nbsp;&lt;span class=&quot;authorb&quot; style=&quot;text-transform: uppercase !important;&quot;&gt;YOURTANGO EXPERTS&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;br style=&quot;background-color: white; color: #222222; font-family: verdana, sans-serif; font-size: 13px; text-align: left;&quot; /&gt;&lt;div class=&quot;entry&quot; style=&quot;background-color: white; color: #222222; font-family: verdana, sans-serif; font-size: 13px; padding-bottom: 0px; padding-left: 0px; padding-right: 10px; padding-top: 0px; text-align: left;&quot;&gt;
&lt;em&gt;&lt;img alt=&quot;6 Ways Men and Women Communicate Differently&quot; id=&quot;blogimg&quot; src=&quot;http://g.psychcentral.com/blog/wp-content/uploads/2012/03/couple-disagree-4.jpg&quot; style=&quot;border-bottom-color: rgb(204, 204, 204); border-bottom-style: solid; border-bottom-width: 1px; border-color: initial; border-image: initial; border-left-color: rgb(204, 204, 204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204, 204, 204); border-right-style: solid; border-right-width: 1px; border-style: initial; border-top-color: rgb(204, 204, 204); border-top-style: solid; border-top-width: 1px; float: left; margin-bottom: 0px; margin-left: 0px; margin-right: 8px; margin-top: 0px; padding-bottom: 2px; padding-left: 2px; padding-right: 2px; padding-top: 2px;&quot; title=&quot;couple disagree 4&quot; width=&quot;211&quot; /&gt;This guest article from&amp;nbsp;&lt;a href=&quot;http://www.yourtango.com/&quot; style=&quot;color: #006688;&quot; target=&quot;_blank&quot;&gt;YourTango&lt;/a&gt;was written by&amp;nbsp;&lt;a href=&quot;http://www.yourtango.com/experts/richarddrobnick&quot; style=&quot;color: #006688;&quot; target=&quot;_blank&quot;&gt;Richard Drobnick&lt;/a&gt;.&amp;nbsp;&lt;/em&gt;&lt;br /&gt;
Men and women are different in many ways. They see the world through completely different perspectives. The key to understanding their differences is in the way that men and women communicate.&lt;br /&gt;
Here are six important communication differences that you should be aware of, to help improve your communications with your partner and make them smoother and more effective.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;1. Why Talk?&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;He&lt;/em&gt;&amp;nbsp;believes communication should have a clear purpose. Behind every conversation is a problem that needs solving or a point that needs to be made. Communication is used to get to the root of the dilemma as efficiently as possible.&lt;br /&gt;
&lt;em&gt;She&lt;/em&gt;&amp;nbsp;uses communication to discover how she is feeling and what it is she wants to say. She sees conversation as an act of sharing and an opportunity to increase intimacy with her partner. Through sharing, she releases negative feelings and solidifies her bond with the man she loves.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;span id=&quot;more-28835&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;strong&gt;2. How Much Should You Say?&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;He&lt;/em&gt;&amp;nbsp;prioritizes productivity and efficiency in his daily life, and conversation is no exception. When he tells a story he has already sorted through the muck in his own head, and shares only those details that he deems essential to the point of the story. He might wonder, “Why do women need to talk as much as they do?” Often he will interrupt a woman once he has heard enough to offer a solution.&lt;br /&gt;
&lt;em&gt;She&lt;/em&gt;&amp;nbsp;uses communication to explore and organize her thoughts —&amp;nbsp;to discover the point of the story. She may not know what information is necessary or excessive until the words come spilling out. But a woman isn’t necessarily searching for a solution when she initiates a conversation. She’s looking for someone to listen and understand what she’s feeling.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;3. What Does It Mean To Listen?&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;He&lt;/em&gt;&amp;nbsp;is conditioned to listen actively. When a woman initiates conversation he assumes she is seeking his advice or assistance. He engages with the woman, filtering everything she’s saying through the lens of, “What can we actually do about this?” Learning to listen patiently —&amp;nbsp;not just passively —&amp;nbsp;doesn’t come easily to him.&lt;br /&gt;
&lt;em&gt;She&lt;/em&gt;&amp;nbsp;sees conversation as a productive end in and of itself. If she feels sufficiently heard or understood she may not need to take further action to resolve a problem or “make things better.” The fact that she has been listened to assuages her anxieties and dulls the pangs of negative feelings. Sharing with someone who understands and loves her heals her from the inside and equips her with the emotional tools necessary to handle the trials and tribulations of the outside world.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;4. When&amp;nbsp;&lt;em&gt;She&lt;/em&gt;&amp;nbsp;Is Feeling Down …&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;He&lt;/em&gt;&amp;nbsp;will want to tackle her problems head on, like a fireman. He feels impatient to put the fire out as quickly as possible. For him, the quickest way to put the fire out is by giving solutions. Because he wants so badly to provide for his spouse, he may take her mood personally and defend himself. He might hear things literally, not realizing that when his spouse is upset she will use words as tools to explore and express difficult emotions.&lt;br /&gt;
By using words as tools to explore and express her difficult emotions when she is upset, she is able to process her negative emotions and let them go. She values support and nurture, and is most fulfilled by sharing, cooperation and community. When he shows interest in her by asking caring questions or expressing heartfelt concerns she feels loved and cared for. He is fulfilling her first primary love need.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;5. When&amp;nbsp;&lt;em&gt;He&amp;nbsp;&lt;/em&gt;Is Feeling Down …&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;H&lt;/em&gt;e will often withdraw into his “cave” (becoming quiet and withdrawn) when he’s upset or stressed. A man’s “cave time” is like a short vacation: he reduces stress by forgetting about his problems and focusing on other things like watching television, reading the newspaper, or playing video games.&lt;br /&gt;
He might avoid communication with his spouse during times of duress. If she persists with nurturing questions or criticism, he withdraws even further, fearing that his partner doesn’t trust him to take care of business on his own. However, with her support and understanding, a man will return and be more emotionally available, caring, and loving.&lt;br /&gt;
&lt;em&gt;She&lt;/em&gt;&amp;nbsp;might interpret her spouse’s silence as a sign that she is failing him or that she’s losing him. She instinctively tries to nurture him through his problems by asking an abundance of caring questions. Or she may react defensively out of fear that her own need for healthy open communication is not being respected within the relationship.&lt;br /&gt;
Ultimately, she can do more for him by appreciating his space, which shows him that she trusts him to work out the problem on his own. Trusting is one of the greatest gifts she has to offer him. In the meantime she should do something nurturing for herself, so she won’t resent him when he emerges from his “cave time.”&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;strong&gt;6. Communication Breaks Down When …&lt;/strong&gt;&lt;br /&gt;
&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;He&lt;/em&gt;&amp;nbsp;feels like he’s being told what to do. The most important thing to a man is doing a good job. When his competence is questioned he’ll not only feel hurt, but he’ll throw up a wall of resistance, and communication begins to breakdown. He thrives in an environment where he’s the expert. Rather than being told, “You should do X” he is likely to respond better to, “What do you think of X?” The trick to improving him is to resist telling him what to do.&lt;br /&gt;
&lt;em&gt;She&lt;/em&gt;&amp;nbsp;hears from her spouse that her problems aren’t as real and pressing as they seem in that very moment. Her spouse may mistakenly think he’s being helpful in providing “reality checks” like:&lt;em&gt;“You’re making a mountain out of a mole hill&lt;/em&gt;” or&amp;nbsp;&lt;em&gt;“You’re getting overly emotional about it.”&lt;/em&gt;&amp;nbsp;To her it feels like he is attempting to minimize her feelings or talk her out of having them.&lt;br /&gt;
Men and women desire to satisfy their partners, but they may miss the mark because it is truly difficult to understand and accept our partner’s different ways of communication. Men and women need education on these differences to help their relationships, so they do not end up in a frustrated state of resentment and feel stuck.&lt;br /&gt;
If a couple is feeling stuck, I suggest they read or listen to couples self-help books together. If the couple still feels stuck, then they should always seek professional counseling and get back on the road to better understanding and communication.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/832844795630476991/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/04/6-ways-men-and-women-communicate.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/832844795630476991'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/832844795630476991'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/04/6-ways-men-and-women-communicate.html' title='6 Ways Men and Women Communicate Differently'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-8555725075279193136</id><published>2012-04-04T04:54:00.004-07:00</published><updated>2012-04-04T04:54:53.264-07:00</updated><title type='text'>Introduce to STORM</title><content type='html'>&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Recently I am working with Webservice on Framework .NET and I found a wonderful tool for testing web services. It helps me a lot, so I want to share it with you.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-C0bwc957SgA/T3w1EVqbXOI/AAAAAAAABcQ/YGg1gUHJbLw/s1600/transmit_blue.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: left; float: left; margin-bottom: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://3.bp.blogspot.com/-C0bwc957SgA/T3w1EVqbXOI/AAAAAAAABcQ/YGg1gUHJbLw/s1600/transmit_blue.png&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;&lt;a href=&quot;http://storm.codeplex.com/&quot;&gt;STORM&lt;/a&gt; :&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;is a free and open source tool for testing web services.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;It is written mostly in F#&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;STORM allows you to&lt;/span&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. Test web services written using any technology (.NET , Java, etc.)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. Dynamically invoke web service methods even those that have input parameters of complex data types&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3. Save development time and money. Creating throw-away test client apps just to test the web service is&amp;nbsp;just too wasteful&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. Test multiple web services from within one UI.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;5. Edit/Manipulate the raw soap requests.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;6 Others (Try out the tool and find out yourself!)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Requirements :&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;.NET Framework 2.0&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;F# 1.9.3.14 (OPTIONAL) - Releases labeled with &quot;&quot;standalone&quot; doesn&#39;t need F# to be installed on the&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;machine&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;QUICK GUIDE :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. Add a web service&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Click Add -&amp;gt; type in the wsdl endpoint URL.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Sample URLs&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;- &lt;a href=&quot;http://www.deeptraining.com/webservices/weather.asmx&quot;&gt;http://www.deeptraining.com/webservices/weather.asmx&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;- &lt;a href=&quot;http://api.google.com/GoogleSearch.wsdl&quot;&gt;http://api.google.com/GoogleSearch.wsdl&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;-&amp;nbsp;&lt;a href=&quot;http://webservices.imacination.com/distance/Distance.jws?wsdl&quot;&gt;http://webservices.imacination.com/distance/Distance.jws?wsdl&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-uRFnYJSfkFo/T3w1DlKWimI/AAAAAAAABcI/KF3m1DEdie8/s1600/b.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;http://1.bp.blogspot.com/-uRFnYJSfkFo/T3w1DlKWimI/AAAAAAAABcI/KF3m1DEdie8/s640/b.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. Select a web method (TreeView on the left side). This will cause the tool to analyze the web method&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;and display the parameters (if any) needed to invoke the method&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3. Select a web method parameter and provide the necessary values&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. Click Go (Green arrow button). This will invoke the webmethod.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-wIn-1gfAHSs/T3w1C5AJF0I/AAAAAAAABcE/AVAkRduAESs/s1600/a.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;360&quot; src=&quot;http://1.bp.blogspot.com/-wIn-1gfAHSs/T3w1C5AJF0I/AAAAAAAABcE/AVAkRduAESs/s640/a.png&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;QUICK Instructions :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Section I.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;LOADING A WEB SERVICE AND TESTING ITS METHODS&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. CLick ADD in the toolbar.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. Provide the wsdl endpoint url&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3. Click Go (Green arrow)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. Select a web method. (Or right click and open it in a new tab)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;5. Click Send&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Section II.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;SAVING SOAP REQUEST AS TEST CASES&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. Open the web service&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. Select a web method while in &quot;Tree View&quot; (lightning icon)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3. Click Send&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. Switch to &quot;Raw View&quot; or &quot;Xml View&quot; (for the Soap Input)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;5. Edit the data.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;6. Click Save. Choose &quot;Test Data&quot; option. Provide the test case label, notes. etc. Click OK.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;7. The raw soap request message will now be part of the project.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;8. To save the soap response as the the expected response, repeat steps 4-7 on&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;response output generated in Step 3.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Section III.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;**********************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;SAVING THE CURRENT SESSION AS A STORM PROJECT&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;**********************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. &amp;nbsp;Assuming you already have an open web service(s) with or without test cases&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;(see above instructions, section II)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;click on the SAVE button in the toolbar&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. &amp;nbsp;Provide the storm project name. CLick OK.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- This will create the following folder structure&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; {File} StormProject.stormproj&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- {Folder} ServiceName&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- {Folder} WebMethod&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - {Folder} TestCaseName&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - {File} TestInputLabel_testinput.xml&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; - {File} WebMethod_test.config&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;- {File} ServiceName_ws.config &amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Section IV. &amp;nbsp; &lt;/b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;**********************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;LOADING A SAVED STORM PROJECT&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;**********************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. &amp;nbsp;Create a stormproject (See above instructions, section III)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. &amp;nbsp;Click OPEN from the toolbar. Navigate to the created storm project file&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3. &amp;nbsp;Click OK. &amp;nbsp;This will re-load the web service(s) and all the test cases (if any)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Section V.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;EXECUTING SAVED TEST CASES&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. Open the storm project&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. Right-click a test case node. Select Run/EDIT. This will open up a new tab.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3. Edit the Test input (Click on the edit icon) as needed.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. Click RUN button to invoke the web method&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. GREEN means the actual response matched the expected response.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Section VI.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;**********************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;SENDING MULTIPLE ARRAY ITEMS&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;**********************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. Load the web service&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. Select the web method containg an array input parameter.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3. Click &quot;Tree View&quot; (lightning icon). Edit the input tree&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. Click RUN button to invoke the web method&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. Switch to &quot;Raw View&quot;. &amp;nbsp;Edit the soap request as needed. You can add as many array items as you like.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;- Make sure that after editing the SOAP request it is still a well-formed XML. (You can check&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;this by switching to &quot;XML View&quot;. &amp;nbsp;If it is displayed correctly then it is well-formed).&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;b style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&amp;nbsp;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;b&gt;Section VII.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;**********************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;SENDING MULTIPLE MEMBER ARRAY ITEMS&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;**********************************************&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1. Load the web service&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2. Select the web method containing a class input parameter. (this class has an array member)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3. Click &quot;Tree View&quot; (lightning icon).&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4. Select the class. Object editor pops-up&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;5. In the object editor, select the array member&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;6. &amp;nbsp;Add array items&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/8555725075279193136/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/04/introduce-to-storm.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/8555725075279193136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/8555725075279193136'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/04/introduce-to-storm.html' title='Introduce to STORM'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-C0bwc957SgA/T3w1EVqbXOI/AAAAAAAABcQ/YGg1gUHJbLw/s72-c/transmit_blue.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-9492765239620106</id><published>2012-04-03T08:55:00.000-07:00</published><updated>2012-04-03T08:59:06.327-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>How to develop jQuery Plugins</title><content type='html'>&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Based on &quot;&lt;a href=&quot;http://docs.jquery.com/Plugins/Authoring#Getting_Started&quot; target=&quot;_blank&quot;&gt;Plugins/Authoring&lt;/a&gt;&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;jQuery is the most popular JavaScript library and many sites adopt it for dynamic effects and Ajax functionality. However, relatively few developers delve into the depths of plugin development.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This post will outline the basics, best practices, and common pitfalls to watch out for, as you begin writing your plugin.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: right;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://blogs.sitepointstatic.com/images/tech/114-jquery-plugin.jpg&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img alt=&quot;How To Develop a jQuery Plugin&quot; border=&quot;0&quot; height=&quot;200&quot; src=&quot;http://blogs.sitepointstatic.com/images/tech/114-jquery-plugin.jpg&quot; width=&quot;200&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;CONTENTS&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Getting Started&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Context&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The Basics&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Maintaining Chainability&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Defaults and Options&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Namespacing&lt;/span&gt;&lt;/li&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Plugin Methods&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Events&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Data&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Summary and Best Practices&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;Getting Started&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;By extending jQuery, you created reusable components that can be used on any web page. Your code is encapsulated and there is less risk that you will use the same function names elsewhere.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;To write a jQuery plugin, start by adding a new function property to the jQuery.fn object where the name of the property is the name of your plugin :&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;background-color: transparent; line-height: 19px;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;color: red;&quot;&gt;// jQuery.fn = jQuery.prototype = ...  &lt;/span&gt;
jQuery.fn.myPlugin = function () {
    // Do your awesome plugin stuff here  
};&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;However, to make sure that your plugin doesn&#39;t collide with other libraries that might use the dollar sign, it&#39;s a best practice to pass jQuery to an&amp;nbsp;IIFE(Immediately Invoked Function Expression) that maps it to the dollar sign so it can&#39;t be overwritten by another library in the scope of its execution.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;(function ($) {
     $.fn.myPlugin = function () {
         // Do your awesome plugin stuff here     
     &lt;span style=&quot;color: red;&quot;&gt;    // Scope Variables     
         //   Closure     
         //     $: function (selector, context) {...   }; &lt;/span&gt;
})(jQuery);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now within that &lt;b&gt;&lt;i&gt;closure&lt;/i&gt;&lt;/b&gt;, we can use the dollar sign in place of jQuery as much as we like.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;Context&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now that we have our shell we can start writing our actual plugin code. But before we do that, I&#39;d like to say a word about context. In the immediate scope of the plugin function, the &lt;i&gt;&lt;b&gt;this &lt;/b&gt;&lt;/i&gt;keyword refers to the jQuery object, the plugin was invoked on. This is a common slip up due to the fact that in other instances where jQuery accepts a callback, the &lt;b&gt;&lt;i&gt;this&lt;/i&gt;&lt;/b&gt; keyword refers to the native DOM element in the callback function.&lt;b&gt; This often leads to developers unnecessarily wrapping the this keyword (again) in the jQuery function.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;(function ($) {
    $.fn.myPlugin = function () {
        // there&#39;s no need to do $(this) because     
        // &quot;this&quot; is already a jquery object      
        // $(this) would be the same as $($(&#39;#element&#39;));      
       &lt;span style=&quot;color: red;&quot;&gt; // Local      
        //   this: jQuery.fn.jQuery.init[1]     
        //    0: HTMLDivElement     
        //    context: HTMLDocument     
        //    length: 1     
        //    selector: &quot;#element&quot;     &lt;/span&gt;
        this.fadeIn(&#39;normal&#39;, function () {
            // the this keyword is a DOM element        
           &lt;span style=&quot;color: red;&quot;&gt; // Local       //   this: HTMLDivElement       
            //     id: &quot;element&quot;       var that = this;              
            // Local       
            //   $this: jQuery.fn.jQuery.init[1]       
            //     0: HTMLDivElement       
            //     context : HTMLDivElement       
            //     length: 1       &lt;/span&gt;
            var $this = $(this);
        });
    };
})(jQuery);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; color: rgb(6, 38, 60) !important; line-height: 1.6 !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;$(&#39;#element&#39;).myPlugin();&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;The Basics&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Now that we understand the context of jQuery plugins, let&#39;s write a plugin that actually does something.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; float: none; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;(function ($) {
    $.fn.maxHeight = function () {
        var max = 0;
        this.each(function () {
          &lt;span style=&quot;color: red;&quot;&gt;  // Closure : max    &lt;/span&gt;   
            max = Math.max(max, $(this).height());
        });
        return max;
    };
})(jQuery);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; color: rgb(6, 38, 60) !important; float: none; line-height: 1.6 !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;var tallest = $(&#39;div&#39;).maxHeight(); // Returns the height of the tallest div&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This is a simple plugin that leverages .height() to return the height of the tallest div in the page.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;Maintaining Chainability&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The previous example returns an integer value of the tallest div on the page, but often times the intent of a plugin is simply modify the collection of elements in some way, and pass them along to the next method in the chain. This is the beauty of jQuery&#39;s design and is one of the reasons jQuery is so popular. So to maintain chainability in a plugin, you must make sure your plugin returns the &lt;b&gt;&lt;i&gt;this &lt;/i&gt;&lt;/b&gt;keyword.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; float: none; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;(function ($) {
    $.fn.lockDimensions = function (type) {
    &lt;span style=&quot;color: red;&quot;&gt;    // .each(function(index, Element))     
        // Iterate over a jQuery object, executing a function for each matched element.     
        // return jQuery    &lt;/span&gt; 
        return this.each(function () {
            var $this = $(this);
            if (!type || type == &#39;width&#39;) {
                $this.width($this.width());
            }
            if (!type || type == &#39;height&#39;) {
                $this.height($this.height());
            }
        });
    };
})(jQuery);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; color: rgb(6, 38, 60) !important; float: none; line-height: 1.6 !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;$(&#39;div&#39;).lockDimensions(&#39;width&#39;).css(&#39;color&#39;, &#39;red&#39;);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Because the plugin returns the this keyword in its immediate scope, it maintains chainability and the jQuery collection can continue to be manipulated by jQuery methods, such as .css. So if your plugin doesn&#39;t return an intrinsic value, you should always return the this keyword in the immediate scope of the plugin function. Also, as you might assume, arguments you pass in your plugin invocation get passed to the immediate scope of the plugin function. So in the previous example, the string &#39;width&#39; becomes the type argument for the plugin function.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;Defaults and Options&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;For more complex and customizable plugins that provide many options, it&#39;s a best practice to have default settings that can get extended(using $.extend) when the plugin is invoked. So instead of calling a plugin with a large number of arguments, you can call it with one argument which is an &lt;b&gt;&lt;i&gt;object literal&lt;/i&gt;&lt;/b&gt; of the settings you would like to override. Here&#39;s how you do it.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; float: none; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #06263c;&quot;&gt;(function ($) {
    $.fn.tooltip = function (options) {
        // Create some defaults, extending them with any options that were provided     
        &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;// var defaults = {...}; var settings = $.extend({}, defaults, options); works also    &lt;/span&gt;&lt;span style=&quot;color: #06263c;&quot;&gt; 
        var settings = $.extend({
            &#39;location&#39;: &#39;top&#39;,
            &#39;background-color&#39;: &#39;blue&#39;
        }, options);
        return this.each(function () {
           &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; // Tooltip plugin code here     &lt;/span&gt;&lt;span style=&quot;color: #06263c;&quot;&gt; 
        });
    };
})(jQuery);&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; color: rgb(6, 38, 60) !important; float: none; line-height: 1.6 !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;$(&#39;div&#39;).tooltip({   &#39;location&#39;&amp;nbsp;: &#39;left&#39; });&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In this example, after calling the tooltip plugin with the given options, the default location setting gets overridden to become &#39;left&#39;, while the background-color setting remains the default &#39;blue&#39;. So the final settings object ends up looking like this:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; color: rgb(6, 38, 60) !important; line-height: 1.6 !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;{  &#39;location&#39; &amp;nbsp;: &#39;left&#39;,   &#39;background-color&#39;&amp;nbsp;: &#39;blue&#39; }&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This is a great way to offer a highly configurable plugin without requiring the developer to define all available options.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;Namespacing&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Properly namespacing your plugin is a very important part of plugin development. Namespacing correctly assures that your plugin will have a very low chance of being overwritten by other plugins or code living on the same page. Namespacing also makes your life easier as a plugin developer because it helps you keep better track of your methods, events and data.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Plugin Methods&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Under no circumstance should a single plugin ever claim more than one namespece in the jQuery.fn object.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;color: #06263c; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;(function ($) {
    $.fn.tooltip = function (options) {
        // THIS   
    };
    $.fn.tooltipShow = function () {
        // IS   
    };
    $.fn.tooltipHide = function () {
        // BAD   
    };
    $.fn.tooltipUpdate = function (content) {
        // !!!     
    };
})(jQuery);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This is a discouraged because it clutters up the $.fn namespace. To remedy this, you should collect all of your plugin&#39;s methods in an object literal and call them by passing the string name of the method to the plugin.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; float: none; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;color: #06263c; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;(function ($) {
    var methods = {
        init: function (options) {
            // THIS      
        },
        show: function () {
            // IS     
        },
        hide: function () {
            // GOOD     
        },
        update: function (content) {
            // !!!      
        }
    };
    $.fn.tooltip = function (method) {
        // Method calling logic     
        if (methods[method]) {
            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
        } else if (typeof method === &#39;object&#39; || !method) {
            return methods.init.apply(this, arguments);
        } else {
            $.error(&#39;Method &#39; + method + &#39; does not exist on jQuery.tooltip&#39;);
        }
    };
})(jQuery);

// calls the init method $(&#39;div&#39;).tooltip();   
// calls the init method $(&#39;div&#39;).tooltip({   foo : &#39;bar&#39; });
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;color: #06263c; font-family: Verdana, sans-serif; line-height: 1.6;&quot;&gt;// calls the hide method $(&#39;div&#39;).tooltip(&#39;hide&#39;);  
&lt;/span&gt;&lt;span style=&quot;color: #06263c; font-family: Verdana, sans-serif; line-height: 1.6;&quot;&gt;// calls the update method $(&#39;div&#39;).tooltip(&#39;update&#39;, &#39;This is the new tooltip content!&#39;); &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This type of plugin architecture allows you to encapsulate all of your methods in the plugin&#39;s parent closure, and call them by first passing the string name of the name of the method, and then passing any additional parameters you might need for that method. This type of method encapsulation and architecture is a standard in the jQuery plugin community and it used by countless plugins, including the plugins and widgets in jQueryUI.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Events&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A lesser known feature of the bind method is that is allows for namespacing of bound events. If your plugin binds an event, its a good practice to namespece it. This way, if you need to unbind it later, you can do so without interfering with other events that might have been bound to the same type of event. You can namespace your events by appending &quot;.&amp;lt;namespace&amp;gt;&quot; to the type of event you&#39;re binding.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; float: none; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;color: #06263c; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt; (function ($) {
     var methods = {
         init: function (options) {
             return this.each(function () {
                 $(window).bind(&#39;resize.tooltip&#39;, methods.reposition);
             });
         },
         destroy: function () {
             return this.each(function () {
                 $(window).unbind(&#39;.tooltip&#39;);
             })
         },
         reposition: function () {
             // ...       
         },
         show: function () {
             // ...       
         },
         hide: function () {
             // ...       
         },
         update: function (content) {
             // ...      
         }
     };
     $.fn.tooltip = function (method) {
         if (methods[method]) {
             return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
         } else if (typeof method === &#39;object&#39; || !method) {
             return methods.init.apply(this, arguments);
         } else {
             $.error(&#39;Method &#39; + method + &#39; does not exist on jQuery.tooltip&#39;);
         }
     };
 })(jQuery);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; color: rgb(6, 38, 60) !important; float: none; line-height: 1.6 !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt; $(&#39;#fun&#39;).tooltip(); // Some time later... $(&#39;#fun&#39;).tooltip(&#39;destroy&#39;);&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In this example, when the tooltip is initialized with the init method, it binds the reposition method to the resize event of the window under the namespece &#39;tooltip&#39;. Later, if the developer needs to destroy the tooltip, we can unbind the events bound by the plugin by passing its namespace, in this case &#39;tooltip&#39;, to the unbind method. This allows us to safely unbind plugin events without accidentally unbinding events that may have been bound outside of the plugin.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Data&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Often times in plugin development, you may need to maintain state or check if your plugin has already been initialized on a given element. Using jQuery&#39;s data method is a great way to keep track of variables on a per element basis. However, rather than keeping track of a bunch of separate data calls with different names, it&#39;s best to use a single object literal to house all of your variables, and access that object by a single data namespace.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;(function ($) {
    var methods = {
        init: function (options) {
            return this.each(function () {
                // .data(key, value) Returns : jQuery          
                // Store arbitraty data associated with the matched elements.          
                var $this = $(this),
                    data = $this.data(&#39;tooltip&#39;),
                    tooltip = $(&#39;&amp;lt;div /&amp;gt;&#39;, {
                        text: $this.attr(&#39;title&#39;)
                    });
                // If the plugin hasn&#39;t been initialized yet          
                if (!data) {
                    /*      Do more setup stuff here     */
                    $(this).data(&#39;tooltip&#39;, {
                        target: $this,
                        tooltip: tooltip
                    });
                }
            });
        },
        destroy: function () {
            return this.each(function () {
                var $this = $(this),
                    data = $this.data(&#39;tooltip&#39;);
                // Namespacing FTW          
                $(window).unbind(&#39;.tooltip&#39;);
                data.tooltip.remove();
                $this.removeData(&#39;tooltip&#39;);
            })
        },
        reposition: function () {
            // ... 
        },
        show: function () {
            // ... 
        },
        hide: function () {
            // ... 
        },
        update: function (content) {
            // ...
        }
    };
    $.fn.tooltip = function (method) {
        if (methods[method]) {
            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
        } else if (typeof method === &#39;object&#39; || !method) {
            return methods.init.apply(this, arguments);
        } else {
            $.error(&#39;Method &#39; + method + &#39; does not exist on jQuery.tooltip&#39;);
        }
    };
})(jQuery);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Using data helps you keep track of variables and state across method calls from your plugin. Namespacing your data into one object literal makes it easy to access all of your plugin&#39;s properties from one central location, as well as reducing the data namespace which allows for easy removal &amp;nbsp;if need be.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;Summary and Best Practices&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Writing jQuery plugins allows you to make the most out of the library and abstract your most clever and useful functions out into reusable code that can save you time and make your development even more efficient. Here&#39;s a brief summary of the post and what to keep in mind when developing your first or next jQuery plugin :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Always wrap your plugin in a closure:&amp;nbsp; (function( $ ){ /* plugin goes here */ })( jQuery );&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Don&#39;t redundantly wrap the this keyword in the immediate scope of your plugin&#39;s function;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Unless you&#39;re returning an intrinsic value from your plugin, always have your plugin&#39;s function return the this keyword to maintain chainability;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Rather than requiring a lengthy amount of arguments, pass your plugin settings in an object literal that can be extended over the plugin&#39;s defaults;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Don&#39;t clutter the jQuery.fn object with more than one namespace per plugin;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Always namespace your methods, events and data.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Make your plugin can initialize itself&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;Using &amp;nbsp;jQuery Plugin Template&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;margin-bottom: 1.467em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; line-height: 22px;&quot;&gt;      Here&#39;s the template code according to this post for creating a new plugin :&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 1.467em; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;/div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial!important; border-bottom-color: rgb(221,221,221)!important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted!important; border-bottom-width: 1px!important; border-color: initial; border-left-color: rgb(221,221,221)!important; border-left-style: dotted!important; border-left-width: 1px!important; border-right-color: rgb(221,221,221)!important; border-right-style: dotted!important; border-right-width: 1px!important; border-style: initial; border-top-color: rgb(221,221,221)!important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted!important; border-top-width: 1px!important; margin-bottom: 1.2em!important; margin-top: 0.8em!important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px!important; padding-left: 5px!important; padding-right: 5px!important; padding-top: 5px!important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;(function ($) {
    // Private members or functions      
    //...TODO      
    // Public functions     
    var methods = {
        init: function (options) {
            var defaults = {
                //...TODO            
            };
            var opts = $.extend({}, defaults, options);
            return this.each(function () {
                //...TODO             
            });
        },
        destroy: function () {
            //...TODO         
        },
        update: function () {
            //...TODO         
        }
        // You can add other methods here, but don&#39;t forget the comma     
    };
    // Change PLUGIN_NAME to your own plugin name     
    $.fn.PLUGIN_NAME = function (method) {
        if (methods[method]) {
            return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
        } else if (typeof method === &#39;object&#39; || !method) {
            return methods.init.apply(this, arguments);
        } else {
            $.error(&#39;Method &#39; + method + &#39; does not exist on jQuery.PLUGIN_NAME&#39;);
        }
    };
})(jQuery);&lt;/span&gt;&lt;/pre&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Also, you can use &lt;a href=&quot;https://github.com/geetarista/jquery-plugin-template/blob/master/jquery.plugin-template.js&quot; target=&quot;_blank&quot;&gt;a much more simple template&lt;/a&gt;&amp;nbsp;created by&amp;nbsp;&lt;a href=&quot;https://github.com/geetarista&quot;&gt;geetarista&lt;/a&gt;, it works well for simple cases but it isn&#39;t robust;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;color: #06263c; font-family: Verdana, sans-serif; line-height: 1.6 !important;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #06263c; font-family: Verdana, sans-serif;&quot;&gt;/**
 * jQuery PLUGIN_NAME Plugin
 * Version: x.x.x
 * URL: URL
 * Description: DESCRIPTION
 * Requires: JQUERY_VERSION, OTHER_PLUGIN(S), ETC. 
 * Author: AUTHOR (AUTHOR_URL)
 * Copyright: Copyright 2010 YOUR_NAME
 * License: LICENSE_INFO
 */
// Plugin closure wrapper
(function ($) {
    // Main plugin function
    // Replace PLUGIN with the name of your desired function
    $.fn.PLUGIN = function (options) {
        // Overwrite user options with plugin defaults
        var opts = $.extend({}, $.fn.PLUGIN.defaults, options);
        // Iterate through DOM elements and work your magic
        return this.each(function () {
            // Assign the current object to a variable for easier use
            var $this = $(this);
            // This is where most of your plugin functionality resides
        }); // end return this.each
    }; // end $.fn.PLUGIN
    // Public plugin function
    // Replce PLUGIN with your plugin function&#39;s name
    // Replace FUNCT with the name of the public function
    $.fn.PLUGIN.FUNCT = function () {
        // Cool JS action
    }; // end $.fn.PLUGIN.FUNCT
    // Default settings for the plugin
    $.fn.PLUGIN.defaults = {
        property: &quot;value&quot;,
        anotherProperty: 10
    };
    // Private function that is used within the plugin
    function privateFunction() {
        // Cool JS action
    }
&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent; line-height: 19px;&quot;&gt;&lt;span style=&quot;color: #06263c; font-family: Verdana, sans-serif;&quot;&gt;})(jQuery); // end closure wrapper&lt;/span&gt;&lt;/span&gt;&lt;span style=&quot;background-color: white; color: #06263c; font-family: Verdana, sans-serif; line-height: 1.6 !important; text-align: -webkit-auto;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;To finish&amp;nbsp;this post, i will introduce you&amp;nbsp;&lt;a href=&quot;http://raynos.github.com/jQuery-plugin-scaffolding/&quot;&gt;a powerful jQuery plugin scaffolding&lt;/a&gt;&amp;nbsp;created by&amp;nbsp;&lt;a href=&quot;http://stackoverflow.com/users/419970/raynos&quot;&gt;Raynos&lt;/a&gt;&amp;nbsp;which has best practice, convention, performance and memory impact. However i think you have to need a solid js base to understand the following :&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #fafafa; background-image: initial !important; border-bottom-color: rgb(221, 221, 221) !important; border-bottom-left-radius: 3px; border-bottom-right-radius: 3px; border-bottom-style: dotted !important; border-bottom-width: 1px !important; border-color: initial; border-left-color: rgb(221, 221, 221) !important; border-left-style: dotted !important; border-left-width: 1px !important; border-right-color: rgb(221, 221, 221) !important; border-right-style: dotted !important; border-right-width: 1px !important; border-style: initial; border-top-color: rgb(221, 221, 221) !important; border-top-left-radius: 3px; border-top-right-radius: 3px; border-top-style: dotted !important; border-top-width: 1px !important; margin-bottom: 1.2em !important; margin-top: 0.8em !important; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 5px !important; padding-left: 5px !important; padding-right: 5px !important; padding-top: 5px !important; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;color: #06263c; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 19px;&quot;&gt;(function ($, jQuery, window, document, undefined) {
    var PLUGIN_NAME = &quot;Identity&quot;;
    // default options hash.
    var defaults = {
        // TODO: Add defaults
    };
    // -------------------------------
    // -------- BOILERPLATE ----------
    // -------------------------------
    var toString = Object.prototype.toString,
        // uid for elements
        uuid = 0,
        Wrap, Base, create, main;
    (function _boilerplate() {
        // over-ride bind so it uses a namespace by default
        // namespace is PLUGIN_NAME_&amp;lt;uid&amp;gt;
        $.fn.bind = function _bind(type, data, fn, nsKey) {
            if (typeof type === &quot;object&quot;) {
                for (var key in type) {
                    nsKey = key + this.data(PLUGIN_NAME)._ns;
                    this.bind(nsKey, data, type[key], fn);
                }
                return this;
            }
            nsKey = type + this.data(PLUGIN_NAME)._ns;
            return jQuery.fn.bind.call(this, nsKey, data, fn);
        };
        // override unbind so it uses a namespace by default.
        // add new override. .unbind() with 0 arguments unbinds all methods
        // for that element for this plugin. i.e. calls .unbind(_ns)
        $.fn.unbind = function _unbind(type, fn, nsKey) {
            // Handle object literals
            if (typeof type === &quot;object&quot; &amp;amp;&amp;amp; !type.preventDefault) {
                for (var key in type) {
                    nsKey = key + this.data(PLUGIN_NAME)._ns;
                    this.unbind(nsKey, type[key]);
                }
            } else if (arguments.length === 0) {
                return jQuery.fn.unbind.call(this, this.data(PLUGIN_NAME)._ns);
            } else {
                nsKey = type + this.data(PLUGIN_NAME)._ns;
                return jQuery.fn.unbind.call(this, nsKey, fn);
            }
            return this;
        };
        // Creates a new Wrapped element. This is cached. One wrapped element 
        // per HTMLElement. Uses data-PLUGIN_NAME-cache as key and 
        // creates one if not exists.
        create = (function _cache_create() {
            function _factory(elem) {
                return Object.create(Wrap, {
                    &quot;elem&quot;: {
                        value: elem
                    },
                    &quot;$elem&quot;: {
                        value: $(elem)
                    },
                    &quot;uid&quot;: {
                        value: ++uuid
                    }
                });
            }
            var uid = 0;
            var cache = {};
            return function _cache(elem) {
                var key = &quot;&quot;;
                for (var k in cache) {
                    if (cache[k].elem == elem) {
                        key = k;
                        break;
                    }
                }
                if (key === &quot;&quot;) {
                    cache[PLUGIN_NAME + &quot;_&quot; + ++uid] = _factory(elem);
                    key = PLUGIN_NAME + &quot;_&quot; + uid;
                }
                return cache[key]._init();
            };
        }());
        // Base object which every Wrap inherits from
        Base = (function _Base() {
            var self = Object.create({});
            // destroy method. unbinds, removes data
            self.destroy = function _destroy() {
                if (this._alive) {
                    this.$elem.unbind();
                    this.$elem.removeData(PLUGIN_NAME);
                    this._alive = false;
                }
            };
            // initializes the namespace and stores it on the elem.
            self._init = function _init() {
                if (!this._alive) {
                    this._ns = &quot;.&quot; + PLUGIN_NAME + &quot;_&quot; + this.uid;
                    this.data(&quot;_ns&quot;, this._ns);
                    this._alive = true;
                }
                return this;
            };
            // returns data thats stored on the elem under the plugin.
            self.data = function _data(name, value) {
                var $elem = this.$elem,
                    data;
                if (name === undefined) {
                    return $elem.data(PLUGIN_NAME);
                } else if (typeof name === &quot;object&quot;) {
                    data = $elem.data(PLUGIN_NAME) || {};
                    for (var k in name) {
                        data[k] = name[k];
                    }
                    $elem.data(PLUGIN_NAME, data);
                } else if (arguments.length === 1) {
                    return ($elem.data(PLUGIN_NAME) || {})[name];
                } else {
                    data = $elem.data(PLUGIN_NAME) || {};
                    data[name] = value;
                    $elem.data(PLUGIN_NAME, data);
                }
            };
            return self;
        })();
        // Call methods directly. $.PLUGIN_NAME(elem, &quot;method&quot;, option_hash)
        var methods = jQuery[PLUGIN_NAME] = function _methods(elem, op, hash) {
                if (typeof elem === &quot;string&quot;) {
                    hash = op || {};
                    op = elem;
                    elem = hash.elem;
                } else if ((elem &amp;amp;&amp;amp; elem.nodeType) || Array.isArray(elem)) {
                    if (typeof op !== &quot;string&quot;) {
                        hash = op;
                        op = null;
                    }
                } else {
                    hash = elem || {};
                    elem = hash.elem;
                }
                hash = hash || {}
                op = op || PLUGIN_NAME;
                elem = elem || document.body;
                if (Array.isArray(elem)) {
                    var defs = elem.map(function (val) {
                        return create(val)[op](hash);
                    });
                } else {
                    var defs = [create(elem)[op](hash)];
                }
                return $.when.apply($, defs).then(hash.cb);
            };
        // expose publicly.
        Object.defineProperties(methods, {
            &quot;_Wrap&quot;: {
                &quot;get&quot;: function () {
                    return Wrap;
                },
                &quot;set&quot;: function (v) {
                    Wrap = v;
                }
            },
            &quot;_create&quot;: {
                value: create
            },
            &quot;_$&quot;: {
                value: $
            },
            &quot;global&quot;: {
                &quot;get&quot;: function () {
                    return defaults;
                },
                &quot;set&quot;: function (v) {
                    defaults = v;
                }
            }
        });
        // main plugin. $(selector).PLUGIN_NAME(&quot;method&quot;, option_hash)
        jQuery.fn[PLUGIN_NAME] = function _main(op, hash) {
            if (typeof op === &quot;object&quot; || !op) {
                hash = op;
                op = null;
            }
            op = op || PLUGIN_NAME;
            hash = hash || {};
            // map the elements to deferreds.
            var defs = this.map(function _map() {
                return create(this)[op](hash);
            }).toArray();
            // call the cb when were done and return the deffered.
            return $.when.apply($, defs).then(hash.cb);
        };
    }());
    // -------------------------------
    // --------- YOUR CODE -----------
    // -------------------------------
    main = function _main(options) {
        this.options = options = $.extend(true, defaults, options);
        var def = $.Deferred();
        // Identity returns this &amp;amp; the $elem.
        // TODO: Replace with custom logic
        def.resolve([this, this.elem]);
        return def;
    }
    Wrap = (function () {
        var self = Object.create(Base);
        var $destroy = self.destroy;
        self.destroy = function _destroy() {
            delete this.options;
            // custom destruction logic
            // remove elements and other events / data not stored on .$elem
            $destroy.apply(this, arguments);
        };
        // set the main PLUGIN_NAME method to be main.
        self[PLUGIN_NAME] = main;
        // TODO: Add custom logic for public methods
        return self;
    }());
})(jQuery.sub(), jQuery, this, document);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre class=&quot;default prettyprint&quot; style=&quot;background-color: white; background-image: initial; border-bottom-width: 0px; border-color: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; line-height: 18px; margin-bottom: 10px; margin-top: 0px; max-height: 600px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; text-align: left; vertical-align: baseline; width: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/9492765239620106/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/04/how-to-develop-jquery-plugins.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/9492765239620106'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/9492765239620106'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/04/how-to-develop-jquery-plugins.html' title='How to develop jQuery Plugins'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-8306290018121062323</id><published>2012-04-01T17:20:00.000-07:00</published><updated>2012-04-01T17:20:09.362-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Front Web"/><category scheme="http://www.blogger.com/atom/ns#" term="Reprint"/><title type='text'>How to Write Maintainable OO JavaScript Code</title><content type='html'>&lt;br /&gt;
&lt;div class=&quot;FeatureTitle&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;h1 style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; margin-bottom: 6px; margin-left: 0px; margin-right: 0px; margin-top: 5px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; font-weight: normal; line-height: 16px;&quot;&gt;Reprint :&amp;nbsp;&lt;/span&gt;&lt;span style=&quot;color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;&lt;span style=&quot;font-weight: normal; line-height: 16px;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/magazine/gg602402.aspx?utm_source=javascriptweekly&amp;amp;utm_medium=email&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;How to Write Maintainable OO JavaScript Code&lt;/a&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Author :&amp;nbsp;&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/magazine/gg602402.aspx?utm_source=javascriptweekly&amp;amp;utm_medium=email#author&quot; rel=&quot;nofollow&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #0066dd; cursor: pointer; font-family: inherit; font-style: inherit; font-weight: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; xmlns:ms=&quot;urn:schemas-microsoft-com:xslt&quot;&gt;Ara Pehlivanian&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Writing maintainable Object-Oriented (OO) JavaScript will save you money and make you popular. Don&#39;t believe me? Odds are that either you or someone else will come back and work with your code. Making that as painless an experience as possible will save time, which we all know equates to money. It will also win you the favor of those for whom you just saved a headache. But before we dive into writing maintainable OO JavaScript, let&#39;s just take a quick look at what OO is all about. If you know already about OO, feel free to skip the next section.&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #260859; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 20px; margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 7px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
What is OO?&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Object-oriented programming basically represents physical, real-world objects that you want to work with in code. In order to create objects, you need to first define them by writing what&#39;s called a&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;class&lt;/em&gt;. Classes can represent pretty much anything: accounts, employees, navigation menus, vehicles, plants, advertisements, drinks, etc... Then, every time you want to create an object to work with, you instantiate one from a class. In other words, you create an instance of a class which gives you an object to work with. In fact, the best time to be using objects is when you&#39;ll be dealing with more than one of anything. Otherwise, a simple functional program will likely do just as well. Objects are essentially containers for data. So in the case of an&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;employee&lt;/em&gt;&amp;nbsp;object, you might store their employee number, name, start date, title, salary, seniority, etc... Objects also include functions (called methods) to handle that data. Methods are used as intermediaries to ensure data integrity. They&#39;re also used to transform data before storing it. For example, a method could receive a date in an arbitrary format then convert it to a standardized format before storing it. Finally, classes can also inherit from other classes. Inheritance allows you to reuse code across different types of classes. For example, both&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;bank account&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;video store account&lt;/em&gt;classes could inherit from a base&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;account&lt;/em&gt;&amp;nbsp;class which would provide fields for profile information, account creation date, branch information, etc... Then, each would define its own&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;transactions&lt;/em&gt;&amp;nbsp;or&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;rentals&lt;/em&gt;handling data structures and methods.&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #260859; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 20px; margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 7px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Warning: JavaScript OO is different&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In the previous section I outlined the basics of classical object-oriented programming. I say classical because JavaScript doesn&#39;t quite follow those rules. Instead, JavaScript classes are actually written as functions and inheritance is&amp;nbsp;&lt;a href=&quot;http://javascript.crockford.com/prototypal.html&quot; id=&quot;ctl00_MTContentSelector1_mainContentContainer_ctl01&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #0066dd; cursor: pointer; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;prototypal&lt;/a&gt;. Prototypal inheritance basically means that rather than classes inheriting from classes, they inherit from objects using the&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;prototype&lt;/em&gt;&amp;nbsp;property.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #3a3e43; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 18px; line-height: 22px; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Object Instantiation&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Here&#39;s an example of object instantiation in JavaScript:&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Define&amp;nbsp;the&amp;nbsp;Employee&amp;nbsp;class&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;Employee(num,&amp;nbsp;fname,&amp;nbsp;lname)&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.getFullName&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;fname&amp;nbsp;+&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;&amp;nbsp;&quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;lname;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Instantiate&amp;nbsp;an&amp;nbsp;Employee&amp;nbsp;object&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;john&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Employee(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;4815162342&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;John&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Doe&quot;&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;alert(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;The&amp;nbsp;employee&#39;s&amp;nbsp;full&amp;nbsp;name&amp;nbsp;is&amp;nbsp;&quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;john.getFullName());&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
There are three important things to note here:&lt;/div&gt;
&lt;ol style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;I uppercased the first letter of my &quot;class&quot; function. That important distinction lets people know that it&#39;s for instantiation and not to be called as a normal function.&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;I use the&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/em&gt;&amp;nbsp;operator when instantiating. Leaving it out would simply call the function and result in problems.&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Though getFullName is publicly available because it&#39;s assigned to the&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/em&gt;&amp;nbsp;operator, fname and lname are not. The&amp;nbsp;&lt;a href=&quot;https://developer.mozilla.org/en/JavaScript/Guide/Closures&quot; id=&quot;ctl00_MTContentSelector1_mainContentContainer_ctl03&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #0066dd; cursor: pointer; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;closure&lt;/a&gt;&amp;nbsp;created by the Employee function gives getFullName access to&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;fname&lt;/em&gt;&amp;nbsp;and&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;lname&lt;/em&gt;while allowing them to remain private from everyone else.&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #3a3e43; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 18px; line-height: 22px; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Prototypal Inheritance&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Now, here&#39;s an example of prototypal inheritance in JavaScript:&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Define&amp;nbsp;Human&amp;nbsp;class&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;Human()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.setName&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(fname,&amp;nbsp;lname)&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.fname&amp;nbsp;=&amp;nbsp;fname;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.lname&amp;nbsp;=&amp;nbsp;lname;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.getFullName&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.fname&amp;nbsp;+&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;&amp;nbsp;&quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.lname;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Define&amp;nbsp;the&amp;nbsp;Employee&amp;nbsp;class&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;Employee(num)&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.getNum&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;num;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Let&amp;nbsp;Employee&amp;nbsp;inherit&amp;nbsp;from&amp;nbsp;Human&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Employee.prototype&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Human();&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Instantiate&amp;nbsp;an&amp;nbsp;Employee&amp;nbsp;object&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;john&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Employee(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;4815162342&quot;&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;john.setName(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;John&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Doe&quot;&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;alert(john.getFullName()&amp;nbsp;+&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;&#39;s&amp;nbsp;employee&amp;nbsp;number&amp;nbsp;is&amp;nbsp;&quot;&lt;/span&gt;&amp;nbsp;+&amp;nbsp;john.getNum());&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
This time, I&#39;ve created a Human class which contains properties common to humans--I moved fname and lname there since all humans, not just employees have names. I then extended the Employee class by assigning a Human object to its&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;prototype&lt;/em&gt;&amp;nbsp;property.&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #260859; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 20px; margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 7px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Code Reuse Through Inheritance&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In the previous example, I split the original Employee class in two. I moved out all the properties common to all humans into a Human class, and then caused Employee to inherit from&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Human&lt;/em&gt;. That way, the properties laid out in&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Human&lt;/em&gt;&amp;nbsp;could be used by other objects such as Student, Client, Citizen, Visitor, etc... As you may have noticed by now, this is a great way to compartmentalize and reuse code. Rather than recreating all of those properties for every single type of object where we&#39;re dealing with a human being, we can just use what&#39;s already available by inheriting from&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Human&lt;/em&gt;. What&#39;s more, if we ever wanted to add a property like say, middle name, we&#39;d do it once and it would immediately be available to everyone inheriting from&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Human&lt;/em&gt;. Conversely, if we only wanted to add a middle name property to just one object, we could do it directly in that object instead of adding it to&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Human&lt;/em&gt;.&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #260859; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 20px; margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 7px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Public and Private&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
I&#39;d like to touch on the subject of public and private variables in classes. Depending on what you&#39;re doing with the data in an object, you&#39;ll want to either make it private or public. A private property doesn&#39;t necessarily mean that people won&#39;t have access to it. You may just want them to go through one of your methods first.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #3a3e43; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 18px; line-height: 22px; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Read-only&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Sometimes, you only want a value defined once at the moment the object is created. Once created, you don&#39;t want anyone changing that value. In order to do this, you create a private variable and have its value set on instantiation.&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;Animal(type)&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;data&amp;nbsp;=&amp;nbsp;[];&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;data[&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;type&#39;&lt;/span&gt;]&amp;nbsp;=&amp;nbsp;type;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.getType&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;return&lt;/span&gt;&amp;nbsp;data[&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;type&#39;&lt;/span&gt;];&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;fluffy&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Animal(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;dog&#39;&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;fluffy.getType();&amp;nbsp;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;returns&amp;nbsp;&#39;dog&#39;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
In this example, I create a local array called&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;data&lt;/em&gt;&amp;nbsp;within the Animal class. When an Animal object is instantiated, a value for&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;type&lt;/em&gt;&amp;nbsp;is passed and set in the&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;data&lt;/em&gt;&amp;nbsp;array. This value can&#39;t be overwritten as it&#39;s private (the Animal function defines its scope). The only way to read the&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;type&lt;/em&gt;&amp;nbsp;value once an object is instantiated is to call the&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;getType&lt;/em&gt;&amp;nbsp;method that I&#39;ve explicitly exposed. Since&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;getType&lt;/em&gt;&amp;nbsp;is defined inside&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Animal&lt;/em&gt;, it has access to&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;data&lt;/em&gt;&amp;nbsp;by virtue of the closure created by&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Animal&lt;/em&gt;. This way, people can read the object&#39;s type but not change it.&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;strong style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;It&#39;s important to note&lt;/strong&gt;&amp;nbsp;that the &quot;read-only&quot; technique will not work when an object is inherited from. Every object instantiated after the inheritance is performed will share those read-only variables and overwrite each other&#39;s values. The simplest solution is to convert the read-only variables in the class to public ones. If however, you must keep them private, you can employ the technique pointed out by Philippe&amp;nbsp;&lt;a href=&quot;http://msdn.microsoft.com/en-us/magazine/gg602402.aspx?utm_source=javascriptweekly&amp;amp;utm_medium=email#CommunityContent&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #0066dd; cursor: pointer; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; xmlns:ms=&quot;urn:schemas-microsoft-com:xslt&quot;&gt;in the comments&lt;/a&gt;.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #3a3e43; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 18px; line-height: 22px; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Public&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
There are times however, that you&#39;ll want to be able to read and write a property&#39;s value at will. To do that, you need to expose the property using the&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/em&gt;&amp;nbsp;operator.&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;Animal()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.mood&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;&#39;&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;fluffy&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Animal();&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;fluffy.mood&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;happy&#39;&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;fluffy.mood;&amp;nbsp;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;returns&amp;nbsp;&#39;happy&#39;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
This time our&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Animal&lt;/em&gt;&amp;nbsp;class exposes a property named&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;mood&lt;/em&gt;&amp;nbsp;which can be written to and read at will. You can equally assign a function to public properties like the&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;getType&lt;/em&gt;&amp;nbsp;function in the previous example. Just be careful not to assign a value to a property like&amp;nbsp;&lt;em style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;getType&lt;/em&gt;&amp;nbsp;or you&#39;ll destroy it with your value.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #3a3e43; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 18px; line-height: 22px; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Completely Private&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Finally, you might find yourself in scenarios where you need a local variable that&#39;s completely private. In this case, you can use the same pattern as the first example and just not create a public method for people to access it.&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;Animal()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;secret&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;You&#39;ll&amp;nbsp;never&amp;nbsp;know!&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;fluffy&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Animal();&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #260859; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 20px; margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 7px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Writing a Flexible API&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Now that we&#39;ve covered class creation, we need to future proof them in order to keep up with product requirement changes. If you&#39;ve done any project work, or maintained a product long-term, you know that&amp;nbsp;requirements change. It&#39;s a fact of life. To think otherwise is to doom your code to obsolescence before it&#39;s even written. You may suddenly have to animate your tab content, or have it fetch data via an Ajax call. Though it&#39;s impossible to truly predict the future, it is possible to write code that&#39;s flexible enough to be reasonably future proof.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #3a3e43; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 18px; line-height: 22px; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Saner Parameter Lists&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
One place where future-proofing can be done is when designing parameter lists. They&#39;re the main point of contact for people implementing your code and can be problematic if not well designed. What you want to avoid are parameter lists like this:&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;Person(employeeId,&amp;nbsp;fname,&amp;nbsp;lname,&amp;nbsp;tel,&amp;nbsp;fax,&amp;nbsp;email,&amp;nbsp;email2,&amp;nbsp;dob)&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;;&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
This class is very fragile. If you want to add a middle name parameter once you&#39;ve released the code, you&#39;re going to have to do it at the very end of the list since order matters. That makes it awkward to work with. It also makes it difficult to work with if you don&#39;t have values for each parameter. For example:&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;ara&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Person(&lt;span class=&quot;js__num&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1234&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Ara&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Pehlivanian&quot;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;514-555-1234&quot;&lt;/span&gt;,&amp;nbsp;null,&amp;nbsp;null,&amp;nbsp;null,&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;1976-05-17&quot;&lt;/span&gt;);&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
A cleaner, more flexible way of approaching parameter lists is to use this pattern:&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;Person(employeeId,&amp;nbsp;data)&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;;&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The first parameter is there because it&#39;s required. The rest is lumped together in an object which can be very flexible to work with.&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;ara&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Person(&lt;span class=&quot;js__num&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1234&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fname:&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Ara&quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lname:&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Pehlivanian&quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tel:&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;514-555-1234&quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dob:&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;1976-05-17&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;);&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The beauty of this pattern is that it&#39;s both easy to read and highly flexible. Note how&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;fax&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;email&lt;/code&gt;&amp;nbsp;and&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;email2&lt;/code&gt;&amp;nbsp;were completely left out. Also, since objects aren&#39;t order specific, adding a middle name parameter is as easy as throwing it in wherever it&#39;s convenient:&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;ara&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;Person(&lt;span class=&quot;js__num&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;1234&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;fname:&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Ara&quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;mname:&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Chris&quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;lname:&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;Pehlivanian&quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;tel:&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;514-555-1234&quot;&lt;/span&gt;,&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;dob:&amp;nbsp;&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;1976-05-17&quot;&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;);&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
The code inside the class doesn&#39;t care because the values get accessed by index like so:&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;Person(employeeId,&amp;nbsp;data)&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.fname&amp;nbsp;=&amp;nbsp;data[&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;fname&#39;&lt;/span&gt;];&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;;&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
If&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;data[&#39;fname&#39;]&lt;/code&gt;&amp;nbsp;returns a value, it gets set. Otherwise, it doesn&#39;t, and nothing breaks.&lt;/div&gt;
&lt;h3 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #3a3e43; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 18px; line-height: 22px; margin-bottom: 3px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Make It Pluggable&lt;/h3&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
As time goes on, product requirements might demand additional behavior from your classes. Yet often times that behavior has absolutely nothing to do with your class&#39;s core functionality. It&#39;s also likely that it&#39;s a requirement for only one implementation of the class, like fading in the contents of one tab&#39;s panel while fetching external data for another. You may be tempted to put those abilities inside your class, but they don&#39;t belong there. A tab strip&#39;s responsibility is to manage tabs. Animation and data fetching are two completely separate things and should be kept outside the tab strip&#39;s code. The only way to future proof your tab strip and keep all that extra functionality external, is to allow people to plug behaviors into your code. In other words, allow people to hook into key moments in your code by creating events like&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;onTabChange&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;afterTabChange&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;onShowPanel&lt;/code&gt;,&amp;nbsp;&lt;code style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;afterShowPanel&lt;/code&gt;&amp;nbsp;and so on. That way, they can easily hook into your onShowPanel event, write a handler that fades in the contents of that panel&amp;nbsp;and everyone is happy. JavaScript libraries allow you to do this easily enough, but it&#39;s not too hard to work it out on your own. Here&#39;s a simple example using YUI 3.&lt;/div&gt;
&lt;div class=&quot;CodeHighlighter&quot; style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 15px; padding-left: 15px; padding-right: 0px; padding-top: 0px; word-wrap: break-word;&quot;&gt;
&lt;pre style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; white-space: pre-wrap;&quot;&gt;&lt;code class=&quot;js&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; margin-bottom: 12px; margin-left: 18px; margin-right: 0px; margin-top: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;script&amp;nbsp;type=&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&amp;nbsp;src=&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;http://yui.yahooapis.com/combo?3.2.0/build/yui/yui-min.js&quot;&lt;/span&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;script&amp;nbsp;type=&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&quot;text/javascript&quot;&lt;/span&gt;&amp;gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;YUI().use(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;event&#39;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;(Y)&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;TabStrip()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.showPanel&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.fire(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;onShowPanel&#39;&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Code&amp;nbsp;to&amp;nbsp;show&amp;nbsp;the&amp;nbsp;panel&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;this&lt;/span&gt;.fire(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;afterShowPanel&#39;&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Give&amp;nbsp;TabStrip&amp;nbsp;the&amp;nbsp;ability&amp;nbsp;to&amp;nbsp;fire&amp;nbsp;custom&amp;nbsp;events&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;Y.augment(TabStrip,&amp;nbsp;Y.EventTarget);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__statement&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: navy; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;var&lt;/span&gt;&amp;nbsp;ts&amp;nbsp;=&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;new&lt;/span&gt;&amp;nbsp;TabStrip();&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//&amp;nbsp;Set&amp;nbsp;up&amp;nbsp;custom&amp;nbsp;event&amp;nbsp;handlers&amp;nbsp;for&amp;nbsp;this&amp;nbsp;instance&amp;nbsp;of&amp;nbsp;TabStrip&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ts.on(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;onShowPanel&#39;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//Do&amp;nbsp;something&amp;nbsp;before&amp;nbsp;showing&amp;nbsp;panel&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ts.on(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;onShowPanel&#39;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//Do&amp;nbsp;something&amp;nbsp;else&amp;nbsp;before&amp;nbsp;showing&amp;nbsp;panel&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ts.on(&lt;span class=&quot;js__string&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: teal; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&#39;afterShowPanel&#39;&lt;/span&gt;,&amp;nbsp;&lt;span class=&quot;js__operator&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: royalblue; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;function&lt;/span&gt;&amp;nbsp;()&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;{&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__sl_comment&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: green; font-family: inherit; font-style: inherit; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;//Do&amp;nbsp;something&amp;nbsp;after&amp;nbsp;showing&amp;nbsp;panel&lt;/span&gt;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;ts.showPanel();&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;span class=&quot;js__brace&quot; style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: red; font-family: inherit; font-style: inherit; font-weight: bold; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;}&lt;/span&gt;);&lt;/li&gt;
&lt;li style=&quot;border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; font-family: inherit; font-style: inherit; list-style-image: none; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 3px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&amp;lt;/script&amp;gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;/code&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
This example has a simple TabStrip class with a showPanel method. The method fires two events, onShowPanel and afterShowPanel. It&#39;s given the ability to do so by augmenting the class with Y.EventTarget. Once that&#39;s done, we instantiate a TabStrip object and assign a bunch of event handlers to it. This is our custom code for handling this instance&#39;s unique behavior without messing with the actual class.&lt;/div&gt;
&lt;h2 style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; clear: both; color: #260859; font-family: &#39;Segoe UI Semibold&#39;, &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 16px; line-height: 20px; margin-bottom: 4px; margin-left: 0px; margin-right: 0px; margin-top: 3px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 7px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
Summary&lt;/h2&gt;
&lt;div style=&quot;background-color: white; border-bottom-width: 0px; border-color: initial; border-image: initial; border-left-width: 0px; border-right-width: 0px; border-style: initial; border-top-width: 0px; color: #333333; font-family: &#39;Segoe UI&#39;, &#39;Lucida Grande&#39;, Verdana, Arial, Helvetica, sans-serif; font-size: 13px; line-height: 16px; margin-bottom: 12px; outline-color: initial; outline-style: initial; outline-width: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
If you plan on reusing code either on the same page, website or across multiple projects, consider packaging and organizing it in classes. Object-oriented JavaScript lends itself naturally to better code organization and reuse. What&#39;s more, with a little forethought, you can make sure that your code is flexible enough to stay in use long after you&#39;ve written it. Writing reusable, future-proof JavaScript will save you, your team and your company time and money. That&#39;s sure to make you popular.&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/8306290018121062323/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/04/how-to-write-maintainable-oo-javascript.html#comment-form' title='1 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/8306290018121062323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/8306290018121062323'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/04/how-to-write-maintainable-oo-javascript.html' title='How to Write Maintainable OO JavaScript Code'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-8371511184611975824</id><published>2012-03-29T05:46:00.000-07:00</published><updated>2012-03-30T12:28:14.216-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Front Web"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><title type='text'>How To Use HighCharts - Intractive Javascript charts for your web projects</title><content type='html'>&lt;div&gt;
&lt;b&gt;&lt;i&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: x-small;&quot;&gt;! this post only include HighCharts but HighStocks, it reprint &lt;a href=&quot;http://www.highcharts.com/documentation/how-to-use&quot;&gt;how to use&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;/b&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;a href=&quot;http://www.highcharts.com/images/stories/logohighcharts.png&quot; imageanchor=&quot;1&quot; style=&quot;clear: right; float: right; margin-bottom: 1em; margin-left: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;64&quot; src=&quot;http://www.highcharts.com/images/stories/logohighcharts.png&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;Table of contents&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Installation&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;How to set up the options&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Preprocessing the options&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Live charts&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Exporting module&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Freeform drawing&lt;/span&gt;&lt;/blockquote&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;1. Installation&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Hight charts uses either jQuery, MooTools or Prototype for some common JavaScript tasks&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;. My choice is jQuery, if you want to use others, please check&amp;nbsp;&lt;/span&gt;&lt;a href=&quot;http://www.highcharts.com/documentation/how-to-use&quot; style=&quot;font-family: Arial, Helvetica, sans-serif;&quot; target=&quot;_blank&quot;&gt;http://www.highcharts.com/documentation/how-to-use&lt;/a&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you already have jQuery included, you can skip the first one. Use this code to include Highcharts with jQuery:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; color: seagreen; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;script src=&quot;&lt;a href=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js&quot; target=&quot;_blank&quot;&gt;http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js&lt;/a&gt;&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&amp;nbsp;
&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;script src=&quot;/js/highcharts.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;In a script tag in the head of your web page, or in a separate .js file, add the JavaScript code to initialize the chart.&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; Note that the id of the div where you want to put the chart (see # 3) is given in the renderTo option below :&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: seagreen; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: pre-wrap;&quot;&gt; var chart1;
 // globally available 
 $(document).ready(function () {
     chart1 = new Highcharts.Chart({
         chart: {
             renderTo: &#39;container&#39;,
             type: &#39;bar&#39;
         },
         title: {
             text: &#39;Fruit Consumption&#39;
         },
         xAxis: {
             categories: [&#39;Apples&#39;, &#39;Bananas&#39;, &#39;Oranges&#39;]
         },
         yAxis: {
             title: {
                 text: &#39;Fruit eaten&#39;
             }
         },
         series: [{
             name: &#39;Jane&#39;,
             data: [1, 0, 4]
         }, {
             name: &#39;John&#39;,
             data: [5, 7, 3]
         }]
     });
 });&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Add a div in your webpage&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;. Give it an id refering to the renderTo option in #2, and set a specific width and height which will be the width and height of your chart.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; color: seagreen; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;div id=&quot;container&quot; style=&quot;width: 100%; height: 400px&quot;&amp;gt;&amp;lt;/div&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;color: #cc0000; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;Optionally, you can apply a global theme to your charts.&lt;/b&gt;&lt;/span&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; A theme is just a set of options that are applies globally through the Highcharts. setOptions method. The download package comes with four predefined themes. To apply a theme from one of these files, add this directly after the highcharts.js file inclusion:&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; color: seagreen; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;script type=&quot;text/javascript&quot; src=&quot;/js/themes/gray.js&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;2. How to set up the options&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Highcharts uses a JavaScript object structure to define the options. The options are nested into categories. The options are mainly strings and numbers, but some are arrays, other objects or even functions. When you initialize the chart using &lt;i&gt;&lt;b&gt;new HighCharts.Chart&lt;/b&gt;&lt;/i&gt;, the &lt;i&gt;&lt;b&gt;options&lt;/b&gt;&lt;/i&gt; object is the first parameter you pass.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you want to apply a set of options to all charts on the same page, use &lt;i&gt;&lt;b&gt;HighCharts.setOptions&lt;/b&gt;&lt;/i&gt; like shown below.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;see small #3 above for an example of an options object. For more examples see the &lt;a href=&quot;http://www.highcharts.com/demo&quot; target=&quot;_blank&quot;&gt;Highcharts demo gallery&lt;/a&gt;. For a full reference of the options availables, see the &lt;a href=&quot;http://www.highcharts.com/ref&quot; target=&quot;_blank&quot;&gt;Highcharts options reference&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;3. Preprocessing the options&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;To get the most out of Highcharts, it is important to understand how the configuration object works and how it can be altered programmatically. These are some key concepts on JavaScript objects:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The Highcharts options in the examples are defined as &lt;a href=&quot;https://developer.mozilla.org/en/Core_JavaScript_1.5_Guide/Core_Language_Features#Literals&quot; target=&quot;_blank&quot;&gt;object literals&lt;/a&gt;.&amp;nbsp;By notating the configuration this way, we can have a clean, human readable and low space consuming config object.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This complicated code is perhaps more familiar to developers with a background from C-type languages:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: seagreen; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: pre-wrap;&quot;&gt; // Bad code: 
 var options = new Object();
 options.chart = new Object();
 options.chart.renderTo = &#39;container&#39;;
 options.chart.type = &#39;bar&#39;;
 options.series = new Array();
 options.series[0] = new Object();
 options.series[0].name = &#39;Jane&#39;;
 options.series[0].data = new Array(1, 0, 4);&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;As JavaScript object literals, we would write it like below. Note that the two options obje&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;cts will produce exactly the same result.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: seagreen; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: pre-wrap;&quot;&gt; // Good code: 
 var options = {
     chart: {
         renderTo: &#39;container&#39;,
         defaultSeriesType: &#39;bar&#39;
     },
     series: [{
         name: &#39;Jane&#39;,
         data: [1, 0, 4]
     }]
 };&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;After an object is created using the object literal notation, we can extend its members by the dot notation. Say we have an object like defined in the &quot;Good code&quot; above. The code below adds another series to it. Remember &lt;i&gt;&lt;b&gt;options.series&lt;/b&gt;&lt;/i&gt; is an array, so it has a push method.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: seagreen; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: pre-wrap;&quot;&gt; options.series.push({
     name: &#39;John&#39;,
     data: [3, 4, 2]
 })&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Another fact that can come in handy when working on JavaScript objects, is that the dot notation and square bracket notation are equivalent, so you can access all members by their string names. Which in practice means that&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; color: seagreen; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; options.renderTo&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;is always the same as&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; color: seagreen; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; options[&#39;renderTo&#39;]&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;3.1 Case study: preprocessing the data from CSV&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;This example shows how to &lt;b&gt;set up the basic chart options&lt;/b&gt; first, then &lt;b&gt;do an Ajax call for the data&lt;/b&gt;, parse the data and add them in the proper format to the options. In this example, jQuery is used for handling Ajax. All of the code runs in the $(document).ready event handler. The example can be seen live at &lt;a href=&quot;http://data-from-csv.htm/&quot; target=&quot;_blank&quot;&gt;data-from-csv.htm&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Create an external CSV file&lt;/span&gt;&lt;/b&gt; containing only the data. In this example, the file looks like below. The first line lists the categories with a dummy name in the first position. The subsequent lines list the data series name in the first position and values in the subsequent positions. In real life, you will often create the contents of this file using server side programming languages. Or you may choose to use other markup formats like XML or JSON. In those cases, jQuery can also parse the data for you natively.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: seagreen; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: pre-wrap;&quot;&gt; Categories, Apples, Pears, Oranges, Bananas
 John, 8, 4, 6, 5
 Jane, 3, 4, 2, 3
 Joe, 86, 76, 79, 77
 Janet, 3, 16, 13, 15&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Define the initial, basic options.&lt;/span&gt;&lt;/b&gt; Note that we create empty arrays for the categories and series objects, so that we can just push values to them later.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: seagreen; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: pre-wrap;&quot;&gt; var options = {
     chart: {
         renderTo: &#39;container&#39;,
         defaultSeriesType: &#39;column&#39;
     },
     title: {
         text: &#39;Fruit Consumption&#39;
     },
     xAxis: {
         categories: []
     },
     yAxis: {
         title: {
             text: &#39;Units&#39;
         }
     },
     series: []
 };&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;b&gt;Put it all together.&lt;/b&gt;&amp;nbsp;&lt;/span&gt;We use the jQuery.get method to get the contents of the data.csv.file. In the success callback function, we parse the returned string, add the results to the categories and series members of the options object, and create the chart. Note that we can&#39;t create the chart outside the Ajax callback, as we have to wait for the data to be returned from the server.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: seagreen; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: pre-wrap;&quot;&gt; $.get(&#39;data.csv&#39;, function (data) {
     // Split the lines     
     var lines = data.split(&#39;\n&#39;);
     // Iterate over the lines and add categories or series     
     $.each(lines, function (lineNo, line) {
         var items = line.split(&#39;,&#39;);
         // header line containes categories         
         if (lineNo == 0) {
             $.each(items, function (itemNo, item) {
                 if (itemNo &amp;gt; 0) options.xAxis.categories.push(item);
             });
         }
         // the rest of the lines contain data with their name in the first position         
         else {
             var series = {
                 data: []
             };
             $.each(items, function (itemNo, item) {
                 if (itemNo == 0) {
                     series.name = item;
                 } else {
                     series.data.push(parseFloat(item));
                 }
             });
             options.series.push(series);
         }
     }); // Create the chart     var chart = new Highcharts.Chart(options); });&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;3.2 Loading from XML&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Loading data from an XML file is similar to the CSV approach. Highcharts does not come with a predefined XML data syntax, it is entirely up to you to write the XML and to define a parsing function for it. The downside of using XML over CSV is that it adds some markup to the data, leaving a larger footprint. How large the extra footprint is depends on how you mark up your data. For example, if you wrap each point with a &amp;lt;point&amp;gt; tag and load 1000 points, it &amp;nbsp;will add some weight. If however you add a comma separated list of point values, it doesn&#39;t. The upside to using XML, at least for small data sets, is that you don&#39;t have to manually parse the incoming data. You can utiliza jQuery&#39;s existing DOM parsing abilities to access the XML tree. We set up a live example for this at &lt;a href=&quot;http://highcharts.com/studies/data-from-xml.htm&quot;&gt;data-from-xml.htm&lt;/a&gt;. The data can be viewed at &lt;a href=&quot;http://highcharts.com/studies/data.xml&quot;&gt;data.xml&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;4. Live charts&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;After a chart has been defined by the configuration object, optionally preprocessed and finally initialized and rendered using&amp;nbsp;new Highcharts.Chart(), we have the opportunity to alter the chart using a toolbox of API methods. The chart, axis, series and point objects have a range of methods like&amp;nbsp;update,remove,&amp;nbsp;addSeries,&amp;nbsp;addPoints&amp;nbsp;and so on. The complete list can be seen in&amp;nbsp;&lt;a href=&quot;http://www.highcharts.com/ref&quot;&gt;the API Reference&lt;/a&gt;&amp;nbsp;under &quot;Methods and Properties&quot; at the left.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;4.1 Case study: a live connection to the server&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The following example shows how to run a live chart with data retrieved from the server each second, or more precisely, one second after the server&#39;s last reply. It is done by setting up a custom function,&amp;nbsp;requestData, that initially is called from the chart&#39;s&amp;nbsp;load&amp;nbsp;event, and subsequently from its own Ajax success callback function. You can see the results live at&amp;nbsp;&lt;a href=&quot;http://www.highcharts.com/studies/live-server.htm&quot;&gt;live-server.htm&lt;/a&gt;.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Set up the server&lt;/span&gt;&lt;/b&gt;.&amp;nbsp;In this case, we have a simple PHP script returning a JavaScript array with the JavaScript time and a random y value. This is the contents of the&amp;nbsp;&lt;a href=&quot;http://www.highcharts.com/studies/live-server-data.php&quot;&gt;live-server-data.php&lt;/a&gt;&amp;nbsp;file:&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px; text-align: -webkit-left;&quot;&gt;&lt;span style=&quot;color: #38761d; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&amp;lt;?php
    // Set the JSON header
    header( &quot;Content-type: text/json&quot;);
    // The xvalue is the current JavaScript time, 
    // which is the Unix time multipliedby 1000. 
    $x=t ime() * 1000;
    // The y value is a random number 
    $y=r and(0, 100);
    // Create a PHP array and echo it as JSON 
    $ret=a rray($x, $y); 
    echo json_encode($ret);
?&amp;gt;&lt;/span&gt;
&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Define the &lt;i&gt;chart &lt;/i&gt;variable globally&lt;/span&gt;&lt;/b&gt;, as we want to access it both from the document ready function and our requestData function. If the chart variable is defined inside the document ready callback function, it will not be available in the global scope later.&amp;nbsp;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; color: seagreen; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; var chart; // global&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Set up the requestData function&lt;/span&gt;&lt;/b&gt;. In this case it uses jQuery&#39;s $.ajax method to handle the Ajax stuff, but it could just as well use any other Ajax framework. When the data is successfully received from the server, the string is eval&#39;d and added to the chart&#39;s first series using the Highcharts addPoint method. If the series length is greater than 20, we shift off the first point so that the series will move to the left rather than just cram the points tighter.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: seagreen; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: pre-wrap;&quot;&gt; /**  * Request data from the server, add it to the graph and set a timeout to request again  */

 function requestData() {
     $.ajax({
         url: &#39;live-server-data.php&#39;,
         success: function (point) {
             var series = chart.series[0],
                 shift = series.data.length &amp;gt; 20; // shift if the series is longer than 20              
             // add the point             
             chart.series[0].addPoint(point, true, shift);
             // call it again after one second             
             setTimeout(requestData, 1000);
         },
         cache: false
     });
 }&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;Create the chart&lt;/span&gt;&lt;/b&gt;. Notice how our requestData function is initially called from chart&#39;s load event. The initial data is an empty array.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: seagreen; font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;span style=&quot;line-height: 18px; white-space: pre-wrap;&quot;&gt; $(document).ready(function () {
     chart = new Highcharts.Chart({
         chart: {
             renderTo: &#39;container&#39;,
             defaultSeriesType: &#39;spline&#39;,
             events: {
                 load: requestData
             }
         },
         title: {
             text: &#39;Live random data&#39;
         },
         xAxis: {
             type: &#39;datetime&#39;,
             tickPixelInterval: 150,
             maxZoom: 20 * 1000
         },
         yAxis: {
             minPadding: 0.2,
             maxPadding: 0.2,
             title: {
                 text: &#39;Value&#39;,
                 margin: 80
             }
         },
         series: [{
             name: &#39;Random data&#39;,
             data: []
         }]
     });
 });&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;5. Exporting module&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;From version 2.0 an exporting module is available for HighCharts, which allow users to download images or PDF&#39;s of your charts. This module consists of an extra JavaScript file, exporting.js, and a web service or server module wirtten in PHP. If you include the exporting module in your charts, two buttons will appear in the upper right. One button prints the chart, which is done on the client side only. The other button handles exporting. By default, an SVG representation of the chart is sent by POST to &lt;a href=&quot;http://export.highcharts.com/&quot;&gt;http://export.highcharts.com&lt;/a&gt;, where it is converted using Apache&#39;s Batik converter to PDF, PNG or JPEG.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;See the&amp;nbsp;&lt;a href=&quot;http://www.highcharts.com/ref/#navigation&quot;&gt;navigation&amp;nbsp;&lt;/a&gt;and&amp;nbsp;&lt;a href=&quot;http://www.highcharts.com/ref/#exporting&quot;&gt;exporting&amp;nbsp;&lt;/a&gt;reference items for a full documentation for the options available. Also see under &quot;Methods and Properties&quot; in the reference for members releated to exporting.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;5.1 Client side setup&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Add the exporting module JavaScript file after your highcharts.js file.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;pre style=&quot;background-color: #eceff0; background-image: initial; border-bottom-color: rgb(170, 180, 190); border-bottom-style: dotted; border-bottom-width: 1px; border-left-color: rgb(180, 180, 180); border-left-style: solid; border-left-width: 20px; border-right-color: rgb(170, 180, 190); border-right-style: dotted; border-right-width: 1px; border-top-color: rgb(170, 180, 190); border-top-style: dotted; border-top-width: 1px; color: seagreen; line-height: 18px; margin-bottom: 10px; margin-top: 10px; padding-bottom: 5px; padding-left: 10px; padding-right: 0px; padding-top: 5px; white-space: pre-wrap;&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt; &amp;lt;script src=&quot;&lt;a href=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&quot;&gt;http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js&lt;/a&gt;&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script src=&quot;/js/highcharts.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;
 &amp;lt;script src=&quot;/js/modules/exporting.js&quot; type=&quot;text/javascript&quot;&amp;gt;&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;b&gt;5.2 Server module setup&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;If you want to set up this web service on your own server, this index.php file that handles the POST is supplied in the download package inside the /exporting-server directory.&lt;/span&gt;&lt;/div&gt;
&lt;ol&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Make sure that PHP and Java is installed on your server.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Upload the&amp;nbsp;index.php&amp;nbsp;file from the /exporting-server directory in the download package to your server.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In your FTP program, create directory called&amp;nbsp;temp&amp;nbsp;in the same directory as&amp;nbsp;index.php&amp;nbsp;and chmod this new directory to 777 (Linux/Unix servers only).&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Download Batik from&amp;nbsp;&lt;a href=&quot;http://xmlgraphics.apache.org/batik/#download&quot;&gt;http://xmlgraphics.apache.org/batik/#download&lt;/a&gt;. Find the binary distribution for your version of&amp;nbsp;jre&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Upload&amp;nbsp;batik-rasterizer.jar&amp;nbsp;and the entire&amp;nbsp;lib&amp;nbsp;directory to a location on your web server.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In the options in the top of the index.php file, set the path to batik-rasterier.jar.&lt;/span&gt;&lt;/li&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;In your chart options, set the&amp;nbsp;&lt;a href=&quot;http://www.highcharts.com/ref/#exporting&quot;&gt;exporting.url&lt;/a&gt;&amp;nbsp;option to match your PHP file location.&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;As an &lt;a href=&quot;http://asp.net/&quot;&gt;ASP.NET&lt;/a&gt; alternative to our Java/PHP based server module, Clément Agarini has kindly shared his &lt;a href=&quot;https://github.com/imclem/Highcharts-export-module-asp.net&quot;&gt;export module for ASP.NET&lt;/a&gt;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;6. Freeform drawing&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Internally, Highcharts is equipped with a rendering module that acts as a wrapper for JavaScript access to SVG in modern browsers and VML in IE &amp;lt; 9. It has much in common with drawing tools like Raphaël or SVG jQuery. This drawing module can be used either to draw shapes or text on the chart, or even as a standalone drawing tool for HTML pages.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Inside a chart, the chart&#39;s renderer object is available as&amp;nbsp;chart.renderer. To instanciate a new SVG drawing outside Highcharts, you call&amp;nbsp;&lt;b&gt;&lt;i&gt;new Highcharts.Renderer(parentNode, width, height)&lt;/i&gt;&lt;/b&gt;, where parentNode is the div or container element where you want the drawing to be placed.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;The drawing API is documented in detail at&amp;nbsp;&lt;a href=&quot;http://www.highcharts.com/ref#renderer&quot;&gt;/ref#renderer&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://www.highcharts.com/ref#element&quot;&gt;/ref#element.&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif; font-size: large;&quot;&gt;7. API reference&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.highcharts.com/ref/&quot;&gt;&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;Proceed to the API Reference.&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Arial, Helvetica, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/8371511184611975824/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/how-to-use-highcharts-intractive.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/8371511184611975824'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/8371511184611975824'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/how-to-use-highcharts-intractive.html' title='How To Use HighCharts - Intractive Javascript charts for your web projects'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-3656058170184114084</id><published>2012-03-28T17:41:00.001-07:00</published><updated>2012-03-29T01:51:05.428-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Front Web"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Development"/><title type='text'>Responsive Web Design: Meta Queries and Viewports</title><content type='html'>&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;This article is based on&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;a href=&quot;http://tech.bluesmoon.info/2011/01/device-width-and-how-not-to-hate-your.html&quot; target=&quot;_blank&quot;&gt;device-width and how not to hate your users&lt;/a&gt;&amp;nbsp;and&amp;nbsp;&lt;a href=&quot;http://www.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/&quot; target=&quot;_blank&quot;&gt;Responsive Web Design: What It Is and How To Use It&lt;/a&gt;.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Opening &amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Almost every new client these days wants a mobile version of their website. It&#39;s practically essential after all: one design for the BlackBerry, another for the iPhone, the iPad, netbook, Kindle — and all screen resolutions must be compatible, too. In the next five years, we&#39;ll likely need to design for a number of additional inventions. When will the madness stop? It won&#39;t, of course.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;What&#39;s Responsive Web design ?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Responsive Web design is the approach that suggests that design and development should respond to the user&#39;s behavior and environment based on screen size, platform and orientation. The practice consists of a mix of flexible grids and layouts, images and an intelligent use of CSS media queries. As the user switches from their laptop to iPad, the website should automatically switch to accommodate for resolution, image size and scripting abilities. In other words, the website should have the technology to automaticallyrespond to the user&#39;s preferences. This would eliminate the need for a different design and development phase for each new gadget on the market.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;Attention : responsive Web design is not only about adjustable screen resolutions and automatically resizable images, but rather about a whole new way of thinking about design.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;What&#39;s Responsive Web design for ?&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;With more devices come varying screen resolutions, definitions and orientations. New devices with new screen sizes are being developed every day, and each of these devices may be able to handle variations in size, functionality and even color. Some are in landscape, others in portrait, still others even completely square. &lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img height=&quot;218&quot; src=&quot;http://media.smashingmagazine.com/wp-content/uploads/2010/11/portrait-landscape.jpg&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;In addition to designing for both landscape and portrait (and enabling those orientations to possibly switch in an instant upon page load), we must consider the hundreds of different screen sizes. &lt;br /&gt;Below are some of the most common:&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://sender11.typepad.com/sender11/2008/04/mobile-screen-s.html&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img height=&quot;218&quot; src=&quot;http://media.smashingmagazine.com/wp-content/uploads/2010/11/sizes.jpg&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;So if you want to satisfy your clients, you have to make your sites adjust to almost of above devices. &lt;br /&gt;For example,  We should  Customize the layout structure  for different devices : &lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img height=&quot;400&quot; src=&quot;http://media.smashingmagazine.com/wp-content/uploads/2010/11/movingcontent.jpg&quot; style=&quot;margin-left: auto; margin-right: auto;&quot; width=&quot;366&quot; /&gt;&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Custom layout structure&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt; Another example, sometimes, Show or Hide content according to needs : &lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://digg.com/&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;img height=&quot;309&quot; src=&quot;http://media.smashingmagazine.com/wp-content/uploads/2010/11/diggmobile.jpg&quot; width=&quot;400&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;Showing or Hiding Content&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;It&#39;s obvious that we can&#39;t keep creating custom solutions for each one. So, how do we deal with the situation? &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Media queries and Viewports is the answer&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;But I&#39;m not going to go into the details of responsive enhancement, the references at the end of this post serve that purpose. This post lists what I think are best practices and my reasons for them.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;
&lt;/span&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;@media queries&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;br /&gt;As a web designer or developer, we want our page to be easily viewable across different devices and screen sizes. It shouldn&#39;t matter whether our user uses a 21&quot; desktop monitor, a 13&quot; laptop, a 10&quot; iPad or a much smaller smartphone. Responsive web design uses @media queries to change the layout of the page using CSS based on browser width. We might have CSS that looks like this:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #274e13; font-size: x-small;&quot;&gt; /* Default wide-screen styles */&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;@media all and (max-width: 1024px) {&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;/* styles for narrow desktop browsers and iPad landscape */&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;@media all and (max-width: 768px) {&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;/* styles for narrower desktop browsers and iPad portrait */&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;@media all and (max-width: 480px) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;/* styles for iPhone/Android landscape (and really narrow browser windows) */&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;@media all and (max-width: 320px) {&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;/* styles for iPhone/Android portrait */&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;}&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;@media all and (max-width: 240px) {&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #274e13; font-family: &#39;Trebuchet MS&#39;, sans-serif; font-size: x-small;&quot;&gt;/* styles for smaller devices */&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;color: #274e13; font-size: x-small;&quot;&gt;} &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;And yes, we could go smaller than that, or have intermediate sizes, but I&#39;ll cover that later. CSS media queries is really powerful and a bit complex, I don&#39;t want to go into details, because all the above codes are enough for Responsive Design. More information about Media Queries, please check relative articles in the section &quot;Footnotes &amp;amp; References&quot;.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: large;&quot;&gt;
&lt;/span&gt;
&lt;li&gt;&lt;b&gt;&lt;span style=&quot;font-size: large;&quot;&gt;viewports&lt;/span&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;br /&gt;Now this works reasonably well when we resize desktop browsers, but not so much for mobile browsers. The problem is that mobile browsers (iPhone/Safari, Android/Chrome and Fennec) assume that the page were designed for a wide screen, and shrink it to fit into the smaller screen. This means that even though users could have had a good customised experience for their smaller devices, they won&#39;t because the device doesn&#39;t know about this. The trick is to use Apple&#39;s viewport6, 7, 8 meta tag in our document&#39;s head in conjunction with @media queries:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;span style=&quot;color: #274e13; font-size: x-small;&quot;&gt; &amp;lt;meta name=&quot;viewport&quot; content=&quot;...&quot;&amp;gt; &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I&#39;ve left the content attribute empty for now because this is where I see confusion... which is what we&#39;ll talk about now.&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;ul&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;li&gt;&lt;u&gt;width=device-width&lt;/u&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;Most sites that I&#39;ve seen advise to set the content attribute to width=device-width. This tells the browser to assume that the page is as wide as the device. Unfortunately, this is only true when our device is in the portrait orientation. When we rotate to landscape, the device-width remains the same (eg: 320px), which means that even if our page were designed to work well in a 480px landscape design, it would still be rendered as if it were 320px.&lt;br /&gt;&lt;br /&gt;It&#39;s tempting to use the orientation media query to solve this problem, but orientation doesn&#39;t really tell us the actual width of the device. All it tells us is whether the width is larger than or smaller than the device&#39;s height. As someone points out, since most pages tend to scroll vertically, this is irrelevant.&lt;br /&gt;&lt;br /&gt;Use this if we use the same page styles in portrait and landscape orientation. Also note that using width=device-width is the only way to tell android devices to use the device&#39;s width.&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;ul&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;li&gt;&lt;u&gt;initial-scale=1.0,maximum-scale=1.0&lt;/u&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;br /&gt;Setting initial-scale=1 tells the browser not to zoom in or out regardless of what it thinks the page width is. This is good when we&#39;ve designed our page to fit different widths since the browser will use the appropriate CSS rules for its own width, and initial-scale stops the zooming problem that we faced without the viewport meta tag.&lt;br /&gt;&lt;br /&gt;Unfortunately a bug, or more likely a mis-feature, in mobile safari messes this up when a device is rotated from portrait to landscape mode. initial-scale is honoured only on full page load. On rotate from portrait to landscape mode, the browser assumes that the page width stays the same and scales accordingly (1.5) to make 320 pixels fit into 480pixels. However, as far as @media queries go, it reports a 480px width, and uses the appropriate CSS rules to render the page. This results in a page designed for 480px rendered scaled up 1.5 times. It&#39;s not horrible, but it&#39;s not desirable. Fennec claims that it does the right thing in this case.&lt;br /&gt;&lt;br /&gt;To get around this bug, the pixel perfection camp suggests also setting maximum-scale=1. This stops the page zoom in on rotate, but it has the undesired side effect of preventing the user from zooming the page. This is a problem from the accessibility point of view. Zooming in is a very valid use case for users with bad eyesight, and in some cases, even users with good eyesight who just want a closer look at some part of our page. Do this only if we hate our users. It goes without saying that setting user-scalable=no should also not be used on most general purpose pages.&lt;br /&gt;&lt;br /&gt;A better solution may be design our page to use the same styles in portrait and landscape orientation and set width=device-width. This way even if it does zoom, it will still be proportionate. &lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;ul&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;li&gt;&lt;u&gt;width=&amp;lt;actual width&amp;gt;&lt;/u&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;br /&gt;Some sites advise using a specific viewport width and designing our pages for that width. This is fine if we are building a separate page for each device class, but that doesn&#39;t flow with the concept of responsive design. Fixed width layouts are for print. The web is fluid and adapts to its users. Our site should too. Don&#39;t use this.&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;ul&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;li&gt;&lt;u&gt;@media all and (device-width:480)&lt;/u&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;br /&gt;While this is a media query rather than an option to the viewport meta tag, I&#39;ve seen it at various locations, and don&#39;t think it&#39;s the best option around. Here&#39;s why. According to the CSS3 media queries spec, thedevice-width media feature describes the width of the rendering surface of the output device. For continuous media, this is the width of the screen. For paged media, this is the width of the page sheet size.&lt;br /&gt;&lt;br /&gt;We&#39;re dealing with continuous media here (on-screen as opposed to printed), in which case the spec states that this is the width of the screen. Unless the browser window is maximised, this might be larger than the viewport with. My tests show that most desktop browsers treat device-width and width as synonyms. Mobile browsers seem a little confused on the matter. As far as the viewport meta tag goes, device-width is the width of the device in portrait orientation only. For a 320x480 device, device-width is always 320px regardless of orientation. For CSS media queries, however, device-width is the width of the screen based on its current orientation.&lt;br /&gt;&lt;br /&gt;If we are going to use this, use it in conjunction with the orientation media feature. Never use max-device-width and min-device-width. It&#39;s better to use max-width and min-width instead. Also remember that device widths may change with newer models. &lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;ul&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;li&gt;&lt;u&gt;Intermediate widths&lt;/u&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;br /&gt;I&#39;d mentioned above that we could design for any number of widths. The important thing is to test our page for different browser widths. This is fairly easy to do just by resizing our browser window. Test, and whenever we find our page layout break, either fix the layout for all widths, or build a new layout for smaller widths.&lt;br /&gt;&lt;br /&gt;As we get smaller, we can reduce the space(Display : none;) used by non-essential content like the footer, the sidebars and the menu at the top, leaving as much space as possible for main content.&lt;br /&gt;&lt;br /&gt;Our own site may have a layout that works perfectly at all screen widths, or we may need to design only two or three layouts. It&#39;s easy to test and design, so there&#39;s no reason not to. Designing for multiple widths took me just a couple of hours, and a lot of it was spent reading the articles below.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;&lt;ul&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;li&gt;&lt;b&gt;&lt;u&gt;Recommendations&lt;/u&gt;&lt;/b&gt;&lt;/li&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/ul&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;br /&gt;So finally, this is what I recommend.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DO &lt;/b&gt;use the viewport meta tag &lt;br /&gt;&lt;b&gt;DO &lt;/b&gt;use media queries to render our page appropriately for various widths ranging from under 200px to 1024px or more&lt;br /&gt;&lt;b&gt;DO &lt;/b&gt;use width=device-width,initial-scale=1 in our viewport meta tag OR use width=device-width alone. &lt;br /&gt;&lt;b&gt;DO NOT&lt;/b&gt; use maximum-scale=1 or user-scalable=no&lt;br /&gt;&lt;b&gt;DO NOT&lt;/b&gt; use width=&amp;lt;specific width&amp;gt;&lt;br /&gt;&lt;b&gt;DO NOT&lt;/b&gt; use @media all and (*-device-width: xxx) &lt;br /&gt;&lt;br /&gt;Remember that using initial-scale=1.0 throws we open to a zooming bug in mobile Safari. Push Safari to fix this bug. Finally, David Calhoun has a great summary of all options to the viewport meta tag, and alternate meta tags for older phones. Well worth a read. Also note that Mozilla&#39;s documentation of the viewport meta tag is far better than Safari&#39;s.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;b&gt;Footnotes &amp;amp; References&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;li&gt;Ethan Marcotte. 2010. &lt;a href=&quot;http://www.alistapart.com/articles/responsive-web-design/&quot;&gt;Responsive Web Design&lt;/a&gt;. In A List Apart #306. ISSN: 1534-0295.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Jeremy Keith. 2010. &lt;a href=&quot;http://adactio.com/journal/1700&quot;&gt;Responsive Enhancement&lt;/a&gt;. In adactio.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Kayla Knight. 2011. &lt;a href=&quot;http://www.smashingmagazine.com/2011/01/12/guidelines-for-responsive-web-design/&quot;&gt;Responsive Web Design: What It Is and How To Use It&lt;/a&gt;. In Smashing Magazine.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Webkit based desktop browsers re-render the page correctly as you resize the browser, however they have a minimum width of 385px (on MacOSX) and I was unable to shrink the browser below this. Firefox 4 re-renders the page correctly until the width gets too narrow to fit the navigation toolbar. At that point the viewport width stays fixed even if you shrink the browser. The page is re-rendered if you type something (anything) into the URL bar. Opera 10/11 re-render correctly at all sizes.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Peter Paul Koch. 2010. &lt;a href=&quot;http://www.quirksmode.org/mobile/viewports2.html&quot;&gt;A tale of two viewports — part two&lt;/a&gt;. In Quirksmode.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariWebContent/UsingtheViewport/UsingtheViewport.html&quot;&gt;Using the Viewport on Safari&lt;/a&gt;. In Safari Web Content Guide.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;&lt;a href=&quot;http://developer.apple.com/library/safari/#documentation/AppleApplications/Reference/SafariHTMLRef/Articles/MetaTags.html%23//apple_ref/html/const/viewport&quot;&gt;The viewport meta tag&lt;/a&gt;. In Safari HTML Reference.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;MDC. 2010. &lt;a href=&quot;https://developer.mozilla.org/en/Mobile/Viewport_meta_tag&quot;&gt;Using the viewport meta tag to control layout on mobile browsers&lt;/a&gt;. In Mozilla Developer Network.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Peter Paul Koch. 2010. &lt;a href=&quot;http://www.quirksmode.org/blog/archives/2010/09/combining_meta.html&quot;&gt;Combining meta viewport and media queries&lt;/a&gt;. In Quirksmode.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;Willison &amp;amp; Downe. &lt;a href=&quot;http://lanyrd.com/&quot;&gt;Lanyrd&lt;/a&gt;.&lt;/li&gt;
&lt;li&gt;Lie et al. 2010. &lt;a href=&quot;http://www.w3.org/TR/css3-mediaqueries/&quot;&gt;Media Queries&lt;/a&gt;. W3C Candidate Recommendation 27 July 2010.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;If you design your page for the narrow view and expect it to scale when rotated, then use width=device-width and nothing else. If, instead, you design your page for either width, then use width=device-width,initial-scale=1. This is the only way to get the android browser to render a page with the intended width. Mobile Safari will render the page exactly as if initial-scale=1 were specified alone. You will still end up with the zoom on rotate bug.&amp;nbsp;&lt;/li&gt;
&lt;li&gt;David Calhoun. 2010. &lt;a href=&quot;http://davidbcalhoun.com/2010/viewport-metatag&quot;&gt;The viewport metatag (Mobile web part I)&lt;/a&gt;.&amp;nbsp;&lt;/li&gt;
&lt;/span&gt;&lt;/ol&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ol&gt;&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/ol&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;
&lt;/span&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/3656058170184114084/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/responsive-web-design-meta-queries-and.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/3656058170184114084'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/3656058170184114084'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/responsive-web-design-meta-queries-and.html' title='Responsive Web Design: Meta Queries and Viewports'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-6342968319927807717</id><published>2012-03-28T02:32:00.002-07:00</published><updated>2012-03-28T03:54:39.710-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DotNetNuke"/><title type='text'>Understanding Module Structure DotNetNuke6</title><content type='html'>&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;A module is a pluggable user interface component that processes requests and generates dynamic content. This definition is similar to that of an &lt;a href=&quot;http://asp.net/&quot;&gt;ASP.NET&lt;/a&gt; page, with the exception that a module can appear only on an &lt;a href=&quot;http://asp.net/&quot;&gt;ASP.NET&lt;/a&gt; page, and a page may contain any number of module &quot;instances.&quot;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;Portal&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;DotNetNuke needs to perform a number of steps to process a page request. The following steps execute during the initialization of the page and work to dynamically load modules at runtime. The dynamically created modules are then capable of handling their own life cycle including events such as initialization, load, and render.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-slxM9_WlBdg/T3LWz6ZH7yI/AAAAAAAABa8/G2VQd6mVnHQ/s1600/Sans+titre.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;http://1.bp.blogspot.com/-slxM9_WlBdg/T3LWz6ZH7yI/AAAAAAAABa8/G2VQd6mVnHQ/s640/Sans+titre.png&quot; width=&quot;464&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Figure 1 : Portal Structure&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;u&gt;&lt;i&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Step 1: Page Configuration Retrieval&lt;/span&gt;&lt;/i&gt;&lt;/u&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The first step is to retrieve the modules for the requested page. The retrieval step comprises a number of important pieces of information, such as the modules that appear on the page, the section of the page on which they will appear (known as content panes), and, finally, the security roles associated with each module.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: green;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;Default.aspx.cs&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;OnInit&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;load skin control and register UI js&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;
&lt;/span&gt;UI.Skins.Skin ctlSkin = UI.Skins.Skin.GetSkin(&lt;span style=&quot;color: blue;&quot;&gt;this&lt;/span&gt;);
&lt;span style=&quot;color: green;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;add skin to page&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;
&lt;/span&gt;SkinPlaceHolder.Controls.Add(ctlSkin);

&lt;span style=&quot;color: green;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;DotNetNuke.UI.Skins.Skin.cs : &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;OnInit()&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; success;
&lt;span style=&quot;color: green;&quot;&gt;//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;Load the Module Control(s)&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;
&lt;/span&gt;success = Globals.IsAdminControl() ? ProcessSlaveModule() : ProcessMasterModules();

&lt;span style=&quot;color: green;&quot;&gt;//DotNetNuke.UI.Skins.Skin.cs : &lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;ProcessMasterModules()&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;bool&lt;/span&gt; success = &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;
&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (TabPermissionController.CanViewPage())
{
&lt;span style=&quot;color: green;&quot;&gt;　　//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;check portal expiry date&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;　　if&lt;/span&gt; (!CheckExpired())
　　{
&lt;span style=&quot;color: blue;&quot;&gt;　　　　if&lt;/span&gt; ((PortalSettings.ActiveTab.StartDate &amp;lt; DateAndTime.Now&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;&amp;amp;&amp;amp; PortalSetting&lt;span style=&quot;background-color: white;&quot;&gt;s.ActiveTab.EndDate &amp;gt; DateAndTime.Now)&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;|| TabPermissionController.CanAdminPage() || Globals.IsLayoutMode())&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;　　　　{
&lt;span style=&quot;color: green;&quot;&gt;　　　　　　//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;dynamically populate the panes with modules&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: blue;&quot;&gt;　　　　　　if&lt;/span&gt; (PortalSettings.ActiveTab.Modules.Count &amp;gt; &lt;span style=&quot;color: purple;&quot;&gt;0&lt;/span&gt;)
　　　　　　{
&lt;span style=&quot;color: blue;&quot;&gt;　　　　　　　　foreach&lt;/span&gt; (ModuleInfo objModule &lt;span style=&quot;color: blue;&quot;&gt;in&lt;/span&gt; PortalSettings.ActiveTab.Modules)
　　　　　　　　{
　　　　　　　　　　success = ProcessModule(objModule);
　　　　　　　　}
　　　　　　}&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Step 2: Security Audit&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The second step is to make some decisions about the security information retrieved in the previous step. By examining the current user roles (whether a registered user or anonymous) and the view roles associated with each module, you can form a list of &quot;authorized&quot; modules for the current page.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;color: blue;&quot;&gt;private&lt;/span&gt; Boolean ProcessModule(ModuleInfo module)
{
&lt;span style=&quot;color: blue;&quot;&gt;　　bool&lt;/span&gt; success = &lt;span style=&quot;color: blue;&quot;&gt;true&lt;/span&gt;;
&lt;span style=&quot;color: blue;&quot;&gt;　　if&lt;/span&gt; (ModulePermissionController.CanViewModule(module)&amp;nbsp;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;&amp;amp;&amp;amp; module.IsDeleted == &lt;span style=&quot;color: blue;&quot;&gt;fa&lt;/span&gt;&lt;span style=&quot;background-color: white; color: blue;&quot;&gt;lse&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;((module.StartDate &amp;lt; DateTime.Now &amp;amp;&amp;amp; module.EndDate &amp;gt; DateTime.Now)&amp;nbsp;&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;&lt;span style=&quot;background-color: white;&quot;&gt;|| Globals.Is&lt;/span&gt;&lt;span style=&quot;background-color: white;&quot;&gt;LayoutMode() || Globals.IsEditMode()))&lt;/span&gt;&lt;/pre&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;　　{
&lt;span style=&quot;color: green;&quot;&gt;　　//&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;...&lt;/span&gt;&lt;span style=&quot;color: green;&quot;&gt;
&lt;/span&gt;　　}
　　//...
}&lt;/pre&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;i&gt;&lt;u&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Step 3: Content Injection&lt;/span&gt;&lt;/u&gt;&lt;/i&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The third (and final) step is to inject the &quot;authorized&quot; modules dynamically into the corresponding content panes of the page. After all of the modules have been loaded, each module is then able to execute its own series of events and render content.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;pre style=&quot;background-color: white; color: #666666; font-size: 13px; line-height: 18px;&quot;&gt;Pane pane = GetPane(module);
&lt;span style=&quot;color: blue;&quot;&gt;if&lt;/span&gt; (pane != &lt;span style=&quot;color: blue;&quot;&gt;null&lt;/span&gt;)
{
　　success = InjectModule(pane, module);
}&lt;/pre&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Tab&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif; font-size: large;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Figure 2 illustrates one tab in the portal. Tab itself express a complete markup document, composed by a large number pane, and also contains a large number of modules in each pane.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-5IXqFaMFwkE/T3LW0-lYosI/AAAAAAAABbE/UGHwkJM3Fu4/s1600/Sans+titre1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;http://2.bp.blogspot.com/-5IXqFaMFwkE/T3LW0-lYosI/AAAAAAAABbE/UGHwkJM3Fu4/s640/Sans+titre1.png&quot; width=&quot;464&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Figure 2 : Tab&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Each module contains a title, a number of&amp;nbsp;decorations and some content generated by the module. The decorations can include a number of buttons, links, and a suspension menu which can change the module status or execute the related features of module.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Module&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;As mentioned previously, a portal is a web-based application that processes requests and generates dynamic content. Each module produces its own piece of markup (known as afragment) and together with the skin&#39;s markup shows a complete document.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Because each module produces its own markup, it can be viewed as a tiny application within a larger application. Usually, users interact with the content produced by each module by clicking links or submitting forms that are then processed by the portal system and the command passed to the corresponding module.&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: large;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Module Container&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;The decorations surrounding a module are known as a module container. Through this container, a user is able to interact with the module and perform actions such as minimizing, maximizing, and more advanced features (if the user has edit privileges on that module).&lt;/span&gt;&lt;br /&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-eJKvdrL72UQ/T3LW1hIg2qI/AAAAAAAABbM/KaLjhtj_TzM/s1600/Sans+titre2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://2.bp.blogspot.com/-eJKvdrL72UQ/T3LW1hIg2qI/AAAAAAAABbM/KaLjhtj_TzM/s640/Sans+titre2.png&quot; width=&quot;640&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;Figure 3 : Container&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/6342968319927807717/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/understanding-module-structure.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/6342968319927807717'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/6342968319927807717'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/understanding-module-structure.html' title='Understanding Module Structure DotNetNuke6'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-slxM9_WlBdg/T3LWz6ZH7yI/AAAAAAAABa8/G2VQd6mVnHQ/s72-c/Sans+titre.png" height="72" width="72"/><thr:total>0</thr:total><georss:featurename>Paris, France</georss:featurename><georss:point>48.856614 2.3522219</georss:point><georss:box>48.773036 2.1942934 48.940192 2.5101504</georss:box></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-1216574590211846820</id><published>2012-03-26T05:43:00.002-07:00</published><updated>2012-03-28T16:40:44.217-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DotNetNuke"/><title type='text'>Entity relationship diagram of the database DotNetNuke Community Edition 5.6.1</title><content type='html'>&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 12px; line-height: 15px; text-align: left;&quot;&gt;The following diagram shows ERD of DotNetNuke Community Edition 5.6.1. I found it on the site &lt;a href=&quot;http://www.r2idnn.com/Blog/BlogEntry/DNN_5_4_x_Data_Model_and_DB_Changes.aspx&quot; rel=&quot;nofollow&quot; target=&quot;_blank&quot;&gt;R2i&lt;/a&gt;. I think ERD is the key to get clear the whole DNN, and can certainly help us understand the DNN architecture and save development time, so i want to share it with you. Though this version is only 5.6.1, not the newest 6.1.4, but 5.6.x is the latest version before DNN&amp;nbsp;6. so I think there aren&#39;t break changes to the core of DNN.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 12px; line-height: 15px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 12px; line-height: 15px; text-align: left;&quot;&gt;In the diagram, the tables surrounded by blue is the authentication, by red, the content, by green, the support tables, by black, the configuration tables, by gray, the tables used by third-core modules.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 12px; line-height: 15px; text-align: left;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 12px; line-height: 15px; text-align: left;&quot;&gt;You can zoom the document using your mouse.&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 12px; line-height: 15px; text-align: left;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;color: #333333; font-size: 12px; line-height: 15px; text-align: left;&quot;&gt;&lt;span style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 12px; line-height: 15px; text-align: left;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-_mOB5zicnoY/T3Bg2ZYxQgI/AAAAAAAABas/AkqeWXWArNI/s1600/DNN561CE_ERD_1-788917.jpg&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;328&quot; id=&quot;BLOGGER_PHOTO_ID_5724181614031880706&quot; src=&quot;http://1.bp.blogspot.com/-_mOB5zicnoY/T3Bg2ZYxQgI/AAAAAAAABas/AkqeWXWArNI/s640/DNN561CE_ERD_1-788917.jpg&quot; width=&quot;640&quot; /&gt;&lt;/a&gt;&lt;br /&gt; &lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #333333; font-family: Verdana, sans-serif;&quot;&gt;&lt;span style=&quot;font-size: 12px; line-height: 15px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;span style=&quot;color: #333333; font-family: Verdana, sans-serif; font-size: 12px; line-height: 15px; text-align: left;&quot;&gt;The original document in PDF format, and the metadata in XLS format, you can download here : &lt;a href=&quot;http://files.cnblogs.com/yhuang/DNN561CE_ERD.pdf&quot;&gt;ERD PDF&lt;/a&gt; || &lt;a href=&quot;http://files.cnblogs.com/yhuang/DNN561CE_METADATA.zip&quot;&gt;Metadata XLS&lt;/a&gt;.&lt;/span&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/1216574590211846820/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/entity-relationship-diagram-of-database.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/1216574590211846820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/1216574590211846820'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/entity-relationship-diagram-of-database.html' title='Entity relationship diagram of the database DotNetNuke Community Edition 5.6.1'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-_mOB5zicnoY/T3Bg2ZYxQgI/AAAAAAAABas/AkqeWXWArNI/s72-c/DNN561CE_ERD_1-788917.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-3471538484166646263</id><published>2012-03-22T03:28:00.002-07:00</published><updated>2012-03-22T03:28:26.678-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Reprint"/><category scheme="http://www.blogger.com/atom/ns#" term="Web Development"/><title type='text'>Must-have Cheat Sheets for Web Development</title><content type='html'>Reprint &quot;&lt;a href=&quot;http://www.ansoncheung.tk/articles/20-cheat-sheets-web-development-you-must-have&quot;&gt;20 Cheat Sheets for Web Development you must have&lt;/a&gt;&quot;.&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: &#39;Trebuchet MS&#39;, sans-serif;&quot;&gt;&lt;b&gt;&lt;i&gt;Don&#39;t forget to Click to Enlarge !&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;1) PHP&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-Cyu2fdD0VAI/T2r27l2Om4I/AAAAAAAABYs/uhiUiuWgzvg/s1600/php-cheat-sheet.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-Cyu2fdD0VAI/T2r27l2Om4I/AAAAAAAABYs/uhiUiuWgzvg/s320/php-cheat-sheet.png&quot; width=&quot;233&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;2) HTML Character Entities&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-m-0k11YHMxs/T2r4NR2CzSI/AAAAAAAABY4/a-Kpf61POFM/s1600/html-character-entities-cheat-sheet.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://1.bp.blogspot.com/-m-0k11YHMxs/T2r4NR2CzSI/AAAAAAAABY4/a-Kpf61POFM/s320/html-character-entities-cheat-sheet.png&quot; width=&quot;244&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;3) CSS&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-9wMCSWmjouQ/T2r4MqK6Q4I/AAAAAAAABY0/MJUWD104YWs/s1600/css-cheat-sheet.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://3.bp.blogspot.com/-9wMCSWmjouQ/T2r4MqK6Q4I/AAAAAAAABY0/MJUWD104YWs/s320/css-cheat-sheet.png&quot; width=&quot;233&quot; /&gt;&lt;/span&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;4) Javascript&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-mbIix6wMkwo/T2r4N3dOXjI/AAAAAAAABZE/a9ioSyhmQek/s1600/javascript-cheat-sheet.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://1.bp.blogspot.com/-mbIix6wMkwo/T2r4N3dOXjI/AAAAAAAABZE/a9ioSyhmQek/s320/javascript-cheat-sheet.png&quot; width=&quot;233&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;5) JQuery 1.3&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/--5NQMYDbLbo/T2r4PVdAaQI/AAAAAAAABZM/iTbfN5_aemA/s1600/jquery_1.3_cheatsheet.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://2.bp.blogspot.com/--5NQMYDbLbo/T2r4PVdAaQI/AAAAAAAABZM/iTbfN5_aemA/s320/jquery_1.3_cheatsheet.png&quot; width=&quot;241&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;6) Regular Expressions&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-Cy_QIuJKHnA/T2r4RxA1AwI/AAAAAAAABZc/dh0yAC7oclI/s1600/regular-expressions-cheat-sheet.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://2.bp.blogspot.com/-Cy_QIuJKHnA/T2r4RxA1AwI/AAAAAAAABZc/dh0yAC7oclI/s320/regular-expressions-cheat-sheet.png&quot; width=&quot;235&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;7) Apache Mod Rewrite&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-7QIqwXr5STI/T2r4QgpaZlI/AAAAAAAABZU/XU4mFPZq6SM/s1600/mod_rewrite-cheat-sheet.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-7QIqwXr5STI/T2r4QgpaZlI/AAAAAAAABZU/XU4mFPZq6SM/s320/mod_rewrite-cheat-sheet.png&quot; width=&quot;235&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;8) WordPress Mind Map&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-lyYTSKNm0Zo/T2r-ID6PUxI/AAAAAAAABZ0/zcrCnh3304Q/s1600/WordPress_Cheatsheet_v1_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;http://3.bp.blogspot.com/-lyYTSKNm0Zo/T2r-ID6PUxI/AAAAAAAABZ0/zcrCnh3304Q/s320/WordPress_Cheatsheet_v1_1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-ap8sNdhiBLU/T2r-JRFmOUI/AAAAAAAABZ8/HL84XqzsvdU/s1600/WordPress_Cheatsheet_v1_2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;http://3.bp.blogspot.com/-ap8sNdhiBLU/T2r-JRFmOUI/AAAAAAAABZ8/HL84XqzsvdU/s320/WordPress_Cheatsheet_v1_2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://1.bp.blogspot.com/-2nmiKVHM_9Y/T2r-KeyakvI/AAAAAAAABaE/jN6BhECrLa4/s1600/WordPress_Cheatsheet_v1_3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;247&quot; src=&quot;http://1.bp.blogspot.com/-2nmiKVHM_9Y/T2r-KeyakvI/AAAAAAAABaE/jN6BhECrLa4/s320/WordPress_Cheatsheet_v1_3.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;9) SEO&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://3.bp.blogspot.com/-1wsXoyIQ7_w/T2r-FX4k42I/AAAAAAAABZk/vaGlaGRdNok/s1600/SEO_Web_Developer_Cheat_Sheet_1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://3.bp.blogspot.com/-1wsXoyIQ7_w/T2r-FX4k42I/AAAAAAAABZk/vaGlaGRdNok/s320/SEO_Web_Developer_Cheat_Sheet_1.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-G7GG3DwpSf4/T2r-G7DGroI/AAAAAAAABZs/v9fWQq569L0/s1600/SEO_Web_Developer_Cheat_Sheet_2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;240&quot; src=&quot;http://2.bp.blogspot.com/-G7GG3DwpSf4/T2r-G7DGroI/AAAAAAAABZs/v9fWQq569L0/s320/SEO_Web_Developer_Cheat_Sheet_2.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;10)&amp;nbsp;Google Analytics Tips&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;/div&gt;
&lt;h1 class=&quot;entry-title&quot; style=&quot;background-color: white; color: #003366; font-family: Arial, Tahoma, Verdana; line-height: 24px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 10px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;a href=&quot;http://www.searchenginejournal.com/the-huge-collection-of-google-analytics-tips/7426/&quot;&gt;The Huge Collection of Google Analytics&amp;nbsp;Tips&lt;/a&gt;&lt;/span&gt;&lt;/h1&gt;
&lt;div class=&quot;social_bottom&quot; style=&quot;background-color: white; margin-bottom: 60px; margin-left: 0px; margin-right: 0px; margin-top: -20px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; text-align: -webkit-auto;&quot;&gt;Putting aside all recent arguments and gossip as per privacy issues (yep, nothing is probably totally free and Google Analytics should be using its (your?) data in some way), I should confess, I love the tool and use it.&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; text-align: -webkit-auto;&quot;&gt;I’ve been compiling the list of advanced Google Analytics tips that open up plenty of possibilities to track and evaluate. Today I am sharing the list and expect you to share yours too!&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;em style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;Note&lt;/em&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; text-align: -webkit-auto;&quot;&gt;: I haven’t tried all of these tricks with the new Google Analytics code yet, so if there are any problems with any of them, please report.&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;entry-content&quot; style=&quot;background-color: white; clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track 404 page&lt;/strong&gt;&amp;nbsp;(&lt;a href=&quot;http://www.google.com/support/googleanalytics/bin/answer.py?hl=en&amp;amp;answer=86927&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;more info here&lt;/a&gt;): I’ve been reporting on the importance of&amp;nbsp;&lt;a href=&quot;http://www.searchenginejournal.com/handling-your-404-page-properly/6882/&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;handling your 404 page properly&lt;/a&gt;. To make sure you take care of your non-existent pages, simply include a piece of code to your 404 page:&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;Track 404 page&quot; height=&quot;81&quot; src=&quot;http://www.searchenginejournal.com/wp-content/uploads/2008/08/ga-404-page.jpg&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Track 404 page&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Classify your site visitors&lt;/strong&gt;, e.g. track the browsing and buying behavior of your “customers” (those who subscribed, made a purchase or downloaded your product):&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;lt;script type=”text/javascript”&amp;gt;pageTracker._setVar(‘Marketing/PR’);&amp;lt;/script&amp;gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;a href=&quot;http://www.google.com/support/analytics/bin/answer.py?answer=57045&amp;amp;ctx=sibling&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Google Analytics help page&lt;/a&gt;&amp;nbsp;gives the following examples of the option usage:&lt;/div&gt;
&lt;ol style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;ol style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px;&quot;&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track visitors that landed on a particular page;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track visitors that clicked a particular link;&lt;/li&gt;
&lt;li style=&quot;margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track visitors according to their form selection.&lt;/li&gt;
&lt;/ol&gt;
&lt;li&gt;&lt;span style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track your (outgoing) links&lt;/strong&gt;: add a code to each link you want to track:&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; text-align: center;&quot;&gt;
&amp;lt;a href=”http://www.example.com”&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;onClick=”javascript:pageTracker._trackPageview(‘/outgoing/example.com’);”&amp;gt;&lt;/div&gt;
&lt;/div&gt;
&lt;div class=&quot;entry-content&quot; style=&quot;background-color: white; clear: both; color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;entry-content&quot; style=&quot;background-color: white; clear: both; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: -webkit-auto;&quot;&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track your&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;banner ads&lt;/strong&gt;&amp;nbsp;with the same code as the above one. For&amp;nbsp;&lt;a href=&quot;http://www.google.com/support/analytics/bin/answer.py?answer=55526&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Flash banners&lt;/strong&gt;&lt;/a&gt;&amp;nbsp;you should use this code:&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;left&quot; style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;on(release) {&lt;br style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; /&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;nbsp;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;getURL(“javascript: pageTracker._trackPageview&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;(‘/bannerads/advertisername/bannername’);”);&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;getURL(“http://www.advertisersite.com”);&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;left&quot; style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;}&lt;/div&gt;
&lt;div align=&quot;left&quot; style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track your&amp;nbsp;&lt;a href=&quot;http://www.google.com/support/analytics/bin/answer.py?answer=55529&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;downloads&lt;/a&gt;&amp;nbsp;(PDF, AVI, or WMV) with this code:&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;center&quot; style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&amp;lt;a href=”http://www.example.com/files/map.pdf” onClick=”javascript: pageTracker._trackPageview(‘/downloads/map’); “&amp;gt;&lt;/div&gt;
&lt;div align=&quot;center&quot; style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;mailto: links&lt;/strong&gt;&amp;nbsp;with this code:&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;span style=&quot;text-align: -webkit-auto;&quot;&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&amp;lt;a href=”mailto:[email address]“onClick=”javascript:urchinTracker(‘/mailto/jerry’);”&amp;gt;[email address]&amp;lt;/a&amp;gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;For&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;WordPress blogs&lt;/strong&gt;: use “&lt;a href=&quot;http://wordpress.org/extend/plugins/ultimate-google-analytics/&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Ultimate Google Analytics&lt;/a&gt;” plugin that also allows for lots of other handy features (easy Google Analytics installation, simple configuration screen, all types of links tracking, etc.).&amp;nbsp;&lt;a href=&quot;http://yoast.com/wordpress/google-analytics/&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Google Analytics for WordPress&lt;/a&gt;&amp;nbsp;is also great for this and and for tracking AdSense clicks,&amp;nbsp;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;image search keywords&lt;/strong&gt;, etc. (More information on&amp;nbsp;&lt;a href=&quot;http://seogadget.co.uk/how-to-count-your-outbound-click-stats-with-onclick-in-google-analytics/&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;counting outbound clicks&lt;/a&gt;without the help of plugins.)&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana;&quot;&gt;&lt;span style=&quot;font-size: 14px; line-height: 24px;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track&amp;nbsp;&lt;a href=&quot;http://www.reubenyau.com/google-analytics-hack-obtaining-full-referring-url/&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;full referring URLs&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;– set up the advanced filter:&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;Full referring URLs&quot; height=&quot;287&quot; src=&quot;http://www.searchenginejournal.com/wp-content/uploads/2008/08/ga-full-referral.jpg&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Full referring URLs&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Track&amp;nbsp;&lt;a href=&quot;http://www.google.com/support/analytics/bin/answer.py?answer=55528&amp;amp;topic=11002&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;e-commerce transactions&lt;/a&gt;&lt;/strong&gt;&amp;nbsp;by monitoring your receipt page. Find additional information on this in “&lt;a href=&quot;http://www.blogstorm.co.uk/advanced-google-analytics/&quot; style=&quot;color: blue; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-decoration: none;&quot; target=&quot;_blank&quot;&gt;Advanced Google Analytics&lt;/a&gt;“:&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;Track e-commerce transactions&quot; height=&quot;195&quot; src=&quot;http://www.searchenginejournal.com/wp-content/uploads/2008/08/ga-track-ecommerce.jpg&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Track e-commerce transactions&quot; width=&quot;379&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Set up email alert on a regularly-scheduled basis&lt;/strong&gt;&amp;nbsp;– go: Analytics Settings =&amp;gt; View Reports =&amp;gt; Email=&amp;gt; Schedule:&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;Set up email alerts&quot; height=&quot;264&quot; src=&quot;http://www.searchenginejournal.com/wp-content/uploads/2008/08/ga-email-alert.jpg&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Set up email alerts&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Exclude internal traffic&lt;/strong&gt;: Analytics Settings =&amp;gt; Edit =&amp;gt; “+Add Filter”:&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;Exclude internal traffic&quot; height=&quot;91&quot; src=&quot;http://www.searchenginejournal.com/wp-content/uploads/2008/08/ga-filters.jpg&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Exclude internal traffic&quot; width=&quot;400&quot; /&gt;&lt;/div&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; list-style-type: square; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 15px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;
&lt;li style=&quot;list-style-type: square; margin-bottom: 0px; margin-left: 20px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;&lt;strong style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot;&gt;Compare traffic / page views over different periods of times&lt;/strong&gt;, e.g. compare how your two viral campaigns performed compared to each other:&lt;/li&gt;
&lt;/ul&gt;
&lt;div style=&quot;color: #444444; font-family: Arial, Tahoma, Verdana; font-size: 14px; line-height: 24px; padding-bottom: 10px; padding-left: 0px; padding-right: 0px; padding-top: 0px; text-align: center;&quot;&gt;
&lt;img alt=&quot;Compare pageviews/ traffic&quot; height=&quot;118&quot; src=&quot;http://www.searchenginejournal.com/wp-content/uploads/2008/08/ga-compare.jpg&quot; style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px; padding-bottom: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;Compare pageviews/ traffic&quot; width=&quot;311&quot; /&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/3471538484166646263/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/must-have-cheat-sheets-for-web.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/3471538484166646263'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/3471538484166646263'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/must-have-cheat-sheets-for-web.html' title='Must-have Cheat Sheets for Web Development'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-Cyu2fdD0VAI/T2r27l2Om4I/AAAAAAAABYs/uhiUiuWgzvg/s72-c/php-cheat-sheet.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-5333660134160359058</id><published>2012-03-21T22:17:00.000-07:00</published><updated>2012-03-21T22:45:46.256-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="DotNetNuke"/><category scheme="http://www.blogger.com/atom/ns#" term="Entity Framework"/><category scheme="http://www.blogger.com/atom/ns#" term="ORM"/><title type='text'>Entity Framework Code First in DotNetNuke 6</title><content type='html'>&lt;div align=&quot;center&quot; id=&quot;PartOne&quot;&gt;
&lt;span style=&quot;color: black; font-family: &#39;Agency FB&#39;; font-size: x-large;&quot;&gt;&lt;strong&gt;Part One : How to develop a new module for DNN 6&lt;/strong&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;If you don&#39;t know what DNN means for, please visit &lt;a href=&quot;http://www.dotnetnuke.com/&quot;&gt;www.dotnetnuke.com&lt;/a&gt;&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;If you don&#39;t know how to install DNN 6 on local, please click &lt;a href=&quot;http://codeciel.blogspot.fr/2012/03/how-to-install-dotnetnuke-6-on-local.html&quot;&gt;http://codeciel.blogspot.fr/2012/03/how-to-install-dotnetnuke-6-on-local.html&lt;/a&gt; &lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;div style=&quot;text-align: left;&quot;&gt;
&lt;i&gt;&lt;span style=&quot;font-family: Georgia, &#39;Times New Roman&#39;, serif;&quot;&gt;If you want to know how to develop a new module on your own for DNN6, please just check this post out.&lt;/span&gt;&lt;/i&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step 1 : Create desktop module and module definition via DNN6 host &lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;In the view of Database, this step will save necessary information for new module into database, thus, DNN can recognize the new module, and you can add it on any page. &lt;/span&gt;&lt;span style=&quot;font-size: small;&quot;&gt;There are many tables concerned “module” if you look into the database - dbo.DesktopModules, dbo.Modules, dbo.ModuleDefinitions, dbo.TabModules, dbo.PortalDesktopModules. I can&#39;t explain clearly their relations here, if possible, i will write another post specifically for this. &lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;So, just follow the instructions to create your own module :&lt;/span&gt; 
&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Login your DNN6 site with the host account&lt;/span&gt; &lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Access Host → Extensions&lt;/span&gt; &lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Then click Manage → Create New Module and you will see&lt;/span&gt; &lt;/blockquote&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Tips : If you can&#39;t find the button Manage, please switch your mode to Edit on the top-right page.&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-wzlL3T9Q_KM/T2q3FXeRXjI/AAAAAAAABXU/XAPSiwG7qAM/s1600/1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;261&quot; src=&quot;http://3.bp.blogspot.com/-wzlL3T9Q_KM/T2q3FXeRXjI/AAAAAAAABXU/XAPSiwG7qAM/s400/1.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 1 : Create new module&lt;/span&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Fill these textboxes &lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Check the option «&amp;nbsp; Add Test Page ? » to simplify our works&lt;/span&gt; &lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Click « Create Module », then you will see that your new module is already deployed on the page «&amp;nbsp; TestEFCodeFirstPage »&lt;/span&gt;&lt;/blockquote&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-KAEXQxM3J7s/T2q3J6qkhRI/AAAAAAAABYA/8-5hghblD6s/s1600/2.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;157&quot; src=&quot;http://1.bp.blogspot.com/-KAEXQxM3J7s/T2q3J6qkhRI/AAAAAAAABYA/8-5hghblD6s/s400/2.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 2 : New page with new module&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step 2 : Hook up the new module to a VS project&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Now open Vs2010 → new project&lt;/span&gt; &lt;/blockquote&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Tips : The name must be same as the module «&amp;nbsp; EFCodeFirst », but you can choose anywhere to place this project, because we will move it to &amp;lt;Site root directory&amp;gt;/DesktopModules and merge the two folders.&lt;/span&gt;&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-0kJAV8WC8go/T2q3LMF8dQI/AAAAAAAABYM/MlgcgkF7b8M/s1600/3.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;276&quot; src=&quot;http://2.bp.blogspot.com/-0kJAV8WC8go/T2q3LMF8dQI/AAAAAAAABYM/MlgcgkF7b8M/s400/3.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 3 : Create new VS2010 project&lt;/span&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;blockquote&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: -webkit-auto;&quot;&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;- Open again the «&amp;nbsp; EFCodeFirst.csproj » project in VS2010. We have some configurations to do.&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Properties → Compiler → output → output path : &amp;lt;Site root directory&amp;gt;\bin\ &lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- (For some people whose site on the server run in environment of .net framework version 2.0.50727.5448) change site&#39;s application pool to ASP.NET V4.0 in IIS&lt;/span&gt; &lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Add reference of Dotnetnuke.dll which you can find in &amp;lt;Site root directory&amp;gt;\bin\, set copy local to false&lt;/span&gt; &lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Rename web.config to web.config.old, because the site has already a web.config&lt;/span&gt; &lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Delete the file «&amp;nbsp; EFView.ascx »&lt;/span&gt; &lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Add a new element, choose web user control as type and «&amp;nbsp; EFView.ascx » as file name.&lt;/span&gt; &lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Open file EFView.ascx, write something in it. «&amp;nbsp; This is my first dnn6 module » for example.&lt;/span&gt; &lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Open file EFView.ascx.cs, change its base class to PortalModuleBase, Save then compile this project. &lt;/span&gt;&lt;/blockquote&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;- Refresh the page &lt;/span&gt;&lt;a href=&quot;http://dnn614/TestEFCodeFirstPage.aspx&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;http://dnn614/TestEFCodeFirstPage.aspx&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: small;&quot;&gt; , and you can get :&lt;/span&gt;&lt;/blockquote&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-NjzKQ3905Rc/T2q3MeGJXZI/AAAAAAAABYQ/Nxg0W3cNCTw/s1600/4.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;132&quot; src=&quot;http://1.bp.blogspot.com/-NjzKQ3905Rc/T2q3MeGJXZI/AAAAAAAABYQ/Nxg0W3cNCTw/s400/4.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 4 : Test page with your own module&lt;/span&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Until here, you has created a dnn6 module successfully, then you can build the module on your own.&lt;/span&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div align=&quot;center&quot; id=&quot;PartTwo&quot;&gt;
&lt;span style=&quot;font-family: &#39;Agency FB&#39;;&quot;&gt;&lt;span style=&quot;font-size: x-large;&quot;&gt;&lt;b&gt;Part Two&lt;/b&gt;&lt;b&gt; &lt;/b&gt;&lt;b&gt;: Using EF Code First in DNN6 module&lt;/b&gt;&lt;/span&gt;&lt;/span&gt; 
&lt;/div&gt;
&lt;blockquote&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;This part is based on &lt;/span&gt;&lt;a href=&quot;http://www.codeguru.com/csharp/article.php/c19233&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Introduction to Entity Framework Code First&lt;/span&gt;&lt;/a&gt;&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;strong&gt;&lt;em&gt;Step 3* : Get some information about Entity Framework&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Before I directly get right to modules, I want to talk about a bit EF, an ORM framework for the .NET.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;EF 4.0 provides two approaches for working with entities, viz. &lt;/span&gt;&lt;a href=&quot;http://blogs.msdn.com/b/adonet/archive/2011/03/15/ef-4-1-model-amp-database-first-walkthrough.aspx&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Database First&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; and&amp;nbsp; &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/data/ff830362&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Model First&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: small;&quot;&gt;. In the former case you design a database before starting your application development. Then you use&amp;nbsp; &lt;/span&gt;&lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb738482(v=vs.90).aspx&quot;&gt;&lt;span style=&quot;font-size: small;&quot;&gt;Entity Data Model Designer&lt;/span&gt;&lt;/a&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&amp;nbsp; of Visual Studio to design a data model visually by dragging and dropping tables from the database onto the designer (see Figure 5). In the case of Model First development you use Entity Data Model Designer to design data model classes manually (see Figure 6). You then specify the database connection to be used in the application. In any case you use Entity Data Model Designer to generate your data model classes.&lt;/span&gt; 
&lt;br /&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-goXcQOoOVZ0/T2q3F-1f65I/AAAAAAAABXY/Ms6jC2mXN50/s1600/2-1.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://2.bp.blogspot.com/-goXcQOoOVZ0/T2q3F-1f65I/AAAAAAAABXY/Ms6jC2mXN50/s1600/2-1.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 5 : Designing a model with Database First approach&lt;/span&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-Gk6YKTE-JAs/T2q3GjYox0I/AAAAAAAABXg/ygrNyZ3aUb0/s1600/2-2.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://1.bp.blogspot.com/-Gk6YKTE-JAs/T2q3GjYox0I/AAAAAAAABXg/ygrNyZ3aUb0/s1600/2-2.jpg&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 6 : Designing a model with Model First approach&lt;/span&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;EF 4.1 offers one more way of generating model classes – Code First. In the Code First approach you won&#39;t use any designer at all. You will create plain .NET Framework classe and then use certain attributes and associated techniques to make them Entity Framework Data Models (see Figure 7) .&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://3.bp.blogspot.com/-BM5YqFiaAaE/T2q3Hp-WttI/AAAAAAAABXo/3aDMbP4XXCQ/s1600/2-3.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;156&quot; src=&quot;http://3.bp.blogspot.com/-BM5YqFiaAaE/T2q3Hp-WttI/AAAAAAAABXo/3aDMbP4XXCQ/s320/2-3.jpg&quot; width=&quot;320&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 7 : Creating a model with Code First&lt;/span&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;When you run the application that makes use of the Code First technique for the first time the EF will create a new SQL Express database, based on the model classes. For our case, we shall specify the database existing. If you are still confused, see figure 8, i think you will be clearer. In our project, we will use the last one.&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-_vKnc9pM4JE/T2q3IWT13dI/AAAAAAAABXw/4iqnP_cDmgA/s1600/2-4.jpg&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://1.bp.blogspot.com/-_vKnc9pM4JE/T2q3IWT13dI/AAAAAAAABXw/4iqnP_cDmgA/s320/2-4.jpg&quot; width=&quot;300&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 8 : Approaches of EF&lt;/span&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now let&#39;s develop not just create our module, step-by-step, that illustrates the entire process. In the module that follows you will be dealing with a data model that represents a blog post. The actual data resides in a SQL Server table named BlogPosts. You can then read-write data to the table using the model class.&lt;/span&gt; 
&lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step 3 :&amp;nbsp; Create a Model&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Let&#39;s assume that you are dealing with a data model that represents a blog post and a blog post category. To begin developing the models, create a new project of type Class Library in the same solution of project “EFCodeFirst” and name it “EFCodeFirstLib”. The class library project will contain two model classes, viz. BlogPost and Category. These classes are shown below: &lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Tips&amp;nbsp; : you must put the EFCodeFirstLib folder in the &amp;lt;root site folder&amp;gt;/DesktopModules/, and the compile path should be &amp;lt;root site folder&amp;gt;/bin/.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; BlogPost&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Guid Id { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Title { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Content { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; DateTime PublishDate { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  11:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  12:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;virtual&lt;/span&gt; Category Category { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  13:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  14:  &lt;/span&gt;}&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  15:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  16:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; Category&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  17:  &lt;/span&gt;{&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  18:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  19:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Guid Id { get; set; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  20:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  21:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Name { get; set; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  22:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  23:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;virtual&lt;/span&gt; ICollection&amp;lt;BlogPost&amp;gt; BlogPosts { get; set; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  24:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  25:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The BlogPost class defines five properties namely Id, Title, Content, PublishDate and Category. Notice that Category property represents a foreign key. The Category class has three properties - Id, Name and BlogPosts. The BlogPosts property is a collection property because there can be multiple blog posts belonging to a single category. Remember that under the default scheme, the property that represents a primary key should have data type of int or Guid. In the former case, EF 4.1 will translate the property as an identity column in the database and in the latter case a Unique Identifier. You can, of course, customize this behavior using certain attributes as we will discuss later. &lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;em&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;Step 4 : Creating a Data Context&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now that your model classes are ready, let&#39;s proceed to creating a data context. A data context allows you to query and work with the entity data in your module. A data context is a class that inherits from DbContext base class. The following class shows how a data context for our example looks:&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;partial&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; BlogContext : DbContext&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; BlogContext():&lt;span class=&quot;kwrd&quot;&gt;base&lt;/span&gt;(&lt;span class=&quot;str&quot;&gt;&quot;BlogDb&quot;&lt;/span&gt;)&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;    {&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;    }&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; DbSet&amp;lt;BlogPost&amp;gt; BlogPosts { get; set; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; DbSet&amp;lt;Category&amp;gt; Categories { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The BlogContext class inherits from DbContext base class. The constructor of the BlogContext class calls the base class constructor and passes a desired database name to it. When you run the application for the first time a database with this name is created for you. If you do not pass this information, the name of the database will be the same as the fully qualified name of the DbContext class (EFCodeFirstLib.BlogContext in our example).&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The BlogContext class defines two public properties, viz. BlogPosts and Categories. These properties are of type DbSet. The DbSet class represents an entity set (in other words a database table) on which CRUD (Create, Read, Update, Delete) operations can be performed.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;strong&gt;&lt;em&gt;Step 5 : Testing Database Generation(optional)&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;To test the code you wrote so far, add a button in the control “EFView.ascx” in the project “EFCodeFirst” and add a reference to the EFCodeFirstLib project you just created. Then key-in the following code in the Button Click Event method.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;using&lt;/span&gt; (var db = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; BlogContext())&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;    Guid id = Guid.NewGuid();&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;    var cat = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Category { Id = id, Name = &lt;span class=&quot;str&quot;&gt;&quot;ASP.NET&quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;    var post = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; BlogPost { Title=&lt;span class=&quot;str&quot;&gt;&quot;Title1&quot;&lt;/span&gt;, Content=&lt;span class=&quot;str&quot;&gt;&quot;Hello World!&quot;&lt;/span&gt;, PublishDate=&lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; DateTime(2011,1,1), Category=cat};&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;    db.Categories.Add(cat);&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;    db.BlogPosts.Add(post);&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;int&lt;/span&gt; i = db.SaveChanges();&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The above code creates a new instance of BlogContext data context. It then creates an instance of Category and BlogPost classes respectively. The newly created entity instances are added to the DbSets and finally SaveChanges() method of the data context is called. The SaveChanges() method persists the entity data into the database tables and returns the number of records affected by the operation.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now run the Console application. Since this is your first ever run of the application, EF will create the database and tables for you using SQL Express running on your machine. The name of the database created will be BlogDb (as specified in data context constructor) and two tables - BlogPosts and Categories - will also be created.&lt;/span&gt;&lt;br /&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-K-uD_3iLvBE/T2q3OI37xFI/AAAAAAAABYk/4J_Xr4RzGXw/s1600/Sans+titre1.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://4.bp.blogspot.com/-K-uD_3iLvBE/T2q3OI37xFI/AAAAAAAABYk/4J_Xr4RzGXw/s320/Sans+titre1.png&quot; width=&quot;267&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 9: Database and tables created after the first click of the button on the page.&lt;/span&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Notice how Id column of BlogPosts and Categories table is marked as primary key. Also, notice that BlogPosts table has a foreign key (Category_Id) defined.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;strong&gt;&lt;em&gt;Step 6 : Recreating the Database with Every Run&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;During the testing phase you may want to create the database under consideration with each run of your application so that your application runs on a clean slate. Additionally, you may want to add some test data into the database while it is being created. Database re-creation is desirable under one more scenario - when entities (and thus tables) change during development. By default EF will create the database only during the first run of the application and there after use the same database for further operations. To alter this behavior you need to create what is known as a database initializer. The initializer typically takes a form of a class inherited from DropCreateDatabaseAlways class. As the name suggests, the DropCreateDatabaseAlways class always re-creates the database. The following code shows BlogContextInitializer that does just that.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;Tips : You can also make use of &lt;strong&gt;DropCreateDatabaseIfModelChanges&lt;/strong&gt; class in which case the database will be re-created when models change.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: x-small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; BlogContextInitializer : DropCreateDatabaseAlways&amp;lt;BlogContext&amp;gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;override&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; Seed(BlogContext context)&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;    {&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;        Category cat1 = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Category { Id=Guid.NewGuid(), Name=&lt;span class=&quot;str&quot;&gt;&quot;.NET Framework&quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;        Category cat2 = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Category { Id = Guid.NewGuid(), Name = &lt;span class=&quot;str&quot;&gt;&quot;SQL Server&quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;        Category cat3 = &lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; Category { Id = Guid.NewGuid(), Name = &lt;span class=&quot;str&quot;&gt;&quot;jQuery&quot;&lt;/span&gt; };&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;        context.Categories.Add(cat1);&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;        context.Categories.Add(cat2);&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;        context.Categories.Add(cat3);&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  11:  &lt;/span&gt;        context.SaveChanges();&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  12:  &lt;/span&gt;    }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  13:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The BlogContextInitializer class inherits from DropCreateDatabaseAlways base class and overrides Seed() method. The Seed() method adds some sample data to the database being created. In the above example you add three categories. Once the initializer is ready you need to add the following line of code in the Main() method.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;protected&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;void&lt;/span&gt; Button1_Click(&lt;span class=&quot;kwrd&quot;&gt;object&lt;/span&gt; sender, EventArgs e)&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;{&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;    Database.SetInitializer&amp;lt;BlogContext&amp;gt;(&lt;span class=&quot;kwrd&quot;&gt;new&lt;/span&gt; BlogContextInitializer());&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;    ...&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;    ...&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Now you will find that with every run the database is re-created and the Categories table is populated with sample data.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;strong&gt;&lt;em&gt;Step 7 : Using an Existing Database with Code First&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;In the above example, you allowed EF to create a database for you. In many cases you may want to use an existing database rather than creating a new one. Because we use EF Code First in DNN, we can’t recreate the whole database used by DNN every time the model is changed. So that we have to use another database instead of the database used by DNN(DNN614 in this case). This can be accomplished by specifying a database connection string in the application configuration file (or web.config file) as shown below: &lt;/span&gt;
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;connectionStrings&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;SiteSqlServer&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;connectionString&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;Data Source=(local)\LEGAL;Initial Catalog=DNN614;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;kwrd&quot;&gt;User ID=login614;Password=xxx&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;providerName&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;System.Data.SqlClient&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;BlogDb&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;connectionString&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;Data Source=(local)\LEGAL;Initial Catalog=DNN614_BlogDb;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;kwrd&quot;&gt;User ID=lgfr;Password=xxx&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;providerName&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;System.Data.SqlClient&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;connectionStrings&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div align=&quot;center&quot;&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-5O3gEmvigGI/T2q3NKDDmII/AAAAAAAABYY/Q9Vzao1ezW0/s1600/Sans+titre.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;320&quot; src=&quot;http://1.bp.blogspot.com/-5O3gEmvigGI/T2q3NKDDmII/AAAAAAAABYY/Q9Vzao1ezW0/s320/Sans+titre.png&quot; width=&quot;258&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;&lt;span style=&quot;font-size: x-small;&quot;&gt;Figure 10 : Using an existing database&lt;/span&gt;&amp;nbsp;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;Note that the name of the database connection string as mentioned in the &amp;lt;connectionStrings&amp;gt; section and the one specified in the data context class must match. If you do not specify anything in the data context class, then the name of the data context itself is assumed. For example, we passed string &quot;BlogDb&quot; in the data context class (BlogContext) in which case EF will first check in the configuration file whether any connection string with name BlogDb is defined; if so, EF will use the database as mentioned in the connection string for further operation. If there is no connection string defined it will proceed and create a new database with name BlogDb under local SQL Express installation. If you do not pass anything to the base class from the data context class then EF will first look for a database connection string with name BlogContext in the configuration file and if found will use that database for further operations.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;&lt;strong&gt;&lt;em&gt;Step 8 : Using Data Annotations to Specify Table and Key Information&lt;/em&gt;&lt;/strong&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;In the above example we used default conventions of EF while creating entity classes. You can use certain data annotations to customize this behavior. For example, consider the BlogPost and Category classes shown below that essentially do the same job as in the previous case but use some data annotation attributes to specify table name, primary key and foreign key information.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;[Table(&lt;span class=&quot;str&quot;&gt;&quot;BlogPosts&quot;&lt;/span&gt;)]&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; BlogPost&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;{&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;    [Key]&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Guid Id { get; set; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Title { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Content { get; set; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; DateTime PublishDate { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;    [ForeignKey(&lt;span class=&quot;str&quot;&gt;&quot;Category&quot;&lt;/span&gt;)]&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Guid CategoryId { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  11:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;virtual&lt;/span&gt; Category Category { get; set; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  12:  &lt;/span&gt;}&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  13:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  14:  &lt;/span&gt;[Table(&lt;span class=&quot;str&quot;&gt;&quot;Categories&quot;&lt;/span&gt;)]&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  15:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;class&lt;/span&gt; Category&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  16:  &lt;/span&gt;{&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  17:  &lt;/span&gt;    [Key]&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  18:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; Guid Id { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  19:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;string&lt;/span&gt; Name { get; set; }&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  20:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;public&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;virtual&lt;/span&gt; ICollection&amp;lt;BlogPost&amp;gt; BlogPosts { get; set; }&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  21:  &lt;/span&gt;}&lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;&lt;/span&gt;&amp;nbsp; &lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;As you can see, the [Table] attribute explicitly specifies the name of the table (BlogPosts and Categories respectively). On the same lines, [Key] and [ForeignKey] attributes specify primary key and foreign key information respectively.&lt;/span&gt; 
&lt;br /&gt;
&lt;span style=&quot;font-size: small;&quot;&gt;The Entity Framework Code First allows you to make use of EF features directly at code level, i.e. without designing any Entity Data Models. This way you create entity classes as plain C# classes. You then define a data context by inheriting from DbContext class. Additionally, you can also use data annotation attributes such as [Key], [ForeignKey] and [Table] to specify the respective pieces of information explicitly. By default, EF creates a database under SQL Express when the application is run for the first time. You can alter this behavior by creating your own database initialization strategy. You can also use an existing database instead of creating a new one by specifying database connection string in the configuration file.&lt;/span&gt; 
&lt;br /&gt;
&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-size: small;&quot;&gt;&lt;strong&gt;&lt;em&gt;&lt;span style=&quot;font-size: medium;&quot;&gt;SUMMARY :&lt;/span&gt;&lt;/em&gt;&lt;/strong&gt; &lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;br /&gt;
In a word, I don’t think it’s a good idea to apply EF into DNN, except that you can accept two databases in the meantime.</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/5333660134160359058/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/entity-framework-code-first-in.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/5333660134160359058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/5333660134160359058'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/entity-framework-code-first-in.html' title='Entity Framework Code First in DotNetNuke 6'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://3.bp.blogspot.com/-wzlL3T9Q_KM/T2q3FXeRXjI/AAAAAAAABXU/XAPSiwG7qAM/s72-c/1.png" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-8889805646306694311</id><published>2012-03-21T03:00:00.000-07:00</published><updated>2012-03-21T03:00:02.081-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="ASP.NET"/><category scheme="http://www.blogger.com/atom/ns#" term="jQuery"/><category scheme="http://www.blogger.com/atom/ns#" term="Reprint"/><title type='text'>Juice UI: Open source ASP.NET Web Forms components for jQuery UI widgets (From Jon Galloway)</title><content type='html'>&lt;h4 align=&quot;justify&quot;&gt;

This article is reprinted from &lt;a href=&quot;http://weblogs.asp.net/jgalloway/archive/2012/02/28/juice-ui-open-source-asp-net-web-forms-components-for-jquery-ui-widgets.aspx?utm_source=feedburner&amp;amp;utm_medium=feed&amp;amp;utm_campaign=Feed%3A+jongalloway+%28Jon+Galloway%29&quot;&gt;Jon Galloway&lt;/a&gt;. Why I keep a watchful eye on Juice UI, that’s because it’s a really good idea to integrate jQuery into Asp.net web control components.&lt;/h4&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;img align=&quot;right&quot; border=&quot;0&quot; height=&quot;108&quot; src=&quot;http://juiceui.com/images/juice-logo.jpg&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; margin-bottom: 0px; margin-left: 5px; margin-right: 0px; margin-top: 0px; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; width=&quot;200&quot; /&gt;This morning at MVP Summit, &lt;a href=&quot;http://blogs.msdn.com/b/scothu/&quot;&gt;Scott Hunter&lt;/a&gt; just announced a new open source project from &lt;a href=&quot;http://appendto.com/&quot;&gt;appendTo&lt;/a&gt; called &lt;a href=&quot;http://juiceui.com/&quot;&gt;Juice UI&lt;/a&gt;. Juice UI is a collection of Web Forms components which make it incredibly easy to leverage jQuery UI widgets in ASP.NET Web Forms applications. You can start using it right away by adding the &lt;a href=&quot;http://nuget.org/packages/JuiceUI&quot;&gt;JuiceUI NuGet package&lt;/a&gt; to your app, and you&#39;re welcome to &lt;a href=&quot;https://github.com/appendto/juiceui&quot;&gt;go nuts with the source&lt;/a&gt;, which is dual licensed under MIT and GPL.&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 align=&quot;justify&quot;&gt;

&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;What Juice UI does&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;color: black;&quot;&gt;&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;a href=&quot;http://jqueryui.com/&quot;&gt;jQuery UI&lt;/a&gt; is a library that&#39;s built on top of jQuery. It&#39;s got a lot of great widgets for common scenarios - things like date pickers, dialogs, and tabs - and they&#39;re all built on a really solid widget platform from &lt;a href=&quot;http://jqueryui.com/about&quot;&gt;some of the sharpest Javascript developers in the field&lt;/a&gt;. You&#39;ve always been able to make use of these libraries using jQuery and jQuery UI, but the new Juice UI controls make it that much easier.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
Example: &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:TextBox&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;_Restrict&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;Juice:Datepicker&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;     &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;     &lt;span class=&quot;attr&quot;&gt;TargetControlID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;_Restrict&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;     &lt;span class=&quot;attr&quot;&gt;MinDate&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;-20&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;     &lt;span class=&quot;attr&quot;&gt;MaxDate&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;+1M +10D&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
Gives you this: &lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://www.flickr.com/photos/36836555@N00/6938942653/&quot;&gt;&lt;img alt=&quot;2012-02-28 09h16_03&quot; border=&quot;0&quot; height=&quot;189&quot; src=&quot;http://farm8.static.flickr.com/7195/6938942653_d824e09ef6_b.jpg&quot; width=&quot;216&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;h4 align=&quot;justify&quot;&gt;

&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;Included controls and behaviors&lt;/em&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
Juice UI is launching with 14 widgets and behaviors. You can see the whole list of controls at &lt;a href=&quot;http://juiceui.com/controls&quot;&gt;http://juiceui.com/controls&lt;/a&gt;, and they&#39;ve all got interactive examples.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://www.flickr.com/photos/36836555@N00/6938942675/&quot;&gt;&lt;img alt=&quot;2012-02-28 09h17_29&quot; border=&quot;0&quot; height=&quot;340&quot; src=&quot;http://farm8.static.flickr.com/7067/6938942675_a0cfa73dc1_b.jpg&quot; style=&quot;display: block; float: none; margin-left: auto; margin-right: auto;&quot; width=&quot;399&quot; /&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
Here&#39;s the full list, linked to the documentation: &lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/accordion&quot;&gt;Accordion&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/autocomplete&quot;&gt;Autocomplete&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/button&quot;&gt;Button&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/datepicker&quot;&gt;Datepicker&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/dialog&quot;&gt;Dialog&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/draggable&quot;&gt;Draggable&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/droppable&quot;&gt;Droppable&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/position&quot;&gt;Position&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/progressbar&quot;&gt;Progress Bar&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/resizable&quot;&gt;Resizable&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/selectable&quot;&gt;Selectable&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/slider&quot;&gt;Slider&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/sortable&quot;&gt;Sortable&lt;/a&gt; &lt;/div&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://juiceui.com/controls/tabs&quot;&gt;Tabs&lt;/a&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;em style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em style=&quot;font-weight: bold;&quot;&gt;Walkthrough&lt;/em&gt;&lt;br /&gt;
&lt;em style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/em&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;h5 align=&quot;justify&quot;&gt;

&lt;span style=&quot;font-weight: bold;&quot;&gt;Add the JuiceUI NuGet package&lt;/span&gt;&lt;/h5&gt;
&lt;div&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;justify&quot;&gt;
I&#39;m going to start with a new ASP.NET 4 Web Forms project. I&#39;ll right click on the References folder, select Manage NuGet Packages..., and search for &quot;juiceui&quot; &lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://www.flickr.com/photos/36836555@N00/6938942645/&quot;&gt;&lt;img alt=&quot;2012-02-28 08h10_11&quot; border=&quot;0&quot; height=&quot;365&quot; src=&quot;http://farm8.static.flickr.com/7041/6938942645_a8062f65bf_b.jpg&quot; style=&quot;display: block; float: none; margin-left: auto; margin-right: auto;&quot; width=&quot;666&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;h5 align=&quot;justify&quot;&gt;

&lt;span style=&quot;font-weight: bold;&quot;&gt;The JuiceUI namespace&lt;/span&gt;&lt;/h5&gt;
&lt;div&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;div align=&quot;justify&quot;&gt;
The NuGet package adds the JuiceUI namespace to my web.config, like this: &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;configuration&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;system.web&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;compilation&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;debug&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;true&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;targetFramework&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;4.0&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;pages&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;            &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;controls&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;                &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;add&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;assembly&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;JuiceUI&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;namespace&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;Juice&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;tagPrefix&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;juice&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;            &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;controls&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;        &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;pages&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;system.web&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;configuration&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
If needed, I remove that and use the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/eb44kack.aspx&quot;&gt;&amp;lt;@Import Namespace=&quot;JuiceUI&quot; /&amp;gt;&lt;/a&gt; directive to bring that namespace at the page level. &lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;h4 align=&quot;justify&quot;&gt;

&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;Using the Juice UI controls&lt;/em&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
You&#39;ll first need an &amp;lt;asp:ScriptManager&amp;gt; - you can add one to a page, or you can add one to your site&#39;s Master page. &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:ScriptManager&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;_Script&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
Now I can just start using the controls. These are extender controls, so you use the TargetControlID property to point the Juice UI behavior at an Web Forms server control. Here&#39;s a stripped down example that hooks up a DatePicker behavior to a TextBox: &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:TextBox&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;DateSample&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;Juice:Datepicker&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;TargetControlID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;DateSample&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
And just because it&#39;s fun, I&#39;ll add a Draggable behavior that&#39;s pointed at a Panel: &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:Panel&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;DragBox&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;Style&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;border:1px solid; width:100px;&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;    Hi. You can drag me around. &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:Panel&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;Juice:Draggable&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;TargetControlID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;DragBox&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;br /&gt;
&lt;em&gt;Note: I&#39;m keeping this really simple for illustration here - of course the style would go in CSS, etc. There are more sophisticated examples in the Juice UI samples included with the source code.&lt;/em&gt; &lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
Running this page shows I&#39;ve got just what you&#39;d expect - a date picker on the textbox, and a draggable panel. &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;a href=&quot;http://www.flickr.com/photos/36836555@N00/6938942687/&quot;&gt;&lt;img alt=&quot;2012-02-28 10h34_32&quot; border=&quot;0&quot; height=&quot;343&quot; src=&quot;http://farm8.static.flickr.com/7180/6938942687_822f45650b_b.jpg&quot; style=&quot;display: block; float: none; margin-left: auto; margin-right: auto;&quot; width=&quot;423&quot; /&gt;&lt;/a&gt; &lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
Here&#39;s the complete markup for that page: &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;asp&quot;&gt;&amp;lt;%@ Page Title=&quot;Home Page&quot; Language=&quot;C#&quot; MasterPageFile=&quot;~/Site.master&quot;&lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;asp&quot;&gt; AutoEventWireup=&quot;true&quot; &lt;/span&gt;&lt;span style=&quot;background-color: yellow;&quot;&gt;CodeBehind=&quot;Default.aspx.cs&quot; Inherits=&quot;Juice_Sample._Default&quot; %&amp;gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:Content&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;HeaderContent&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt;&amp;nbsp;&lt;span class=&quot;attr&quot; style=&quot;background-color: transparent;&quot;&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;background-color: transparent;&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;background-color: transparent;&quot;&gt;&quot;HeadContent&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;background-color: transparent;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:Content&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:Content&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;BodyContent&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ContentPlaceHolderID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;background-color: transparent;&quot;&gt;&quot;MainContent&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;background-color: transparent;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:ScriptManager&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;_Script&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;    &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:TextBox&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;DateSample&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   9:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;Juice:Datepicker&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;TargetControlID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;DateSample&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  10:  &lt;/span&gt;    &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  11:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:Panel&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;ID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;DragBox&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;Style&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;border:1px solid;&amp;nbsp;&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;background-color: transparent;&quot;&gt;width:100px;&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot; style=&quot;background-color: transparent;&quot;&gt;&amp;gt;&lt;/span&gt;&lt;span style=&quot;background-color: transparent;&quot;&gt; &lt;/span&gt;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  12:  &lt;/span&gt;        Hi. You can drag me around. &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  13:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:Panel&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  14:  &lt;/span&gt;    &lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;Juice:Draggable&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;runat&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;server&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;TargetControlID&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;DragBox&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;  15:  &lt;/span&gt;&amp;nbsp;&lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;  16:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;asp:Content&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;div align=&quot;justify&quot;&gt;
&lt;br /&gt;
And, in case you&#39;re interested, the widgets are hooked up using HTML5 data- attributes: &lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;csharpcode&quot;&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   1:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;input&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;name&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;ctl00$MainContent$DateSample&quot;&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;type&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;text&quot;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   2:  &lt;/span&gt;        &lt;span class=&quot;attr&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;MainContent_DateSample&quot;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   3:  &lt;/span&gt;        &lt;span class=&quot;attr&quot;&gt;data-ui-widget&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;datepicker&quot;&lt;/span&gt; &lt;span class=&quot;kwrd&quot;&gt;/&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   4:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;div&lt;/span&gt; &lt;span class=&quot;attr&quot;&gt;id&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;MainContent_DragBox&quot;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   5:  &lt;/span&gt;        &lt;span class=&quot;attr&quot;&gt;data-ui-widget&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;draggable&quot;&lt;/span&gt; &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   6:  &lt;/span&gt;        &lt;span class=&quot;attr&quot;&gt;style&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;=&quot;border:1px solid; width:100px;&quot;&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;pre class=&quot;alt&quot;&gt;&lt;span class=&quot;lnum&quot;&gt;   7:  &lt;/span&gt;    Hi. You can drag me around. &lt;/pre&gt;
&lt;pre&gt;&lt;span class=&quot;lnum&quot;&gt;   8:  &lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;lt;/&lt;/span&gt;&lt;span class=&quot;html&quot;&gt;div&lt;/span&gt;&lt;span class=&quot;kwrd&quot;&gt;&amp;gt;&lt;/span&gt; &lt;/pre&gt;
&lt;/div&gt;
&lt;style type=&quot;text/css&quot;&gt;
.csharpcode, .csharpcode pre
{
 font-size: small;
 color: black;
 font-family: consolas, &quot;Courier New&quot;, courier, monospace;
 background-color: #ffffff;
 /*white-space: pre;*/
}
.csharpcode pre { margin: 0em; }
.csharpcode .rem { color: #008000; }
.csharpcode .kwrd { color: #0000ff; }
.csharpcode .str { color: #006080; }
.csharpcode .op { color: #0000c0; }
.csharpcode .preproc { color: #cc6633; }
.csharpcode .asp { background-color: #ffff00; }
.csharpcode .html { color: #800000; }
.csharpcode .attr { color: #ff0000; }
.csharpcode .alt 
{
 background-color: #f4f4f4;
 width: 100%;
 margin: 0em;
}
.csharpcode .lnum { color: #606060; }
&lt;/style&gt;

&lt;br /&gt;
&lt;h4 align=&quot;justify&quot;&gt;
&lt;br /&gt;&lt;/h4&gt;
&lt;h4 align=&quot;justify&quot;&gt;

&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;This seems familiar...&lt;/em&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
It&#39;s a very similar experience to the Ajax Control Toolkit, but using jQuery UI as an underpinning. That is, create Web Forms extender and script controls for all the widgets and effects in jQuery UI. Don&#39;t read anything into this - work is still continuing on &lt;a href=&quot;http://ajaxcontroltoolkit.codeplex.com/&quot;&gt;Ajax Control Toolkit&lt;/a&gt; (in fact, there have been &lt;a href=&quot;http://stephenwalther.com/blog/archive/2011/11/16/ajax-control-toolkit-november-2011-release.aspx&quot;&gt;quite a few updates lately&lt;/a&gt;). The ASP.NET team&#39;s long term direction for client side scripting is jQuery, though, and Juice UI helps you to integrate with that really easily.&lt;/div&gt;
&lt;h4 align=&quot;justify&quot;&gt;

&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;&lt;/em&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;h4 align=&quot;justify&quot;&gt;

&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;Finding out more&lt;/em&gt;&lt;/span&gt;&lt;/h4&gt;
&lt;div&gt;
&lt;span style=&quot;font-weight: bold;&quot;&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
The best place to find out more about Juice UI is on the &lt;a href=&quot;http://juiceui.com/&quot;&gt;Juice UI site&lt;/a&gt;, which has interactive examples and documentation.&lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
The source (including a sample project) is in the &lt;a href=&quot;https://github.com/appendto/juiceui&quot;&gt;GitHub repository&lt;/a&gt;. &lt;/div&gt;
&lt;div align=&quot;justify&quot;&gt;
I&#39;d recommend getting help either on &lt;a href=&quot;http://stackoverflow.com/search?q=juiceui&quot;&gt;StackOverflow (using the juiceui tag)&lt;/a&gt; or in the &lt;a href=&quot;http://forums.asp.net/1223.aspx/1?jQuery+for+the+ASP+NET+Developer&quot;&gt;ASP.NET jQuery forum&lt;/a&gt;. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/8889805646306694311/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/juice-ui-open-source-aspnet-web-forms.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/8889805646306694311'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/8889805646306694311'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/juice-ui-open-source-aspnet-web-forms.html' title='Juice UI: Open source ASP.NET Web Forms components for jQuery UI widgets (From Jon Galloway)'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://farm8.static.flickr.com/7195/6938942653_d824e09ef6_t.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-2409640408162391486</id><published>2012-03-19T18:24:00.000-07:00</published><updated>2012-03-19T18:48:28.002-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="Bootstrap"/><category scheme="http://www.blogger.com/atom/ns#" term="Front Web"/><title type='text'>On my way to Bootstrap - Overview</title><content type='html'>I&#39;ve been working on&amp;nbsp;&amp;nbsp; DotNetNuke for almost one year.&amp;nbsp; DotNetNuke is an open source CMS on the framework .Net.&amp;nbsp; &lt;br /&gt;
Most of my job is in back-end, namely to develop or update some modules to meet clients&#39; needs. But as consultant, I have to design and realize the layout of the site for my clients sometimes.&amp;nbsp;&amp;nbsp; &lt;br /&gt;
Fortunately, DotNetNuke offers a powerful solution &quot;Skin&quot; to take in charge of&amp;nbsp; the front-end work , even so, I still find it&#39;s complicate and I was always lost in it, especially when dealing with the overriding of CSS and the conflict of Javascript.&amp;nbsp; &lt;br /&gt;
In order to get a way out, I started looking up for one CSS framework, because i hoped that it could facilitate my front-end work, what&#39;s more, and that it can help me to build a simple, clear and beautiful site.  &lt;br /&gt;
The goal is not just for DotNetNuke appearance but to enrich my front-end experience.  &lt;br /&gt;
My first target is &lt;a href=&quot;http://blueprintcss.org/&quot;&gt;Blueprint&lt;/a&gt;, a CSS framework, which aims to cut down on your coding time. It offers a solid foundation to build your project on top of, with an easy-to-use grid, sensible typography, useful plug-ins, and even a stylesheet for printing. After several days&#39; trial, I ended up giving up. There were two reasons for my quit :  &lt;br /&gt;
&lt;ol&gt;
&lt;li&gt;It is not so easy to get started for me.  &lt;/li&gt;
&lt;li&gt;It is not so powerful as I thought. In other words, it is just a CSS framework, but front-end works also include javascript.&lt;/li&gt;
&lt;/ol&gt;
Recently, i heard that twitter had released a new version of &lt;a href=&quot;http://twitter.github.com/bootstrap/&quot;&gt;Bootstrap&lt;/a&gt; which has some breakthrough upgradings. &quot;So amazing ! &quot;when I looked at it, I couldn&#39;t help myself saying that. Based on less, new scaffolding included customization and responsive design for various devices and resolutions, more Components and Javascript plug-ins, all of these new characters make me not hold on for a while.When i read his documentation online,&amp;nbsp; suddenly, I realized it was just the framework i had been looking for.  &lt;br /&gt;
I trusted my feeling and then I was on the way to Bootstrap. I write this article to record what i saw and thought in my code timeline, what’s more, share with others.&lt;br /&gt;
&lt;br /&gt;
&lt;a href=&quot;http://lh4.ggpht.com/-4N9y0OekUzw/T2fW7E_8GFI/AAAAAAAABTs/KJnD8IpEZEQ/s1600-h/overview%252520of%252520bootstrap%25255B5%25255D.png&quot;&gt;&lt;img alt=&quot;overview of bootstrap&quot; border=&quot;0&quot; height=&quot;512&quot; src=&quot;http://lh3.ggpht.com/-FhfoOvk_3AY/T2fW8q0xSjI/AAAAAAAABT0/fvF3V_sR12c/overview%252520of%252520bootstrap_thumb%25255B3%25255D.png?imgmax=800&quot; style=&quot;background-image: none; border-bottom-width: 0px; border-left-width: 0px; border-right-width: 0px; border-top-width: 0px; display: block; float: none; margin-left: auto; margin-right: auto; padding-left: 0px; padding-right: 0px; padding-top: 0px;&quot; title=&quot;overview of bootstrap&quot; width=&quot;494&quot; /&gt;&lt;/a&gt;  &lt;br /&gt;
&amp;nbsp; &lt;br /&gt;
In general, Bootstrap has four parts clearly in above figure. One more thing, which is the most attractive to me : We can customize and extend Bootstrap with LESS, a CSS preprocessor, to take advantages of the variables, mixins, and more used to build Bootstrap&#39;s CSS. Of course, this is an advanced character, so we can try it after finish the base things.  &lt;br /&gt;
&lt;br /&gt;
P.S. Once I&#39;ve got all the bases, i will create a template for &lt;a href=&quot;http://yhuang.cnblogs.com/&quot;&gt;my cnblogs&lt;/a&gt; using Bootstrap.&lt;br /&gt;
&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/2409640408162391486/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/on-my-way-to-bootstrap-overview.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/2409640408162391486'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/2409640408162391486'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/on-my-way-to-bootstrap-overview.html' title='On my way to Bootstrap - Overview'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://lh3.ggpht.com/-FhfoOvk_3AY/T2fW8q0xSjI/AAAAAAAABT0/fvF3V_sR12c/s72-c/overview%252520of%252520bootstrap_thumb%25255B3%25255D.png?imgmax=800" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-5034063583837234384</id><published>2012-03-19T06:51:00.001-07:00</published><updated>2012-03-28T16:45:27.139-07:00</updated><category scheme="http://www.blogger.com/atom/ns#" term="DotNetNuke"/><title type='text'>How to install DotNetNuke 6 on local</title><content type='html'>&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://www.dotnetnuke.com/&quot;&gt;DotNetNuke&lt;/a&gt;® is a world class web content management platform (CMS) for building professional websites with dynamic content and interactive features. DNN® makes it quick and affordable to develop a commercial website, a community portal, or an intranet solution.&amp;nbsp;From version 6, they change source code from VB.net to C#.&lt;/span&gt;&lt;br /&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;When I tried to write some opening for this post, but why not give it up and start directly&amp;nbsp;? Here we go&amp;nbsp;:&lt;br /&gt;&lt;br /&gt;My local context&amp;nbsp;: a Windows 7 Professionnel machine running IIS7.5, SQL Server 2005, and .NET&amp;nbsp;Framework&amp;nbsp;4.0.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;In general, only 5 steps can finish a clean install.&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Download the New Install .zip from the site &lt;a href=&quot;http://dotnetnuke.codeplex.com/&quot; target=&quot;_blank&quot;&gt;http://dotnetnuke.codeplex.com/&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Create a database and a SQL Server login for dnn&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Create the website folder and unzip the downloaded .zip file.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Create virtual directory in IIS and configure the website&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Run the DNN install wizard in the web browser.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Let&#39;s talk about it in details :&lt;/span&gt;&lt;/div&gt;
&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;b&gt;1. Download the New Install .zip from the site &lt;/b&gt;&lt;a href=&quot;http://dotnetnuke.codeplex.com/&quot; target=&quot;_blank&quot;&gt;http://dotnetnuke.codeplex.com/&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;CodePlex is Microsoft&#39;s open source projet hosting web site. DotNetNuke as the biggest open source CMS in .Net framework, there is no surprise to move it on CodePlex. Now, the newest stable version is 6.1.4&amp;nbsp;, so I downloaded DotNetNuke_Community_06.01.04_Install.zip.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;b&gt;2. Create a database and a SQL Server login for dnn&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;First of all, Make sure that your database server runs in &quot;mixed authentication mode&quot; (SQL Server and Windows Authentication mode is checked.) You can find this option by right-clicking on your sql server in the SQL Server Management Studio, then Properties → Security.&lt;br /&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Secondly, Create the Database in your Sql server by using SQL Server Management Studio. For example, my sql server is (local) which has the new empty database named DNN614.&lt;br /&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Finally, Create a login for your new database :&amp;nbsp;&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Expand the security node of your server&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Right-click on Logins&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Select &quot;New Login&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Enter a login name, login614 for example&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Select &quot;SQL Server Authentication&quot; and enter a password&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Uncheck &quot;Enforce Password expiration/User must change password at next login&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Click &quot;User Mapping&quot; on the left&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Select/Check the new database you created in top grid &quot;Users mapped to this login&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Select/Check db_owner in the bottom list &quot;Database rôle membership for&quot;&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Click OK&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Now look in the Security node under you database(DNN614) and you will see a newly created database user listed, meaning we also created a new database user by mapping our SQL Server login to our database(Figure 1).&lt;br /&gt;  &lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://4.bp.blogspot.com/-8bTSc5ddvWw/T2c2qnxs_9I/AAAAAAAABSk/qyStdjyZSmc/s1600/1-753725.jpg&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;395&quot; id=&quot;BLOGGER_PHOTO_ID_5721601957457362898&quot; src=&quot;http://4.bp.blogspot.com/-8bTSc5ddvWw/T2c2qnxs_9I/AAAAAAAABSk/qyStdjyZSmc/s400/1-753725.jpg&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Figure 1 : New database with new login&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;b&gt;3.Create the website folder and unzip the downloaded .zip file.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;In this step, we create a folder and unzip the DNN install .zip file to this directory. I used C:\Dev\WebDnnTest\DNN614.&lt;br /&gt;&lt;br /&gt;One more thing, we must change the access permissions of your folder. The Windows account that is used to access your site must have full control over your DNN root folder. To set this, right-click on the root folder of your site (C:\Dev\WebDnnTest\DNN614). Click Sharing and Security. Click the Security tab. On the Security tab, you will see a list of users who have access to your folder. Add the NETWORK SERVICE account and give it full control permissions. In my remember, if we run DNN6 on local, we can skip this configuration.&lt;br /&gt; &lt;/span&gt;&lt;/div&gt;
&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;b&gt;4.Create virtual directory in IIS and configure the website&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt; Now that the database and file system are in place, we can create the virtual directory in IIS&lt;/span&gt;&lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Open IIS and expand the tree Sites&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Right click on it&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Click «&amp;nbsp;add a new Site&amp;nbsp;»&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Enter a name of site, and choose the path to the root directory of your website&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Enter a name of host, dnn614 is my choice.&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Open the C:\Windows\System32\drivers\etc\hosts file, and add this line «&amp;nbsp;127.0.0.1 dnn614&amp;nbsp;» then save&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;ul&gt;
&lt;li&gt;&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;Click OK to finish&lt;/span&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;PS. If you want your site to run on .net 4.0, please change its application pool to &lt;a href=&quot;http://asp.net/&quot;&gt;ASP.NET&lt;/a&gt; V4.0.&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;blockquote style=&quot;border: none; margin: 0 0 0 40px; padding: 0px;&quot;&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;b&gt;5.Run the DNN install wizard in the web browser.&lt;/b&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt; Open &lt;a href=&quot;http://dnn614/&quot; target=&quot;_blank&quot;&gt;http://dnn614/&lt;/a&gt; in your web browser and you will see&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-bFD4ZEcQcMk/T2c2rh2m3FI/AAAAAAAABSw/JaQKfuq87Xs/s1600/2-770435.png&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;252&quot; id=&quot;BLOGGER_PHOTO_ID_5721601973047188562&quot; src=&quot;http://2.bp.blogspot.com/-bFD4ZEcQcMk/T2c2rh2m3FI/AAAAAAAABSw/JaQKfuq87Xs/s400/2-770435.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt; &lt;br /&gt;&lt;br /&gt;Programs test the folder permissions when requested&amp;nbsp;:&lt;br /&gt; &lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://2.bp.blogspot.com/-F1alXv7H4oY/T2c2sSu7_wI/AAAAAAAABS8/olhzet32qto/s1600/3-773433.png&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;236&quot; id=&quot;BLOGGER_PHOTO_ID_5721601986168356610&quot; src=&quot;http://2.bp.blogspot.com/-F1alXv7H4oY/T2c2sSu7_wI/AAAAAAAABS8/olhzet32qto/s400/3-773433.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;
&lt;br /&gt;Enter the information to connect your sql server&amp;nbsp;:&lt;br /&gt;&lt;br /&gt;&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-_Y_Lld9nj38/T2c2tCGgSVI/AAAAAAAABTI/5Y9lYdA4W5U/s1600/4-775955.png&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;268&quot; id=&quot;BLOGGER_PHOTO_ID_5721601998883670354&quot; src=&quot;http://2.bp.blogspot.com/-_Y_Lld9nj38/T2c2tCGgSVI/AAAAAAAABTI/5Y9lYdA4W5U/s400/4-775955.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
Click Next, you will see the wizard running the script for each version&amp;nbsp;:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt; &lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;a href=&quot;http://2.bp.blogspot.com/-zfwQD75u0yg/T2c2tp4yq9I/AAAAAAAABTU/l1HEEmfIaCs/s1600/5-777972.png&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;297&quot; id=&quot;BLOGGER_PHOTO_ID_5721602009563573202&quot; src=&quot;http://2.bp.blogspot.com/-zfwQD75u0yg/T2c2tp4yq9I/AAAAAAAABTU/l1HEEmfIaCs/s400/5-777972.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;Click Next to configure Host Account, then on successful completion, your new DNN-based website appears&amp;nbsp;:&lt;br /&gt; &lt;/span&gt;&lt;br /&gt;
&lt;div style=&quot;text-align: center;&quot;&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;a href=&quot;http://1.bp.blogspot.com/-YGu0DlL0YMU/T2c2uR-SALI/AAAAAAAABTg/eF6K2kVcOBo/s1600/6-781206.png&quot;&gt;&lt;img alt=&quot;&quot; border=&quot;0&quot; height=&quot;375&quot; id=&quot;BLOGGER_PHOTO_ID_5721602020324016306&quot; src=&quot;http://1.bp.blogspot.com/-YGu0DlL0YMU/T2c2uR-SALI/AAAAAAAABTg/eF6K2kVcOBo/s400/6-781206.png&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: verdana, sans-serif;&quot;&gt;&lt;br /&gt;&lt;br /&gt;Until now, all the DNN install is finished. You can enjoy it. Allez&amp;nbsp;!!!&amp;nbsp;&lt;/span&gt; &lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/5034063583837234384/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/how-to-install-dotnetnuke-6-on-local.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/5034063583837234384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/5034063583837234384'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/how-to-install-dotnetnuke-6-on-local.html' title='How to install DotNetNuke 6 on local'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-8bTSc5ddvWw/T2c2qnxs_9I/AAAAAAAABSk/qyStdjyZSmc/s72-c/1-753725.jpg" height="72" width="72"/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-3513546590294907870</id><published>2012-03-16T07:00:00.001-07:00</published><updated>2012-03-16T07:04:03.462-07:00</updated><title type='text'>.NET Developper Salary Survey 2012 in United States [From Visual Studio Magazine]</title><content type='html'>&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;This is my abstract of the salary surveys, if you want to see the whole survey, please click this link : &lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/Developer-Salary-Survey.aspx?Page=1&quot;&gt;Visual Studio Magazine&#39;s 2012 .NET Developer Salary Survey&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;&lt;br /&gt;From this survey, we can get one conclusion : &lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;it&#39;s a good time to be a developer.&lt;/span&gt;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;span style=&quot;color: #990000;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig2.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;300&quot; src=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig2.ashx&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot;&gt;Your Primary Development Environment&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig3.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig3.ashx&quot; width=&quot;333&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Languages Used for Development Projects in the Last 12 Months&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig5.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;310&quot; src=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig5.ashx&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Salary by Range&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig6.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;282&quot; src=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig6.ashx&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Salary by Education&lt;br /&gt;
&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig7.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;186&quot; src=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig7.ashx&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Average Salary, Male vs. Female&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://ads.adgenta.com/ads/ads.dll/click?Client=CKHUANGYAN&amp;amp;GUID=%2803%2F16%2F12+13%3A58%3A41%29&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Ads by AdGenta&quot; border=&quot;0&quot; height=&quot;90&quot; ismap=&quot;ismap&quot; src=&quot;http://ads.AdGenta.com/ads/ads.dll/view?Client=CKHUANGYAN&amp;amp;GUID=%2803%2F16%2F12+13%3A58%3A41%29&amp;amp;Keywords=information%20technology&amp;amp;BANNER_STYLE=1&amp;amp;WIDTH=468&amp;amp;FOOTER_GRADIENT=0&quot; style=&quot;border: none; margin: 4px;&quot; width=&quot;468&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig8.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig8.ashx&quot; width=&quot;285&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Salary by Job Title&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig9.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;400&quot; src=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig9.ashx&quot; width=&quot;346&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Salary by Microsoft Technology Expertise&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td&gt;&lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig10.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;373&quot; src=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig10.ashx&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;font-size: 13px;&quot;&gt;Average Salary by Role&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;table align=&quot;center&quot; cellpadding=&quot;0&quot; cellspacing=&quot;0&quot; class=&quot;tr-caption-container&quot; style=&quot;margin-left: auto; margin-right: auto; text-align: center;&quot;&gt;&lt;tbody&gt;
&lt;tr&gt;&lt;td style=&quot;text-align: center;&quot;&gt;&lt;a href=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig11.ashx&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: auto; margin-right: auto;&quot;&gt;&lt;img border=&quot;0&quot; height=&quot;640&quot; src=&quot;http://visualstudiomagazine.com/Articles/2012/01/01/~/media/ECG/visualstudiomagazine/Images/2012/01/SSFig11.ashx&quot; width=&quot;368&quot; /&gt;&lt;/a&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;tr-caption&quot; style=&quot;text-align: center;&quot;&gt;Average Salary by Industry&lt;/td&gt;&lt;/tr&gt;
&lt;/tbody&gt;&lt;/table&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: left;&quot;&gt;
&lt;span style=&quot;font-family: &#39;comic sans ms&#39;, sans-serif; font-size: x-small; text-align: -webkit-auto;&quot;&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;
&lt;span style=&quot;font-family: Verdana, sans-serif;&quot;&gt;In a word, Developer is a indeed good career, but not in everywhere, France for example...&lt;/span&gt;&lt;br /&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/3513546590294907870/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/net-developper-salary-survey-2012-in.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/3513546590294907870'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/3513546590294907870'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/net-developper-salary-survey-2012-in.html' title='.NET Developper Salary Survey 2012 in United States [From Visual Studio Magazine]'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-6695190583420034173</id><published>2012-03-14T17:47:00.000-07:00</published><updated>2012-03-15T19:50:17.927-07:00</updated><title type='text'>Restore WordPress on local from a backup of cpanel on Mac</title><content type='html'>&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Restore WordPress on local from a backup of cpanel on Mac&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
My context :&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
host : bluehost&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
domain name : ecca-paris.org&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
local machine : MacBook&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Already create a wordpress sub-site in ecca-paris.org/wppretest/ for testing and developing&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Prerequisite :&amp;nbsp;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Whole backup included website and database which is got from Cpanel via bluehost.com&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Apache server enabled php module&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Mysql server&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
Steps :&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
1. Unzip the package of backup, and you will see many files in the backup. But, there are only two folders which are useful - /mysql and /homedir/public_html/wppretest&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
2. Copy&amp;nbsp;/homedir/public_html/wppretest to the root folder of your apache server.&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div style=&quot;margin-bottom: 0px; margin-left: 0px; margin-right: 0px; margin-top: 0px;&quot;&gt;
3. Restore database on local mysql server from the files of folder /mysql :&lt;/div&gt;
&lt;ul&gt;
&lt;li&gt;Open mysql from terminal : mysql -u root -p&lt;/li&gt;
&lt;li&gt;Create database : source &amp;lt;your path&amp;gt;/mysql/eccapari_wrd1.create&lt;/li&gt;
&lt;li&gt;Restore tables and datas : source &amp;lt;your path&amp;gt;/mysql/eccapari_wrd1.sql&lt;/li&gt;
&lt;/ul&gt;
&lt;div&gt;
4. Change&amp;nbsp;wordpress configurations :
    &lt;br /&gt;
&lt;ul&gt;
&lt;li&gt;Find the file wp-config.php in &amp;lt;server path&amp;gt;/wppretest, and open it&lt;/li&gt;
&lt;li&gt;Modify the informations &quot;DB_NAME&quot;, &quot;DB_USER&quot;, &quot;DB_PASSWORD&quot; and &quot;DB_HOST&quot; according to your situation.&lt;/li&gt;
&lt;li&gt;Save it.&lt;/li&gt;
&lt;/ul&gt;
My example :&lt;br /&gt;
&lt;div class=&quot;separator&quot; style=&quot;clear: both; text-align: center;&quot;&gt;
&lt;a href=&quot;http://4.bp.blogspot.com/-7cPi8OFA6W8/T2KqXpehO0I/AAAAAAAABR0/N0UsWgRdTXg/s1600/Capture+d%E2%80%99e%CC%81cran+2012-03-15+a%CC%80+01.55.17.png&quot; imageanchor=&quot;1&quot; style=&quot;margin-left: 1em; margin-right: 1em;&quot;&gt;&lt;img border=&quot;0&quot; src=&quot;http://4.bp.blogspot.com/-7cPi8OFA6W8/T2KqXpehO0I/AAAAAAAABR0/N0UsWgRdTXg/s1600/Capture+d%E2%80%99e%CC%81cran+2012-03-15+a%CC%80+01.55.17.png&quot; /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
5. Open localhost/wppretest in your browser&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IF the page tell you that there a error with the connection to mysql database :&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please check the file config, and mysql server running environment with your account and password.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; There is a way to test connection to database :&lt;br /&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Create a file named &quot;test.php&quot; in the root of apache server folder.&lt;/li&gt;
&lt;li&gt;Write the codes below and save it :&lt;/li&gt;
&lt;li&gt;&amp;lt;?php&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $dbhost = &#39;127.0.0.1&#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; $dbuser = &#39;root&#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $dbpass = &#39;123&#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $dbname = &#39;test&#39;;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; $conn = mysql_connect($dbhost, $dbuser, $dbpass) or die (&#39;Error connecting to mysql&#39;);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; mysql_select_db($dbname);&lt;br /&gt;?&amp;gt;&lt;/li&gt;
&lt;li&gt;open localhost/test.php in your browser, if nothing in your page, you get the right connection.&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; IF the connection is built, but the presentation of page mass up or the links don&#39;t function :&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please modify your home url in the database, this is because you use localhost/wppretest to enter the site rather than &quot;www.ecca-paris.org/wppretest&quot;.&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Follow the instructions to fix problem :&lt;br /&gt;
&lt;blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Open database eccapari-wrd1 by taping mysql -u root -p eccapari-wrd1&lt;/li&gt;
&lt;li&gt;Check : select * from wp_options where option_name=&quot;siteurl&quot; or option_name=&quot;home&quot;;&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
&lt;/div&gt;
&lt;blockquote&gt;
&lt;blockquote&gt;
+-----------+---------+-------------+-------------------------------------+----------+&lt;br /&gt;| option_id | blog_id | option_name | option_value | autoload |&lt;br /&gt;+-----------+---------+-------------+-------------------------------------+----------+&lt;br /&gt;| 39 | 0 | home | http://www.ecca-paris.org/wppretest | yes |&lt;br /&gt;| 3 | 0 | siteurl | http://www.ecca-paris.org/wppretest | yes |&lt;br /&gt;+-----------+---------+-------------+-------------------------------------+----------+&lt;br /&gt;2 rows in set (0.12 sec)&lt;/blockquote&gt;
&lt;ul&gt;
&lt;li&gt;Modify : update wp_options set option_value=&quot;http://localhost/ecca/wppretest&quot; where option_name=&quot;siteurl&quot; or option_name=&quot;home&quot;;&lt;br /&gt;+-----------+---------+-------------+---------------------------------+----------+&lt;br /&gt;| option_id | blog_id | option_name | option_value | autoload |&lt;br /&gt;+-----------+---------+-------------+---------------------------------+----------+&lt;br /&gt;| 39 | 0 | home | http://localhost/ecca/wppretest | yes |&lt;br /&gt;| 3 | 0 | siteurl | http://localhost/ecca/wppretest | yes |&lt;br /&gt;+-----------+---------+-------------+---------------------------------+----------+&lt;br /&gt;2 rows in set (0.00 sec)&lt;/li&gt;
&lt;/ul&gt;
&lt;/blockquote&gt;
6. Finally, your wordpress on local should be functional. Enjoy it.&lt;br /&gt;
&lt;a href=&quot;http://ads.adgenta.com/ads/ads.dll/click?client=ckhuangyan&amp;amp;GUID=03%2F16%2F12+03%3A47%3A26&quot; target=&quot;_blank&quot;&gt;&lt;img alt=&quot;Ads by AdGenta.com&quot; border=&quot;0&quot; height=&quot;70&quot; ismap=&quot;ismap&quot; src=&quot;http://ads.adgenta.com/ads/ads.dll/view?client=ckhuangyan&amp;amp;GUID=03%2F16%2F12+03%3A47%3A26&amp;amp;width=364&amp;amp;height=70&amp;amp;bgColor=ffffff&amp;amp;FOOTER_COLOR=ffffff&amp;amp;FOOTER_GRADIENT=0&amp;amp;TF_C=0000ff&amp;amp;DF_C=000000&amp;amp;DMF_C=0000ff&amp;amp;FF_C=000000&amp;amp;keywords=sql&quot; style=&quot;border: none; margin: 4px;&quot; width=&quot;364&quot; /&gt;&lt;/a&gt;&lt;br /&gt;
&lt;div style=&quot;color: #000088; text-align: right;&quot;&gt;
&lt;small&gt;&lt;em&gt;Powered by&lt;/em&gt; &lt;a href=&quot;http://www.qumana.com/&quot;&gt;Qumana&lt;/a&gt;&lt;/small&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/6695190583420034173/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/my-context-host-bluehost-domaine-name.html#comment-form' title='2 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/6695190583420034173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/6695190583420034173'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/my-context-host-bluehost-domaine-name.html' title='Restore WordPress on local from a backup of cpanel on Mac'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-7cPi8OFA6W8/T2KqXpehO0I/AAAAAAAABR0/N0UsWgRdTXg/s72-c/Capture+d%E2%80%99e%CC%81cran+2012-03-15+a%CC%80+01.55.17.png" height="72" width="72"/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1029276025775361197.post-6947365510923246656</id><published>2012-03-14T08:54:00.002-07:00</published><updated>2012-03-14T08:55:32.373-07:00</updated><title type='text'>Swap rows and columns in SQL</title><content type='html'>&lt;div style=&quot;background-color: white; font-family: verdana,Arial,Helvetica,sans-serif; font-size: 14px; line-height: 21px; margin-bottom: 10px; margin-left: auto; margin-right: auto; margin-top: 10px;&quot;&gt;
Create a table :&lt;/div&gt;
&lt;div style=&quot;background-color: white; font-family: verdana,Arial,Helvetica,sans-serif; font-size: 14px; line-height: 21px;&quot;&gt;
&lt;div&gt;
&lt;div class=&quot;cnblogs_code&quot; style=&quot;background-color: whitesmoke; border-bottom-color: rgb(204,204,204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204,204,204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204,204,204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204,204,204); border-top-style: solid; border-top-width: 1px; font-family: &#39;Courier New&#39;; font-size: 12px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 300px; word-break: break-all;&quot;&gt;
&lt;pre style=&quot;font-family: &#39;Courier New&#39;; margin-bottom: 5px; margin-left: 8px; margin-right: 8px; margin-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;1&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;CREATE&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;TABLE&lt;/span&gt; MyTable(
&lt;span style=&quot;color: teal;&quot;&gt;2&lt;/span&gt; 　　A &lt;span style=&quot;color: blue;&quot;&gt;int&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;NULL&lt;/span&gt;,
&lt;span style=&quot;color: teal;&quot;&gt;3&lt;/span&gt; 　　B &lt;span style=&quot;color: blue;&quot;&gt;nvarchar&lt;/span&gt;(&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;50&lt;/span&gt;) &lt;span style=&quot;color: grey;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;NULL&lt;/span&gt;,
&lt;span style=&quot;color: teal;&quot;&gt;4&lt;/span&gt; 　　C &lt;span style=&quot;color: blue;&quot;&gt;nvarchar&lt;/span&gt;(&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;50&lt;/span&gt;) &lt;span style=&quot;color: grey;&quot;&gt;NOT&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;NULL&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;5&lt;/span&gt; ) &lt;span style=&quot;color: blue;&quot;&gt;ON&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;PRIMARY&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;
Then insert some datas :&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div class=&quot;cnblogs_code&quot; style=&quot;background-color: whitesmoke; border-bottom-color: rgb(204,204,204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204,204,204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204,204,204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204,204,204); border-top-style: solid; border-top-width: 1px; font-family: &#39;Courier New&#39;; font-size: 12px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 500px; word-break: break-all;&quot;&gt;
&lt;pre style=&quot;font-family: &#39;Courier New&#39;; margin-bottom: 5px; margin-left: 8px; margin-right: 8px; margin-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;1　　&lt;/span&gt; A           B               C
&lt;span style=&quot;color: teal;&quot;&gt;2&lt;/span&gt; 　　&lt;span style=&quot;color: teal;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;------- ------------- -------------&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;
3&lt;/span&gt; 　 &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;1&lt;/span&gt;          date           &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;08&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;4&lt;/span&gt; 　 &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;1&lt;/span&gt;          fname          jon
&lt;span style=&quot;color: teal;&quot;&gt;5&lt;/span&gt; 　 &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;1&lt;/span&gt;          lname          doe
&lt;span style=&quot;color: teal;&quot;&gt;6&lt;/span&gt; 　 &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;1&lt;/span&gt;          receipt        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;99999&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;7&lt;/span&gt; 　 &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;1&lt;/span&gt;          transnum       &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;123&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;8&lt;/span&gt; 　 &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;55&lt;/span&gt;         date           &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;04&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;9&lt;/span&gt; 　 &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;55&lt;/span&gt;         fname          allen
&lt;span style=&quot;color: teal;&quot;&gt;10&lt;/span&gt; 　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;55&lt;/span&gt;         lname          smith
&lt;span style=&quot;color: teal;&quot;&gt;11&lt;/span&gt; 　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;55&lt;/span&gt;         transnum       &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;345&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;12&lt;/span&gt; 　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;121&lt;/span&gt;        date           &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;08&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;13&lt;/span&gt; 　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;121&lt;/span&gt;        fname          sandra
&lt;span style=&quot;color: teal;&quot;&gt;14&lt;/span&gt; 　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;121&lt;/span&gt;        lname          adams
&lt;span style=&quot;color: teal;&quot;&gt;15&lt;/span&gt; 　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;121&lt;/span&gt;        receipt        &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;99998&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;16&lt;/span&gt; 　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;121&lt;/span&gt;        transnum       &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;5465&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
Now we want to transform it to:&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div class=&quot;cnblogs_code&quot; style=&quot;background-color: whitesmoke; border-bottom-color: rgb(204,204,204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204,204,204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204,204,204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204,204,204); border-top-style: solid; border-top-width: 1px; font-family: &#39;Courier New&#39;; font-size: 12px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 500px; word-break: break-all;&quot;&gt;
&lt;pre style=&quot;font-family: &#39;Courier New&#39;; margin-bottom: 5px; margin-left: 8px; margin-right: 8px; margin-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;1&lt;/span&gt; 　　A      DATE      FNAME  LANME  RECEIPT  TRANSUM
&lt;span style=&quot;color: teal;&quot;&gt;2&lt;/span&gt; 　　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;1&lt;/span&gt;     &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;08&lt;/span&gt;   jon    doe    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;99999&lt;/span&gt;    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;123&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;3&lt;/span&gt; 　　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;55&lt;/span&gt;    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;04&lt;/span&gt;   allen  smith  &lt;span style=&quot;color: blue;&quot;&gt;NULL&lt;/span&gt;     &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;345&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;4&lt;/span&gt; 　　&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;121&lt;/span&gt;   &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;2&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;/&lt;/span&gt;&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;08&lt;/span&gt;    sandra adams  &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;99998&lt;/span&gt;    &lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;5465&lt;/span&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;pre style=&quot;font-family: &#39;Courier New&#39;; font-size: 12px; margin-bottom: 5px; margin-left: 8px; margin-right: 8px; margin-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;/pre&gt;
&lt;/div&gt;
&lt;div&gt;
There are two simple solutions, and just use CASE and MAX :&lt;br /&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;strong&gt;　　&lt;/strong&gt;&lt;i&gt;-- Static SQL :&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;cnblogs_code&quot; style=&quot;background-color: whitesmoke; border-bottom-color: rgb(204,204,204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204,204,204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204,204,204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204,204,204); border-top-style: solid; border-top-width: 1px; font-family: &#39;Courier New&#39;; font-size: 12px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 500px; word-break: break-all;&quot;&gt;
&lt;pre style=&quot;font-family: &#39;Courier New&#39;; margin-bottom: 5px; margin-left: 8px; margin-right: 8px; margin-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;1&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; A
&lt;span style=&quot;color: teal;&quot;&gt;2&lt;/span&gt;     , &lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;CASE&lt;/span&gt; B &lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;date&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;     &lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt; C &lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; DATE_COL
&lt;span style=&quot;color: teal;&quot;&gt;3&lt;/span&gt;     , &lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;CASE&lt;/span&gt; B &lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;fname&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;    &lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt; C &lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; FNAME
&lt;span style=&quot;color: teal;&quot;&gt;4&lt;/span&gt;     , &lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;CASE&lt;/span&gt; B &lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;lname&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;    &lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt; C &lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; LNAME
&lt;span style=&quot;color: teal;&quot;&gt;5&lt;/span&gt;     , &lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;CASE&lt;/span&gt; B &lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;receipt&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;  &lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt; C &lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; RECEIPT
&lt;span style=&quot;color: teal;&quot;&gt;6&lt;/span&gt;     , &lt;span style=&quot;color: magenta;&quot;&gt;MAX&lt;/span&gt;(&lt;span style=&quot;color: magenta;&quot;&gt;CASE&lt;/span&gt; B &lt;span style=&quot;color: blue;&quot;&gt;WHEN&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;transnum&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;THEN&lt;/span&gt; C &lt;span style=&quot;color: blue;&quot;&gt;ELSE&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;END&lt;/span&gt;) &lt;span style=&quot;color: blue;&quot;&gt;AS&lt;/span&gt; TRANSNUM
&lt;span style=&quot;color: teal;&quot;&gt;7&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;MyTable&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;8&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;GROUP&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;BY&lt;/span&gt; A&lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;i&gt;　　&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; -- Dynamic SQL for B has more than these five rows (Date, fname, lname, receipt, transnum)&lt;/i&gt;&lt;br /&gt;
&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/div&gt;
&lt;div&gt;
&lt;/div&gt;
&lt;div&gt;
&lt;div class=&quot;cnblogs_code&quot; style=&quot;background-color: whitesmoke; border-bottom-color: rgb(204,204,204); border-bottom-style: solid; border-bottom-width: 1px; border-left-color: rgb(204,204,204); border-left-style: solid; border-left-width: 1px; border-right-color: rgb(204,204,204); border-right-style: solid; border-right-width: 1px; border-top-color: rgb(204,204,204); border-top-style: solid; border-top-width: 1px; font-family: &#39;Courier New&#39;; font-size: 12px; margin-bottom: 5px; margin-left: 0px; margin-right: 0px; margin-top: 5px; overflow-x: auto; overflow-y: auto; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px; width: 500px; word-break: break-all;&quot;&gt;
&lt;pre style=&quot;font-family: &#39;Courier New&#39;; margin-bottom: 5px; margin-left: 8px; margin-right: 8px; margin-top: 5px; padding-bottom: 5px; padding-left: 5px; padding-right: 5px; padding-top: 5px;&quot;&gt;&lt;span style=&quot;color: teal;&quot;&gt;1&lt;/span&gt; 　&lt;span style=&quot;color: teal;&quot;&gt;--&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt; char(10) : New line&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;
&lt;/span&gt;&lt;span style=&quot;color: teal;&quot;&gt;2&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;DECLARE&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;@sql&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;varchar&lt;/span&gt;(&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;8000&lt;/span&gt;)
&lt;span style=&quot;color: teal;&quot;&gt;3&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;@sql&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;SELECT A &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;(&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;)
&lt;span style=&quot;color: teal;&quot;&gt;4&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;SELECT&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;@sql&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;@sql&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;, MAX(CASE B WHEN &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt;B &lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; THEN C ELSE &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; END) AS &lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: magenta;&quot;&gt;UPPER&lt;/span&gt;(B)&lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;char&lt;/span&gt;(&lt;span style=&quot;color: maroon; font-weight: bold;&quot;&gt;10&lt;/span&gt;)
&lt;span style=&quot;color: teal;&quot;&gt;5&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;FROM&lt;/span&gt; (&lt;span style=&quot;color: blue;&quot;&gt;select&lt;/span&gt; &lt;span style=&quot;color: blue;&quot;&gt;distinct&lt;/span&gt; B &lt;span style=&quot;color: blue;&quot;&gt;from&lt;/span&gt; MyTable) &lt;span style=&quot;color: blue;&quot;&gt;as&lt;/span&gt; a
&lt;span style=&quot;color: teal;&quot;&gt;6&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;SET&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;@sql&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;=&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;@sql&lt;/span&gt; &lt;span style=&quot;color: grey;&quot;&gt;+&lt;/span&gt; &lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt; FROM MyTable GROUP BY A&lt;/span&gt;&lt;span style=&quot;color: red;&quot;&gt;&#39;&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;7&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;PRINT&lt;/span&gt; &lt;span style=&quot;color: green;&quot;&gt;@sql&lt;/span&gt;
&lt;span style=&quot;color: teal;&quot;&gt;8&lt;/span&gt; 　&lt;span style=&quot;color: blue;&quot;&gt;EXEC&lt;/span&gt;(&lt;span style=&quot;color: green;&quot;&gt;@sql&lt;/span&gt;) &lt;/pre&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://codeciel.blogspot.com/feeds/6947365510923246656/comments/default' title='Publier les commentaires'/><link rel='replies' type='text/html' href='http://codeciel.blogspot.com/2012/03/swap-rows-and-columns-in-sql.html#comment-form' title='0 commentaires'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/6947365510923246656'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1029276025775361197/posts/default/6947365510923246656'/><link rel='alternate' type='text/html' href='http://codeciel.blogspot.com/2012/03/swap-rows-and-columns-in-sql.html' title='Swap rows and columns in SQL'/><author><name>Anonymous</name><uri>http://www.blogger.com/profile/03005715292819326657</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='https://img1.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry></feed>