<?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>Jeremyopolis &#187; WebDev</title>
	<atom:link href="http://jrsandberg.com/category/webdev/feed/" rel="self" type="application/rss+xml" />
	<link>http://jrsandberg.com</link>
	<description>An History Of Nerdly Activities</description>
	<lastBuildDate>Thu, 08 Apr 2010 16:32:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Calendar v0.1 &#8211; A Dynamic Javascript Date Picker&#8230;Tutorial</title>
		<link>http://jrsandberg.com/2008/06/calendar-v01-a-dynamic-javascript-date-pickertutorial/</link>
		<comments>http://jrsandberg.com/2008/06/calendar-v01-a-dynamic-javascript-date-pickertutorial/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 04:25:55 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[WebDev]]></category>
		<category><![CDATA[tutorials]]></category>

		<guid isPermaLink="false">http://jrsandberg.com/?p=6</guid>
		<description><![CDATA[This is the first of a few installments of how to create your own dynamic JavaScript calendar/date picker. First of all, I want to define what I mean be dynamic: simply put, the calendar creates itself from scratch so that it doesn&#8217;t matter what date the user wants to pick; they can find it. The [...]]]></description>
			<content:encoded><![CDATA[<p>This is the first of a few installments of how to create your own dynamic JavaScript calendar/date picker.  First of all, I want to define what I mean be dynamic: simply put, the calendar creates itself from scratch so that it doesn&#8217;t matter what date the user wants to pick; they can find it.</p>
<p>The first thing that I always do when creating a JavaScript application is to mock up the html.  I find it much easier to debug if I can actually see what is coming out of the JavaScript.  This is exactly what I will show you now.</p>
<p>My main concern at this point is that my JavaScript calendar will be robust enough to handle any user&#8217;s need.  This means considering how many weeks I needed to display to show all of the days.  At first thought, 5 seems like a good idea, and why not?  Most months consist of four weeks with a few days on either end.  But, alas, there are many cases where five weeks would just not do.  This means that my design includes six weeks with the first day of the month you are looking at, starting at the top week and the other days following.</p>
<p>The next thing I considered was how to display and manipulate this data.  My first idea, and I think best idea, is to just use a simple table.  I know, I know, I made reference to the dreaded html tag and even said that I used it, but the plain and simple task is that I do use it and so should you&#8230;when it makes sense.</p>
<p>With those two things in mind, I set off to compose some really ugly looking html.  Let&#8217;s begin by creating a table that has a border so we can see exactly where our columns and rows are divided.  That will look something like this:</p>
<pre>&lt;table border="1"&gt;</pre>
<p>Pretty simple!  The first thing I want the user to see is the name of the month with an arrow on either side so they can move from month to month.  That would look something like this:</p>
<pre>
&lt;tr&gt;
&lt;td&gt;&lt;&lt;&lt;/td&gt;
&lt;td colspan="5"&gt;May&lt;/td&gt;
&lt;td&gt;&gt;&gt;&lt;/td&gt;
&lt;/tr&gt;
</pre>
<p>The colspan=&#8221;5&#8243; is included because we know that there are 7 days in a week and the arrows only need to be one column wide.  This means that we want the name of the month to take up the rest of the columns which would be 5 columns. The next row will show each day of the week in the corresponding column assigned to it:</p>
<pre>&lt;tr&gt;
&lt;td&gt;S&lt;/td&gt;
&lt;td&gt;M&lt;/td&gt;
&lt;td&gt;T&lt;/td&gt;
&lt;td&gt;W&lt;/td&gt;
&lt;td&gt;T&lt;/td&gt;
&lt;td&gt;F&lt;/td&gt;
&lt;td&gt;S&lt;/td&gt;
&lt;/tr&gt;</pre>
<p>The final thing to do is simply list the days the correspond to the month.  The first few will of course be for the month before and the last few days for the month after.</p>
<pre>&lt;tr&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;29&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;9&lt;/td&gt;
&lt;td&gt;10&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;12&lt;/td&gt;
&lt;td&gt;13&lt;/td&gt;
&lt;td&gt;14&lt;/td&gt;
&lt;td&gt;15&lt;/td&gt;
&lt;td&gt;16&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;18&lt;/td&gt;
&lt;td&gt;19&lt;/td&gt;
&lt;td&gt;20&lt;/td&gt;
&lt;td&gt;21&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;23&lt;/td&gt;
&lt;td&gt;24&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;25&lt;/td&gt;
&lt;td&gt;26&lt;/td&gt;
&lt;td&gt;27&lt;/td&gt;
&lt;td&gt;28&lt;/td&gt;
&lt;td&gt;29&lt;/td&gt;
&lt;td&gt;30&lt;/td&gt;
&lt;td&gt;31&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;&lt;/td&gt;
&lt;td&gt;3&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;6&lt;/td&gt;
&lt;td&gt;7&lt;/td&gt;
&lt;/tr&gt;</pre>
<p>And after all of that nice html code just finish it off with &lt;/table&gt; and the mock of up our date picker/calendar is complete.  Here is what the finished product should look like:</p>
<div style="text-align:center;">
<table border="1">
<tr>
<td><<</td>
<td colspan="5">May</td>
<td>>></td>
</tr>
<tr>
<td>S</td>
<td>M</td>
<td>T</td>
<td>W</td>
<td>T</td>
<td>F</td>
<td>S</td>
</tr>
<tr>
<td>27</td>
<td>28</td>
<td>29</td>
<td>30</td>
<td>1</td>
<td>2</td>
<td>3</td>
</tr>
<tr>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
<td>8</td>
<td>9</td>
<td>10</td>
</tr>
<tr>
<td>11</td>
<td>12</td>
<td>13</td>
<td>14</td>
<td>15</td>
<td>16</td>
<td>17</td>
</tr>
<tr>
<td>18</td>
<td>19</td>
<td>20</td>
<td>21</td>
<td>22</td>
<td>23</td>
<td>24</td>
</tr>
<tr>
<td>25</td>
<td>26</td>
<td>27</td>
<td>28</td>
<td>29</td>
<td>30</td>
<td>31</td>
</tr>
<tr>
<td>1</td>
<td>2</td>
<td>3</td>
<td>4</td>
<td>5</td>
<td>6</td>
<td>7</td>
</tr>
</table>
</div>
<p>Not very pretty yet?  Doesn&#8217;t actually accomplish anything yet?  Um, yeah, that is correct.  This is only so that we have a base off of which we can go.  Now we easily know how we want to generate our html inside out javascript object.  Figuring out the basic html before hand is the best way I have found to build web applications.</p>
<p>In the next installment of this tutorial I will show how to create a JavaScript object, public and private methods and variables in that object as well as one way to generate html on the fly with JavaScript.  Thanks for joining me for this tutorial and I encourage you to check out the rest of the tutorials as they come.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrsandberg.com/2008/06/calendar-v01-a-dynamic-javascript-date-pickertutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Foo or Flop?</title>
		<link>http://jrsandberg.com/2008/05/javascript-foo-or-flop/</link>
		<comments>http://jrsandberg.com/2008/05/javascript-foo-or-flop/#comments</comments>
		<pubDate>Wed, 14 May 2008 02:46:22 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[WebDev]]></category>

		<guid isPermaLink="false">http://jrsandberg.com/?p=5</guid>
		<description><![CDATA[I know many people who downplay JavaScript and how cool it is. I personally love JavaScript and really enjoy writing web applications with it. These people contend that, while it is possible to write cool programs with JavaScript, it takes too much time to accomplish any really novel and useful items. The first thought that [...]]]></description>
			<content:encoded><![CDATA[<p>I know many people who downplay JavaScript and how cool it is.  I personally love JavaScript and really enjoy writing web applications with it.  These people contend that, while it is possible to write cool programs with JavaScript, it takes too much time to accomplish any really novel and useful items.  The first thought that came to mind for me was, <em>&#8220;Um, Google?&#8221;</em> Since then I have just continued my nerdly adventures in the land of programming and have come across some pretty amazing projects written in JavaScript:</p>
<ul>
<li><a href="http://ejohn.org/blog/processingjs/">Processing.js</a> &#8211; This is a JavaScript library that implements the <a href="http://processing.org/">Processing Visualization Language</a>.  Check out the demos and you will see that it is pretty amazing.</li>
<li><a href="http://www.elizium.nu/scripts/lemmings/">DHTML Lemmings</a> &#8211; This is one of the best Amega games ever, completely implemented in JavaScript!  Too bad he had people breathing down his neck for copyright infringement so he couldn&#8217;t finish making the game.</li>
<li><a href="http://ejohn.org/blog/running-java-in-javascript/">Orto</a> &#8211; The JavaVM written in JavaScript.  You take the byte code and run it through Orto and out comes JavaScript that emulates your java code.  It can even handle threads.  How cool is that?</li>
</ul>
<p>These are just three of hundreds, if not thousands, of amazing things people are able to do with JavaScript.  I love JavaScript and while other technologies have their places, I intend to continue to develop in JavaScript for many days to come.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrsandberg.com/2008/05/javascript-foo-or-flop/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>gDo &#8211; my current baby</title>
		<link>http://jrsandberg.com/2008/04/gdo-my-current-baby/</link>
		<comments>http://jrsandberg.com/2008/04/gdo-my-current-baby/#comments</comments>
		<pubDate>Wed, 09 Apr 2008 06:27:17 +0000</pubDate>
		<dc:creator>Jeremy</dc:creator>
				<category><![CDATA[Security]]></category>
		<category><![CDATA[WebDev]]></category>
		<category><![CDATA[gDo]]></category>

		<guid isPermaLink="false">http://jrsandberg.com/?p=3</guid>
		<description><![CDATA[I am currently working on a project I like to call gDo. I stole the first letter from Google and the second part of the name tries to describe what I am trying to create: a To-Do list. At the current moment it is really simple, but I plan on adding functionality until it becomes [...]]]></description>
			<content:encoded><![CDATA[<p>I am currently working on a project I like to call gDo.  I stole the first letter from Google and the second part of the name tries to describe what I am trying to create: a To-Do list.  At the current moment it is really simple, but I plan on adding functionality until it becomes a pretty useful app.</p>
<p>I am developing this app for two reasons.  One is so that I can learn AJAX better.  The second is because I really need a to-do list that I don&#8217;t have to carry around with me everywhere.  If I put this one up on the cloud then wherever I find the internet I will also find my to-do list.</p>
<p>So far there haven&#8217;t been any major problems as I have been fleshing out basic functionality.  Currently gDo is just some iframes with a content div to hold the list of items in the to-do list.  Figuring out how to interact between the windows and having different windows update at the correct times has been interesting.  I would go into a long tutorial on how to do all of it except that I found all my solutions online.  I will post on how I make the main window refresh and the complexities of knowing when windows are loaded so that they can be used.</p>
<p>Security has been my next project.  I don&#8217;t want to implement full bore https but I don&#8217;t want people&#8217;s passwords to just be plain text available upon packet/request/response inspection.  My solution has not been very original or novel (oh too bad, no patents that I can troll about with) but it is going to work great.  I am just going to put the password through a little hash, which one of course will remain nameless, and add a little salt in for taste and bam.  No little hackers reading my passwords without at least <em>some</em> effort.</p>
<p>The best part about all of this, though, is the experience I am gaining.  I really enjoy learning new things and trying them out.  It seems that many of my fellow nerds swear by this technology or that technology.  They will argue until they are blue in the face about how Linux is better than Windows or Flex is better than AJAX or Java is better than any scripting language.  The way I look at things is more of a buffet (and I <strong>do</strong> love buffets):  I take a little AJAX when it seems to work well and then I take a little Flex when it works well.  Bottom of the line, no technology is inherently bad.  As long as you keep your eyes and mind open there will be places for every technology.</p>
]]></content:encoded>
			<wfw:commentRss>http://jrsandberg.com/2008/04/gdo-my-current-baby/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
