Now that I've got a few javascript applications under my belt, I'm strating to see a pattern emerge. A javascript app for me always starts with three files. An html, a css, and of course a js file. This is the triangle that makes the base for your application to build upon. The fourth piece that I always include is a reference to jQuery. I wouldn't even try to write a javascript app without it. It's the defacto framework that makes javascript programming tolerable and should be included in any project IMHO.
The first thing I put in my js file is an object to represent my application. Since there's just one instance of the app I just define an object literal, there's no need for a constructor. But I do give it an init() method as the place to get things started.
MyApp={
init: function() { // do something... }
};
Then of course I add the jQuery document ready handler that calls the object's init() method. The document ready handler is the entry point into the app and is equivalent to the main() function in a lot of other programming languages.
$(document).ready(function() {
MyApp.init();
});
A javascript application's domain is the html DOM. Use jQuery to manipulate the DOM to make your application do what you want it to do. You can read user input, hide and show elements, and all of the other things that applications usually do. Heck, you can even make games if you want to. I've done it. And with the new additions provided in HTML5 you are going to get even more powerful features like canvas, local storage, etc.
Yes, javascript is a real programming language, and you can write real applications with it. Now go out there and write your own and show us what you got.