Where is the HTML5 Book Cheat Sheet?

A few people have now purchased HTML5 Programming with JavaScript For Dummies and one of the first questions that I’m asked is where the cheat sheet is. If you’ve purchased other Dummies books, you’ll have encountered the cheat sheet—a feature that includes quick tips for becoming productive quickly. The cheat sheet is normally printed on card stock and perforated so that you can easily remove it from the book. You place the cheat sheet where you can access it easily and provide tips for jogging your memory about content you saw in the book.

Don’t worry, the cheat sheet is still available, but now you access it online on the Dummies site. Now, before I get a bunch of e-mails yelling foul, yes there are some disadvantages to this new approach—the most noticeable of which is that you can’t remove the cheat sheet from your book and carry it around with you. I have to admit, not having the cheat sheet within easy reach wherever I am at the moment is a disadvantage. However, it used to be more of a disadvantage when I wasn’t always connected to the Internet. I thought about it recently and those occasions are rare today.

Let’s discuss the positives of an online cheat sheet. The following list provides some reasons that you’ll find the new cheat sheet really helpful (at least, these are reasons I like the new cheat sheet).

  • The new cheat sheet is available to everyone, even if you purchased an e-book version of the book.
  • I can make the cheat sheet as large as needed (within reason) to accommodate everything I think the reader might like to see (I often had to cut content from the old cheat sheets).
  • You now have access to live links as part of the cheat sheet so that all you need to do is click a link to see additional resources.
  • The new cheat sheet can’t get lost. Readers used to complain all the time that they had misplaced their cheat sheet (or someone had borrowed it).
  • The new cheat sheet won’t get worn out.

If you’re like me, you still like to have a paper copy of your cheat sheet around. To make the new cheat sheet as readable in paper form as possible, click the smallish Print link near the top of the page. You’ll see a less embellished version of the cheat sheet that will print cleanly no matter what platform you’re using. When the paper copy you have is lost, borrowed, or worn out, you can simply print a new one without having to ask anyone about it. Talk about convenient !

I’m always open to your input. What do you like or dislike about the new cheat sheet? Is there anything I can do to improve this new form of cheat sheet in the future? This is my first stab at this new format, so I really do need to know your thoughts so that I can polish my presentation to meet your needs. Let me know your thoughts at John@JohnMuellerBooks.com.


Considering the Increasing Need for Security

Many of the readers I work with have noted an increase in the amount of security information I provide in my books. For example, instead of being limited to a specific section of the book, books such as Microsoft ADO.NET Entity Framework Step by Step (the new name for Entity Framework Development Step by Step) and HTML5 Programming with JavaScript for Dummies provide security suggestions and solutions throughout the book. The fact of the matter is that this additional security information is necessary.

There are a number of factors that have changed the development environment and the way you design applications. The most significant of these factors is the whole Bring Your Own Device (BYOD) phenomenon. Users bring devices from home and simply expect them to work. They don’t want to hear that their favorite device, no matter how obscure or unpopular, won’t work with your application. Because these devices aren’t under the IT department’s control, are completely unsecured, and could be loaded with all sorts of nasty software, you have to assume that your application is always under attack.

Years of trying to convince users to adopt safer computing practices has also convinced me that users are completely unconcerned about security, even when a lack of security damages data. All the user knows is that the application is supposed to work whenever called upon to do so. It’s someone else’s responsibility to ensure that application data remains safe and that the application continues to function no matter how poorly treated by the user (through ignorance or irresponsible behavior is beside the point). Because of this revelation of human behavior, it has become more important to include additional security discussions in my book. If the developers and administrators are going to be held responsible for the user’s actions, at least I can try to arm them with good information.

The decentralized nature of the security information is also a change. Yes, many of my books will still include a specific security chapter. However, after getting a lot of input from readers, it has become apparent that most readers aren’t looking in the security-specific chapter for information. It’s easier and better if much of the security information appears with the programming or administration techniques that the reader is reviewing at any given time. As a consequence, some of my books will contain a great deal of security information but won’t even have a chapter devoted to security issues.

I’m constantly looking for new ways to make your reading experience better. Of course, that means getting as much input as I can from you and also discussing these issues on my blog. If you have any ideas on ways that I can better present security issues to you, let me know at John@JohnMuellerBooks.com.


Introducing HTML5 Programming with JavaScript For Dummies

Today marks the first day you can obtain my latest book, “HTML5 Programming with JavaScript For Dummies.” This is a really exciting book because it helps you create interesting applications using technology that works on just about every platform that exists in the world today using tools that cost little or nothing to use. Of course, these are Web-based applications—the kind that run within a browser. At one time, Web-based meant applications that provided deficient interfaces, lacked any sort of pizzazz, and just generally felt cheesy (poorly made). Today Web-based applications provide interfaces that are every bit as good as their desktop counterparts, but don’t require a special platform to work. All of the examples in the book were tested on Windows, the Mac, and Linux using several different browsers including Internet Explorer, Firefox, and Chrome. One of my beta testers even checked out a few of the examples on his smartphone and they worked just fine. (I do try to point out situations where differences between browsers or platforms will cause an application to look or act differently that what you see in the book.)

Don’t get the idea that this book is only for beginners. Even intermediate readers will be able to discover some new techniques. That said, the beginning of the book is definitely targeted toward someone who hasn’t worked with JavaScript before. Here is a list of the chapters:


  • Chapter 1: HTML, Say Hello to JavaScript
  • Chapter 2: Assessing Tools of the Trade
  • Chapter 3: Integrating HTML5 and JavaScript
  • Chapter 4: Embracing JavaScript Variables
  • Chapter 5: Working with Objects
  • Chapter 6: Getting to Know the Standard JavaScript Objects
  • Chapter 7: Using Functions
  • Chapter 8: Making Choices in JavaScript
  • Chapter 9: Making the Rounds with Loops
  • Chapter 10: Performing Error Handling
  • Chapter 11: Understanding the Document Object Model
  • Chapter 12: Handling Events
  • Chapter 13: Connecting with Style: JavaScript and CSS
  • Chapter 14: Enhancing HTML5 Forms with JavaScript
  • Chapter 15: Interacting with Windows
  • Chapter 16: Working with XML in JavaScript
  • Chapter 17: Cleaning up the Web with AJAX
  • Chapter 18: Making JavaScript easier with jQuery
  • Chapter 19: Using jQuery to handle AJAX
  • Chapter 20: Animating the web
  • Chapter 21: Ten Incredible HTML5 and JavaScript Examples
  • Chapter 22: Ten Thoughts About the Future of Web Development

As you can see, the later chapters in the book contain some really interesting topics you can use to create great sites. For example, you get to work with jQuery, possibly one of the best libraries available today. There is even an example that demonstrates how to work with the Google Maps API. The point is that you’ll start this book as a beginner, but you won’t stay a beginner for very long. Not only does the book use the Dummies approach to learning, but you get a lot of hands on experience through 108 programming examples.

I’d love to hear any questions you have about my new book. Let me know what you’d like to know at John@JohnMuellerBooks.com.


Using jQuery and jQuery UI to Enhance Web Apps

As I work more and more often with Web apps (applications), rather than Windows-specific applications, I have become aware of the tremendous amount of developer support that’s available for anyone on any platform when creating this application type. It’s possible for someone who works predominantly on the Mac to write code that works just fine for someone who works most of the time on a Windows system. In fact, the entire idea of platform becomes meaningless when working with Web apps. jQuery and jQuery UI are a huge part of the third party support available to anyone writing Web apps. In fact, it’s hard to find Web apps of any size that don’t rely on these two libraries (many examples of smaller applications do exist).

Third party libraries are an exciting part of working with Web apps because they make it possible to create apps that look similar (possibly precisely the same) on a number of platforms without the work usually required to pull this feat off. jQuery and jQuery UI are used quite often in this capacity. In fact, they’re used often enough that I wrote an article about them entitled, “Using jQuery UI to Your Advantage.” Instructions and examples on using these libraries also appear in HTML5 Programming with JavaScript For Dummies. I like these libraries so much that customization instructions for them will appear in an upcoming book, CSS3 for Dummies (work on this book will begin in May—be sure to keep your eyes peeled for further details).

Of course, you might wonder why jQuery and jQuery UI are so successful. My experience is that these libraries are incredibly well written, work with a wide variety of browsers, are well supported, and provide great documentation. Most importantly, the two libraries provide developers with needed functionality and flexibility. It’s possible to create a unique application using just these libraries with well-documented tweaks and event handlers. In short, these two libraries have everything needed to create a successful library—one that everyone will enjoy using.

There are many other libraries available to Web developers and I plan to explore many more of them as time permits. I find it interesting that even if I were to devote myself entirely to working through all of the available libraries, there probably wouldn’t be time to explore them all. That’s why I’d like to know about your favorite library and why you find this particular library so useful. I’m not interested in hearing about something mundane—the library needs to do something special, such as providing functionality not found in other libraries currently available. I’m looking for libraries that are well documented and are used by a wide variety of developers to create great looking Web apps. Let me know about the library of your dreams at John@JohnMuellerBooks.com.


Discovering a New Way to Create JavaScript

Over time, developers will gain an entire toolbox full of different computer languages. A fully stocked toolbox is a developer’s best defense against the ever changing tide in what’s popular and what’s not in the world of application development. Recently I learned about a new computer language called TypeScript. The amazing thing about TypeScript is that it’s a true superset of JavaScript. If you know how to write JavaScript, you already know a great deal about TypeScript. In fact, I wrote an article entitled, “TypeScript: A New Direction in Browser-Based Applications” that describes some of my experiences with this new language. The short story is that TypeScript compiles into JavaScript, so you start with TypeScript and its advantages and end up with JavaScript code that is ready for use in your favorite Web application.

Of course, the biggest question people ask me is why I need to know yet another language.  After 28 years I’ve collected knowledge of more than a few computer languages—some of which turned out to be turkeys, some of which were extremely useful for a limited time, and others that I still use almost daily. Experiencing new languages and understanding how they can make developers more productive helps keep computer science alive for me. If I had stayed with the original set of languages that I learned as part of my training in college, I would not only be bored to tears, I’d be unemployed. So, if nothing else, learning about TypeScript is an adventure for me.

Adventures are better when they’re productive and interesting. TypeScript is interesting because it actually does improve on a language that’s really popular. You gain the advantages of using a compiler and static typing (amongst other things). For me, the use of the compiler is the biggest advantage because working with a compiler makes it possible to locate and fix the sort of simple errors developers make when tired. There have been more than a few times where a seemingly simple problem has kept my JavaScript application from running as it should and I later found that the problem was something that a compiler would have found in an instant.

Finding mistakes fast and easily, especially when you’re tired, is a real productivity booster. If I can code efficiently for another hour or two because I have a compiler helping me, I can produce more usable code than other developers. In the end, no one is going to care that I used a compiler to produce my JavaScript code. All that anyone is going to care about is that I produced more lines of code in a given time-frame than other developers using older techniques that don’t involve using a compiler. When you use TypeScript, you gain a productivity advantage over other developers.

TypeScript is available using the Node.js Package Manager, a Visual Studio plug-in, or by compiling the source code for your particular environment. My personal favorite is the Node.js Package Manager because it lets me work at the command prompt without having to worry about a particular IDE. I simply set up Komodo Edit to work with the new environment. Since I already use Komodo Edit to create my JavaScript applications, the environment is a good fit with TypeScript as well. There is no actual TypeScript support in Komodo Edit now, but people are talking about it. Of course, you’ll have your favorite environment and working with a new language like this always presents some challenges at first.

If you do try TypeScript out, let me know what you think of it. Do the features that TypeScript provides today make working with a new language worthwhile? Let me know your thoughts at John@JohnMuellerBooks.com. Also, keep your eyes peeled for more posts about TypeScript because this really does seem like an interesting and productive language!


Installing and Managing Third Party Products

Most of my books make recommendations about third party products that you can use to enhance your computing experience. Each of these products is tested during the writing process, but without any of the add-on applications that may come with the product. For example, if I test a Windows enhancement product, I don’t test the toolbar that comes with that product. So, it’s important to realize that the advice you obtain in the book doesn’t include those add-on features.

However, it’s important to take a step back at this point and discuss why the product includes an add-on in the first place. Just like you, the product vendor has bills to pay and must obtain money from somewhere to pay them. An important concept to remember when working with computers is that free doesn’t exist. Typically, product vendors who offer free products will do so by paying for them in one of these ways:

  • Advertisements: Advertising comes in many forms, not just banner ads. Marketing types constantly come up with new ways to advertise products and induce you to buy them. A developer can obtain payment from advertisements in several ways, such as referral fees.
  • Product Add-ons: A developer can provide the means to install other products with the product that you’re installing. The company who provides the additional product sponsors the free product that you’re using.
  • Marketing Agreements: The application collects information about you and your system when you install it and the developer sells this information to marketing companies.
  • Value-added Products: The free product that you’re using is just a sample of some other product that the developer provides. If you like the free product, the developer is hoping that you’ll eventually purchase the full-fledged product.
  • Government Grants: A developer creates a product after obtaining a grant from the government. You pay for the product through your taxes.
  • Sponsorship: A larger company supports a developer’s work to determine whether the idea is marketable or simply the seed of something the larger company can develop later. You pay for the product through higher prices when you buy something from the larger company.

There are other methods that developers use to get paid for their work, but the bottom line is that they get paid. Whenever you see free, your mind should say, “This product doesn’t cost money, but there is some other price.” You need to decide whether you’re willing to pay the price the developer is asking. In the case of a government grant, you’ve already paid the price.

When you install a free product, you must watch the installation routine carefully. In almost every case, you must opt out of installing add-on products that the free product supports. So, you have to read every screen carefully because these opt-out check boxes are usually small and hard to see. The developer really isn’t pulling a fast one—just trying to earn a living. Make sure you clear any check boxes you see for installing add-on products if you don’t want that product on your machine. The reason I don’t discuss these check boxes in my books is that they change constantly. Even if I were to tell you about the check boxes that appeared at the time I installed the free product, your experience is bound to be different.

Of course, you might accidentally install one of these add-ons, an add-on that you really didn’t want. In this case, you must locate the product in the list of products installed on your system, such as the Programs and Features applet of the Control Panel for Windows users. The product name won’t be straightforward, but a little research will help you find it. Simply uninstall the add-on product. However, it’s always better to avoid installing something you don’t want to begin with, rather than remove it later, because few applications uninstall cleanly (even those from larger vendors such as Microsoft).

Unfortunately, there isn’t much I can do to help you when you install an add-on product. I do have some experience with the third party product in my book, but I won’t know anything about the add-on product. You need to contact the developer of the third party product to ask for advice in removing it from your system. This may seem like I’m passing the buck, but the truth is that the add-on products change all the time and there simply isn’t any way I can keep up with them all. When in doubt, don’t install a product, rather than being sorry you installed it later. Let me know your thoughts on third party products at John@JohnMuellerBooks.com.


Future Directions in Computer Science

There are many people in the computer industry today claiming that the PC is dead. Even Intel is bidding a fond adieu to the making of motherboards—certainly that sounds the death knell for the technology! Before we all succumb to PC is dead mania, it’s time to do a little thinking. The problems with this perspective are many:

  • The PC has a huge installed base and no one in their right mind is simply going to throw all those machines away.
  • The PC currently provides the best method for speedy data input and many other mundane tasks.
  • Many current applications don’t scale well to smaller footprint devices.
  • Using a desktop system provides management with ways of monitoring employee activity that management won’t want to give up anytime soon.
  • From a cost perspective, the PC is an extreme deal because it has turned into a commodity, so people will continue to buy them.

What has happened to the PC is that it’s a victim of its own success. New systems provide faster processors, more memory, and larger hard drives. The displays get ever more impressive and there are subtle, though small, changes that are attractive, but nothing to cause people to throw out their old machine. The fact is that the modern PC is so fast and well equipped that it has greatly outpaced the requirements of the software running on it. There is no reason to replace a PC anymore until the system simply dies from old age. In short, sales are down because people only buy a new PC when they need to replace their old one.

However, people will continue to use their desktop systems or a laptop equivalent because they need the functionality that the PC provides. It simply isn’t possible to run a business by typing everything on a smartphone screen (not unless you’re into repetitive stress injuries). From a computer scientist’s perspective, the PC still makes a great platform for writing applications. It is the basic machine that everyone uses, despite the fact that everyone seems to think it’s dead.

There are many assumed dead things in the world of computers. For example, everyone assumes that COBOL is dead, but it isn’t. We’ve been reading about the death of COBOL as a language for years and it isn’t even taught in colleges anymore, yet if you used an ATM anytime recently, you probably relied on a COBOL application to make the transaction. PCs are coming to the same transitional phase. Everyone will continue to use PCs in some fashion, but the growth phase of the PC is over, so the PC will appear less glamorous in the years to come—it will become yet another tool. In some respects, the PC will become like a car. They’re both complex devices that people take for granted because they’re commodities. In addition, both require specialized skills to work on and yet have devoted legions of non-professional adherents.

The direction computer science is taking today is the browser-based application. The reason is relatively simple. People now use multiple devices to perform tasks, but the common element for all of these devices is a browser that can host applications. Having the same application to perform common tasks on each device is a necessity if the person is to accomplish anything useful. In addition, tastes in devices vary between people. These devices have differing capabilities and flexibility. An application today must run equally well in every environment. Even in a controlled environment, people are working with more types of devices from a variety of vendors—the focus is less on compatibility and more on what appeals to the person in the way of features.

This change in focus in the reason I’ve started to focus my efforts more on technologies you can use to create applications that work anywhere on any device. It’s the reason I chose to write books such as HTML5 Programming with JavaScript For Dummies and Java eLearning Kit for Dummies (which is completed, but currently on hold). Yes, I’ll continue to write about Microsoft technologies because I truly believe the PC has a future, albeit a less exciting one than in the past. However, look for me to embrace this new future in upcoming posts and books with greater fervor. I’d love to hear your input on the future of computer science. Where do you think applications are headed? Let me know your ideas at John@JohnMuellerBooks.com.


JavaScript and Memory Leaks

I recently finished writing HTML5 Programming with JavaScript For Dummies. This book focuses a lot of attention on working efficiently with JavaScript to produce full-fledged browser-based applications. You’ll find everything from creating simple code to update form entries to creating interesting special effects for your user interface. In fact, I spend considerable time looking at third party libraries such as jQuery and jQuery UI—an incredibly useful set of functions that can significantly reduce coding time.

One of my goals in the book is to introduce you to techniques that produce useful applications in an incredibly short time without writing bad code. The term bad code covers a lot of ground, but one of the more serious issues is one of memory leaks. Applications that have memory leaks will cause the application and everything else on the system to slow down due to a lack of usable memory. In addition, memory leaks can actually cause the application to crash or the system to freeze when all of the available memory is used up. So, it was with great interest that I read an InfoWorld article recently entitled, “Brendan Eich tells how to prevent JavaScript memory leaks.” The article contains a lot of useful advice in writing good JavaScript code that won’t cause your users heartache. Just in case you’ve never heard of him, Brendan Eich is the creator of the JavaScript language, so I’m sure he knows quite a lot about what makes the language tick.

There are a few points of interest in the article. A big one is that the memory leak you’re seeing in your application may not be due to your code—it may be caused by the browser. The potential for browser problems is an important one to keep in mind because these issues affect every application that runs, not just yours. However, when your application performs a lot of work that requires heavy memory use, the user may see your application as the culprit. It pays to track browser issues so that you can support your users properly and recommend browser updates for running your application when appropriate. For that matter, you can simply determine whether the user has one of the poorly designed browsers and tell the user to perform an update instead of running the application.

What I found curious about the article is that it doesn’t discuss other potential sources of memory leaks. For example, using the wrong third party library could cause considerable woe when it comes to memory usage (amongst other issues). Consequently, you need to research any libraries or templates that you use carefully. The libraries, templates, and other tools discussed in my book were chosen with extreme care to ensure you get the best start possible in creating JavaScript applications.

One of the reasons I find JavaScript so compelling as a language is that it has grown to include enough features to create real applications that run in just about any browser on just about any platform. The ability to run applications anywhere at any time has been a long term goal of computer science and it finally seems to be a reality at a certain level. What are your thoughts on JavaScript? Let me know at John@JohnMuellerBooks.com.


Web Services and Protocols

A number of my books (such as HTML5 Programming with JavaScript For Dummies, Start Here! Learn Microsoft Visual C# 2010 Programming, Professional Windows 7 Development Guide, and LINQ for Dummies) discuss Web services and how to access them. As developers become more and more pressed for time, using code that has been debugged and tested by someone else becomes extremely tempting. Web services provide free or paid access to someone’s code in a specific manner. Using Web services is the only way that many organizations can deliver robust applications on time and within budget today. That’s the reason Web services figure prominently in previous books and will become even more important in upcoming books.

If every one of these Web services used a different set of low-level rules to provide access, it would be a nightmare for developers to access them. Fortunately, Web services generally use one of two methods of low-level access: Simple Object Access Protocol (SOAP) or REpresentational State Transfer (REST). Most developers assume that one or the other protocol is best, but a recent article that I wrote, “Understanding SOAP and REST Basics” points out that you actually need to be proficient with both protocols to get the most out of the resources available online. The overall point of this article is that a well-equipped developer can make things happen quickly by using the best Web service for a particular task, irregardless of the underlying protocols that it uses.

Web services still have many differences. In most cases, the differences are due to individual team perspectives of the task at hand, rather than some requirement for exposing the data in a certain way. A few of these differences are incredibly convoluted. Sending REST requests where you include data as part of the request header is one example of a needlessly cumbersome method of transferring information. The need to send every SOAP request as pure XML creates ticklish situations at times. Future standards (and there will be many) will help smooth these differences out and make Web service access even easier.

The use of Web services as a programming strategy is still in its infancy, so you should expect to see some major changes as more developers rely on Web services as a basic programming tool. What are some of the most pressing problems you see with SOAP and REST today? Do you feel there will be a third standard that marries the best features of the two standards and also adds a few features of its own? What sorts of Web services would you like to see in the future? Let me know your thoughts on the topic at John@JohnMuellerBooks.com.


Checking SQL Server Status

A number of my books rely on database access and one of the most common servers that I’ve used in the past is SQL Server. In order to access any server, the server must be running. It only makes sense that you can’t access something that isn’t listening. The problem is that SQL Server may not start automatically for a number of reasons on your system and that Visual Studio doesn’t always make it apparent that the server isn’t running. You may get a nebulous message when you try to make a connection that doesn’t tell you anything. (No, SQL Server doesn’t start automatically when you make a request for data.) With this in mind, a post of checking the status of SQL Server is important.

Normally, I would tell you to use the tools that come with SQL Server to check the status of the server. However, some versions of SQL Server Express Edition install without the standard tools now, such as SQL Server Management Studio. Without access to these tools, it may seem as if checking the server status is impossible. Fortunately, you have other options.

The best way to check the status of SQL Server on your system is to use the Services console found in the Administrative Tools folder of the Control Panel. The Services console is one of a number of Microsoft Management Console (MMC) snap-ins that Windows installs automatically for you. However, to use this console, you must have administrator rights on the target system. Without these rights, you truly are out of luck in checking the status of your SQL Server setup and will need to get an administrator to help you.

Open the Services console and you find a list of all of the services installed on your system. Scroll down the list and you should find one or more SQL Server entries like the ones shown here.


In order to work successfully with the examples in my book, you should have SQL Server set to start automatically. In addition, when you check the service, you should see Started in the Status column as shown in the screenshot. If you don’t see Started, then highlight the service as shown and click the Start link you see on the left side (not shown in this case because the service is already started).

To make the examples easier to work with, you should also ensure that the SQL Server Browser service is started. This service makes it possible for Visual Studio to find the SQL Server installation on your system. Without this service, you must correctly type the name of the SQL Server installation you want to use when creating a connection, which is both time consuming and error prone.

If you find that you encounter problems making database examples in my books work, please check the status of SQL Server to ensure the service is actually started. Contact me at John@JohnMuellerBooks.com if you experience any other connectivity problems. I may not be able to fix every problem you encounter, but I often have a good idea of what problems you might be seeing on your system and will do my best to help you.