<?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>dev&#124;sushi &#187; javascript</title>
	<atom:link href="http://devsushi.com/tag/javascript/feed/" rel="self" type="application/rss+xml" />
	<link>http://devsushi.com</link>
	<description>Discussion on Development in Several Different Flavours</description>
	<lastBuildDate>Fri, 16 Apr 2010 01:06:35 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Object-Oriented JavaScript</title>
		<link>http://devsushi.com/2006/09/21/object-oriented-javascript/</link>
		<comments>http://devsushi.com/2006/09/21/object-oriented-javascript/#comments</comments>
		<pubDate>Thu, 21 Sep 2006 23:02:14 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2006/09/21/object-oriented-javascript/</guid>
		<description><![CDATA[Today, for the first time, I used JavaScript in an object oriented way. I must say that I am impressed. The job called for a few parameters and some methods that all operated on the contents of a single div element, so an object to contain it all just made sense. There are many great [...]]]></description>
			<content:encoded><![CDATA[<p>Today, for the first time, I used JavaScript in an object oriented way. I must say that I am impressed. The job called for a few parameters and some methods that all operated on the contents of a single <em>div</em> element, so an object to contain it all just made sense.<span id="more-13"></span></p>
<p>There are many great tutorials out there for getting started with JavaScript OOP. I&#8217;ve linked some of the ones that I used below. One thing to note is that JavaScript was not designed as an OO language so the syntax, you will notice, is very dirty looking. If you are used to C++ or Java you will just have to grin and bear it. JavaScript does, however, support all of the important OO concepts such as Encapsulation, Inheritance and Polymorphism.</p>
<p>In my code I made use of a concept called Singletons. Singletons are objects that are only created once since they are elements which shouldn&#8217;t be created multiple times. As an example think of a system scheduler, having multiple schedulers would just cause conflicts so you only want your one scheduler object created ever.</p>
<p>I&#8217;m starting to enjoy programming in JavaScript. It has made it possible to create some very simple but powerful user interfaces which otherwise would require a large number of page postbacks (server interaction).</p>
<ul>
<li class="head">Useful JavaScript OOP Links</li>
<li><a href="http://www.sitepoint.com/article/oriented-programming-1">JavaScript Object-Oriented Programming Part 1</a></li>
<li><a href="http://www.sitepoint.com/article/oriented-programming-2">JavaScript Object-Oriented Programming Part 2</a></li>
<li><a href="http://www.digital-web.com/articles/objectifying_javascript/">Objectifying JavaScript</a></li>
<li><a href="http://www.snook.ca/archives/javascript/singletons_with_functions/">Singletons with functions</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2006/09/21/object-oriented-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Disabling JavaScript</title>
		<link>http://devsushi.com/2006/09/11/disabling-javascript/</link>
		<comments>http://devsushi.com/2006/09/11/disabling-javascript/#comments</comments>
		<pubDate>Mon, 11 Sep 2006 15:16:16 +0000</pubDate>
		<dc:creator>Adam</dc:creator>
				<category><![CDATA[miscellaneous]]></category>
		<category><![CDATA[asp.net]]></category>
		<category><![CDATA[javascript]]></category>

		<guid isPermaLink="false">http://adamhewgill.com/devsushi/2006/09/11/disabling-javascript/</guid>
		<description><![CDATA[There seems to be a small but significant backlash to the proliferation of JavaScript. These days with buzzwords like Web 2.0 and AJAX becoming unavoidable, (see there they are again) some users seem to be getting sick of it and have started to “fight” back. Many people have started using the Firefox NoScript plug-in and [...]]]></description>
			<content:encoded><![CDATA[<p>There seems to be a small but significant backlash to the proliferation of JavaScript. These days with buzzwords like Web 2.0 and AJAX becoming unavoidable, (see there they are again) some users seem to be getting sick of it and have started to “fight” back. Many people have started using the Firefox <a href="https://addons.mozilla.org/firefox/722/">NoScript</a> plug-in and others have just simply disabled JavaScript in their browsers.  “Take that Web 2.0!” they shout.<span id="more-11"></span></p>
<h3>NoScript Plug-in download stats</h3>
<p>Last Updated: Sep 10, 2006<br />
Total Downloads: 9622925  —  Downloads this Week: 62473</p>
<p>I have no stats on the number of users with and without JavaScript disabled but if the numbers from the NoScript plug-in page are any indication we should really start taking this seriously. The first step is to make sure our pages work properly without JavaScript enabled. Here are instructions for each of the currently popular browsers. Google also has a nice list <a href="https://www.google.com/support/adsense/bin/answer.py?answer=12654">here</a>.</p>
<h3>Firefox</h3>
<p>I generally assume that anybody who creates web pages uses Firefox as their default browser and has the <a href="https://addons.mozilla.org/firefox/60/">Web Developer</a> toolbar installed, it provided a quick and easy JavaScript toggle under the “disable” section. If you don’t have the toolbar simply open the “Options” dialog from the Tools menu, click “Content” then deselect “Enable JavaScript”.</p>
<h3>Opera</h3>
<p>In Opera it is by far the easiest, you can use the “Quick preferences” menu by pressing F12 and deselecting “Enable JavaScript”.</p>
<h3>Safari</h3>
<p>In Safari open the “Preference” dialog from the “Safari” menu, select “Security” and deselect the “Enable JavaScript” check box.</p>
<h3>Internet Explorer</h3>
<p>In Internet Explorer it is not quite as easy, however I’m sure there is a plug-in out there somewhere if you care to look (I don’t).  Open the “Internet Options” dialog from the Tools menu and click the “Security” tab, make sure “Internet” is selected in the zone box then click the “Custom Level…” button. In the “Security Settings” dialog scroll the list nearly to the bottom and find the “Scripting” section, change the “Active scripting” setting to “Disable”.</p>
<p>Now that we have seen the horrible failure of our application without JavaScript what do we do? The answer, as usual, is “It depends”. Does your application require JavaScript in such a way that it can’t function without it? Is your JavaScript just effects and niceties? Figuring this out will guide you to a solution. You can use the &lt;NOSCRIPT&gt; HTML tag to let users know that they must have JavaScript enabled to use your site or you can just make it degrade gracefully to a non-JavaScript site.</p>
<p>ASP.Net is a whole issue all on its own. It utilizes JavaScript quite a bit for different controls and validation logic. One possibility is to use the ClientTarget=&#8221;downlevel&#8221; property of the &lt;%@ Page %&gt; tag. This does quite a few things but most importantly pushes the validation logic to the server. You will notice that all the different button types still use JavaScript to execute the post-back but in the case of the normal button it works anyway since it is an input element of type=”submit”.  I will be looking further into ASP.Net without JavaScript in the coming months so expect more on this topic.</p>
<p>Focusing on accessibility of your web applications just makes good sense. It leads to better more standard compliant pages which is a definite plus but also makes your pages available to a greater readership.  Target was just <a href="http://dailycal.org/sharticle.php?id=21297">sued</a> in the US over an inaccessible website so why not spend that extra little bit of time to save yourself issues in the future.</p>
]]></content:encoded>
			<wfw:commentRss>http://devsushi.com/2006/09/11/disabling-javascript/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

