<?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>Unobtrusive JavaScript &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/unobtrusive-javascript/feed/" rel="self" type="application/rss+xml" />
	<link></link>
	<description>on web development</description>
	<lastBuildDate>Tue, 13 Feb 2018 08:18:15 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.0.3</generator>
	<item>
		<title>JavaScript optimization. Lazy loading.</title>
		<link>/2010/02/11/javascript-optimization-lazy-loading/</link>
		<comments>/2010/02/11/javascript-optimization-lazy-loading/#respond</comments>
		<pubDate>Thu, 11 Feb 2010 05:49:53 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Computer science]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[Unobtrusive JavaScript]]></category>
		<category><![CDATA[web applications]]></category>
		<category><![CDATA[web browsers]]></category>

		<guid isPermaLink="false">/?p=1054</guid>
		<description><![CDATA[Javascript files are too big! Yes that&#8217;s the reality and when they become more and more bigger the web pages becomes to be irresponsible. The bitter reality is that you load any functionality that slows down the first user impression, but is needed only when you click on a button and so on. That&#8217;s a &#8230; <a href="/2010/02/11/javascript-optimization-lazy-loading/" class="more-link">Continue reading <span class="screen-reader-text">JavaScript optimization. Lazy loading.</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/" rel="bookmark" title="Speed up the JavaScript. It can change dramatically the user experience.">Speed up the JavaScript. It can change dramatically the user experience. </a></li>
<li><a href="/2010/03/14/javascript-snippets-if-statements-optimization/" rel="bookmark" title="JavaScript Snippets: IF Statements Optimization">JavaScript Snippets: IF Statements Optimization </a></li>
<li><a href="/2010/02/07/javascript-optimization-optimizing-if-statements/" rel="bookmark" title="JavaScript optimization. Optimizing IF statements.">JavaScript optimization. Optimizing IF statements. </a></li>
<li><a href="/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/" rel="bookmark" title="javascript: detect browser speed and load the &#8220;slow connection&#8221; site version">javascript: detect browser speed and load the &#8220;slow connection&#8221; site version </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Javascript files are too big!</h2>
<p>Yes that&#8217;s the reality and when they become more and more bigger the web pages becomes to be irresponsible. The bitter reality is that you load any functionality that slows down the first user impression, but is needed only when you click on a button and so on. That&#8217;s a problem because you can load only that chunks you need in the beginning and than after a few seconds to load everything else. Some web applications have more than 100K of javascript which become really bad.</p>
<h2>Separate logic</h2>
<p>What you can do is to separate the logic into one or more files. Even when the user thinks everything is on the page and he can interact with the application and than to start to load the rest of the functionality.</p>
<p>That&#8217;s a pretty good technique. Nobody can start interacting on the 5th second of the load process. Usually the user looks at the interface starts to explore the app and after approximately the 10th second he start interacting with the page.</p>
<h2>Lazy loading</h2>
<p>There are various techniques of loading JavaScript on demand. So I wont cover it, but that pattern of loading it latter when needed is really powerful.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/" rel="bookmark" title="Speed up the JavaScript. It can change dramatically the user experience.">Speed up the JavaScript. It can change dramatically the user experience. </a></li>
<li><a href="/2010/03/14/javascript-snippets-if-statements-optimization/" rel="bookmark" title="JavaScript Snippets: IF Statements Optimization">JavaScript Snippets: IF Statements Optimization </a></li>
<li><a href="/2010/02/07/javascript-optimization-optimizing-if-statements/" rel="bookmark" title="JavaScript optimization. Optimizing IF statements.">JavaScript optimization. Optimizing IF statements. </a></li>
<li><a href="/2009/07/24/javascript-detect-browser-speed-and-load-the-slow-connection-site/" rel="bookmark" title="javascript: detect browser speed and load the &#8220;slow connection&#8221; site version">javascript: detect browser speed and load the &#8220;slow connection&#8221; site version </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/02/11/javascript-optimization-lazy-loading/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Manage JavaScript and CSS includes within Zend Framework application</title>
		<link>/2010/02/10/manage-javascript-and-css-includes-within-zend-framework-application/</link>
		<comments>/2010/02/10/manage-javascript-and-css-includes-within-zend-framework-application/#comments</comments>
		<pubDate>Wed, 10 Feb 2010 07:29:18 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[css]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[zend framework]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Cascading Style Sheets]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Style sheet]]></category>
		<category><![CDATA[Unobtrusive JavaScript]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web design]]></category>
		<category><![CDATA[World Wide Web]]></category>

		<guid isPermaLink="false">/?p=1052</guid>
		<description><![CDATA[How to include JavaScript and CSS files? In Zend Framework there is a very elegant way to include CSS and JavaScript. Because in one single view of any action you cannot include a JavaScript or CSS because they wont be executed from the browser, you can simply use a helper. You can see the original &#8230; <a href="/2010/02/10/manage-javascript-and-css-includes-within-zend-framework-application/" class="more-link">Continue reading <span class="screen-reader-text">Manage JavaScript and CSS includes within Zend Framework application</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/06/24/zend-framework-inject-javascript-code-in-a-actionview/" rel="bookmark" title="Zend Framework: Inject JavaScript Code in a Action/View">Zend Framework: Inject JavaScript Code in a Action/View </a></li>
<li><a href="/2010/02/15/css-selectors-new-look-over-them/" rel="bookmark" title="CSS selectors &#8211; new look over them">CSS selectors &#8211; new look over them </a></li>
<li><a href="/2010/01/18/what-if-your-site-doesnt-use-all-of-the-css-selectors/" rel="bookmark" title="What if your site doesn&#8217;t use all of the CSS selectors?">What if your site doesn&#8217;t use all of the CSS selectors? </a></li>
<li><a href="/2010/01/30/optimizing-css-five-simple-steps/" rel="bookmark" title="Optimizing CSS. Five simple steps!">Optimizing CSS. Five simple steps! </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>How to include JavaScript and CSS files?</h2>
<p>In Zend Framework there is a very elegant way to include CSS and JavaScript. Because in one single view of any action you cannot include a JavaScript or CSS because they wont be executed from the browser, you can simply use a helper.</p>
<p>You can see the original source of how that&#8217;s done <a href="http://devzone.zend.com/article/11760-Managing-CSS-and-JavaScript-files-within-a-Zend-Framework-App" target="_blank">here</a>. And in breve you can include a JS file like so:</p>
<blockquote>
<pre>&lt;? $this-&gt;headScript()-&gt;appendFile('/media/js/global.js') ?&gt;</pre>
</blockquote>
<p>but where the problem is?</p>
<p>As a very good PHP point of view, there is really that way to include JS into the application. But a PHP point of view is not a JavaScript point of view so this solution is not the best one.</p>
<p>As almost everybody knows JavaScript blocks other content until it&#8217;s loaded and executed from the server and nowadays the most popular way to include JS is just before the closing <strong>&lt;body&gt;</strong> tag.</p>
<p>That&#8217;s why the ZF solution is not optimal. What we actually need as both PHP and JavaScript developers is a most robust solution!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/06/24/zend-framework-inject-javascript-code-in-a-actionview/" rel="bookmark" title="Zend Framework: Inject JavaScript Code in a Action/View">Zend Framework: Inject JavaScript Code in a Action/View </a></li>
<li><a href="/2010/02/15/css-selectors-new-look-over-them/" rel="bookmark" title="CSS selectors &#8211; new look over them">CSS selectors &#8211; new look over them </a></li>
<li><a href="/2010/01/18/what-if-your-site-doesnt-use-all-of-the-css-selectors/" rel="bookmark" title="What if your site doesn&#8217;t use all of the CSS selectors?">What if your site doesn&#8217;t use all of the CSS selectors? </a></li>
<li><a href="/2010/01/30/optimizing-css-five-simple-steps/" rel="bookmark" title="Optimizing CSS. Five simple steps!">Optimizing CSS. Five simple steps! </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/02/10/manage-javascript-and-css-includes-within-zend-framework-application/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
