Archives For JavaScript

In this edition…

Continue Reading…

Some time ago I stumbled upon the WWW SQL Designer, an online database modeling tool, created by Ondrej Zara. It’s built in JavaScript, and runs in the browser, although PHP is required for some functionality. You can download the code from its Google Code home page so that you can run it in from your own computer, but to see a demo of it in action (a completely usable demo), head to http://ondras.zarovi.cz/sql/demo/.

There’s not much in the way of documentation, but the tool is pretty straightforward, and there’s a YouTube video, if you want. To start, just create a new table, giving it a name. The tool will automatically create the autoincremented primary key for each new table. Then you can add other columns and indexes (aka keys). Add more tables as needed, and you can easily indicate the relationships between tables by marking foreign keys. Once you’re done with the design, you can export the SQL. The tool supports many different databases, including MySQL, SQLite, Oracle, and PostgreSQL. The outputted SQL is also nicely broken down, separating, for example, the foreign key statements and table properties (e.g., the character set, collation, and storage engine) into standalone ALTER queries, allowing you to use whatever commands you need when you actually go to create the database in your database application. The generated SQL even provides demo INSERT statements for the tables. Alternatively, you can save the design as XML, allowing you to reload that design in the application for further editing at another time.

I’m always on the lookout for a good database design tool, so was pleased to find this one. It’s particularly useful when I’m not on my primary computer, such as when I’m at a client’s office, and need to whip up some SQL on the fly. Check it out for yourself and see what you think. The price—free—is right!

Some time ago I came across an excellent resource titled “Essential JavaScript Design Patterns“, written by Addy Osmani. Mr. Osami is a JavaScript developer for AOL, a member of the jQuery core team, among other roles, and is a strong writer. “Learning JavaScript Design Patterns” is a book-length document, available for free online. In it, Mr. Osami:

  • Introduces the concept of design patterns
  • Covers the fundamental design patterns (e.g., Singleton, Module, Prototype, Factory, Mixin)
  • Shows the implementations of the most common design patterns in both JavaScript and jQuery

I think the ideas and the details are well explained, although the subject matter itself does put it beyond the average JavaScript beginner. But if you’re solid with your JavaScript skills and are looking into design patterns, it’s well worth your time. In fact, I would say that if you’re interested  in the subject of design patterns, regardless of the language in use, the introduction that Mr. Osami provides to the subject is a must read.

As of 2013, I no longer directly sell the “Modern JavaScript” book. I appreciate the interest, but you’ll need to buy it from a bookstore instead.

I am very, very happy to say that I received my printed copies of Modern JavaScript: Develop and Design on Monday evening (February 20, 2012). It’s safe to say that the book actually exists, after many, many delays, and should be available to you soon. My sincerest thanks to everyone for their interest in the book and for their patience.

The official Web site for the book is https://www.larryullman.com/books/modern-javascript-develop-and-design/. You can view the book’s Table of Contents there, too. And I’ve created a support forum for the book, naturally.

Over the next couple of weeks, some articles and videos I did in support of the book will be made available, and I’ll link those here as that happens.