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.

 

Differentiating Between CSS Boilerplate, Template, and Frameworks

You often see the terms boilerplate, template, and framework uses almost interchangeably online when people discuss CSS. In fact, some readers are confused about these terms and have written me about them. There are distinct differences between the three terms and you really do need to know what they are.

Boilerplate is code that you can simply cut and paste to use in an application. As an alternative, you can simply import the file that contains the boilerplate code. However, boilerplate code is designed to perform a specific task without modification in your application. Someone else has written code that performs a common task and you simply borrow it for your application (assuming they make it publicly available). It would be nearly impossible to create a complete application using just boilerplate code because it’s inflexible. Developers often stitch multiple sources of boilerplate code together to perform specific tasks, but then add custom code to the mix to customize the output.

Templates, like boilerplate, provide a means to reuse code, but the implication is that the code is modified in some way and that it’s also incomplete as presented. Yes, the template may provide a default presentation, but the default is usually bland and simplistic. Using templates makes it possible to create a customized appearance without writing a lot of code. Of all the readily available code categories, templates are the most common. Template makers also commonly create wizards to reduce the time a developer needs to employ a template even further. The downside to templates is that they do require some level of skill and more time to use than boilerplate.

Frameworks can be viewed as a container for holding other sorts of code and presenting it in an organized manner. However, a framework still consists of modifiable code. The difference is that a framework will commonly control the layout of a page, rather than the appearance of content it contains. Developers commonly combine frameworks with both templates and boilerplate to create a finished site. In general, frameworks always rely on a wizard to make creating the site easier.

Using the correct term for the kind of code that you’ve created makes it easier for others to know whether your solution will help them. In many cases, developers don’t want to be bothered with details, so boilerplate is precisely the solution needed. At other times, management has decided that a site with a perfectly usable framework needs a new look, so the developer may want a template to create a customized appearance within the existing framework. There are still other times where a new layout will better address the needs of site users, so a new framework is required.

Precise terminology makes it possible for people to communicate with each other. The creation and use of jargon is essential to any craft because precision takes on new importance when describing a process or technique. Developers need to use precise terms to ensure they can communicate effectively. Do you find that there is any ambiguous use of terminology in my books? If so, I always want to know about it and will take time to define the terms better in my blog. Let me know about your terminology concerns at John@JohnMuellerBooks.com.

 

Keeping Your CSS Clean

It happens to everyone. Even with the best intentions, your code can become messy and unmanageable. When that code is compiled into an executable, the compiler can perform some level of cleanup and optimization for you. However, when you’re working with a text-based technology, such as Cascading Style Sheets (CSS), the accumulated grime ends up slowing your application measurably, which serves to frustrate users. Frustrated users click the next link in line, rather than deal with an application that doesn’t work as they think it should. It doesn’t take long to figure out that you really must keep your CSS clean if you plan to keep your users happy (and using your application).

Manually cleaning your code is a possibility, as is keeping your code clean in the first place. Both solutions can work when you’re a lone developer or possibly working as part of a small team. The problem begins when you’re part of a larger team and there are any number of people working on the code at the same time. As the size of the team increases, so does the potential for gunky code that affects application speed, reliability, and security negatively. In order to clean code in a team environment, you really do need some level of automation, which is why I wrote Five Free Tools to Clean Up Your CSS. This article provides good advice on which tools will help you get the most out of your application.

The cleaner you keep your code, the faster the application will run and the less likely it is to have reliability and security problems. Of course, there are many other quality issues you must consider as part of browser-based application development. Messy CSS does cause woe for a lot of developers, but it isn’t the only source of problems. I’ll cover some of these other issues in future posts. What I’d like to hear now is what you consider the worst offenders when it comes to application speed, reliability, and security problems. Let me know about your main source of worry 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.