Java 7 Released for General Use

Developers have been using Java 7 for quite some time now for creating and testing applications with additional functionality. However, until May 2nd, Java 7 wasn’t made generally available for users. Oracle plans to upgrade the entire user base at this point, so now is the time to start thinking about deploying those applications you’ve been developing. Just in case you’re new to Java programming, you can use my latest book, Java eLearning Kit for Dummies to learn how to work with Java quickly using the Windows, Linux, or Macintosh operating systems. The accompanying CD provides a fully interactive environment that includes impromptu tests and animation, to make learning a lot more fun. You can read the Java eLearning Kit for Dummies Manuscript Finished to get more information about the book. Be sure to contact me at John@JohnMuellerBooks.com if you have any questions about this new offering.

This new version of Java has a lot to offer. For example, it’s the first time Oracle has provided both the Java Development Kit (JDK) and JavaFX Software Development Kit (SDK) for the Macintosh OS X. You can find a quick overview of why you should upgrade to Java 7 on the Oracle site. A more complete, developer friendly, list of changes appears on the OpenJDK site. Long time Java developers say there is nothing earth shattering in the upgrade, but there are a wealth of welcome enhancements. Just which enhancement is most important depends on which developer you talk to. Java eLearning Kit for Dummies discusses which of these enhancements are most important to beginning developers—those targeted by my book. I would say that the feature that intrigues me most is the improved support for dynamic languages—a feature I may try out soon. You can find the official Oracle feature list on their site at http://www.oracle.com/technetwork/java/javase/jdk7-relnotes-418459.html.

Of course, now that Java 7 is out everyone is already starting to discuss Java 8. (In fact, some people are already talking about Java 9.) As with any new project, there are a lot of ideas and vaporware right now, with a true lack of any substance. You can be sure that I’ll keep you updated on the progress of Java 8. In the meantime, if you choose to get my book, I’d love to hear from you. Let me know what you like and what you’d like to see improved in the next edition. However, whatever you do, don’t keep silent if you have a question. I really do want to help you get the most out of everything I write.

 

Considering the Performance Triangle

It has been at least ten years ago now that I was reading an article and considering its ramifications in light of my current book. The name of the article has fallen by the wayside over the years, but the book was entitled, “.NET Development Security Solutions.” I was considering two important questions in the creation of my book:

 

  • Is it possible to create a truly secure application?
  • What is the actual cost of a secure application?


They’re essential questions and the answers to them continue to have an effect on my book writing efforts. The answer to the first question is yes—it’s possible to write a truly secure application. However, in order to obtain such an application, it can’t have any connectivity to anything. The second that an application has any connectivity, whatsoever, with anything else, it becomes contaminated by that connection. Don’t just think about users entering incorrect data here. The data on a hard drive can be corrupted, as can the memory used to hold the application. For that matter, someone could probably make the argument that it’s possible to create serious problems in the processor. My readers are a truly ingenious lot, so I’m sure if I gave you enough time, you could come up with an application that has no connectivity whatsoever with anything, but the usefulness of such an application is debatable. What good is an application with no inputs or outputs? I came to the conclusion, after quite a few hours of thought, that the most secure application in the world does nothing at all, interacts with nothing at all, and is pretty much worthless.

As I considered this security dilemma, it occurred to me that a truly secure application has no speed and is completely unreliable, given that it doesn’t do anything at all. As I worked through this book, I eventually came up with a performance triangle, where these sides are based on:

 

  • Security: The ability of the application to prevent damage to the application data, application code, the host system, and any connected systems.
  • Reliability: The accessibility of the application by the user. A reliable application is available for use at all times and makes every possible feature available to the user in a manner that precludes damage to the data or the system.
  • Speed: The pace at which an application can accept input, perform tasks, and provide output.


In order to increase speed, you must remove code that provides security and reliability. (I’m assuming here that the code is already as efficient as you can make it.) Likewise, when adding security features, you decrease
application availability in some situations and also add code that affects application speed. Making code reliable (which infers accessibility) reduces security and speed. The performance triangle has worked out for me for many years now as the basis for thinking about how application code actually works and the tradeoffs I must consider while writing it.

The use of the performance triangle isn’t based on language or platform. Whether you work on a Macintosh, Linux system, or Windows, you need to consider the effects of the performance triangle on your application irregardless of the host system. Likewise, language choice doesn’t affect the performance triangle, except that some languages provide more features that enhance a particular triangle element more than others. For example, C++ provides a significant speed advantage over many applications, but at a known cost to both security and reliability because the programmer is made responsible to adding the required safeguards. C# provides more safeguards, which enhances reliability, but at the cost of speed.

A problem in the current application design environment is that developers often focus on one element of the triangle (normally speed or security) at the cost of the other two. In order to build an application that performs well in a specific situation, the developer must consider the ramifications of all three triangle elements—an incredibly difficult task in some situations.

Even the questions that developers ask about the three elements of the performance triangle are often flawed. For example, many developers equate reliability with up time, but up time is only part of the reliability picture. An application that produces inconsistent results, denies required access to the user, or damages data in some way is unreliable. Robust applications explore all of the elements fully.

In the end, developers are usually faced with an imperfect scenario. Conflicting requirements and real world necessities often serve to weaken a good application design so that the developer must carefully craft the application to meet the maximum number of these requirements with the fewest possible faults. The situation comes down to one of weighing risk. A developer needs to ask which issue is most likely to cause the most harm and then write code that addresses that issue.

What sorts of design issues are you facing when developing applications? Do you use something like the performance triangle to help you consider the risks incurred when choosing one course over another in application development? Let me know your thoughts at John@JohnMuellerBooks.com.

 

Java eLearning Kit for Dummies Manuscript Finished

Nothing excites me more than to complete the manuscript for another book. I actually completed the Java eLearning Kit for Dummies manuscript last week Wednesday, but there are always last minute things to do. Today I’m considering the manuscript for book number 89 done. At this point, I’m working on Author Review (AR)—a process where I interact with the various editors. I answer any questions they might have about my book’s content and also check their edits to make sure no mistakes have been introduced.

This book is really exciting for a number of reasons. First of all, it’s a carefully crafted tutorial. Even if you’re a complete novice, you should be able to use this book. Every term is defined, the code is fully documented, and you shouldn’t run into any unpleasant surprises where the author assumes that you know something that you don’t. In fact, this book had a total of 15 beta readers involved in reviewing the material, in addition to my ever faithful editors. Of course, being precise and careful doesn’t mean you won’t have questions and I always welcome your questions about any book I write.

Second, this book is intended for use on multiple platforms. It doesn’t matter whether you work on a Linux, Macintosh, or Windows machine—you can use this book to learn how to write basic Java applications. Creating a book that works on so many platforms is exhilarating in the extreme. I couldn’t have done it without the support of my beta readers and I wish to thank every one of them publicly. You’ll find the names of the beta readers who didn’t mind me mentioning them in the Acknowledgements when the book is released.

Third, this book is the first I’ve ever written that comes with an interactive CD. You don’t really have to read anything if you don’t want. I estimate that you can get upwards of 85% of the content of the book simply by listening to the CD. Of course, books on tape have been providing this service for a long time. The difference with this book is that the CD is interactive. Not only will you hear the text, but you’ll see animations demonstrating the various things you need to know about Java. A number of different quiz types will test your knowledge of Java as you progress through the book. Finally, you’ll work through hands on exercises in order to build your skills. In short, this book includes everything that some of the newer interactive books include, but in a form that works on any computer system.

It’s important for any buyer to understand that this book truly is intended for novice readers. You aren’t going to get an intense Java workout by reading this book. In fact, here is a list of the lessons in the book:

 

  • Lesson 1: Starting With Java
  • Lesson 2: Using Primitive Variables
  • Lesson 3: Using Object Variables
  • Lesson 4: Formatting Variable Content
  • Lesson 5: Working with Operators
  • Lesson 6: Working with Conditional Statements
  • Lesson 7: Repeating Tasks Using Loops
  • Lesson 8: Handling Errors
  • Lesson 9: Creating and Using Classes
  • Lesson 10: Accessing Data Sets Using Arrays and Collections
  • Lesson 11: Performing Advanced String Manipulation
  • Lesson 12: Interacting with Files
  • Lesson 13: Manipulating XML Data


Nothing here is earth shattering, but you do get a good basic knowledge of Java. By the time you’re finished, you’ll know enough to move on to the harder to understand tutorials you find in books and online. In order to demonstrate all of the techniques in these topics, you’ll find 101 fully documented examples. Each one is designed for you to work through and interact with so that you fully understand precisely how Java works on your platform.

I’ll be working on the CD for the next while. As soon as it’s finished, I’ll provide you with an update about the CD content. For example, I’ll let you know a bit more about the kinds of exams I’m providing. Let me know if you have any questions about my new book at John@JohnMuellerBooks.com.

 

Considering the New Metro Interface—Ribbon Redux?

Microsoft has made it quite plain that the new Metro interface will be the default interface for Windows 8. All one has to do is spend some time looking at the Building Windows 8 blog posts to discover this fact—Metro appears all over the place. In fact, Microsoft is adamant that you will like the Ribbon and Metro whether you want to or not. Of course, this means preparing developers to create applications for the Metro interface. However, the current emphasis is in trying to convince people that they won’t miss out on anything by using the old Start menu interface, but that they’ll really want to use the Metro interface for maximum functionality. Both interfaces use the same low level functionality and rely on the same HTML5 engine.

Something that began to worry me though is that Microsoft seems to be espousing an architecture that is more closed and propriety with Metro. For example, they tell you that the Metro-style Internet Explorer interface isn’t going to support plug-ins and that it’s a good thing it doesn’t. When has restricting third party add-ins ever made something better? One of the things that has made Windows a great platform over the years is that Microsoft has encouraged third party additions that make a stronger offering. Anything that Microsoft can’t offer is provided by third parties—users are free to pick and choose what they want as part of their application experience.

Microsoft’s decision to close their architecture actually began with the Ribbon. One of the reasons I wrote RibbonX for Dummies and updated VBA for Dummies was to help VBA developers to continue creating add-ins for Office products. (You can read my continued posts about these books in the RibbonX for Dummies and VBA for Dummies categories.) Now Microsoft is closing something else—Internet Explorer—a central part of the Windows experience.

I’m not the only one who has concerns about Metro, nor am I the only one who has noted that the Ribbon actually slows power users considerably. A recent ComputerWorld article discusses the problem of both interfaces slowing business users and the fact that Metro will require hardware updates for maximum functionality, despite Microsoft’s protestations to the contrary. I think that the Ribbon does indeed help the less skilled, non-geek, user to become more productive with less effort, but at the cost of hampering everyone else. I’ve learned though to wait to see how things work out. With the Ribbon, I think more people have won than lost, but those who have lost productivity have lost in a big way. Metro may prove to be more of the same. At least you can select the old Start menu interface if desiredOffice didn’t offer this option without a third party add-in.

What concerns me right now though is that Microsoft added a host of productivity enhancements to Windows 7 that really did make sense. I use many of them every day now and I’ve talked about them in Professional Windows 7 Development Guide. These enhancements apparently go by the wayside when you use the Metro interface, which makes me wonder why Microsoft developed them in the first place. I find that the new Windows 7 enhancements really do workI’m able to open my documents and get to work considerably fasterI feel much more informed about my work environment. It seems a shame that these enhancements will be left by the wayside if Microsoft ends up making Metro the only option a future version of Windows.

What do you feel about the new Metro interface? Is it a productivity enhancement or an impediment to getting things done quickly? I’m curious because I’ll eventually need to update my books for Windows 8. Which interface do I focus on during these updates? When you send your opinion, please let me know whether you’re speaking as a home user or as a business user. Let me know your thoughts at John@JohnMuellerBooks.com.

 

The Ribbon in Windows 8

Windows 8 will include the Ribbon in a lot of places that you’ve never seen it before and it appears that Microsoft eventually plans to use the Ribbon everywhere it can. For developers, this means a major reworking of applications that have been stable for a long time. For users, it means learning a new way of doing things when the user hasn’t worked with a version of Office that includes the Ribbon. A blog entry by Preston Gralla put things into perspective for me. Even if you hate the Ribbon, you’ll have to use it in Windows 8.

In my book, C# Design and Development, I discuss the need to create a reliable user interface that works for every user who uses an application. A number of changes are occurring in Windows 8 that are going to prove interesting when viewed in the perspective of the user interface—who it serves best. Earlier versions of Windows are better suited for the power user because they provide a quick method of finding precisely what you need using toolbars and menus. However, novice users are often lost and sometimes can’t accomplish the required tasks at all.

RibbonX for Dummies describes how the Ribbon can simplify the user experience and even create a workflow environment for novice users. In fact, many of the examples in that book are based on workflows. I get into some examples of the Ribbon in the latest edition of VBA for Dummies, but not at the depth found in RibbonX for Dummies. The emphasis of these examples is to help you create a usable Ribbon interface in Office. The point is that the Ribbon is a useful interface for a particular group of usersmost likely the majority of Windows users who aren’t technically savvy. Many power users that I’ve talked with still view it as cumbersome and state emphatically that it slows them down. Managers I talk with are obviously most concerned about training costs associated with moving to the Ribbon.

Because the Ribbon has taken center place in Office, I’ve written a number of blog entries about it for VBA developers. I plan to continue covering the Ribbon for Office in the VBA for Dummies category. From what I’ve been reading in Steven Sinofky’s blog posts, it appears that at least some of the information I’m providing for VBA for Dummies readers will also apply to Windows 8 developers, but it isn’t clear yet at what level. However, I’ll keep tracking Windows 8 carefully and let you know how things start working out.

In the meantime, as a developer, you should start looking at applications outside of Office that use the Ribbon successfully. For example, you’ll find a good Ribbon experience in WinZip. Working with this user interface will likely provide ideas for a Ribbon for your own applications.

Of course, as an author, I’m constantly looking for reader input. How do you feel about the Ribbon? Do you think it’ll prove cumbersome or will it be a great benefit? What questions would you like answered in a user-level book about Windows 8 when it comes to the Ribbon? What would a developer need to know about it? Let me know your viewpoint at John@JohnMuellerBooks.com.

 

Progress Bars in the Real World

In Chapter 5 (page 74) of Professional Windows 7 Development Guide you find an example showing how to use the progress bar. In this example, you discover how to set the progress bar state, start the progress bar, pause it, and reset it. Each of these actions changes the display of the progress bar on the Taskbar (as described on the bottom of page 75). Displaying the progress bar on the Taskbar is really helpful because it can let the user check the status of a task quickly, without actually displaying the application.

Microsoft’s theories are often nice, but several readers have written to tell me that this technology can’t possibly work in a real world application. Reader skepticism is healthy and I always welcome it because it forces me to think. So, I spent a good deal of time thinking about and researching this particular Windows 7 feature.

You won’t find the progress bar shown on the Taskbar for any Microsoft product that I’m aware of (if anyone knows of one, please do write me at John@JohnMuellerBooks.com). However, I did find one real world product so far that does indeed use the new Windows 7 progress barInternet Download Manager. As you download a file from online, you see it’s progress on the Taskbar. I must admit, the feature works great. However, this product appears to use only the normal status state. For example, pausing doesn’t appear to turn the Taskbar presentation yellow (at least, it didn’t for me). Still, it’s a real world example if you want to see one. I’d be interested in hearing about other real world examples that I can share in my blog because real world products often demonstrate how to use a particular feature better than any example.

Several readers also jumped immediately to Chapter 5 and didn’t read any of the preceding material. This particular problem happens all of the time. I’m guilty of jumping myself at times and missing out on something important. They wrote to complain that the example won’t compile. You need to download and install the Windows API Code Pack for the Microsoft .NET Framework. The instructions for doing this appear on page 46 of the book. Make absolutely certain that you download and install all of the required software, including the .NET Framework 4.0 (described in Chapter 3) before you attempt to use the examples in the book.

I also had one reader ask about a version of these examples that will run under Mono. So far I haven’t been successful in creating such an example. I’m not actually sure why you’d want to create such an example (and the reader didn’t respond to additional queries on my part). If someone wants to discuss Mono in more detail with me, please be sure to write. You can read my latest update on Mono in my An Update About Mono post. In the meantime, please keep those skeptical e-mails coming 8).

An Update About Mono

I’m not one to get stuck on a particular form of a technologyit’s best to use the solution that works, rather than make a favored solution try to fit. Many .NET developers miss opportunities to move their solutions to other platforms or use them in places that normally don’t work well with the .NET Framework by leaving out Mono, the .NET Framework alternative. Most people associate Mono with the Macintosh or Linux, but there is also a Windows form of Mono. When Windows Server 2008 Server Core came out without the .NET Framework, I immediately wrote an article about it entitled, “Mixing Server Core with .NET Applications.” In fact, I’ve promoted Mono to frustrated administrators in my book, “Administering Windows Server 2008 Server Core.” Before Microsoft finally came out with a .NET Framework solution, you could use Mono to do things like run ASP.NET applications on Windows Server 2008 Server Core and my book told you how to do it in Chapter 24.

So, I was more than a little disturbed when I heard that the Mono crew had been laid off by Novell. Fortunately, I discovered later that the layoffs are just a prelude to having Mono supported by a new company named Xamarin. To read more about this company, check out Miguel de Icaza’s blog entry, “Announcing Xamarin.” Not only will the new company continue supporting the open source versions of both Mono and Moonlight (the Silverlight alternative), but it’ll create new commercial products for both Android and iOS. In short, this development is actually good because the new company will focus on this incredibly useful technology.

My main concern for the new company is that they won’t have the funding to do everything they envision doing, but that remains to be seen. Reading Mary Jo Foley’s article gives me hope that they’ll succeed. What are your thoughts about Mono? Is it a technology that you’ve used or at least are willing to try? Let me know at John@JohnMuellerBooks.com.

 

Quotas Revisited for Windows XP

The other day I provided a post about quotas that contained a simple three step process for turning quota monitoring on and logging quota events, without actually enforcing the quota. It turns out that the process works just fine with Vista and Windows 7, but it doesn’t quite work with Windows XP. Microsoft made a fix between operating systems and didn’t mention the change to anyone. Of course, this is an old story with Microsoft. You have to watch carefully because you might miss a fix and find that your perfectly functioning batch file or script suddenly stops working.

It turns out that Windows XP does things a little differently. When you execute the FSUtil Quota Track C: command, you get the expected result; tracking is enabled. The next step is to turn on exception logging using the WMIC QuotaSetting Where Caption=”C:” Set ExceededNotification=True command, which also works as expected. However, when you execute the WMIC QuotaSetting Where Caption=”C:” Set WarningExceededNotification=True command to turn on warning logging, suddenly, the exception logging is turned off. Likewise, if you were to reverse the order of the two WMIC commands, you’d find that warning logging is turned off.

Fortunately, there is a fix to this problem and it’s a very odd fix indeed. In order to enable tracking and turn on both levels of logging, you need to follow this order in Windows XP:

  1. FSUtil Quota Track C:
  2. WMIC QuotaSetting Where Caption=”C:” Set ExceededNotification=True
  3. WMIC QuotaSetting Where Caption=”C:” Set ExceededNotification=True

That’s right, you issue the exception logging command twice and you’ll find that both logging check boxes are checked. Microsoft fixed this particular error between Windows XP and Vista, but I can’t find any source that tells me about the fix. If you find one, feel free to contact me at John@JohnMuellerBooks.com.

Moving from 32-bits to 64-bits

64-bit processors have been around for a long time now. Unlike the move to 32-bit processors, the move to 64-bit processors has been sluggish. In fact, if the move goes any slower, we’ll still be using 32-bit processors ten years (or more) from now. The main reason that the move to 64-bit processors has been so incredibly slow is that users are basically happy with their 32-bit setups. There isn’t any compelling application that makes the move to a 64-bit environment necessary, or even desirable. So, we still have 32-bit Windows XP enjoying a huge market share. It wasn’t until October 2010 that its market share finally fell below 60 percent.

However, the environment is beginning to change for a number of reasons. For one thing, Windows XP is becoming less secure as Microsoft starts to view it as an old OS past its prime. Yes, you still get security updates for Windows XP, but it’s only a matter of time before those updates become ineffective; the platform is simply becoming outdated and hard to maintain.

Anyone who has worked with Vista knows that the platform has problems. In fact, I tried my best not to work with it unless absolutely necessary. Windows 7 is a different story. I’ve been using it now for quite a few months without any problems at all. In fact, except for a few problem applications, I don’t even notice the Windows 7 differences any longer; it has become part of the background for me, as it has become part of the background for many people.

Windows 7 works best as a 64-bit operating system. I tried it as a 32-bit operating system and found that it lacked pep. A memory upgrade and moving to Windows 7 64-bit have made all the difference in the world. I now consider Windows 7 a true upgrade to Windows XP and hope that people begin moving to it en masse soon.

Microsoft has also made the move to 64-bits in some of the server products it offers. For example, Microsoft Exchange comes only as a 64-bit product now, as does SharePoint. Consequently, many organizations are beginning the arduous upgrade to 64-bit operating systems on their servers.

Using a 64-bit setup does have significant advantages. Of course, there is the availability of additional memory to consider. It’s also possible to perform certain code optimizations on a 64-bit system that you can’t achieve using 32-bits. Of course, if you want to obtain the full benefits of a 64-bit platform, you need 64-bit applications. Some developers are worried about the consequences of this move and for good reason. Making the move to the 64-bit environment is fraught with unexpected pitfalls. My latest article, “10 Biggest Issues for Developers Migrating 32-bit Applications to 64-bits”, explains some of the most common problems that developers encounter when moving their applications to the 64-bit environment. Give it a read and let me know what you think at John@JohnMuellerBooks.com.