Feeds

Time for UML tools to evolve

Refactoring gap

Security for virtualized datacentres

There's an audible rhythm to development tools. Modern integrated development environments (IDEs) go like this: tap, tap, bam! Diagramming tools go like this: point, click, pause, point, click, pause...

Now that the two are starting to overlap through things like UML plug-ins for IDEs and round-trip engineering as standard, the overall differences are becoming more pronounced than ever. IDEs stand out as being fast and lovely to use, whereas - with a few possible exceptions - modeling tools are slow and cumbersome. They force you to use the mouse - an eminently serial input device.

While they're being left behind in terms of productivity, though, modeling tools are making headway with advanced features such as round-trip engineering - the ability to turn a UML model into code, and reverse-engineer code into a UML model. The model is as close to the code as it's ever been right now, meaning that there's little excuse for the model and the code to become out of sync.

There's still a huge gap when it comes to refactoring support, though. If the model and the code are really tightly integrated, then you'd expect to be able to perform operations on the code via the model elements.

How cool would that be, to be able to right-click on a class in a UML diagram and choose "extract interface", then have a little pop-up window that shows the before and after code segments? That would be true integration. It's certainly needed if the trend for integrating a UML tool into an IDE is to make any sense at all.

Detailed design diagrams such as class and sequence diagrams are very nearly at the code level, so refactoring operations on these diagrams would be virtually the same as code refactorings. In fact, I can't help wondering why the UML support in NetBeans for example doesn't include the same right-click menu as in its Java editor, when you right-click on a class (including the refactor sub-menu of course).

But why stop at code-level refactoring? A UML tool operates at so many more levels than just code. There are business processes, requirements analysis, preliminary design, deployment and tests to consider.

UML is also concerned with both static and dynamic models. A "refactor" submenu on a modeling element at these levels would more suitably be called "prefactor".

What sort of prefactorings would exist under this sub menu? To answer that, we'd need to look at the nature of refactoring itself.

Refactoring is all about improving the design of code without modifying its semantics. In other words, the result of a single refactoring is better-designed code that does essentially the same thing. There's also an implied caveat: if we look at Object Oriented Analysis and Design (OOAD) as a "stack" with analysis models at the top, and code plus unit tests at the bottom, refactoring operates at the code level.

It doesn't affect anything "above" it such as requirements or the preliminary or logical design. Prefactoring should operate at the level it's performed on. So prefactoring a use case - such as extracting a use case with an "extends" relationship to the original, for example - should only affect the use case, nothing at higher "levels". It seems reasonable, though, that a prefactoring would have a knock-on effect on the levels beneath it: change the architecture and you'd expect the design to change too.

This would be round-trip engineering on steroids: probably beyond what current tools can do, but it's the direction they should be heading in.

We already have round-trip engineering to keep the model and the code in sync. I believe that native and obvious, prominent prefactoring support (with plenty of keyboard shortcuts) is the final missing link needed to bring UML fully into the agile world.®

Matt Stephens has co-authored Use Case Driven Object Modeling with UML: Theory and Practice, which illustrates how to get from use cases to code using a core subset of UML, and Extreme Programming Refactored: The Case Against XP.

Providing a secure and efficient Helpdesk

More from The Register

next story
New 'Cosmos' browser surfs the net by TXT alone
No data plan? No WiFi? No worries ... except sluggish download speed
iOS 8 release: WebGL now runs everywhere. Hurrah for 3D graphics!
HTML 5's pretty neat ... when your browser supports it
Mathematica hits the Web
Wolfram embraces the cloud, promies private cloud cut of its number-cruncher
Mozilla shutters Labs, tells nobody it's been dead for five months
Staffer's blog reveals all as projects languish on GitHub
'People have forgotten just how late the first iPhone arrived ...'
Plus: 'Google's IDEALISM is an injudicious justification for inappropriate biz practices'
SUSE Linux owner Attachmate gobbled by Micro Focus for $2.3bn
Merger will lead to mainframe and COBOL powerhouse
iOS 8 Healthkit gets a bug SO Apple KILLS it. That's real healthcare!
Not fit for purpose on day of launch, says Cupertino
prev story

Whitepapers

Providing a secure and efficient Helpdesk
A single remote control platform for user support is be key to providing an efficient helpdesk. Retain full control over the way in which screen and keystroke data is transmitted.
A strategic approach to identity relationship management
ForgeRock commissioned Forrester to evaluate companies’ IAM practices and requirements when it comes to customer-facing scenarios versus employee-facing ones.
Saudi Petroleum chooses Tegile storage solution
A storage solution that addresses company growth and performance for business-critical applications of caseware archive and search along with other key operational systems.
WIN a very cool portable ZX Spectrum
Win a one-off portable Spectrum built by legendary hardware hacker Ben Heck
The next step in data security
With recent increased privacy concerns and computers becoming more powerful, the chance of hackers being able to crack smaller-sized RSA keys increases.