Error in HTML5 Programming with JavaScript for Dummies

A reader recently wrote to tell me of an error on Page 118 of HTML5 Programming with JavaScript for Dummies. The problem appears in the source code for the SearchString.HTML example. As written, the code will currently work in most cases, except if you type This as the input value. The problem is this bit of code:

if (Result == 0)
{
   document.getElementById("Result").innerHTML =
   "You must provide an input value!";
}

The value of Result can equal 0 in a number of situations, but the problem is that one of those situations, typing This as the search term, is actually a correct input. In order to fix this problem, you must change the comparison condition to look at the text input, rather than the result of the search. The following code works as anticipated.

if (FindValue == "")
{
   document.getElementById("Result").innerHTML =
   "You must provide an input value!";
}

As always, I want to hear about any problems you experience using my books. Please contact me at John@JohnMuellerBooks.com if you encounter any other problems with this example or have questions about the change in comparisons.

 

Understanding the Effects of Net Neutrality on Web Programmers

There has been a lot of hubbub about net neutrality. I even saw not one, but two articles about the topic in my local newspaper the other day. Of course the discussion has been going on for a while now and will continue to go on—eventually ending up in the courts. My initial interest in the topic is different from almost every other account you read. While everyone else seems to be concerned about how fast their app will run, I’m more concerned about getting new applications out and allowing them to run correctly on a wide range of systems.

Both HTML5 Programming with JavaScript for Dummies and CSS3 for Dummies speak to the need of performance testing. Neither book covers the topic in detail or uses exotic techniques, but it’s an issue every good programming book should cover. Of course, I had no idea at the time I wrote these books that something like net neutrality would become fact. The developer now has something new to worry about. Given that no one else is talking much about developer needs, I decided to write Considering Net Neutrality and API Access. The article considers just how developers are affected by net neutrality.

If net neutrality remains the law of the land, developers of all types will eventually have to rethink strategies for accessing data online as a minimum. However, the effects will manifest themselves in even more ways. For example, consider how net neutrality could affect specialty groups such as data scientists. It will also affect people in situations they never expected. For example, what happens when net neutrality assures equal access speeds for the x-ray needed to save your life and that online game the kid is playing next to you? Will people die in order to assure precisely equal access. So far, I haven’t found anyone talking about these issues. There just seems to be this nebulous idea of what net neutrality might mean.

My thought is that we need a clearer definition of precisely what the FCC means by equal access. It’s also important to define exceptions to the rule, such as medical needs or real time applications, such as self-driving cars. The rules need to spell out what fair really means. As things sit right now, I have to wonder whether net neutrality will end up being another potentially good idea gone really bad because of a lack of planning and foresight. What are your ideas about net neutrality? Let me know at John@JohnMuellerBooks.com.

 

Saving Development Time Using CSS Templates and Boilerplate

Recently I created a post entitled, Differentiating Between CSS Boilerplate, Template, and Frameworks that defines the differences between these technologies. However, I stopped short of making any product recommendations. A few of you have asked about the products I’ve tried and liked. So, I put some suggestions together in a recent article, 5 Truly Effective CSS Boilerplates and Frameworks. Mind you, there are scores of such products available on the market. This article represents the cream of the crop from my perspective based on those products I’ve actually tried and found to work well in my particular circumstances.

There are many criteria for choosing a development product and you probably have specific needs that you must address. For example, you might have specific packages that an solution must work with because these other packages form the basis of a mission critical applications. Only you know what these criteria are and it pays to write them down before you look for any third party product. However, there are some questions that you can ask yourself before you begin the search.

 

  • Will the product actually save me time?
  • Can I create a unique look using it?
  • Is the product simple to use based on my experience level?
  • Does the product come with good documentation?
  • How much community support can I expect to obtain with this product?
  • Does the vendor clearly state which packages this product will work with?
  • Has anyone investigated, validated, and qualified the vendor’s claims?


These questions will definitely get you started in the right direction, no matter what your other needs might be. Learning to identify products that meet your specific needs is important because no one can perform that particular part of the software development process for you. Yes, you can hire a consultant to guide you in your efforts, but when all is said and done, you need to make certain decisions regarding the products you use, especially when it comes to intangibles such as appeal and usefulness in making a statement your organization can live with.

In addition to these questions, you need to also ask yourself organization-specific questions such as the need to have access to a Content Delivery Network (CDN). Some organizations prefer to host third party software on their own server (which requires a download), but other organizations prefer to use a CDN that makes it possible to access the product from a remote server. There are advantages and disadvantages to each approach.

What sorts of questions do you ask yourself when looking for a third party product to save development time? The kinds of questions you ask is important and I’d love to know more about the processes that take place in other organizations. Let me know your thoughts at John@JohnMuellerBooks.com.

 

Adjusting to Web Development

Web applications require a different mindset than the desktop applications of old. Two of my books, HTML5 Programming with JavaScript for Dummies and CSS3 for Dummies, provide techniques for focusing on content, rather than application structure. However, both books contain this information across a number of chapters and some readers might like something a bit more succinct. I recently wrote A Short Guide for Desktop Developers Making the Transition to Web Applications with this need in mind. In a single article you can find the essential information needed to create better sites. The crux of the problem is that a desktop application resides on a device with known capabilities—a Web-based application can run on any device and you won’t necessarily know what that device is at any point during application execution.

The new focus in application design is flexible content. You make the content fit whatever device requires it. The reason that many Web-based applications currently fail is not because they’re poorly coded, but rather that they’re designed for the wrong environment. You see many examples of desktop-like applications on the Internet today. These applications don’t work because the developer has become fixated on creating a neat appearance for the content based on the desktop environment, rather than designing a flexible environment in which to present the content. The environment can’t assume anything because the user device could be anything.

Although my article will provide you with a great overview and provides you with the essentials you need to create a phenomenal Web-based application, you’ll still want to review my books as well. It’s in the books where you see the details of using a particular technology to create your application. The books also provide details that an article simply can’t provide. Of course, this additional information includes specific coding examples so you can see examples of how to implement a good design. So, start with the article. If you find what you need in it, turn to the books for the additional details.

Designing for the Web requires a different mindset. New device types require different design strategies. What are the biggest problems you face when making the transition from the desktop environment to the Web? Let me know at John@JohnMuellerBooks.com.

 

HTML5 and CSS3 Bugs in iOS 7

Several readers have written to ask about an article that appeared in InfoWorld entitled, “Bad news: iOS 7’s HTML5 is full of bugs.” In reading about the bugs, it doesn’t appear that any of them will affect the examples found in either HTML5 Programming with JavaScript for Dummies or CSS3 for Dummies. Unfortunately, I don’t personally own a copy of iOS 7 to perform any testing to verify that there aren’t any problems. A helpful reader did test a few examples for me and didn’t report any errors. If you find that you’re having problems with any of the examples in either book, please let me know at John@JohnMuellerBooks.com.

This issue does serve to point out a problem that I’ve encountered more than a few times in supporting my books. A vendor can release a faulty version of a library, operating system, or other support software required for my books and it will appear that the examples are buggy to the reader. If you read about these sorts of issues, please let me know about them so that I can test the book examples and report back to you here.

 

Obtaining an Editor for Your Web-based Application

One of the things I like most about writing code for Web-based applications is that there are so many libraries out there to make the task simple. You can stitch together libraries to create an application in only a small amount of the time required to create the same application in desktop form and the resulting application is going to be a lot more flexible. (Admittedly, the desktop application is usually prettier and can be faster.) Some time intensive tasks for desktop developers, such as creating an editor, require little or no work when creating a Web-based application. In fact, you can get a number of editors for free as described in my article, “5 Free JavaScript Libraries to Add Text Editing to Your Web Application.”

In this case, I wanted to see what was available in the way of editors. There are quite a large number of editors out there, some paid, some not. After discovering that the scope of my original article idea was too large (just editors in general), I decided to narrow the scope to just those editors that are free. After all, why pay for something you can get free unless you actually need the special features of the paid product?

Unfortunately, I still ended up with too many editors (somewhere in the neighborhood of 20). So, I decided to categorize the editors by complexity and presentation. I ended up with five major categories that span the range from simple to complex. The article contains what I think are the five best editors. Of course, your opinion may vary from mine. The point is, that you have a significant number of editors to choose from, so there is absolutely no reason to ever write code to create your own editor unless you need something truly specialized.

I’m thinking about other sorts of classes of application module for future articles. For example, it might be necessary to create an application where the user can make a simple drawing to show how something is put together or how something has failed. I actually needed such a module when trying to describe the glass panes used in the front of my wood stove not long ago and finally resorted to using paper and faxing it. The graphics module would have been easier, faster, and simpler.

What sorts of modules do you need for your Web-based applications? I’m always looking for good ideas from the people who read my material. Send me your thoughts at John@JohnMuellerBooks.com.

 

Browser-based Applications and APIs

Both HTML5 Programming with JavaScript for Dummies and CSS3 for Dummies place an emphasis on the developer who needs to create a unique site in the shortest time possible, and yet achieve this feat with low support costs. The task might seem impossible. Both books achieve their goals by focusing on free or low cost tools, development aids, and Application Programming Interfaces (APIs). However, the API is the lynchpin that holds everything else together and makes everything work. The idea is to obtain a functional application that does everything it needs to do in an incredibly short time using resources that have been created, tested, and maintained by someone else.

My books discuss a few of the most popular APIs and provide pointers to other APIs that you might want to try. In addition, both books provide some best practices for working with APIs. However, I wanted to explore the concept of what makes a great API further, so I wrote “Avoiding Problematic API Choices.” The goal of this article is to help you weed out the great APIs from those that could actually damage data or leave your organization exposed to unwanted risk. The time saved developing an application is quickly used up when the APIs used to create that application cause support issues, so it’s best to use reliable APIs.

Using tools, development aids (such as free art), and APIs is a no brainer.  Creating browser-based applications makes it possible for your application to run anywhere and on any device. These free (or sometimes low cost) aids add extra incentive to develop browser-based applications because now you also avoid a large amount of the cost and upkeep of an application. Organizations that don’t avail themselves of these technologies will eventually be left behind, especially as the Bring Your Own Device (BYOD) phenomena becomes even more prevalent.

There are many tools, development aids, and APIs out there and I have yet to explore even a modicum of them. I can say that I’ve worked with a considerable number of the most popular offerings online, plus a few private (paid) offerings. Still, I’m looking forward to my continued exploration of this particular area of development. I find it incredibly interesting because I started out at a time when assembler was considered the state of the art (and a time saving approach to development when compared to other methods available at the time). Computers have come a long way since I began and every new day brings something exciting my way. It’s the reason I continue to pursue this technology with such diligence.

Of course, I’m always interested in hearing what you have to say. Do you see APIs as being safe and helpful, or as a source for problems in your organization? Which tools, development aids, and APIs do you use most often? Let me know your thoughts at John@JohnMuellerBooks.com.

 

Continuing Education

I don’t know if you’ve noticed, but I’m continually asking questions in my blog posts. In fact, you can find questions in a few of my books and more than a few readers have commented when I ask them questions as part of my correspondence with them. I often get the feeling that people think I should know everything simply because I write books of various sorts. In fact, I had to write a post not long ago entitled No, I Don’t Know Everything to address the issue. Experts become experts by asking questions and finding the answers. They remain experts by asking yet more questions and finding yet more answers. Often, these answers come from the strangest sources, which means that true experts look in every nook and cranny for answers that could easily elude someone else. Good authors snoop more than even the typical expert—yes, we’re just plain nosy. So, here I am today asking still more questions.

This year my continuing education has involved working with the latest version of the Entity Framework. The results of some of my efforts can be found in Microsoft ADO.NET Entity Framework Step by Step. You can also find some of my thoughts in the Entity Framework Development Step-by-Step category. I’ve been using some of my new found knowledge to build some applications for personal use. They may eventually appear as part of a book or on this blog (or I might simply choose to keep them to myself).

However, my main technical focus has been on browser-based application technology. I think the use of browser-based application technology will make it possible for the next revolution in computing to occur. It certainly makes it easier for a developer to create applications that run anywhere and on any device. You can find some of what I have learned in two new books HTML5 Programming with JavaScript for Dummies and CSS3 for Dummies. Of course, there are blog categories for these two books as well: HTML5 Programming with JavaScript for Dummies and Developing with CSS3 for Dummies. A current learning focus is on the SCAlable LAnguage (SCALA), which is a functional language (akin to F# and many other languages of the same type) based on Java.

Anyone who knows me very well realizes that my life doesn’t center on technology. I have a great number of other interests. When it comes to being outdoors, I’ve explored a number of new techniques this year as I planted some new trees. In fact, I’ll eventually share a technique I learned for removing small tree stumps. I needed a method for removing stumps of older fruit trees in order to plant new trees in the same location.

I’ve also shared a number of building projects with you, including the shelving in our larder and a special type of dolly you can use for moving chicken tractors safely. Self-sufficiency often involves building your own tools. In some cases, a suitable tool doesn’t exist, but more often the problem is one of cost. Buying a tool from the store or having someone else build it for you might be too expensive.

The point I’m trying to make is that life should be a continual learning process. There isn’t any way that you can learn everything there is to learn. Even the most active mind picks and chooses from the vast array of available learning materials. No matter what your interests might be, I encourage you to continue learning—to continue building your arsenal of knowledge. Let me know your thoughts on the learning process at John@JohnMuellerBooks.com.

 

Death of the Heading Group (hgroup) Tag

In the “Working with the new elements” section of Chapter 14 of HTML5 Programming with JavaScript For Dummies I briefly mention the <hgroup> tag. The purpose of this tag is good enough; it lets you group content together to form a heading from multiple elements. I had noted during my research that the tag is supported by a number of browsers but no one seems very enthusiastic about it. In fact, the tag is now dead and you should avoid using it.

Fortunately, there are some methods to work around the support the <hgroup> tag. The main workaround is to use the <header> tag instead. In fact, the presence of the <header> tag makes me wonder why anyone thought the <hgroup> tag was needed in the first place. In order to group elements using the <header> tag, you simply place them inside the tag like this:

<header>
   <h1>Section Title</h1>
   <p>Last Modified:
      <time datetime="2013-07-31">31 March 2013</time>
   </p>
</header>

In this case, you see a section title that also provides a date of last modification. The two items are obviously related (even though you may want to format them differently), so you want to group them on the page. Creating a group will help users interact with the page more easily and also reduce the work required to render the page for those with special needs. The <header> tag performs this task quite easily. You can then use CSS to format the information in any way needed so the viewer can easily distinguish the various kind so information.

The bottom line is that the <hgroup> tag is gone and you should forget it even appears in my book. Let me know your thoughts out repetitive or unneeded tags at John@JohnMuellerBooks.com. You should also contact me if you have any questions about using the <header> tag.

 

The Role of APIs in Application Development

More people are coming to understand that the PC will constitute just one of several devices that users will rely upon to perform daily computing tasks in the future. Articles such as, “Life in the Post-PC Era” are appearing more and more often because the trend is clear. However, unlike many people, I don’t see the PC going away completely. There really are situations where you need to size and comfort of a larger system. I can’t imagine myself trying to write an entire book on a tablet. If I did, the resulting Repetitive Stress Injury (RSI) would be my own fault. However, the higher reliability and slow rate of technological change also means that my systems will last longer and I won’t be buying them as often. In other words, I’ll continue to use my PC every day, but people won’t be making as much money off of me as I do it. This said, a tablet will figure into my future in performing research and reading technical materials that I would have used a PC to accomplish in the past.

The nature of computing today means that any application you write will need to work on multiple platforms. Users won’t want a unique application for each platform used. Unfortunately, new platforms arrive relatively fast today, so developers of most applications need some method of keeping their applications relevant and useful. Web-based applications are perfect for this use. These applications are the reason I chose to write CSS3 for Dummies and HTML5 Programming with JavaScript For Dummies. These books represent the future of common applications—those used by users every day to perform the mundane tasks of living and business.

When reading these two books, you’ll find a strong emphasis on not reinventing the wheel. In fact, a lot of developers are now finding that their work is greatly simplified when they rely on third party Application Programming Interfaces (APIs) to perform at least some of their work. The stronger emphasis on APIs hasn’t gone unnoticed by the media either. Articles such as, “How the API Movement is Transforming the Telecom Industry” describe how APIs have become central to creating applications for specific industries. In fact, you’ll find targeted articles for API use all over the Internet because APIs have become a really big deal.

I plan to write quite a lot more about APIs because I see them as a way of standardizing application developing, creating more reliable applications, and reducing developer effort in creating the mundane parts of an application. What will eventually happen is that developers will become more creative and APIs will put the art back into the science of creating applications. However, I’d like your input too. What do you see as the role of APIs in the future? What questions do you have about them? Let me know at John@JohnMuellerBooks.com.