<?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>web apps &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/web-apps/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>Profiling JavaScript with Firebug. console.profile() &#038; console.time()!</title>
		<link>/2010/02/02/profiling-javascript-with-firebug-console-profile-console-time/</link>
		<comments>/2010/02/02/profiling-javascript-with-firebug-console-profile-console-time/#respond</comments>
		<pubDate>Tue, 02 Feb 2010 06:19:50 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[brilliant software]]></category>
		<category><![CDATA[Computer programming]]></category>
		<category><![CDATA[Computer science]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[JavaScript programmer]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[web apps]]></category>
		<category><![CDATA[web developers]]></category>

		<guid isPermaLink="false">/?p=999</guid>
		<description><![CDATA[Firebug and the console object Although my impression is that most of the web developers use Firefox and most of them are using Firebug, I’m not sure that they use the full potential of this brilliant software. Firebug&#8217;s console view Firebug is a very powerful tool helping those like me doing his job. But what’s &#8230; <a href="/2010/02/02/profiling-javascript-with-firebug-console-profile-console-time/" class="more-link">Continue reading <span class="screen-reader-text">Profiling JavaScript with Firebug. console.profile() &#038; console.time()!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/02/03/firebugs-console-profile-vs-console-time/" rel="bookmark" title="Firebug&#8217;s console.profile vs console.time">Firebug&#8217;s console.profile vs console.time </a></li>
<li><a href="/2010/02/02/firebugs-console-time-accuracy/" rel="bookmark" title="Firebug&#8217;s console.time() accuracy">Firebug&#8217;s console.time() accuracy </a></li>
<li><a href="/2010/02/12/how-to-detect-a-variable-existence-in-javascript/" rel="bookmark" title="How to detect a variable existence in JavaScript?">How to detect a variable existence in JavaScript? </a></li>
<li><a href="/2012/01/24/javascript-performance-for-vs-while/" rel="bookmark" title="JavaScript Performance: for vs. while">JavaScript Performance: for vs. while </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>Firebug and the console object</h2>
<p>Although my impression is that most of the web developers use Firefox and most of them are using Firebug, I’m not sure that they use the full potential of this brilliant software.</p>
<p><a href="/wp-content/uploads/2010/01/logging.gif"><img class="aligncenter size-full wp-image-1001" title="logging" src="/wp-content/uploads/2010/01/logging.gif" alt="" width="430" height="195" srcset="/wp-content/uploads/2010/01/logging.gif 430w, /wp-content/uploads/2010/01/logging-300x136.gif 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<p><em>Firebug&#8217;s console view</em></p>
<p>Firebug is a very powerful tool helping those like me doing his job. But what’s behind the mostly used Firebug’s tools and what’s in the API.</p>
<h2>console.log()</h2>
<p>For a typical JavaScript programmer the console.log() function is one of his best friends. It can dump useful information in the console tab of the Firebug making everything quite clear. But have you ever asked yourself how to improve your code, how to measure its performance against some constructions.</p>
<h2>Performance of JavaScript</h2>
<p>I’m sure many of us have read enough articles out in the web about JS performance. Nowadays when the web apps become bigger and bigger, this topic is rising from the bottom of the interesting topics pool. Now everybody’s concerned about it’s app performance and speed.</p>
<p>You’ve probably heart about some basic advices. What to use, what not to use. In a short example I’ll mention only that everybody knows that .appendChild is far slower than the innerHTML. But why is that? How can be sure it’s true.</p>
<p>As I wrote recently you should instantiate your new arrays in javascript with the following construction:</p>
<blockquote>
<pre>var a = [];</pre>
</blockquote>
<p>instead of:</p>
<blockquote>
<pre>var a = new Array();</pre>
</blockquote>
<p>but as I’ll write here that’s not always true.</p>
<h2>console.profile()</h2>
<p>One of the useful methods of the Firebug’s console object is the profile() method. It gives you the power to measure timing and performance of any JS function. As described in the Firebug’s web page:</p>
<p><em>The high-fi approach is to use the JavaScript profiler. Just call console.profile() before the code you want to measure, and then console.profileEnd() afterwards. Firebug will log a detailed report about how much time was spent in every function call in between.</em></p>
<p>With the simple construction like:</p>
<blockquote>
<pre>&lt;html&gt;
&lt;body&gt;
&lt;script&gt;
    myFunc = function() {
        var a = [];
    }				

   console.profile();
   myFunc();
   console.profileEnd();
&lt;/script&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
</blockquote>
<p><a href="/wp-content/uploads/2010/01/firebug-profile.png"><img class="aligncenter size-full wp-image-1000" title="firebug-profile" src="/wp-content/uploads/2010/01/firebug-profile.png" alt="" width="430" height="152" srcset="/wp-content/uploads/2010/01/firebug-profile.png 430w, /wp-content/uploads/2010/01/firebug-profile-300x106.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<p><em>Firebug&#8217;s profile output</em></p>
<p>The simple problem is that thus you cannot just measure some code that’s not a function. This will result in empty profile output in the console&#8217;s view:</p>
<p><a href="/wp-content/uploads/2010/01/no-activity.png"><img class="alignleft size-full wp-image-1002" title="no-activity" src="/wp-content/uploads/2010/01/no-activity.png" alt="" width="231" height="60" /></a></p>
<p>But hopefully there comes the other method of the console object.</p>
<h2>console.time()</h2>
<p>It gives anything you’d like to know even if it’s not closed into a function.</p>
<p><em><strong>Note</strong>: remember that both profile and time methods goes with their related profileEnd and timeEnd methods. You’re supposed to enclose the chunk of code you measure with that to be sure that the Firebug’s console will stop the profilers on time. </em></p>
<p><em><span style="font-style: normal;">Now you can simply ask the profiler: what is faster?</span></em></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/02/03/firebugs-console-profile-vs-console-time/" rel="bookmark" title="Firebug&#8217;s console.profile vs console.time">Firebug&#8217;s console.profile vs console.time </a></li>
<li><a href="/2010/02/02/firebugs-console-time-accuracy/" rel="bookmark" title="Firebug&#8217;s console.time() accuracy">Firebug&#8217;s console.time() accuracy </a></li>
<li><a href="/2010/02/12/how-to-detect-a-variable-existence-in-javascript/" rel="bookmark" title="How to detect a variable existence in JavaScript?">How to detect a variable existence in JavaScript? </a></li>
<li><a href="/2012/01/24/javascript-performance-for-vs-while/" rel="bookmark" title="JavaScript Performance: for vs. while">JavaScript Performance: for vs. while </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/02/02/profiling-javascript-with-firebug-console-profile-console-time/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Speed up the JavaScript. It can change dramatically the user experience.</title>
		<link>/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/</link>
		<comments>/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/#respond</comments>
		<pubDate>Sun, 31 Jan 2010 07:06:52 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Computer science]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[http]]></category>
		<category><![CDATA[JavaScript library]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[Minification]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[The Times Global Broadcasting Co Ltd]]></category>
		<category><![CDATA[Twitter Inc]]></category>
		<category><![CDATA[Web application]]></category>
		<category><![CDATA[web apps]]></category>
		<category><![CDATA[web developer]]></category>
		<category><![CDATA[Yahoo! Inc.]]></category>
		<category><![CDATA[YouTube Inc]]></category>

		<guid isPermaLink="false">/?p=874</guid>
		<description><![CDATA[JavaScript in a modern web application If someone asks you what is the javascript in modern web developer, probably you should answer it’s almost the half of the traffic of your site and it’s almost everything when dealing with user experience. Today’s big web apps are useless without it AJAX/JS part. Think about Facebook, Google &#8230; <a href="/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/" class="more-link">Continue reading <span class="screen-reader-text">Speed up the JavaScript. It can change dramatically the user experience.</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/02/11/javascript-optimization-lazy-loading/" rel="bookmark" title="JavaScript optimization. Lazy loading.">JavaScript optimization. Lazy loading. </a></li>
<li><a href="/2010/03/12/javascript-libraries-popularity/" rel="bookmark" title="Javascript Libraries Popularity">Javascript Libraries Popularity </a></li>
<li><a href="/2010/06/29/html5-geolocation-what-if-the-user-doesnt-share-his-position/" rel="bookmark" title="HTML5 geolocation &#8211; What If the User Doesn&#8217;t Share His Position?">HTML5 geolocation &#8211; What If the User Doesn&#8217;t Share His Position? </a></li>
<li><a href="/2010/01/14/optimizing-openlayers-make-it-smaller-and-faster/" rel="bookmark" title="Optimizing OpenLayers. Make it smaller and faster!">Optimizing OpenLayers. Make it smaller and faster! </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>JavaScript in a modern web application</h2>
<p>If someone asks you what is the javascript in modern web developer, probably you should answer it’s almost the half of the traffic of your site and it’s almost everything when dealing with user experience.</p>
<p>Today’s big web apps are useless without it AJAX/JS part. Think about <a title="facebook" href="http://facebook.com/" target="_blank">Facebook</a>, <a title="google products" href="http://google.com/" target="_blank">Google products</a>, <a title="twitter" href="http://twitter.com/" target="_blank">Twitter</a>, <a title="yahoo" href="http://yahoo.com/" target="_blank">Yahoo!</a>, <a title="youtube" href="http://youtube.com/" target="_blank">Youtube</a>.</p>
<p>Actually they made this a standart. The times when you used to use JavaScript as a helper language just to figure out how a drop down menu will work are far way in the past. Now JavaScript is everything in a rich web sites. With no JS they will be no rich at all! Then it comes the question how to improve sites with lots of javascript. Actually one of the main problems in the web now is that JavaScript is blocking content.</p>
<h2>Blocked by the JavaScript</h2>
<p>What that means at all is that until the browser receives and parses the JavaScript file/s it doesn’t process anything else, it even doesn’t load any other resources. Now you can imagine how big the problem is. When it comes to large files more than 100K the user experience will be very bad!</p>
<h2>Optimize the web? What about optimizing JavaScript!</h2>
<p>If the problem is so big as I described above why should we doubt about where to start with the optimization process? But of course with the JavaScript and the natural question that rises is how this can be optimized at all?</p>
<h2>Three steps</h2>
<p>Like me, many of you may heart of some techniques that improve javascript performance. Here are some I was able to select as important:</p>
<h3>1. minify/compress</h3>
<blockquote><p>That’s rule number one. If everything that is a JavaScript file is processed once it arrives to the client than make it smaller and make it go faster trough the wire. Actually one technique to speed up things more is to concatenated all the files you have into one single big file. Although this will not spend you some space will reduce the HTTP requests and therefore speed up the loading process.  Good tools that you can use to minify javascript files are the Yahoo’s YUI Compressor, that beside that compresses CSS and Google Closure Compiler. Both are extremely useful and by the last measurements the Google’s Compiler is even better, but it’s up to you to decide which one to pick up.</p></blockquote>
<h3>2 .write fast and smart code</h3>
<blockquote><p>You can minify everything that’s JavaScript and the code may remain slow. But why is that? That’s because the JavaScript is written in a bad way. You know there are many resources in the web describing what is a bad and what is a good practice when writing JS. Even more you can measure it by yourself if you’d like to use the Firebug’s profiler. That’s a good start to avoid bad practices.</p></blockquote>
<h3>3. improve loading &#8211; lazy loading</h3>
<blockquote><p>That’s a bit more complicated. If there’s a really big javascript file after compressing and concatenating all the JS functionality remains big. How to avoid that? Simply let’s the user to see the most important functionality and than load the entire app. Some good tutorials about lazy loading again can be found online. Don’t hesitate to search about.</p></blockquote>
<p>Beside this really basic advices I’ll continue to write in my blog about specific techniques how to improve the JavaScript as this is one of the most interesting parts of web development by me.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/02/11/javascript-optimization-lazy-loading/" rel="bookmark" title="JavaScript optimization. Lazy loading.">JavaScript optimization. Lazy loading. </a></li>
<li><a href="/2010/03/12/javascript-libraries-popularity/" rel="bookmark" title="Javascript Libraries Popularity">Javascript Libraries Popularity </a></li>
<li><a href="/2010/06/29/html5-geolocation-what-if-the-user-doesnt-share-his-position/" rel="bookmark" title="HTML5 geolocation &#8211; What If the User Doesn&#8217;t Share His Position?">HTML5 geolocation &#8211; What If the User Doesn&#8217;t Share His Position? </a></li>
<li><a href="/2010/01/14/optimizing-openlayers-make-it-smaller-and-faster/" rel="bookmark" title="Optimizing OpenLayers. Make it smaller and faster!">Optimizing OpenLayers. Make it smaller and faster! </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/31/speed-up-the-javascript-it-can-change-dramatically-the-user-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cool tutorial about Zend_Paginator</title>
		<link>/2010/01/29/cool-tutorial-about-zend_paginator/</link>
		<comments>/2010/01/29/cool-tutorial-about-zend_paginator/#respond</comments>
		<pubDate>Fri, 29 Jan 2010 13:20:01 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[zend framework]]></category>
		<category><![CDATA[Computer programming]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Integrated development environments]]></category>
		<category><![CDATA[Joey Rivera]]></category>
		<category><![CDATA[PHP programming language]]></category>
		<category><![CDATA[Software architecture]]></category>
		<category><![CDATA[Software engineering]]></category>
		<category><![CDATA[Software framework]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[tutorial]]></category>
		<category><![CDATA[Twitter Inc]]></category>
		<category><![CDATA[Web 2.0]]></category>
		<category><![CDATA[Web application frameworks]]></category>
		<category><![CDATA[web apps]]></category>
		<category><![CDATA[web development tasks]]></category>
		<category><![CDATA[web project]]></category>
		<category><![CDATA[wonderful tool]]></category>
		<category><![CDATA[zend]]></category>

		<guid isPermaLink="false">/?p=1017</guid>
		<description><![CDATA[Every part of Zend Framework is indeed very profesional and useful. But as it happens often some modules are less used than others. Don’t know why but my feeling is that Zend_Paginator, a wonderful tool for pagination is really misunderstood. And in fact it does one of the most common web development tasks. It builds &#8230; <a href="/2010/01/29/cool-tutorial-about-zend_paginator/" class="more-link">Continue reading <span class="screen-reader-text">Cool tutorial about Zend_Paginator</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/01/25/using-zend-framework-validators-zend_validate_db_recordexists/" rel="bookmark" title="Using Zend Framework validators &#8211; Zend_Validate_Db_RecordExists">Using Zend Framework validators &#8211; Zend_Validate_Db_RecordExists </a></li>
<li><a href="/2010/07/06/zend-framework-simple-acl-front-controller-plugin/" rel="bookmark" title="Zend Framework: Simple Acl Front Controller Plugin">Zend Framework: Simple Acl Front Controller Plugin </a></li>
<li><a href="/2010/08/06/setting-up-zend-framework-with-modules/" rel="bookmark" title="Setting Up Zend Framework with Modules">Setting Up Zend Framework with Modules </a></li>
<li><a href="/2010/07/14/media-rss-and-zf-part-2/" rel="bookmark" title="Media RSS and ZF &#8211; Part 2">Media RSS and ZF &#8211; Part 2 </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<p>Every part of <a title="zend framework" href="http://framework.zend.com/" target="_blank">Zend Framework</a> is indeed very profesional and useful. But as it happens often some modules are less used than others. Don’t know why but my feeling is that <a title="Zend_Paginator" href="http://framework.zend.com/manual/en/zend.paginator.html" target="_blank">Zend_Paginator</a>, a wonderful tool for pagination is really misunderstood. And in fact it does one of the most common web development tasks. It builds the abstraction for a component that everybody uses in a web project &#8211; pagination.</p>
<p>It make sense if there where more tutorials like the following one describing its usage! Many thanks to <a title="http://www.joeyrivera.com/" href="http://www.joeyrivera.com/" target="_blank">Joey Rivera</a> for a great <a title="Zend_Paginator tutorial" href="http://www.joeyrivera.com/2010/using-zend_paginator-with-twitter-api-and-zend_cache/" target="_blank">tutorial</a> about Zend_Paginator.</p>
<p>Even more this tutorials goes behind the pure usage of the paginator but it helps you understand the integration with one of the most used web apps today &#8211; <a title="twitter" href="http://twitter.com/" target="_blank">Twitter</a> and another Zend Framework component &#8211; <a title="Zend_Cache" href="http://framework.zend.com/manual/en/zend.cache.html" target="_blank">Zend_Cache</a>.</p>
<p><a href="/wp-content/uploads/2010/01/joeyrivera.png"><img class="aligncenter size-full wp-image-1019" title="joeyrivera" src="/wp-content/uploads/2010/01/joeyrivera.png" alt="joey rivera blog" width="430" height="185" srcset="/wp-content/uploads/2010/01/joeyrivera.png 430w, /wp-content/uploads/2010/01/joeyrivera-300x129.png 300w" sizes="(max-width: 430px) 100vw, 430px" /></a></p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/01/25/using-zend-framework-validators-zend_validate_db_recordexists/" rel="bookmark" title="Using Zend Framework validators &#8211; Zend_Validate_Db_RecordExists">Using Zend Framework validators &#8211; Zend_Validate_Db_RecordExists </a></li>
<li><a href="/2010/07/06/zend-framework-simple-acl-front-controller-plugin/" rel="bookmark" title="Zend Framework: Simple Acl Front Controller Plugin">Zend Framework: Simple Acl Front Controller Plugin </a></li>
<li><a href="/2010/08/06/setting-up-zend-framework-with-modules/" rel="bookmark" title="Setting Up Zend Framework with Modules">Setting Up Zend Framework with Modules </a></li>
<li><a href="/2010/07/14/media-rss-and-zf-part-2/" rel="bookmark" title="Media RSS and ZF &#8211; Part 2">Media RSS and ZF &#8211; Part 2 </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/29/cool-tutorial-about-zend_paginator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
