Scott - 3DM Design Learn to Program with JavaScript: Instant Feedback

Last time, with part one of this Learn to Program with JavaScript series, I introduced some basic HTML with an interactive tutorial. As JavaScript works very nicely inside a web page, this gave us the foundation. Now it’s time to add actual JavaScript on top.

Just like other aspects of an HTML page, JavaScript goes into a specific tag. The <script> tag, to be precise. Try out the first example to see our own version of “hello world” in JavaScript:

Continue Reading…

Scott - 3DM Design JavaScript RegExp Tool Available

There are times when I just need to process some text quickly and efficiently. Regular Expressions are very well suited to this task, and now I’ve released my own JavaScript Regular Expressions tool for just this purpose.

Continue Reading…

Scott - 3DM Design First Steps to Comet: Orbited in PHP

I’ve recently become interested in Comet, as a web technology, and Orbited, as a Comet server. For anyone else starting down this path, I thought I’d write up the summary of this weekend’s quick foray into event-driven server-sent-messaging goodness.

Continue Reading…

Scott - 3DM Design Comet for Web Games

For those not familiar with Comet, you’re either not a front end web developer or you’ve been kept in the dark. To sum it up quickly, Comet is a technology like Ajax. While Ajax basically consists of an asynchronous request by the client to the server, followed by the server’s response, Comet is a bit different. In Comet the client establishes a connection (or makes a request) to the server, and then generally keeps that connection open for the server to send responses back to the client on its own schedule.

Continue Reading…

Scott - 3DM Design Extending JavaScript Strings with Chomp using Prototypes

Chomp is that oh-so-fun function in Perl to bite off extra newlines from the end of a string. It can be useful to have chomp for JavaScript too, especially in cases such as reading input in textareas.

This time around, I’m going to take a quick look at how we can take the standalone JavaScript chomp function and make it even more accessible by extending JavaScript’s String object, which also gives us an excuse to try out the awesome prototype feature in JavaScript.

Continue Reading…