Next Up: Data Modeling

I tell new developers (all anxious to write the bestest, fastest code they can) that they're worrying about the wrong thing. The most important thing is to get their database design right.

If you get the database design right then everything else will be easy; if you get the database design wrong... then make sure you're paid by the hour. In December, we're going to review one of the top vote getters in the database category of this year's VSM Readers Choice Awards: CA Technologies' ERWin Data Modeler.

We expect a lot from our database design tools: That they support whatever notation we're using, that their output be compatible with whatever database we're using, that we be able to share the designs that we create with the tool with all of the stakeholders in our development, that it integrate with our development toolset. And, of course, that they actually help us get the database design right.

These days there's a more important question: In a world of Object Relational Modeling tools (like Visual Studio's Entity Framework, to name one) is their still a spot in the toolspace for ERWin?

Posted by Peter Vogel on 11/17/20100 comments


Aspose Set to Merge PDF Packages

We reviewed Aspose.PDF recently, looking at its ability to create PDF documents from .NET applications. Aspose actually has two related PDF products, Aspose.PDF and Aspose.PDF.Kit, however in a bid to ease complexity, the company is thinking about merging the two products some time before the end of the year.

Posted by Peter Vogel on 10/26/20100 comments


JetBrains' Test-Driven Dev Tool

Test Driven Development must be important: Vendors are releasing tools just to support parts of the TDD process. JetBrains -- which makes ReSharper -- has just released a new code coverage add-in for Visual Studio 2005 to 2010. It's called dotCover and highlights code covered by unit tests. It works with a variety of unit test frameworks and has a console front end that allows it to integrate with continuous integration processes.

Posted by Peter Vogel on 10/26/20100 comments


Working with Vendors

When you think about it, a reviewer like me has a lot of effrontery. Fundamentally, I call up software vendors and ask them to send me a free copy of their software. Often the vendor does just that, while a few vendors suggest that I download the evaluation copy of their product from their Web site.

I explain to those vendors who point me at their evaluation copy that I'm uncomfortable with reviewing anything but the exact same bits that a real developer gets. I'm keenly interested in seeing what the "real" installation process is like and what, if any, issues are raised by the company's licensing strategy. In addition, I live in fear of criticizing some aspect of a product and have it turn out that I was looking at some limitation built into the "evaluation" version and not present in the "real" bits.

Most vendors are comfortable with providing a free version. After all, having me download software doesn't explicitly cost them anything and, at most, they are only losing the profit they might have made had I purchased the software myself.

Some vendors are not. For instance, we look at the latest versions of the InstallShield and Wise installation and deployment tools in the upcoming November issue of Visual Studio Magazine. InstallShield was steadfast in that they do not provide free software to anyone under any circumstances. If I wanted to review the product, I was going to have to review the evaluation version available on their Web site. I don't think that I've misled any readers as a result of doing that, but please let me know if there's something in the InstallShield review that isn't accurate because I was using an evaluation version.

I simply wasn't able to get a response from Wise despite several e-mails to the company and to their public relations firm. I mention this because (perhaps unfairly) I use this as a measure of how well the company responds to requests.

When I first started reviewing software in the late 80s, I would often test the company's technical support by asking a question. This was only a reasonable test if the person processing the request didn't realize that I was reviewing the software. That's not possible any more, so I usually measure a company's responsiveness by how quickly they get back to me from the start of the review process to the end. I recognize that these companies know that this review is part of their marketing process, so it's not a great measure of the organization's responsiveness. However, Wise is unique in simply not responding at all. I'm not sure what that tells me about the company.

Does anyone out there use the Wise installer? How has the company dealt with you when you've had an issue with their software?

Posted by Peter Vogel on 10/21/20100 comments


The Beauty of Consistency with Aspose.PDF

One of the things that I like about object models is consistency. If I learn one object, I hope that I can leverage that knowledge when working with other objects. I also like it if the object model that I'm working with is compatible with the .NET object model. Aspose.PDF, which I reviewed in the September issue of Visual Studio Magazine is like that.

For instance, with Aspose.PDF if I want to create a document with some text, I first create a Pdf object, create a Section and add the Section to the Pdf's Sections collection. I then create a Text object and add the Text to the Section's Paragraphs collection (I can add a Text object to the Paragraphs collection because Text inherits from Paragraph). Right at the start you can see the consistency between how a Section is added to the Pdf object and the Text is added to the Section.

The code looks like this (and you can see the repetition):

Dim doc As Pdf = New Pdf()

Dim sec As New Section()
doc.Sections.Add(sec)

Dim txt As Text = New Text("A curve")
sec.Paragraphs.Add(txt)

This is exactly the way that I expect objects-with-collections to work, so I'm a happy camper.

While I like collections, I also appreciate shortcuts. Aspose, for instance, allows me to create a Section and add it to the Pdf object by using an inconsistent version of the Add method that accepts no parameters:

Dim sec As Section = doc.Sections.Add()

I'm comfortable with using this shortcut because I believe that a developer reading this code would understand what the code was doing.

There's a second shortcut that I can use to create a Section and add it to the Pdf object. I can pass a Pdf object to the Section as I create it:

Dim sec As New Section(doc)

I'm less comfortable with this shortcut because I don't think it's obvious what's going on here. In fact, a developer with knowledge of the Decorator pattern might assume that's what's happening here (and it's not, by the way).

But these are all shortcuts and I'm free to ignore them to stick with the standard objects-with-collections coding.

Now what happens when I create a document with a graphic? The pattern is the same but I create a Graph object and add it to the Section's Paragraphs collection (a Graph inherits from Paragraph, just like a Text object does). So that code looks like this:

Dim gph As Graph = New Graph(sec1, 100, 400)
sec.Paragraphs.Add(gph)

I can build up a Graph by creating Shapes and adding them to the Graph's Shapes collection in a way very similar to the way I added Texts and Graphs to Sections. This example creates a Curve (using an array of positions) and adds it to the Graph object:

Dim pos () As Single = New Single() {0, 0, 200, 80, 300, 40, 350, 90}
Dim crv As Curve = New Curve(graph1, posArr)
gph.Shapes.Add(crv)

However, I have to admit, the number of parameters required to create a curve makes creating a graphic out of shapes more than a little intimidating. Ignoring that though, I appreciate the care that went into the Aspose.PDF object model.

Posted by Peter Vogel on 10/15/20100 comments


Aspose.Pdf: Documentation Done Right

I spend so much time talking about how I feel let down by the documentation provided with the software that I review that it would be churlish not to comment on a company that does it right. So here it is:

Aspose.Pdf does it right.

I reviewed Aspose.Pdf for the September issue of Visual Studio Magazine, and one thing that impressed me was the product's documentation and help. Aspose provides a Help file that breaks down into two main sections. First, there is a Getting Started section that provides an overview of the package and what it does. The very first sentence provides what's often missing in these packages: a succinct description of what the product does in terms of "why you'd want to use it":

Aspose.Pdf for .NET is a .NET Component built to ease the job of developers to create PDF documents ranging from simple to complex on the fly programmatically.

The second section is a programmer's guide that provides detailed information on using Aspose. This section is in several parts. The first sections are introductions that assume you're not familiar with the basic technologies used by the package and provide essential background information. You're free to skip over these sections, of course, if you are familiar with the information.

The next part section is "scenario based:" it walks a developer through the basics of creating a "Hello, World" application with Aspose.PDF. This would probably be where most programmers would get started -- skipping the background material to see if they can get something working.

Aspose.PDF is smart enough to continue in that mode, organizing the information in the next few parts around typical scenarios. Rather than dumping the reader into an alphabetical list of classes and methods, information is organized by what developers would want to do: "Working with Sections," "Working with Images" and so on.

Aspose.Pdf has recognized that the typical developer question when starting to work with a product is not, "How do I use this class?" Instead, most developers want to ask the question, "How do I accomplish this task?" These parts don't consist of a hunk of code that you have to figure out. Instead, you get an overview of what the solution looks like, followed by the code you need.

Once you've gotten up to speed in Aspose.Pdf and have moved on to the point where you are asking "How do I use class ???', there's a an API reference that answers those questions.

It's just nice to see documentation done right. And darned unusual, also.

Posted by Peter Vogel on 10/08/20103 comments


Attracting the User's Attention in CodeRush

This is a continuation of my last blog with Mark Miller, chief scientist at Developer Express, about what his company has learned about user interface design in creating CodeRush. One of the issues in CodeRush is attracting the user's attention to what's important, which Mark addresses in this blog.

Before going to Mark's feedback, I wanted to feature one quote what seemed to me like very good advice from Mark: "Watch product demonstrations and look for moments when the presenter takes too much time explaining and pointing to the UI. These moments generally indicate opportunities to improve the UI using these guidelines."

Mark Miller: Everything onscreen is information. For example, data in a table, lines delineating the table cells, and the border around the table. But not all information is equally relevant. For example, the data in a table is much more important than the lines separating the cells.

If you're going to add less relevant information, make it both easy to find and easy to ignore. This usually means making each type of information visually distinctive in shape or size and less relevant information lower in contrast... which leads to matching emphasis to information relevance. For example, you should dial up the contrast for more important information and dial it down for less important information.

Use animation when you need to attract the gaze of your customers. This is extremely useful when resurfacing from a recent drilldown into data. To reduce cognitive friction while navigating, it is helpful to restore previous views into data as you bubble out (scrolling or scaling the data appropriately so it fits within the view just as it did when the customer previously drilled down).

In addition, you often want to restore a caret or cursor into that data view. Carets are sometimes small and hard to see when the view is vast. Imagine a very large monitor showing many lines of code and suddenly changing the position of the caret relative to the view -- try to find it). Animation can help draw the eye into that newly repositioned caret location, which may often be at a very different location than where the customer was previously looking. A low-contrast locator beacon animates to reveal a new caret position as part of restoring a previous view into the code.

Animation is also useful when onscreen elements are physically moved by the user. It's so much easier to see what's happening. Compare a smoothly animated repositioning to an instant redraw, which is sometimes easy to miss. Another tip: when animating, acceleration and deceleration are both good because they mimic the natural motion we see in the world every day.

Posted by Peter Vogel on 10/04/20100 comments


Defining a User Interface for Visual Studio with CodeRush

Tools like CodeRush that extend Visual Studio require a different approach to user interface design than other applications. As I noted in an earlier blog, CodeRush packs a ton of information into the Visual Studio screen. Wondering about how CodeRush makes it work, I asked Mark Miller (chief scientist at DevExpress) about what conclusions Developer Express has come to about UI design. Specifically, I asked about any general principles that Mark could share.

As his answers show, what DevExpress has learned applies to all applications, not just to Visual Studio Add-Ins. As Marks says, "Every UI decision should be intentional and should be justifiable using guidelines to good design. We avoid UI decisions based on whimsy or weak justification."

Mark Miller: Avoid modal dialogs, especially for frequently-accessed functionality. Instead try to flatten your UI; pull it down to the same level as the data. This has the advantage of keeping important data in view and is often a more pleasing experience for the customer.

Consistency is very good. Once a UI convention is established, use it everywhere it makes sense. For example, we use a glowing border to indicate active Fields, active Linked Text, and active references with the Tab to Next Reference feature. If used consistently, UI conventions become a sort of language, effectively communicating information to the customer.

Staying with convention simplifies the cognitive path to understanding (which is a very good thing). For example, our Tab to Next Reference feature uses the Tab key to shift focus among references in the code. This follows the well-established convention of using the Tab key to shift focus among controls in a window, so it makes the experience of using this feature quite enjoyable.

Also, we use well-established visual conventions when appropriate. For example, our preview hints for refactorings uses strikethrough to indicate deleted text and proofreader insertion marks ("^") to indicate where references to the new local variable will be inserted.

Use context to infer customer intent whenever possible. For example, Tab to Next Reference works when the caret is inside an identifier and you press the Tab key. If the caret is at the start or end of a line, then the Tab key simply inserts a tab as expected.

Another example: In CodeRush when the Refactor key is pressed, a short list of available refactorings (out of over 200 possible) appears in the menu. If only one refactoring is available, we can simply apply it.

The answer to the question of availability is the responsibility of each refactoring, but it's all based on context, such as the location of the caret or selection in the code. That also allows us to have one-keystroke access to a great deal of power without overloading the customer with noise (e.g., showing menu items for refactorings that simply don't apply in the given context).

Position relevant details in close proximity to the elements they describe. This reduces the amount of eye movement needed to take it all in. For example, in addition to shipping unit test runner (which is useful for viewing, managing and running tests from a high level), CodeRush places the results of individual unit test runs inside the code, right next to each test method, so it's easy to see if it has passed, failed or is waiting to be run.

Preview hints are very effective. They lower the barrier to first use, showing customers what will happen when they select the active menu item.

Posted by Peter Vogel on 09/30/20102 comments


A .NET API for Managing WCF Services

Once you've got more than two or three services built, you'll need to start thinking about how you're going to manage them: You're going to need an Enterprise Service Bus (ESB). Neudesic's Neuron ESB (http://products.neudesic.com/neuron/) is an ESB built completely with Microsoft technologies and supports a broad range of the Microsoft toolset (SQL Server, SharePoint, CRM, and Microsoft's Line of Business Adapters).

More importantly, from a developer's point of view, the Neudesic ESB API is easy to use from .NET. Neuron is hosting a Webinar on ESB for the .NET Developer on October 20th.

Posted by Peter Vogel on 09/21/20101 comments


Debugging and Deploying Office Add-Ins with Add-In Express

I'm obviously impressed with Add-In Express, reviewed in the September issue of Visual Studio Magazine (Build Office Apps with Add-in Express). I've built a lot of Office-based applications and it's never been fun or pretty. Using Visual Studio Tools for Office didn't make the process any easier -- it substantially increased the amount of required plumbing code that you had to write to make anything work. Add-In Express takes care of all the ugly plumbing so that you can work on the custom code that your Add-In requires.

Even debugging is made easier with Add-In Express. You can press F5 to debug your application by specifying the path to the executable for one of the Office applications in the project's Debug Options. Compiling your Add-In registers it in Windows on the local computer so that, when you start an Office application, your Add-In will be available. You can also unregister a component (essential if your Add-In isn't working right and you want to actually, you know, use Office) by right mouse clicking on the project in Solution Explorer and picking Unregister ADX Project.

But that brings up another issue: installing your solution on some other computer. With Add-In Express, the first step is to right-mouse click on the project in Solution Explorer and select Create Setup Project. A Wizard pops up to let you select some options for your setup project. When the Wizard is done, you have a complete setup project for your Office Add-In. After building the setup project you have an MSI file (and a setup.exe for old times' sake) that you can take to another computer to install your add-in.

I built my application in Visual Studio 2010 with .NET 4 so I also had to install .NET 4 on my target computer. But other than that wrinkle, everything worked the first time.

I didn't test the feature but, in theory, you can even publish your Add-In so that it will download and install itself over the Internet using ClickOnce. That's very cool.

Posted by Peter Vogel on 09/19/20100 comments


Adding a Menu to Office with Add-In Express

In the September issues of Visual Studio Magazine we reviewed Office Add-In Express (Build Office Apps with Add-in Express). I found that creating an Office Add-in with Add-In Express is incredibly easy.

After picking "ADX COM Add-In" from the Extensibility section of the New Project dialog, a Wizard walks you through all the choices necessary to create the initial project, including generating a strong name key file. As part of the Wizard you can choose which version of Office you're going to target (targeting Office 2000 supports all versions) and how many of the Office components you want your Add-In to integrate with. The resulting project has all the necessary references, including DLLs for both 32 bit and 64 bit systems.

Also added to your project is AddInModule.cs, which handles communicating with Office. Not only is all the necessary base code present but so are GuidAttributes added to the Class to support installing into COM. In design view for the AddInModule there is something new: a Menu across the top with about twenty options.

Seven of those options are tied to adding menus (including context menus) to Office and an additional seven are for adding items to the Ribbon (other support creating SmartTags and other Office features). While adding an item to the new Office Ribbon is notoriously awkward and difficult, with Add-In Express you just click the AdxRibbonTab option at the top of the design surface. Once you've add a AdxRibbonTab, you can add controls to it using the Controls property on the control's Property List. You even get a preview of the impact on the ribbon.

Posted by Peter Vogel on 09/17/20100 comments


VS Toolbox: Looking Ahead

Next month we're going to do another joint review like the ReSharper/CodeRush review we did last month (Two Productivity Tools for Visual Studio 2010). This time, however, we'll be looking at two installation packages.

So what do you worry about in installation packages? What should we be looking at in reviewing these products? What products should be reviewing (my first thoughts are Wise and Installshield).

Posted by Peter Vogel on 09/14/20100 comments


Subscribe on YouTube