<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>sogroup.com</title>
	<atom:link href="http://www.sogroup.com/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sogroup.com</link>
	<description>What You Need To Know About IIS</description>
	<lastBuildDate>Wed, 22 Feb 2012 01:39:33 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.4</generator>
		<item>
		<title>Getting A American Childrens Passport</title>
		<link>http://www.sogroup.com/getting-a-american-childrens-passport</link>
		<comments>http://www.sogroup.com/getting-a-american-childrens-passport#comments</comments>
		<pubDate>Wed, 22 Feb 2012 01:39:33 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/getting-a-american-childrens-passport</guid>
		<description><![CDATA[Over the years, various requirements have been added in an effort to combat children abduction and trafficking. These new requirements prove to be a bit complicated for parents to acquire passports for their children. While it is definitely vital to ensure children&#8217;s safety and it is a way of protecting them, these procedures are often [...]]]></description>
			<content:encoded><![CDATA[<p>Over the years, various requirements have been added in an effort to combat children abduction and trafficking. These new requirements prove to be a bit complicated for parents to acquire passports for their children. While it is definitely vital to ensure children&#8217;s safety and it is a way of protecting them, these procedures are often considered to be too stringent. To make it through the process without a hitch, start early and pay attention to the details when applying for a <a href="http://www.uspassportnow.com/services/ChildPassport">American childrens pasport</a>.</p>
<p>Application Process</p>
<p>Primarily, what you need to understand is that the child has to apply personally, along with a guardian or both parents. Renewal of passports through the mail is not applicable for minors. Children below the age of 16 whose passports have expired or are about to expire should apply for renewal by filling out the form and submitting it personally at the designated center.</p>
<p> Form DS-11</p>
<p>The form should be completed but it is signed only after the request of the agent. Form DS-11 is required to apply for a passport if you are U. S. A citizen. The complete but unsigned form must be presented to an agent at a passport accepting facility. Parental consent is also necessary for children under the age of 16. There is a different form for <a href="http://www.uspassportnow.com/services/ChildPassport/Expedited">expedited American child passports</a>.</p>
<p>Documentation</p>
<p>If you are applying for a minor, a proof of citizenship needs to be presented along with evidence of the relationship between the parents or guardians and the child. You should also present the child&#8217;s birth certificate as primary evidence.</p>
<p>Proof of Relationship</p>
<p>To present a proof of your relationship with the child, you have to provide a birth certificate that clearly states the parent&#8217;s name or an adoption decree that has the adopting parents&#8217; names on it. In other situations a court order authorizing you to have the custody or guardianship of the child can also be presented.</p>
<p>Foreign Birth</p>
<p>In case your child was born abroad, you would have to provide a certified foreign birth certificate with the parents&#8217; names and a translation if required. A document of certification of birth abroad may also be used. Minors under sixteen, apart from needing evidence of the relationship between them and parents, will also have to provide copies of their parents&#8217; identification plus a photocopy of each parent/guardian document.</p>
<p>Parental Consent</p>
<p>What does it mean to provide parental consent for children to get U. S. Passports? It means being there with the child in front of the responsible agent who authorizes the passports. If only one parent can appear, the other must have written a statement that is notarized giving his or her consent. Once again, sole legal custody must be documented by a custody decree from the courts or a death certificate.</p>
<p></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/getting-a-american-childrens-passport/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Learning Resources Upgrades eCommerce Operations to Increase Sales for Retailers and Provide More Options for Consumers</title>
		<link>http://www.sogroup.com/learning-resources-upgrades-ecommerce-operations-to-increase-sales-for-retailers-and-provide-more-options-for-consumers</link>
		<comments>http://www.sogroup.com/learning-resources-upgrades-ecommerce-operations-to-increase-sales-for-retailers-and-provide-more-options-for-consumers#comments</comments>
		<pubDate>Tue, 21 Feb 2012 17:23:04 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Website Launch]]></category>
		<category><![CDATA[Consumers]]></category>
		<category><![CDATA[eCommerce]]></category>
		<category><![CDATA[Increase]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[More]]></category>
		<category><![CDATA[Operations]]></category>
		<category><![CDATA[Options]]></category>
		<category><![CDATA[Provide]]></category>
		<category><![CDATA[Resources]]></category>
		<category><![CDATA[Retailers]]></category>
		<category><![CDATA[Sales]]></category>
		<category><![CDATA[Upgrades]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/learning-resources-upgrades-ecommerce-operations-to-increase-sales-for-retailers-and-provide-more-options-for-consumers</guid>
		<description><![CDATA[SAN LUIS OBISPO, Calif., Feb. 21, 2012 &#160;/PRNewswire/ &#8211;&#160;Learning Resources, a leading global manufacturer of hands-on educational materials, has made a significant shift in their&#8230; The Web Buyer Guide is a comprehensive directory used by today’s teach and business savvy Web buyers. Web buyers can make and educated and informed purchasing decisions by utilizing a [...]]]></description>
			<content:encoded><![CDATA[<p>SAN LUIS OBISPO, Calif., Feb. 21, 2012 &#160;/PRNewswire/ &#8211;&#160;Learning Resources, a leading global manufacturer of hands-on educational materials, has made a significant shift in their&#8230;<br/><br />
<br/><br />
The Web Buyer Guide is a comprehensive directory used by today’s teach and business savvy Web buyers. Web buyers can make and educated and informed purchasing decisions by utilizing a Web Buyers Guide resource to search for companies and products by category, name, keyword, operating system, software requirements, type of product or price.<br />
<a rel="nofollow" href="http://webbuyerguide.org/learning-resources-upgrades-ecommerce-operations-to-increase-sales-for-retailers-and-provide-more-options-for-consumers.htm">Web Buyers Guide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/learning-resources-upgrades-ecommerce-operations-to-increase-sales-for-retailers-and-provide-more-options-for-consumers/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Its Raining In Terms Of Projects Announces ONS Interactive Solutions, The … – PR Web (press release)</title>
		<link>http://www.sogroup.com/its-raining-in-terms-of-projects-announces-ons-interactive-solutions-the-%e2%80%a6-%e2%80%93-pr-web-press-release</link>
		<comments>http://www.sogroup.com/its-raining-in-terms-of-projects-announces-ons-interactive-solutions-the-%e2%80%a6-%e2%80%93-pr-web-press-release#comments</comments>
		<pubDate>Tue, 21 Feb 2012 04:53:45 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Website Launch]]></category>
		<category><![CDATA[Announces]]></category>
		<category><![CDATA[Interactive]]></category>
		<category><![CDATA[press]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[Raining]]></category>
		<category><![CDATA[Release]]></category>
		<category><![CDATA[Solutions]]></category>
		<category><![CDATA[Terms]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/its-raining-in-terms-of-projects-announces-ons-interactive-solutions-the-%e2%80%a6-%e2%80%93-pr-web-press-release</guid>
		<description><![CDATA[Its Raining In Terms Of Projects Announces ONS Interactive Solutions, The &#8230;PR Web (press release)The company has decided to blend the most efficient internet marketing techniques including SEO&#8230; The Web Buyer Guide is a comprehensive directory used by today’s teach and business savvy Web buyers. Web buyers can make and educated and informed purchasing decisions [...]]]></description>
			<content:encoded><![CDATA[<p>Its Raining In Terms Of Projects Announces ONS Interactive Solutions, The &#8230;PR Web (press release)The company has decided to blend the most efficient internet marketing techniques including SEO&#8230;<br/><br />
<br/><br />
The Web Buyer Guide is a comprehensive directory used by today’s teach and business savvy Web buyers. Web buyers can make and educated and informed purchasing decisions by utilizing a Web Buyers Guide resource to search for companies and products by category, name, keyword, operating system, software requirements, type of product or price.<br />
<a rel="nofollow" href="http://webbuyerguide.org/its-raining-in-terms-of-projects-announces-ons-interactive-solutions-the-pr-web-press-release.htm">Web Buyers Guide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/its-raining-in-terms-of-projects-announces-ons-interactive-solutions-the-%e2%80%a6-%e2%80%93-pr-web-press-release/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Applying For A Same Day American Kids Pasport</title>
		<link>http://www.sogroup.com/applying-for-a-same-day-american-kids-pasport</link>
		<comments>http://www.sogroup.com/applying-for-a-same-day-american-kids-pasport#comments</comments>
		<pubDate>Mon, 20 Feb 2012 18:24:22 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/applying-for-a-same-day-american-kids-pasport</guid>
		<description><![CDATA[Foreign travel can be an exciting adventure, especially for children travelling for the first time. However, it is important to make sure they have the right documentation. Sometimes you may forget that their passport needs renewing or you may need to get the process completed as quickly as possible. Therefore you may want to consider [...]]]></description>
			<content:encoded><![CDATA[<p>Foreign travel can be an exciting adventure, especially for children travelling for the first time. However, it is important to make sure they have the right documentation. Sometimes you may forget that their passport needs renewing or you may need to get the process completed as quickly as possible. Therefore you may want to consider applying for <a href="http://www.uspassport123.com/services/ChildPassport">same day US kids passport</a>.</p>
<p>Download The Application</p>
<p>The main benefit of this is being able to complete the process at short notice. Often when you are travelling, there is a lot of preparation and even important details can be forgotten until the last minute. Applying for a 24-hour passport for your child is a real time saver. However in order to make sure the process is successful, you need to provide the right information and have the right forms.</p>
<p>Parental Consent</p>
<p>The next step is to make sure you have the proper identification for your child.  A birth certificate is the preferred document to be used for this purpose. If you have an expired passport for your child, you can also use it as a form of identification if it is in good condition. Another important requirement is that both parents or guardians must be present or must provide a notarized letter providing permission for the child&#8217;s travel.</p>
<p>Identification</p>
<p>Equally important is having the correct identification. You should have your birth certificate to hand so a copy can be made. If this is not available, it is possible to use an expired previous passport as long as it is in good condition.</p>
<p>Proof of Travel Date</p>
<p>The problem of an absentee parent is easily overcome by providing written consent allowing the child to travel. Remember that this letter must be notarized.  It is also vital to have two passport photos. These must be taken in accordance with all government rules and regulations for passport photos. You also need to present proof of the departure date. This can be in the form of a ticket or travel itinerary.</p>
<p>Submission of Documents and Fees</p>
<p>If you are travelling for business purposes but need to take your children with you, you may need to have a letter from your employer to verify the urgency of your departure.  With the proper documentation, you will have no problem receiving your child’s travel documents in time for your departure.</p>
<p>Receipt of Your Completed Documents</p>
<p>Once the <a href="http://www.uspassport123.com/expediting/">expedited US passport</a> forms have been completed, you will pay the relevant fees.  These fees will include governmental fees as well as expediting charges, which will be paid to the agency assisting you.  When you receive your completed documents, they must remain in the sealed envelope until presented to the agency processing them for you.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/applying-for-a-same-day-american-kids-pasport/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery.continuations In Action</title>
		<link>http://www.sogroup.com/jquery-continuations-in-action</link>
		<comments>http://www.sogroup.com/jquery-continuations-in-action#comments</comments>
		<pubDate>Mon, 20 Feb 2012 03:52:35 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Action]]></category>
		<category><![CDATA[jQuery.continuations]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/jquery-continuations-in-action</guid>
		<description><![CDATA[I’ve been getting quite a few questions about jQuery.continuations after my last round of posts and the lightning round I gave at ADNUG last month. I have this horrible habit of pretending that I’m a lot more articulate than I really am. Obviously my last few posts didn’t do this library any justice. I think [...]]]></description>
			<content:encoded><![CDATA[<p>I’ve been getting quite a few questions about jQuery.continuations after my last round of posts and the lightning round I gave at ADNUG last month. I have this horrible habit of pretending that I’m a lot more articulate than I really am. Obviously my last few posts didn’t do this library any justice.</p>
<p>I think <a href="http://lostechies.com/jimmybogard/">Jimmy</a> put it the best when he said: “Yeah, I read your posts but there just wasn’t a whole lot of code”. So this time I’m going to write a post that’s mostly code and see if it helps.</p>
<h2>Show me something concrete</h2>
<p>Let’s start with an example and then I’ll explain what’s going on:</p>
<p><iframe style="width: 100%; height: 300px" src="http://jsfiddle.net/jmarnold/KEKxr/56/embedded/" allowfullscreen="allowfullscreen" frameborder="0"></iframe></p>
<p>If you run this example, you’ll be shown a dialog. Clicking “Success” or “Failure” will demonstrate the behavior of a successful or failed http post (respectively).</p>
<blockquote><p>NOTE:<br />
I’ve noted this in the code several times but here it is again: don’t bother with the “Server” stuff. It’s just a helper to mock the ajax calls since we’re not using a server here.</p>
</blockquote>
<h3>Custom options</h3>
<p>We are making use of the correlatedSubmit method here (an extension to jquery.forms). Notice that we’re passing in the custom “closeDialog” property.</p>
<p>Passing in a hash to correlatedSubmit or as the “options” property of the hash to $.ajax provides a local set of custom options that are made available during the processing of the clientside continuation.</p>
<p>Great, what does that mean? Well, here’s how this works:</p>
<p><script src="https://gist.github.com/1857553.js?file=continuation.policies.js"></script></p>
<p>Whenever a continuation is received (via the success callback from $.ajax), this custom dialog policy will be inspected. Notice that we’re matching against “continuation.options.closeDialog”. The options property of the continuation contains the same options that you passed in so in this case, “closeDialog” would be true.</p>
<blockquote><p>Note:<br />
My first pass at this didn’t have these custom options and our conventions were ALWAYS global. You should ask <a href="https://twitter.com/#!/jeremydmiller">Jeremy</a> what he thought about that.</p>
</blockquote>
<p>In case you missed the point here, our policy conventionally closes a jquery ui dialog when the response was successful.</p>
<h3>Reusable conventions</h3>
<p>Conventions are only “conventions” when they’re reusable. Reusable pieces of code really strut their value when they’re reusable in more than one project.</p>
<p>The “Failure” button demonstrates a failed continuation response from the server. fubuvalidation-js has a built-in convention for detecting those errors and rendering them into the form that originated the request. So simply including fubuvalidation-js into this jsfiddle was enough to get that to work.</p>
<h3>From client to server</h3>
<p>The validation and “close dialog” policies are pretty useful. For us, they’re very useful because we use them throughout our app. These are just two simple examples of what can be done here. Let’s brainstorm a few more to make sure I’m articulating the power of this correctly:</p>
<ul>
<li>Refresh the page (force a full refresh on certain conditions)</li>
<li>Redirect to a new url</li>
<li>Display errors (“something went terribly wrong”)</li>
<li>Keep track of pending ajax requests</li>
</ul>
<p>The list goes on and on but let’s talk about this “redirect to a new url” idea.</p>
<h3>APIs and Continuations</h3>
<p>A common technique found in HTTP-based APIs is to provide a set of information regarding a resource when it is created. For example, “POST /users/create” may return things like:</p>
<ul>
<li>The ID of the User</li>
<li>Some urls (e.g., “go here to view the details”, “go here to edit the user”</li>
</ul>
<p>If you design your endpoints to follow a similar technique, you can plugin policies that use the response and orchestrate the behavior of your system from a central block of code. Of course, in small applications this doesn’t pay off but in large and complex systems the value starts to shine.</p>
<h2>Wrapping it up</h2>
<p>Hopefully the code speaks for itself and this sparks a few ideas.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/LosTechies?a=gOn6UyhfWWA:HHGOtQnf8KQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LosTechies?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/LosTechies?a=gOn6UyhfWWA:HHGOtQnf8KQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LosTechies?i=gOn6UyhfWWA:HHGOtQnf8KQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/LosTechies?a=gOn6UyhfWWA:HHGOtQnf8KQ:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/LosTechies?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/LosTechies?a=gOn6UyhfWWA:HHGOtQnf8KQ:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/LosTechies?i=gOn6UyhfWWA:HHGOtQnf8KQ:D7DqB2pKExk" border="0"></img></a>
</div>
<p><img src="http://feeds.feedburner.com/~r/LosTechies/~4/gOn6UyhfWWA" height="1" width="1"/><br />
<a rel="nofollow" href="http://feedproxy.google.com/~r/LosTechies/~3/gOn6UyhfWWA/">Los Techies</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/jquery-continuations-in-action/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top Ten Extreme Environment Projects, Los Angeles NFL Stadium … – Einnews Portugal</title>
		<link>http://www.sogroup.com/top-ten-extreme-environment-projects-los-angeles-nfl-stadium-%e2%80%a6-%e2%80%93-einnews-portugal</link>
		<comments>http://www.sogroup.com/top-ten-extreme-environment-projects-los-angeles-nfl-stadium-%e2%80%a6-%e2%80%93-einnews-portugal#comments</comments>
		<pubDate>Sun, 19 Feb 2012 15:24:46 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Website Launch]]></category>
		<category><![CDATA[Angeles]]></category>
		<category><![CDATA[Einnews]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[Extreme]]></category>
		<category><![CDATA[Portugal]]></category>
		<category><![CDATA[projects]]></category>
		<category><![CDATA[Stadium]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/top-ten-extreme-environment-projects-los-angeles-nfl-stadium-%e2%80%a6-%e2%80%93-einnews-portugal</guid>
		<description><![CDATA[Top Ten Extreme Environment Projects, Los Angeles NFL Stadium &#8230;Einnews PortugalOur systems continuously scan the web, indexing news from thousands of worldwide sources. The data is then&#8230; The Web Buyer Guide is a comprehensive directory used by today’s teach and business savvy Web buyers. Web buyers can make and educated and informed purchasing decisions by [...]]]></description>
			<content:encoded><![CDATA[<p>Top Ten Extreme Environment Projects, Los Angeles NFL Stadium &#8230;Einnews PortugalOur systems continuously scan the web, indexing news from thousands of worldwide sources. The data is then&#8230;<br/><br />
<br/><br />
The Web Buyer Guide is a comprehensive directory used by today’s teach and business savvy Web buyers. Web buyers can make and educated and informed purchasing decisions by utilizing a Web Buyers Guide resource to search for companies and products by category, name, keyword, operating system, software requirements, type of product or price.<br />
<a rel="nofollow" href="http://webbuyerguide.org/top-ten-extreme-environment-projects-los-angeles-nfl-stadium-einnews-portugal.htm">Web Buyers Guide</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/top-ten-extreme-environment-projects-los-angeles-nfl-stadium-%e2%80%a6-%e2%80%93-einnews-portugal/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hyper-V Bandwidth Meter and Hosting Controller</title>
		<link>http://www.sogroup.com/hyper-v-bandwidth-meter-and-hosting-controller</link>
		<comments>http://www.sogroup.com/hyper-v-bandwidth-meter-and-hosting-controller#comments</comments>
		<pubDate>Sun, 19 Feb 2012 02:53:40 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Bandwidth]]></category>
		<category><![CDATA[Controller]]></category>
		<category><![CDATA[Hosting]]></category>
		<category><![CDATA[HyperV]]></category>
		<category><![CDATA[Meter]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/hyper-v-bandwidth-meter-and-hosting-controller</guid>
		<description><![CDATA[We have finished the integration of Hyper-V Bandwidth Meter and Hosting Controller (web hosting control panel). Bandwidth reports (created by Hyper-V Bandwidth Meter) are now provided to view with Hosting Controller. In case of bandwidth over usage, Hosting Controller will take appropriate action (configurable) e.g. Suspend Virtual Machine, Resume Virtual Machine. Hosts Tools]]></description>
			<content:encoded><![CDATA[<p>We have finished the integration of Hyper-V Bandwidth Meter and Hosting Controller (web hosting control panel).</p>
<ul>
<li> Bandwidth reports (created by Hyper-V Bandwidth Meter) are now provided to view with Hosting Controller.</li>
<li> In case of bandwidth over usage, Hosting Controller will take appropriate action (configurable) e.g. Suspend Virtual Machine, Resume Virtual Machine.</li>
</ul>
<p><a rel="nofollow" href="http://www.hoststools.com/index.php/bandwidth-meters/hyper-v-bandwidth-meter-and-hosting-controller/">Hosts Tools</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/hyper-v-bandwidth-meter-and-hosting-controller/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Young Adult Alcohol Addiction Rehab Can Help People Recover From Alcohol Dependency</title>
		<link>http://www.sogroup.com/young-adult-alcohol-addiction-rehab-can-help-people-recover-from-alcohol-dependency</link>
		<comments>http://www.sogroup.com/young-adult-alcohol-addiction-rehab-can-help-people-recover-from-alcohol-dependency#comments</comments>
		<pubDate>Sat, 18 Feb 2012 22:14:15 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/young-adult-alcohol-addiction-rehab-can-help-people-recover-from-alcohol-dependency</guid>
		<description><![CDATA[Finding young adult alcohol addiction rehab can help individuals overcome alcoholism. Rehabilitation centers can be the focus of a strategy of recovery. Many people have been through these treatment facilities and have had their lives changed in a positive way. The path to recovery is often a long one, but with the right help it [...]]]></description>
			<content:encoded><![CDATA[<p>Finding <a href="https://www.thewatershed.com/Specialized_Programs/young_adults.php">young adult alcohol addiction rehab</a> can help individuals overcome alcoholism. Rehabilitation centers can be the focus of a strategy of recovery. Many people have been through these treatment facilities and have had their lives changed in a positive way. The path to recovery is often a long one, but with the right help it can be a rewarding one as well. </p>
<p>Alcohol</p>
<p>Alcohol can be a highly addictive substance and individuals with drinking problems often have difficulty with family and work relationships. Sometimes they may encounter serious legal problems, especially if they drink and drive. Some young people are compelled to attend rehabilitation because of part of a court ordered sentence. Others may come voluntarily. It is important for them to confront the problem early, as alcohol dependency that goes untreated can lead to future health problems. </p>
<p>Detox</p>
<p>Counseling and detoxification are two important parts of a rehabilitation strategy. Initially, patients may need to detoxify and sober up before they can respond to treatment. Once this takes place, therapeutic counseling can help the patient make the necessary changes. However, counseling and other forms of therapy usually can not begin until the patient has gone through the detoxification process. </p>
<p>Dependency</p>
<p>Detoxification becomes necessary in many cases for people who are dependent on alcohol. These people may experience significant withdrawal symptoms including in some cases life threatening delirium tremens. DTs are characterized by convulsions, hallucinations and blurred consciousness. Persons suffering from intense withdrawal symptoms often require residential treatment so that they can be monitored for rapid changes in health. Sometimes the administration of tranquilizers such as Ativan or Valium might be recommended. </p>
<p>Support Groups</p>
<p>Many rehab programs follow the twelve step program outlined by Alcoholics Anonymous. However, not every facility employs this model and there are other therapeutic approaches to recovery. Although programs differ in design, all of them are designed with the goal of getting the patient sober and keeping him or her sober for the long haul. </p>
<p>Residential Care</p>
<p>Some people may need inpatient care for their addiction while others can go outpatient. It is all up to the doctor who sees the patient and determines what they may need. In a residential program, several professionals will work with a patient to help them recover. Outpatient treatment may have less doctors as it requires less maintenance. </p>
<p>Consequences</p>
<p>There are several repercussions for having an alcohol problem. It can affect one&#8217;s personal relationships, work history and stability, and one&#8217;s health. Of course, all of these are important to having a healthy life. Rehabilitation facilities help bring about change and health for people of all ages. A patient must want the change, however. No one can make them change unless they want it. The goal is <a href="https://www.thewatershed.com/Treatment_Programs/halfway_house.php">sobriety living</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/young-adult-alcohol-addiction-rehab-can-help-people-recover-from-alcohol-dependency/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HeBS Digital Launches Landmark Sixth Annual Benchmark Survey on Hotel Digital Marketing Strategies</title>
		<link>http://www.sogroup.com/hebs-digital-launches-landmark-sixth-annual-benchmark-survey-on-hotel-digital-marketing-strategies</link>
		<comments>http://www.sogroup.com/hebs-digital-launches-landmark-sixth-annual-benchmark-survey-on-hotel-digital-marketing-strategies#comments</comments>
		<pubDate>Fri, 17 Feb 2012 00:53:03 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Website Launch]]></category>
		<category><![CDATA[Annual]]></category>
		<category><![CDATA[Benchmark]]></category>
		<category><![CDATA[Digital]]></category>
		<category><![CDATA[HeBS]]></category>
		<category><![CDATA[Hotel]]></category>
		<category><![CDATA[Landmark]]></category>
		<category><![CDATA[Launches]]></category>
		<category><![CDATA[Marketing]]></category>
		<category><![CDATA[Sixth]]></category>
		<category><![CDATA[strategies]]></category>
		<category><![CDATA[Survey]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/hebs-digital-launches-landmark-sixth-annual-benchmark-survey-on-hotel-digital-marketing-strategies</guid>
		<description><![CDATA[New York, NY (PRWEB) – February 14, 2012: HeBS Digital today announces the launch of the 2012 Benchmark Survey on Hotel Digital Marketing Strategies, Budget Planning and Best Practices. Following the editions taking place from 2007 to 2011, the sixth annual Benchmark Survey asks hoteliers what digital formats and methods they use to reach potential and [...]]]></description>
			<content:encoded><![CDATA[<p>New York, NY (PRWEB) – February 14, 2012: <a href="http://www.hebsdigital.com/index.php?chebs=pr_hebs_0212" target="_blank">HeBS Digital</a> today announces the launch of the <em><a href="https://www.surveymonkey.com/s/5LWLPPG">2012 Benchmark Survey on Hotel Digital Marketing Strategies, Budget Planning and Best Practices.</a></em> Following the editions taking place from 2007 to 2011, the sixth annual Benchmark Survey asks hoteliers what digital formats and methods they use to reach potential and current guests, what digital marketing practices generate the highest ROIs, how they choose to allocate their marketing budgets between different mediums, and more.</p>
<p>Held for the sixth year in a row, the goal of the 2012 Benchmark Survey is to assess hoteliers’ 2012 digital marketing priorities, as well as provide the industry with insight into recent evolutions in digital marketing strategies.  The results and analysis of this survey, provided by HeBS Digital, may assist hoteliers in building better ROI-centric, cost-effective digital marketing solutions to help meet and exceed their goals.</p>
<p><a href="http://www.hebsdigital.com/blog/it%e2%80%99s-time-for-a-mid-year-course-correction-the-results-of-the-annual-survey-on-digital-marketing-are-in/">Key findings from the 5<sup>th</sup> Annual Benchmark Survey conducted in 2011</a><strong> can be found on the HeBS Digital blog.</strong></p>
<p>The survey should take no more than five minutes to complete, and all participants will be entered to win a Google+ Business Page Set-Up and a Facebook Custom Tab Design.</p>
<p>“HeBS Digital launches this survey year-after-year for two reasons: to provide the hospitality industry with results and actionable recommendations, and to assess the annual changes in hoteliers’ priorities, digital marketing budgets and industry dynamics,” said Max Starkov, President and CEO of HeBS Digital. “The following affect budget planning for hoteliers: the state of the economy, technological advancements (and their adoption by consumers), changes in search engine algorithms, emerging distribution channels such as the mobile web and customer engagement channels like Facebook, Twitter, etc. The Benchmark Survey helps us evaluate how these issues affect and influence hoteliers, and how their properties will react to the new competitive landscape.”</p>
<p>General managers, revenue managers, sales and marketing managers, e-commerce managers and professionals at hotels, resorts, hotel management companies and hotel chains are invited to participate in the <strong><em>2012 Benchmark Survey on Hotel Digital Marketing Strategies, Budget Planning and Best Practices</em></strong><strong>. </strong>Please <span style="text-decoration: underline;"><a href="https://www.surveymonkey.com/s/5LWLPPG">click here</a></span> to take the survey.</p>
<p>&nbsp;</p>
<p><strong><span style="text-decoration: underline;"><br />
</span></strong></p>
<p><strong>About HeBS Digital:</strong></p>
<p>Founded in 2001, HeBS Digital is the industry’s leading full-service hotel digital marketing, website design and direct online channel strategy firm based in New York City (<a href="http://www.hebsdigital.com/">www.HeBSDigital.com</a>).</p>
<p>HeBS Digital has pioneered many of the &#8220;best practices&#8221; in hotel digital marketing, social and mobile marketing, and direct online channel distribution. The firm has won over 175 prestigious industry awards for its digital marketing and website design services, including numerous Adrian Awards, Davey Awards, W3 Awards, WebAwards, Magellan Awards, Summit International Awards, Interactive Media Awards, and IAC Awards.</p>
<p>A diverse client portfolio of top tier major hotel brands, luxury and boutique hotel brands, resorts and casinos, hotel management companies, franchisees and independents, and CVBs are taking advantage of the hospitality digital marketing expertise offered at HeBS Digital. Contact HeBS Digital’s consultants at (212) 752-8186 or <a href="mailto:success@hebsdigital.com">success@hebsdigital.com</a>.</p>
<p><em> </em></p>
<p>Editorial Contact:<br />
Mariana Mechoso Safer<br />
HeBS Digital<br />
Phone: 212-752-8186<br />
Email: mariana@hebsdigital.com<br />
Web: <a href="http://www.hebsdigital.com/">http://www.hebsdigital.com</a><br />
Facebook: <a href="http://www.facebook.com/hebsdigital">http://www.facebook.com/hebsdigital</a><br />
Twitter: <a href="https://twitter.com/HeBS_NYC">https://twitter.com/HeBS_NYC</a><br />
LinkedIn: <a href="http://www.linkedin.com/company/hospitality-ebusiness-strategies">http://www.linkedin.com/company/hospitality-ebusiness-strategies</a><br />
<strong><em> </em></strong></p>
<p><a rel="nofollow" href="http://www.hebsdigital.com/blog/hebs-digital-launches-landmark-sixth-annual-benchmark-survey-on-hotel-digital-marketing-strategies/">HeBS Internet Marketing Blog</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/hebs-digital-launches-landmark-sixth-annual-benchmark-survey-on-hotel-digital-marketing-strategies/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Asynchronously Load HTML Templates For Backbone Views</title>
		<link>http://www.sogroup.com/asynchronously-load-html-templates-for-backbone-views</link>
		<comments>http://www.sogroup.com/asynchronously-load-html-templates-for-backbone-views#comments</comments>
		<pubDate>Thu, 16 Feb 2012 12:26:45 +0000</pubDate>
		<dc:creator></dc:creator>
				<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Asynchronously]]></category>
		<category><![CDATA[Backbone]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[Load]]></category>
		<category><![CDATA[Templates]]></category>
		<category><![CDATA[Views]]></category>

		<guid isPermaLink="false">http://www.sogroup.com/asynchronously-load-html-templates-for-backbone-views</guid>
		<description><![CDATA[As JavaScript applications become larger and larger, we have to think about the download size, memory usage and other performance constraints for our end users. There are a number of aspects to consider, one of which is how to deliver the HTML templates that your application is using, to the user&#8217;s browser, so that your [...]]]></description>
			<content:encoded><![CDATA[<p>As JavaScript applications become larger and larger, we have to think about the download size, memory usage and other performance constraints for our end users. There are a number of aspects to consider, one of which is how to deliver the HTML templates that your application is using, to the user&#8217;s browser, so that your application can render the templates.</p>
<p>For my smaller applications, I tend to stuff a number of &lt;script&gt; blocks in to the HTML that the user downloads. This makes it easy for me to work with and I don&#8217;t have to worry about whether or not the template exists. But when the number of templates gets to be more than 5 or 6 small ones, this gets out of hand quickly. It makes it hard for me to manage them as I have to scroll through a lot of template code. Putting them in external files and then including them in the page with some server side technology helps the developer problem but it doesn&#8217;t solve the client problem of having to download all of these templates even if they are never used.</p>
<p>To deal with the issues surrounding templates in HTML files, we can split our templates in to separate files and then use asynchronous calls to our server to load them as needed.</p>
<h2>Backbone.View Render Semantics</h2>
<p>One of my goals, other than the asynchronous template loading, is to keep the general semantics of a Backbone View&#8217;s `render` method. It&#8217;s a short list, but it&#8217;s an important list as most of the Backbone community expects the render method to work this way.</p>
<p>Semantics are generally important as they give us information about how methods and objects are expected to be used, as well. This, in turn, informs the method signature and behavior. And all of this comes back to the <a href="http://code-magazine.com/article.aspx?quickid=1001061&amp;page=6">Liskov Substitution Principle (LSP)</a> from the <a href="http://code-magazine.com/Article.aspx?quickid=1001061">SOLID principles</a>, which tells us that we need to pay attention to semantics so that we can drop in replacements as needed.</p>
<p>The general semantics and method signature of a view&#8217;s render include:</p>
<ul>
<li><strong>No parameters</strong>: the render method shouldn&#8217;t require any parameters. You should be able to call `view.render()` and have it work fine</li>
<li><strong>Chainable</strong>: the render method should return `this` so that it can be chained with other method and attribute calls. This is most commonly done as `view.render().el` to grab the element that was rendered to</li>
<li><strong>Populate `el`, don&#8217;t replace it</strong>: the render method should populate a view&#8217;s `el` with any contents that the view needs to display. It generally shouldn&#8217;t replace the `el` as a whole</li>
</ul>
<p>Aside from these three items, there&#8217;s a lot of flexibility in how a view will typically be rendered. There&#8217;s also plenty of room for interpretation and divergence from this list. Many applications use a render method signature that takes parameters, or that replaces the `el` entirely. When changes like this are made, it&#8217;s a good idea to document them so that people will know why the changes are in place.</p>
<p>The benefit of keeping these semantics, though, is that you can swap out a synchronous, pre-loaded template rendering view with a view that uses an asynchronous template loading mechanism. Or, better yet, you can have an intelligent system that uses asynchronous calls to get the template the first time it needs it, and then uses caching to keep the template around and do synchronous rendering on subsequent requests for this view / template. If the semantics for the view are kept in place, it doesn&#8217;t matter how the view implements the rendering. The view can be dropped in or removed as needed, without having to change the surrounding code that uses it.</p>
<h2>Simple Async Template Retrieval</h2>
<p>We can keep this very simple, to begin with, using jQuery&#8217;s AJAX calls to load the template with a callback to do the actual rendering after the template is loaded.</p>
<div id="gist-1752642" class="gist">
<div class="gist-file">
<div class="gist-data gist-syntax">
<div class="highlight">
<pre>
<div class='line' id='LC1'><span class="nx">Backbone</span><span class="p">.</span><span class="nx">View</span><span class="p">.</span><span class="nx">extend</span><span class="p">({</span></div>
<div class='line' id='LC2'>&nbsp;&nbsp;<span class="nx">template</span><span class="o">:</span> <span class="s1">&#39;my-view-template&#39;</span><span class="p">,</span></div>
<div class='line' id='LC3'><br/></div>
<div class='line' id='LC4'>&nbsp;&nbsp;<span class="nx">render</span><span class="o">:</span> <span class="kd">function</span><span class="p">(){</span></div>
<div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">that</span> <span class="o">=</span> <span class="k">this</span><span class="p">;</span></div>
<div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">$</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s2">&quot;/templates/&quot;</span> <span class="o">+</span> <span class="k">this</span><span class="p">.</span><span class="nx">template</span> <span class="o">+</span> <span class="s2">&quot;.html&quot;</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">template</span><span class="p">){</span></div>
<div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">html</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="nx">template</span><span class="p">).</span><span class="nx">tmpl</span><span class="p">();</span></div>
<div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">that</span><span class="p">.</span><span class="nx">$el</span><span class="p">.</span><span class="nx">html</span><span class="p">(</span><span class="nx">html</span><span class="p">);</span></div>
<div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">});</span></div>
<div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">return</span> <span class="k">this</span><span class="p">;</span></div>
<div class='line' id='LC11'>&nbsp;&nbsp;<span class="p">}</span></div>
<div class='line' id='LC12'><br/></div>
<div class='line' id='LC13'><span class="p">});</span></div>
</pre>
</div></div>
<div class="gist-meta">
            <a href="https://gist.github.com/raw/1752642/5c0cd33f99709a06d1ab876885942e3aa2c755fc/1.js" style="float:right;">view raw</a><br />
            <a href="https://gist.github.com/1752642#file_1.js" style="float:right;margin-right:10px;color:#666">1.js</a><br />
            <a href="https://gist.github.com/1752642">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
</p></div>
</div>
<p>In this example, we&#8217;re assuming that the view has a `template` attribute. This attribute represents the file that will be loaded from the server, and that file contain the actual template to be used.</p>
<p>We&#8217;re also using a convention of `/templates/{name}.html` for the template location on the server. This can be implemented easily in many different web server technologies. In Sinatra, for example, you can create a &#8220;public/templates&#8221; folder and put your HTML template files directly in that folder. They will be available without having to do anything more than start the Sinatra server.</p>
<p>When the call to `render` is made, the code makes an AJAX call back to the server to retrieve the specified template. A callback method is provided &#8211; and at this point, it assumes a successful call to get the template. When the template is returned from the server, the callback is fired, and the standard render code (using jQuery templates in this example) is executed.</p>
<p>Note that the `el` for the view is populated inside of the callback, but we are still calling `return this` at the end of the function. Even if we chain access to the `el` from the `render` method and immediately add the el&#8217;s contents to the DOM, this will still work:</p>
<blockquote>
<p>$(&#8220;#content&#8221;).html(view.render().el);</p>
</blockquote>
<p>The reason this works is that we are only populating the `el` with contents. We are not replacing it. When the AJAX call finally returns with the template, rendering it and populating the `el` will show the contents immediately because we&#8217;re setting the `html` method of an HTML element that is already attached to the DOM. It&#8217;s as if we had called `$(&#8220;#content&#8221;).html(&#8220;&lt;div&gt;some html&lt;/div&gt;&#8221;);` directly.</p>
<h2>Caching Templates</h2>
<p>Now that we have a template loading asynchronously, it would be nice to only load it once instead of every time it needs to be used. This will improve the overall performance of the application, from the user&#8217;s perspective.</p>
<p>To do this, we&#8217;ll need a little more than just some code in the render method. We want to re-use templates that we&#8217;ve already loaded, which means we can&#8217;t just store the template on the view instance. We need to store it in a place where any view instance can grab a copy of the template if it exists, or have an asynchronous call back to the server done to get the template when needed.</p>
<div id="gist-1752642" class="gist">
<div class="gist-file">
<div class="gist-data gist-syntax">
<div class="highlight">
<pre>
<div class='line' id='LC1'><span class="nx">TemplateManager</span> <span class="o">=</span> <span class="p">{</span></div>
<div class='line' id='LC2'>&nbsp;&nbsp;<span class="nx">templates</span><span class="o">:</span> <span class="p">{},</span></div>
<div class='line' id='LC3'><br/></div>
<div class='line' id='LC4'>&nbsp;&nbsp;<span class="nx">get</span><span class="o">:</span> <span class="kd">function</span><span class="p">(</span><span class="nx">id</span><span class="p">,</span> <span class="nx">callback</span><span class="p">){</span></div>
<div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">template</span> <span class="o">=</span> <span class="k">this</span><span class="p">.</span><span class="nx">templates</span><span class="p">[</span><span class="nx">id</span><span class="p">];</span></div>
<div class='line' id='LC6'><br/></div>
<div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">if</span> <span class="p">(</span><span class="nx">template</span><span class="p">)</span> <span class="p">{</span></div>
<div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">callback</span><span class="p">(</span><span class="nx">template</span><span class="p">);</span></div>
<div class='line' id='LC9'><br/></div>
<div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">}</span> <span class="k">else</span> <span class="p">{</span></div>
<div class='line' id='LC11'><br/></div>
<div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">that</span> <span class="o">=</span> <span class="k">this</span><span class="p">;</span></div>
<div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">$</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s2">&quot;/templates/&quot;</span> <span class="o">+</span> <span class="nx">id</span> <span class="o">+</span> <span class="s2">&quot;.html&quot;</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">template</span><span class="p">)){</span></div>
<div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">$tmpl</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="nx">template</span><span class="p">);</span></div>
<div class='line' id='LC15'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">that</span><span class="p">.</span><span class="nx">templates</span><span class="p">[</span><span class="nx">id</span><span class="p">]</span> <span class="o">=</span> <span class="nx">$tmpl</span><span class="p">;</span></div>
<div class='line' id='LC16'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">callback</span><span class="p">(</span><span class="nx">$tmpl</span><span class="p">);</span></div>
<div class='line' id='LC17'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">}</span></div>
<div class='line' id='LC18'><br/></div>
<div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">}</span></div>
<div class='line' id='LC20'><br/></div>
<div class='line' id='LC21'>&nbsp;&nbsp;<span class="p">}</span></div>
<div class='line' id='LC22'><br/></div>
<div class='line' id='LC23'><span class="p">}</span></div>
</pre>
</div></div>
<div class="gist-meta">
            <a href="https://gist.github.com/raw/1752642/fa83841cfc2901dc092f45ab8c95dcbc701c0734/2.js" style="float:right;">view raw</a><br />
            <a href="https://gist.github.com/1752642#file_2.js" style="float:right;margin-right:10px;color:#666">2.js</a><br />
            <a href="https://gist.github.com/1752642">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
</p></div>
</div>
<p>The template manager object has one primary method that we call: `get`. This method takes in a template name to be loaded and a callback method that is executed when the template is found. By using a callback method instead of returning a value directly, we can ensure both synchronous and asynchronous calls will work correctly.</p>
<p>When you call `get`, it will check a hash / object literal to see if the template you want is already loaded using the template name that you provide to make this check. If it exists, it executes the callback immediately and passes the template along. If it does not exist yet, an AJAX call is made with jQuery to get the template from the server. Once the template is loaded, the callback that you passed in will be executed and the template is passed to it.</p>
<p>We can now update our view to use the template manager:</p>
<div id="gist-1752642" class="gist">
<div class="gist-file">
<div class="gist-data gist-syntax">
<div class="highlight">
<pre>
<div class='line' id='LC1'><span class="nx">Backbone</span><span class="p">.</span><span class="nx">View</span><span class="p">.</span><span class="nx">extend</span><span class="p">({</span></div>
<div class='line' id='LC2'>&nbsp;&nbsp;<span class="nx">template</span><span class="o">:</span> <span class="s1">&#39;my-view-template&#39;</span><span class="p">,</span></div>
<div class='line' id='LC3'><br/></div>
<div class='line' id='LC4'>&nbsp;&nbsp;<span class="nx">render</span><span class="o">:</span> <span class="kd">function</span><span class="p">(){</span></div>
<div class='line' id='LC5'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">that</span> <span class="o">=</span> <span class="k">this</span><span class="p">;</span></div>
<div class='line' id='LC6'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">TemplateManager</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="k">this</span><span class="p">.</span><span class="nx">template</span><span class="p">,</span> <span class="kd">function</span><span class="p">(</span><span class="nx">template</span><span class="p">){</span></div>
<div class='line' id='LC7'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">html</span> <span class="o">=</span> <span class="nx">$</span><span class="p">(</span><span class="nx">template</span><span class="p">).</span><span class="nx">tmpl</span><span class="p">();</span></div>
<div class='line' id='LC8'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">that</span><span class="p">.</span><span class="nx">$el</span><span class="p">.</span><span class="nx">html</span><span class="p">(</span><span class="nx">html</span><span class="p">);</span></div>
<div class='line' id='LC9'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">});</span></div>
<div class='line' id='LC10'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">return</span> <span class="k">this</span><span class="p">;</span></div>
<div class='line' id='LC11'>&nbsp;&nbsp;<span class="p">}</span></div>
<div class='line' id='LC12'><br/></div>
<div class='line' id='LC13'><span class="p">});</span></div>
</pre>
</div></div>
<div class="gist-meta">
            <a href="https://gist.github.com/raw/1752642/e7c6dd25bacf6d8ea48046aa83a1ad13f1ecbfc4/3.js" style="float:right;">view raw</a><br />
            <a href="https://gist.github.com/1752642#file_3.js" style="float:right;margin-right:10px;color:#666">3.js</a><br />
            <a href="https://gist.github.com/1752642">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
</p></div>
</div>
<p>This isn&#8217;t much of a change from the view&#8217;s perspective. It&#8217;s better encapsulated, though, and a little easier to read. The real work is now being done in the TemplateManager object and we can change how it behaves as needed without having to update our views.</p>
<h2>Beyond Simple Caching</h2>
<p>There&#8217;s one remaining problem that this code has. If you have multiple instances of a view requesting the same template at roughly the same time, multiple AJAX calls will be made &#8211; one for each instance of the view. The net result is a slowdown in the application&#8217;s performance from too many network calls, and also a visual oddity where the views will appear one at a time as the AJAX calls finish. This can be a pretty big drag on performance and UI responsiveness.</p>
<p>Thanks to some previous digging in to jQuery&#8217;s deferred and some help from Steve Flitcroft (<a href="https://twitter.com/#!/red_square">@red_square</a>), I was able to solve this problem fairly easily. I put <a href="https://github.com/derickbailey/bbclonemail/blob/master/public/javascripts/bbclonemail.views.js#L28-52">the following code</a> in to my BBCloneMail app, which uses my <a href="https://github.com/derickbailey/backbone.marionette">Backbone.Marionette</a> plugin. It&#8217;s not directly implemented in Marionette&#8217;s `TemplateManager` but most of what you need is already there. There&#8217;s only a few additional lines of code that you need to make this work.</p>
<div id="gist-1752642" class="gist">
<div class="gist-file">
<div class="gist-data gist-syntax">
<div class="highlight">
<pre>
<div class='line' id='LC1'><span class="p">(</span><span class="kd">function</span><span class="p">(){</span></div>
<div class='line' id='LC2'>&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">promises</span> <span class="o">=</span> <span class="p">{};</span></div>
<div class='line' id='LC3'><br/></div>
<div class='line' id='LC4'>&nbsp;&nbsp;<span class="c1">// Cache the returned deferred/promise by the id of the template</span></div>
<div class='line' id='LC5'>&nbsp;&nbsp;<span class="c1">// so that we can prevent multiple requests for the same template</span></div>
<div class='line' id='LC6'>&nbsp;&nbsp;<span class="c1">// from making the ajax call.</span></div>
<div class='line' id='LC7'>&nbsp;&nbsp;<span class="c1">//</span></div>
<div class='line' id='LC8'>&nbsp;&nbsp;<span class="c1">// This code is only safe to run synchronously. There exists a</span></div>
<div class='line' id='LC9'>&nbsp;&nbsp;<span class="c1">// race condition in this function, when run asynchronously,</span></div>
<div class='line' id='LC10'>&nbsp;&nbsp;<span class="c1">// which would nullify the benefit under certain circumstances.</span></div>
<div class='line' id='LC11'>&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">loadTemplateAsync</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">tmpId</span><span class="p">){</span></div>
<div class='line' id='LC12'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">promise</span> <span class="o">=</span> <span class="nx">promises</span><span class="p">[</span><span class="nx">tmpId</span><span class="p">]</span> <span class="o">||</span> <span class="nx">$</span><span class="p">.</span><span class="nx">get</span><span class="p">(</span><span class="s2">&quot;/templates/&quot;</span> <span class="o">+</span> <span class="nx">tmpId</span> <span class="o">+</span> <span class="s2">&quot;.html&quot;</span><span class="p">);</span></div>
<div class='line' id='LC13'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">promises</span><span class="p">[</span><span class="nx">tmpId</span><span class="p">]</span> <span class="o">=</span> <span class="nx">promise</span><span class="p">;</span></div>
<div class='line' id='LC14'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="k">return</span> <span class="nx">promise</span><span class="p">;</span></div>
<div class='line' id='LC15'>&nbsp;&nbsp;<span class="p">}</span></div>
<div class='line' id='LC16'><br/></div>
<div class='line' id='LC17'>&nbsp;&nbsp;<span class="c1">// Use jQuery to asynchronously load the template. </span></div>
<div class='line' id='LC18'>&nbsp;&nbsp;<span class="nx">Backbone</span><span class="p">.</span><span class="nx">Marionette</span><span class="p">.</span><span class="nx">TemplateManager</span><span class="p">.</span><span class="nx">loadTemplate</span> <span class="o">=</span> <span class="kd">function</span><span class="p">(</span><span class="nx">templateId</span><span class="p">,</span> <span class="nx">callback</span><span class="p">){</span></div>
<div class='line' id='LC19'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">tmpId</span> <span class="o">=</span> <span class="nx">templateId</span><span class="p">.</span><span class="nx">replace</span><span class="p">(</span><span class="s2">&quot;#&quot;</span><span class="p">,</span> <span class="s2">&quot;&quot;</span><span class="p">);</span></div>
<div class='line' id='LC20'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="kd">var</span> <span class="nx">promise</span> <span class="o">=</span> <span class="nx">loadTemplateAsync</span><span class="p">(</span><span class="nx">tmpId</span><span class="p">);</span></div>
<div class='line' id='LC21'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">promise</span><span class="p">.</span><span class="nx">done</span><span class="p">(</span><span class="kd">function</span><span class="p">(</span><span class="nx">template</span><span class="p">){</span></div>
<div class='line' id='LC22'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<span class="nx">callback</span><span class="p">.</span><span class="nx">call</span><span class="p">(</span><span class="k">this</span><span class="p">,</span> <span class="nx">$</span><span class="p">(</span><span class="nx">template</span><span class="p">));</span></div>
<div class='line' id='LC23'>&nbsp;&nbsp;&nbsp;&nbsp;<span class="p">});</span></div>
<div class='line' id='LC24'>&nbsp;&nbsp;<span class="p">}</span></div>
<div class='line' id='LC25'><span class="p">})();</span></div>
</pre>
</div></div>
<div class="gist-meta">
            <a href="https://gist.github.com/raw/1752642/5d5796e3335c80182324ce00ca9263f371f6c265/5.js" style="float:right;">view raw</a><br />
            <a href="https://gist.github.com/1752642#file_5.js" style="float:right;margin-right:10px;color:#666">5.js</a><br />
            <a href="https://gist.github.com/1752642">This Gist</a> brought to you by <a href="http://github.com">GitHub</a>.
          </div>
</p></div>
</div>
<p>The basic idea is that I&#8217;m using a jQuery deferred / promise to fire the callback method from the loadTemplate parameters. To prevent multiple requests for the same template heading back to the server, I&#8217;m caching the promises by the template id. When a call to loadTemplate is made through the template manager, I check to see if I have a promise for that template already. If I do, I register the loadTemplate&#8217;s callback parameter with the promise. If I don&#8217;t, I create the promise and then store it by the template&#8217;s Id. Either way, I register the callback with the promise which <a href="http://lostechies.com/derickbailey/2012/02/07/rewriting-my-guaranteed-callbacks-code-with-jquery-deferred/">guarantees it will be executed</a>. Once the template is returned from the server and the promise is fulfilled (resolved), all of the callbacks are fired off with the template data and everything renders correctly.</p>
<p>Note, though, that this code is not 100% safe. If you call the template manager from code that is already asynchronous, you can end up with a race condition where multiple promises are created and multiple calls to get the template are done. You&#8217;ll still get all of your views rendered just fine, but this will eliminate the benefit of using a promise to reduce network calls. Calling this code synchronously, though, won&#8217;t cause this race condition and the templates will only load once before they are cached and re-used.</p>
<p><span style="font-size: 18px; font-weight: bold;">See It In Action</span></p>
<p>If you&#8217;d like to see an example of this code in action (including the deferred/promise code from above), check out my <a href="http://bbclonemail.heroku.com/">BBCloneMail</a> application and <a href="https://github.com/derickbailey/bbclonemail">it&#8217;s source code</a>. You&#8217;ll see the update to the TemplateManager&#8217;s `loadTemplate` function in the code. When you view the live site, switch to the Contacts view and refresh the page. There will be a small delay in the template loading, and then all of the contacts (which all individually requested the same contact template) will all display at once. Subsequent requests to those areas of the app will be cached, of course, improving the user experience and performance even more.</p>
<div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/LosTechies?a=BNfhhMjdorY:UJLvyF_u2B4:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/LosTechies?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/LosTechies?a=BNfhhMjdorY:UJLvyF_u2B4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/LosTechies?i=BNfhhMjdorY:UJLvyF_u2B4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/LosTechies?a=BNfhhMjdorY:UJLvyF_u2B4:7Q72WNTAKBA"><img src="http://feeds.feedburner.com/~ff/LosTechies?d=7Q72WNTAKBA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/LosTechies?a=BNfhhMjdorY:UJLvyF_u2B4:D7DqB2pKExk"><img src="http://feeds.feedburner.com/~ff/LosTechies?i=BNfhhMjdorY:UJLvyF_u2B4:D7DqB2pKExk" border="0"></img></a>
</div>
<p><img src="http://feeds.feedburner.com/~r/LosTechies/~4/BNfhhMjdorY" height="1" width="1"/><br />
<a rel="nofollow" href="http://feedproxy.google.com/~r/LosTechies/~3/BNfhhMjdorY/">Los Techies</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.sogroup.com/asynchronously-load-html-templates-for-backbone-views/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

