<?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>Java &#8211; stoimen&#039;s web log</title>
	<atom:link href="/tag/java/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>Quick Look at JavaScript Objects</title>
		<link>/2010/08/11/quick-look-at-javascript-objects/</link>
		<comments>/2010/08/11/quick-look-at-javascript-objects/#respond</comments>
		<pubDate>Wed, 11 Aug 2010 17:38:55 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[javascript]]></category>
		<category><![CDATA[micro tutorial]]></category>
		<category><![CDATA[C++ classes]]></category>
		<category><![CDATA[Class]]></category>
		<category><![CDATA[Computer programming]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Function]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[JavaScript syntax]]></category>
		<category><![CDATA[JSON]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Set-builder notation]]></category>
		<category><![CDATA[Software engineering]]></category>

		<guid isPermaLink="false">/?p=1900</guid>
		<description><![CDATA[JavaScript Objects As you may know there are different notations of objects in JavaScript, and there are slight differences. However here I&#8217;m gonna achieve the same thing with different notations. The first one is the object notation in JavaScript known mostly from JSON. There you&#8217;ve to construct a key/value pairs, divided by a colon: var &#8230; <a href="/2010/08/11/quick-look-at-javascript-objects/" class="more-link">Continue reading <span class="screen-reader-text">Quick Look at JavaScript Objects</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2011/05/30/object-oriented-javascript-inheritance/" rel="bookmark" title="Object Oriented JavaScript: Inheritance">Object Oriented JavaScript: Inheritance </a></li>
<li><a href="/2011/07/28/oop-javascript-accessing-public-methods-in-private-methods/" rel="bookmark" title="OOP JavaScript: Accessing Public Methods in Private Methods">OOP JavaScript: Accessing Public Methods in Private Methods </a></li>
<li><a href="/2010/05/24/javascript-objects-coding-style/" rel="bookmark" title="JavaScript Objects Coding Style">JavaScript Objects Coding Style </a></li>
<li><a href="/2009/07/08/javascript-closures-in-brief/" rel="bookmark" title="JavaScript closures in brief">JavaScript closures in brief </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>JavaScript Objects</h2>
<p>As you may know there are different notations of objects in JavaScript, and there are slight differences. However here I&#8217;m gonna achieve the same thing with different notations. The first one is the object notation in JavaScript known mostly from JSON. There you&#8217;ve to construct a key/value pairs, divided by a colon:</p>
<pre lang="javascript">
var class1 = {
    a : 0,
    func1 : function() {
        console.log(class1.a);
    },
    func2 : function(a) {
        this.a = a;
    }
}
class1.func2(3);
</pre>
<p>Here we have two functions &#8211; func1 and func2 and one member variable. Func2 is setting up the member variable, it&#8217;s something like a setter in some languages like Java and PHP, and the func1 is printing the value of that variable via console.log(). Note that in the body of func1() the variable &#8220;a&#8221; is accessed with the class name: class1.a. Here the notation can be changed to this.a, which will result in the same thing.</p>
<pre lang="javascript">
...
console.log(this.a);
...
</pre>
<h2>Notation #2</h2>
<p>While in the notation I&#8217;ve just used is not possible to have two different instances from the same class, in the next example this is possible. In JavaScript the objects are even the functions, and you can access the function&#8217;s private variables with the dot notation.</p>
<pre lang="javascript">
var class2 = function() {
    this.a = 0;
    this.func1 = function() {
        console.log(this.a);
    }

    this.func2 = function(a) {
        this.a = a;
    }
}
</pre>
<p>To use this object you&#8217;ve to use the &#8220;new&#8221; operator.</p>
<pre lang="javascript">
var c = new class2();
c.func2(4);
</pre>
<p>This helps you create more than one instance of the same class.</p>
<pre lang="javascript">
var c = new class2();
var d = new class2();
c.func2(3);
d.func2(4);
</pre>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2011/05/30/object-oriented-javascript-inheritance/" rel="bookmark" title="Object Oriented JavaScript: Inheritance">Object Oriented JavaScript: Inheritance </a></li>
<li><a href="/2011/07/28/oop-javascript-accessing-public-methods-in-private-methods/" rel="bookmark" title="OOP JavaScript: Accessing Public Methods in Private Methods">OOP JavaScript: Accessing Public Methods in Private Methods </a></li>
<li><a href="/2010/05/24/javascript-objects-coding-style/" rel="bookmark" title="JavaScript Objects Coding Style">JavaScript Objects Coding Style </a></li>
<li><a href="/2009/07/08/javascript-closures-in-brief/" rel="bookmark" title="JavaScript closures in brief">JavaScript closures in brief </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/08/11/quick-look-at-javascript-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Closure Compiler doesn&#8217;t work?!</title>
		<link>/2010/01/20/google-closure-compiler-doesnt-work/</link>
		<comments>/2010/01/20/google-closure-compiler-doesnt-work/#respond</comments>
		<pubDate>Wed, 20 Jan 2010 09:06:29 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[C]]></category>
		<category><![CDATA[Comparison of Java and C Sharp]]></category>
		<category><![CDATA[Computing]]></category>
		<category><![CDATA[Computing platforms]]></category>
		<category><![CDATA[Cross-platform software]]></category>
		<category><![CDATA[Curly bracket programming languages]]></category>
		<category><![CDATA[Environment]]></category>
		<category><![CDATA[Exception handling]]></category>
		<category><![CDATA[Google Inc.]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Java platform]]></category>
		<category><![CDATA[Java programming language]]></category>
		<category><![CDATA[Technology/Internet]]></category>
		<category><![CDATA[USD]]></category>

		<guid isPermaLink="false">/?p=911</guid>
		<description><![CDATA[What are these strange java errors? No, it works but maybe the problem is you current Java version. The Google Closure Compiler requires 1.6 and most commonly you&#8217;re runing on 1.5 therefore it produces errors. It was my problem when I tried to run the application. At that moment it produced these lines of errors: &#8230; <a href="/2010/01/20/google-closure-compiler-doesnt-work/" class="more-link">Continue reading <span class="screen-reader-text">Google Closure Compiler doesn&#8217;t work?!</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/01/18/google-closure-compiler/" rel="bookmark" title="Google Closure Compiler?">Google Closure Compiler? </a></li>
<li><a href="/2011/01/21/google-analytics-for-nokia-and-mobiles/" rel="bookmark" title="Google Analytics for Nokia &#8230; and Mobiles">Google Analytics for Nokia &#8230; and Mobiles </a></li>
<li><a href="/2010/04/13/secure-localstorage-now-thats-a-good-question/" rel="bookmark" title="Secure localStorage? Now that&#8217;s a good question!">Secure localStorage? Now that&#8217;s a good question! </a></li>
<li><a href="/2011/01/18/download-images-with-php/" rel="bookmark" title="Download Images with PHP">Download Images with PHP </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>What are these strange java errors?</h2>
<p>No, it works but maybe the problem is you current Java version. The Google Closure Compiler requires 1.6 and most commonly you&#8217;re runing on 1.5 therefore it produces errors. It was my problem when I tried to run the application. At that moment it produced these lines of errors:</p>
<blockquote>
<pre>java -jar compiler.jar --help</pre>
</blockquote>
<blockquote><p>Exception in thread &#8220;main&#8221; java.lang.UnsupportedClassVersionError: Bad version number in .class file<br />
at java.lang.ClassLoader.defineClass1(Native Method)<br />
at java.lang.ClassLoader.defineClass(ClassLoader.java:676)<br />
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)<br />
at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)<br />
at java.net.URLClassLoader.access$100(URLClassLoader.java:56)<br />
at java.net.URLClassLoader$1.run(URLClassLoader.java:195)<br />
at java.security.AccessController.doPrivileged(Native Method)<br />
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)<br />
at java.lang.ClassLoader.loadClass(ClassLoader.java:317)<br />
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:280)<br />
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)<br />
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:375)</p></blockquote>
<p>Just update or switch your current Java version to 1.6 and everything will be fine!</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/01/18/google-closure-compiler/" rel="bookmark" title="Google Closure Compiler?">Google Closure Compiler? </a></li>
<li><a href="/2011/01/21/google-analytics-for-nokia-and-mobiles/" rel="bookmark" title="Google Analytics for Nokia &#8230; and Mobiles">Google Analytics for Nokia &#8230; and Mobiles </a></li>
<li><a href="/2010/04/13/secure-localstorage-now-thats-a-good-question/" rel="bookmark" title="Secure localStorage? Now that&#8217;s a good question!">Secure localStorage? Now that&#8217;s a good question! </a></li>
<li><a href="/2011/01/18/download-images-with-php/" rel="bookmark" title="Download Images with PHP">Download Images with PHP </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/20/google-closure-compiler-doesnt-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What should I optimize first in my web page?</title>
		<link>/2010/01/18/what-should-i-optimize-first-in-my-web-page/</link>
		<comments>/2010/01/18/what-should-i-optimize-first-in-my-web-page/#comments</comments>
		<pubDate>Mon, 18 Jan 2010 19:43:23 +0000</pubDate>
		<dc:creator><![CDATA[Stoimen]]></dc:creator>
				<category><![CDATA[web development]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[JavaScript programming language]]></category>
		<category><![CDATA[Minification]]></category>
		<category><![CDATA[Program optimization]]></category>
		<category><![CDATA[safari]]></category>

		<guid isPermaLink="false">/?p=870</guid>
		<description><![CDATA[I start with the optimization process &#8230; It’s a common question! Where do I begin with the optimization process. Should I start with JavaScript or with some simple Apache optimizations? The answer is pretty simple and it’s related to a very, very simple technique. Look what Firebug is saying Yeah, look at the Firebug. You &#8230; <a href="/2010/01/18/what-should-i-optimize-first-in-my-web-page/" class="more-link">Continue reading <span class="screen-reader-text">What should I optimize first in my web page?</span> <span class="meta-nav">&#8594;</span></a><div class='yarpp-related-rss'>

Related posts:<ol>
<li><a href="/2010/01/11/what-should-be-optimized-in-one-web-page/" rel="bookmark" title="What should be optimized in one web page?">What should be optimized in one web page? </a></li>
<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/02/11/javascript-optimization-lazy-loading/" rel="bookmark" title="JavaScript optimization. Lazy loading.">JavaScript optimization. Lazy loading. </a></li>
<li><a href="/2009/06/10/google-adsense-blocks-the-page-load/" rel="bookmark" title="Google Adsense blocks the page load">Google Adsense blocks the page load </a></li>
</ol>
</div>
]]></description>
				<content:encoded><![CDATA[<h2>I start with the optimization process &#8230;</h2>
<p>It’s a common question! Where do I begin with the optimization process. Should I start with JavaScript or with some simple Apache optimizations? The answer is pretty simple and it’s related to a very, very simple technique.</p>
<h2>Look what Firebug is saying</h2>
<p>Yeah, look at the Firebug. You can check what’s taking most of the time to load. If it’s some server site script you can try caching it, if it’s a JavaScript file load, than you can try minify/compile it. Another good tool is the Safari developer tool. Than you can graphically understand what part of the sites’ components are slowing down the loading process. Whether the images or the JavaScript, well check that out with the Safari browser.</p>
<h2>Finally what I do?</h2>
<p>Once you know what’s the thing slowing down the site, start with its optimization! It’s really simple.</p>
<div class='yarpp-related-rss'>
<p>Related posts:<ol>
<li><a href="/2010/01/11/what-should-be-optimized-in-one-web-page/" rel="bookmark" title="What should be optimized in one web page?">What should be optimized in one web page? </a></li>
<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/02/11/javascript-optimization-lazy-loading/" rel="bookmark" title="JavaScript optimization. Lazy loading.">JavaScript optimization. Lazy loading. </a></li>
<li><a href="/2009/06/10/google-adsense-blocks-the-page-load/" rel="bookmark" title="Google Adsense blocks the page load">Google Adsense blocks the page load </a></li>
</ol></p>
</div>
]]></content:encoded>
			<wfw:commentRss>/2010/01/18/what-should-i-optimize-first-in-my-web-page/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
