Hero image for Software Documentation With UML Diagrams

Software Documentation With UML Diagrams

Advantages of graphical software documentation and how to leverage UML diagrams in the development process

Unified Modeling Language (UML) diagrams provide a standardized graphical representation for software systems.

The overall software structure is the backbone of each system and has a significant impact on software quality and its maintainability. Any new feature or change needs to be integrated into this structure without interfering or breaking other existing parts of the system. Particularly in agile software development processes, it helps to keep the overall system structure well organized.

Why use a UML diagram?

A standardized format like UML brings everyone on the same page and simplifies feature discussions in the team.

In addition to representing the structure of a system, UML is also used to depict behavioral aspects and interactions within a system. This includes modeling the flow of operations and transitions of data between different components or entities.

What are the elements of a UML Class Diagram?

A UML class diagram is a structural description of a software system, at the level of its class implementation. Hopefully, clearly showing the properties and methods of each class. This representation provides a quick overview of the class and helps to identify common fields or methods that may be abstracted in a parent class or interface.

UML Class Entity

Furthermore, inheritance is depicted as relationships between the class entities in the form of differently styled connections.

UML Relations

These basic elements are sufficient to formalize a software architecture in a concise diagram that can be used as a reference during software development.

Challenges of UML Diagram Visualizations

Aside from class diagrams, UML encompasses various other types of diagrams that document diverse aspects of software systems. For instance:

  • Activity diagrams illustrating individual workflows

  • Sequence diagrams depicting interactions over a time sequence

Despite their differences, these diagrams share a common goal:

  • Representing interconnected elements within the system

The basic elements of a class diagram are the class entities with an arbitrary amount of stacked labels for the name of the class with its methods and properties and the connections that support different dash styles and arrows.

Depending on the interactivity of the visualization, additional elements might be required to add or remove fields or collapse different sections on the class entities.

Another aspect that is even more important for the readability is the layout of class entities and the paths of the relations. The dependency chain defines a structural order on the classes and interfaces and should be reflected in the graphical representation.

To avoid confusion in the diagram, it’s advisable to minimize crossings of relationship paths and group similar types of relationships together.

Trying to include all these aspects manually is extremely time consuming and frequently results in suboptimal diagrams, which at their worst, can be more perplexing than enlightening.

Mastering UML Diagram Visualizations with yFiles

A detailed graphical representation needs to address all aspects of UML diagram visualization. It should be adaptable to the varying needs of the UML diagram rendering and creation.

yFiles is a commercial programming library explicitly designed for diagram visualization and is thus an ideal fit for addressing the complexities of UML diagram visualization. Its extensive customization options enable nearly limitless possibilities for visually representing UML diagram elements and accommodating interactive user input. The sophisticated layout algorithms of yFiles automatically arrange the entities in a concise and clear diagram, continuously adapting to any changes you make.

Consider the journey of JetBrains, a leading provider of integrated development environments (IDEs), facing the challenge of visualizing complex codebases within their software. By embracing yFiles for UML diagramming, they transformed their IDEs into dynamic platforms where developers could effortlessly grasp intricate code structures. Through tailored customization options, JetBrains crafted visually captivating diagrams, bridging the gap between technical intricacies and intuitive understanding.

This empowered both seasoned developers and newcomers to navigate through code complexities with ease, enhancing productivity and fostering collaboration across their development teams.

UML Diagram

How to make a simple UML diagram?

Diagrams can be created from an existing code base, or interactively with intuitive keyboard, mouse, and touch gestures. The yFiles generic I/O mechanism allows you to store and create diagrams using formats that are most suitable for the specific use case, such as JSON.

UML Diagram Editor Example

The UML Diagram Editor Sample Application that comes with yFiles for HTML implements these advanced features and clearly demonstrates how it addresses the various challenges encountered in UML class diagram visualization.

Interactive Class Entities

This application uses SVG styles to visualize the class entities which render the name, attributes, and methods. The built-in mechanism to place and render labels stacks the labels easily and automatically clips the text with an optional ellipsis.

Any click on a class entity is forwarded to the style implementation, enabling listening for clicks on interactive elements, e.g. to collapse the attributes or methods section, to select single labels on the class, or to add new entries or remove them.

Label Editing

The class entities also support label editing.

Double-clicking a label on the class entity opens up an input field to edit that label.

Context-sensitive Interactions

Diagram editors frequently suffer from cluttered and convoluted user interfaces. In contrast, this example strives to eliminate unnecessary elements and instead employs context-sensitive interactions, aiding users in focusing on specific tasks.

While yFiles for HTML does include built-in support for creating new connections, in this application, it has been customized to display a connection context menu upon selecting a class entity.

Context Menu

This customized context menu, designed for a streamlined user interface, offers an intuitive method for users to create new connections. Additionally, in the web application, another enhancement is that newly created connections automatically generate a new class entity if the gesture concludes on the empty canvas.

The context menu can also be used to adjust the class entity itself.

In this example, it is used to switch between different entity types, i.e. class, interface, or abstract.

UML Diagram Example Source Code

With yFiles, you can create a UML diagram on your favorite platform.

yFiles for HTML, yFiles WPF, yFiles.NET, and yFiles for Java (Swing) included is a UML Diagram Editor Sample Application that demonstrates tailored visualizations for the nodes and connections, and a customized UI that simplifies working with the diagrams.

The source code of the UML Diagram Editor Sample Application is part of these yFiles packages and available on the yWorks GitHub repository:

Implement Your Own UML Diagram Editor

Test the yFiles diagramming library with a fully functional trial package.

Feel free to explore and test the capabilities of the yFiles diagramming library with our fully functional trial package.

To implement your own UML diagram editor, select the UML Diagram Editor Sample Application that is part of this yFiles package.

The application serves not only as a showcase but also offers best-practices source code that you can utilize in your own projects.

yFiles makes it easy to customize all aspects of this application, for example you can include your own styling, change the user interaction, or load data from your own data sources.

Have a quick look and also interact with the yFiles UML diagram demo!

Features like the node visualizations and the specialized automatic layout are separate components that work in any yFiles-based project.

STEP BY STEP GUIDE:

  1. Download the trial version of yFiles for your target platform at the yWorks Customer Center.

  2. Navigate to the source directory of the UML Diagram Editor Sample Application.

  3. Explore the sample application’s features and

    1. adjust its source code to match your requirements or

    2. copy the source code of the features you like to your own project.

Conclusion

In summary, a UML diagram provides a standardized way to visually represent software systems, enhancing communication and understanding within development teams. Leveraging tools like yFiles simplifies the creation of premium UML diagrams.

By downloading the yFiles evaluation package or exploring the yFiles UML diagram demo, you can get a taste of how easy it is to create stunning, highly customized and crystal clear UML Diagrams.

Overall, designing a UML diagram with yFiles facilitates better collaboration and navigation through complex software projects, resulting in more successful outcomes.

Why yFiles?

Most complete solution

Since 2000, yWorks is dedicated to the creation of professional graph and diagramming software libraries. yWorks enables clients to realize even the most sophisticated visualization requirements to help them gain insights into their connected data. The yFiles family of software programming libraries is the most advanced and complete solution available on the market, supporting the broadest range of platforms, integrations, input methods, data sources, backends, IDEs, and programming languages.

Perfect match for all use-cases

yFiles not only lets you create your own customized applications but integrates well with your existing solutions and dashboards on the desktop, on mobile, and on the web. Developers can use concise, rich, complete APIs to create fresh, new applications and user experiences that match your corporate identity and exactly fit your specific use-cases. Browse and choose from hundreds of source code demos and integrations to get ideas and get started in no time.

Honest, simple licensing

yFiles enables white-label integrations into your applications, with royalty-free and perpetual licensing. There are no third party code dependencies.

Industry-leading automatic layouts

yFiles has got you covered with a complete set of fully configurable, extensible automatic layout algorithms, that not merely render the elements on the screen but help users understand their data and the relationships just by looking at the diagrams.

Unmatched customizability

Decades of work went into the creation of the most flexible, extensible, and easy to use diagramming APIs that are available on the market. Everything may be customized with yFiles: data acquisition and import, graph creation, display, interaction, animation, layout, export, printing, and third party service connectivity.

Algorithms included

With yFiles, you can analyze your graphs, connected data, and networks both on the fly and interactively with a complete set of efficient graph algorithm implementations. Calculate centrality measures, perform automatic clustering, calculate flows, run reachability algorithms, find paths, cycles, and dependencies. For the best user experience, use the results to drive the visualization, interactivity, and layout.

Unequaled developer productivity

Developers quickly create sophisticated diagramming applications with yFiles. The extensive API has been carefully designed and thoroughly documented. There are developers’ guides, source code tutorials, getting started videos, and fully documented source code demo applications, that help to realize even the most advanced features. Inline API documentation lookup for all major IDEs with hundreds of code snippets and linked related topics make writing robust code a breeze. Integration samples for many major third party systems help in getting productive, quickly.

Not just a static viewer

With yFiles, you can do more than just analyze and view your data. Create interactive, deeply integrated apps that don’t just let you consume data sources, but also enable users to create, modify, and work with both existing and changing data. Integrate with third party services to automatically trigger actions and apply updates. With yFiles, there are no limits: you decide what your app can do.

High-performance implementations

While it is recommended not to overwhelm the end-user with overly complex graph visualizations, of course, all aspects of the library have been prepared to work with large amounts of data. Developers can create both high-quality diagram visualizations and rich user-interactions, as well as configure algorithms and visualizations to perform great for even the largest graphs and networks.

Generic data acquisition

You don’t need to let your users create the diagrams from scratch or use a particular file format. yFiles enables you to import graphs from any data source which is accessible via an API. Programmatically build the in-memory model using an intuitive, powerful API. Update the diagram live in response to external events and changes.

World-class support

Get the best support for your development teams. Directly connect with more than a dozen core yFiles library developers to get answers to your questions. If you don’t have the time to do the implementation or your team is not large enough to do the implementation, let yWorks help you with consultancy and project work to get your team and apps up running, quickly.

Proven solution

Customers from all industries all over the world have been using yFiles for almost twenty years for both internal and customer-facing applications and tools. See the references for a non-conclusive list.

Frequently Asked Questions

What is yFiles?

yFiles is a software library that supports visualizing, editing, and analyzing graphs and graph-like diagrams. It is not a ready-to-use application or graph editor. Instead, it provides a component for graph visualization, graph editor features, and an extensive set of algorithms for automatic data arrangement and graph analysis. Software developers can use yFiles to display, edit, and analyze diagrams in their own applications. yFiles is available for many platforms.

Which platforms does yFiles support?

Right now, yFiles supports HTML / JavaScript, Java (Swing), JavaFX, .NET (WinForms), and WPF.

What kind of applications can I create with yFiles?

Developers can use concise, rich, complete APIs to create fresh, new applications, and user-experiences that match your corporate identity and exactly fit your specific use-cases. yFiles enables white-label integrations into your applications, with royalty-free and perpetual licensing. Any application that works with or displays relational data in the form of graphs, diagrams, and networks can be built with the help of yFiles.

What devices can I target with yFiles?

yFiles not only lets you create your own customized applications but integrates well with your existing solutions and dashboards on the desktop, mobile, and the web. There are versions of yFiles available for all major platforms and frameworks.

How extensive is the graph API of yFiles?

yFiles offers the most extensive graph layout, visualization, and analysis APIs available commercially. In total, there are around ten thousand public API members (classes, properties, methods, interfaces, enumerations). yFiles uses a clean, consistent, mostly object-oriented architecture that enables users to customize and (re-) use the available functionality to a great extent. API components can be (re-)combined, extended, configured, reused, and modified to a very high degree. It is not mandatory to know the complete API, of course. Most applications only require a minimal subset of the full functionality, and the advanced functionality and APIs may only be required for implementing unique requirements.

As a developer, what can I expect from yFiles?

yFiles helps developers quickly create sophisticated diagramming applications. The extensive API has been carefully designed and thoroughly documented. There are developers’ guides, source code tutorials, and fully documented complete source code demo applications that help to realize even the most advanced features. Inline API documentation lookup for all major IDEs with hundreds of code snippets and linked related topics help in writing robust code, efficiently. Integration samples for many major third party systems help in getting productive, quickly.

Is yFiles Free?

No. yFiles is a commercial software library. If you decide to use yFiles in your application, you’ll have to pay a one-time fee. You also have the option to subscribe annually for technical support and updates.

How does the licensing work for yFiles?

yFiles enables white-label integrations into your applications, with royalty-free and perpetual licensing. There are no third party code dependencies. Licensing basically works on a per developer basis. Please refer to the pricing information and software license agreements of the respective product for more details.

What kind of support can I get for yFiles?

The yFiles libraries come with fully documented demo applications, detailed API documentation, and extensive developers’ guides. Apart from that, yWorks also offers professional support services for your development teams. They can connect directly with more than a dozen core yFiles library developers to get answers to their programming questions. Optionally, if you don’t have the time or necessary team, yWorks can help you with consultancy and project work to get you and your apps up running quickly.

How is the release cycle for yFiles?

There is no public roadmap for yFiles. yFiles usually gets a new major feature release about every 10 to 15 months, with bugfixes or minor maintenance releases in between as required. Typically there are between one and five bugfix releases for each major release, and previous releases get important bugfixes, too. yWorks tries very hard to keep the libraries and APIs backward compatible so that customers can update to the newest version of yFiles regularly with little to no effort and still benefit from performance improvements and new features.

Can I edit my graphs with yFiles?

With yFiles, you can do more than just analyze and view your data. You can have interactive, deeply integrated apps that don’t just let you consume data sources but also enable users to create from scratch, modify, and work with both existing and changing data. Integrate with third party services to automatically trigger actions and apply updates in real-time and publish changes to third party systems while the user works with the graph. It’s up to you to decide what your app can do.

What kind of layouts does yFiles support?

yFiles comes with the most extensive set of fully configurable, extensible automatic layout algorithms, that not merely render the elements on the screen but help users understand their data and the relationships just by looking at the diagrams. yFiles includes hierarchic, organic (force-directed), orthogonal, tree-like, radial, balloon-like, and special purpose layouts. yFiles also supports incremental, partial, and interactive layouts, as well as various edge routing and automatic label placement algorithms.

Are the layout algorithms configurable?

Layout algorithms support various settings and constraints and are fully customizable in code. They support different node sizes, nested groups, bundled edges, orthogonally and octilinearly routed edges, consider and automatically place node, edge, and port labels. Nodes may be partitioned and clustered, and different layout styles can be mixed in the same diagram.

What kind of graph analysis does yFiles support?

yFiles lets you analyze your graphs, connected data, and networks both on the fly and interactively with a complete set of efficient graph algorithm implementations. Choose from a range of different centrality measure implementations, automatic clustering algorithms, network flow algorithms, reachability and connectivity algorithms, pathfinding variants, cycle, and dependency analysis algorithms. For the best user experience, use the results to drive the visualization, interactivity, and layout.

What parts of yFiles can be customized?

yFiles has the most flexible, extensible, and easy to use diagramming APIs that are available commercially. Every aspect of the functionality is customizable with options ranging from high-level configuration settings, down to low-level implementation overrides: data acquisition, import, graph creation, display, interaction, animation, layout, export, printing, and third party service connectivity.

How can I get my data into yFiles?

End-users don’t need to create the diagrams from sketch or use a specific file format. yFiles lets you import graphs from any data source that is accessible via an API. Developers can populate the in-memory model using an intuitive, powerful API, directly connecting to their preferred data sources. Diagrams can be updated live in response to external events and changes.

How can I get my diagrams data back from yFiles?

The in-memory graph model lets you export all the information to any system and file format. There are built-in export options to various file and image formats, but as a developer, you can create your own glue code to connect to arbitrary data storage systems and third party services.

Is the diagram size limited?

Theoretically, the only limiting factor for the number of graph elements is the size of the computer’s memory. In practice, performance is also a limiting factor. For the vast majority of use-cases, yFiles delivers best-in-class performance out-of-the-box. For very large visualizations and data-sets, there are options available that let developers tune between features, running-time, and quality of the results. yFiles can deal with graphs of any size and is only bound by the memory available and the runtime complexity of the algorithms. Large graphs may require adjusting the default settings and performance depends on more than just the number of elements in the diagram, but also the structure of the graph, the algorithm and configuration, as well as platform and hardware capabilities.

Who is using yFiles, already?

Customers from almost all industries all over the planet have been using yFiles for nearly twenty years, to create both internal and customer-facing applications and tools. Clients include both single developers and the largest corporations and organizations in all of academia, public and governmental services, and of course, the commercial space. See the references for a non-conclusive list. Naturally, there are the big well-known software corporations among yWorks’ customers (unfortunately only some of them allow yWorks to list them on the references page), but there’s also a great lot of companies that are not traditionally known for software, but who still have their own IT departments create software for their intranet or customer-facing applications. And last but not least, smaller companies without IT departments that let third party implementors create useful diagramming applications with the help of yFiles for them. yFiles at its core is a generic diagramming component that is use-case agnostic and can be used to create graph and diagramming-centric applications for any business domain that requires working with or displaying connected data.

How long did it take to implement yFiles?

yFiles started as a university project at the University of Tübingen in the late 1990s. Since 2000, yWorks has taken over all development and has been working continuously with a core layout-team of two to eight developers on improving the layout algorithms. The layout algorithms alone, as of 2021, took more than seventy development years to implement. A team of more than 25 developers has been working on the implementation for the visualization and interaction and the support for the various platforms yFiles supports, totaling in more than a hundred years of development for the visualization. Porting yFiles to a new platform in the past took between three and about 15 development years. Most platform variations were implemented in between six and ten calendar months.

How long has yFiles been around?

yFiles started as a university project at the University of Tübingen in the late 1990s. The company yWorks was founded as a spin-off of the university in 2000 when the first commercial customers wanted a license for yFiles. Since then, it has been developing and improving the library. It all started as a Java library, and over time, yWorks improved and even rewrote large parts of the library to add new features and support new platforms.

Who is the company behind yFiles?

yWorks is the company behind yFiles. It was founded as a spin-off of the University of Tübingen in the year 2000 specifically for licensing and supporting yFiles commercially. The German company is a privately-held, headquartered in Tübingen. More than 30 employees are working at yWorks, over 20 of which are developers, working on yFiles and the tooling around the libraries. The library developers also provide support and implementation services to yFiles customers. So as a developer, you will get first-class, highest level support directly from the team that implements the libraries.

What does yWorks specialize in?

Since 2000, yWorks is dedicated to the creation of professional graph and diagramming software libraries. The software yWorks creates, enables customers to realize even the most sophisticated visualization requirements to help them gain insights into their connected data. Their main product is the software programming library family yFiles, which is the most sophisticated and complete solution available for diagramming applications on the market, supporting the broadest range of platforms, integrations, input methods, data sources, backends, IDEs, and programming languages. yWorks has set a track-record in providing the most extensive layout and diagramming solutions for developers on all major platforms. In addition to creating, maintaining and supporting the libraries, yWorks also provides professional consultancy services in the area of visualization and diagramming. In addition to that, yWorks also provides a set of smaller software tools, both free and commercial, end-user facing and for software developers, closed-source and open-source.

Does yWorks own all the intellectual property for yFiles?

yFiles does not depend on any third party library, except of course at runtime, where it depends on the runtime of the platform. yWorks owns the IP for all implementations in the core yFiles library. Some demos show the integration and make use of third party software, but they are not required for other cases.

Which papers and algorithms does yFiles implement?

The list of algorithms implemented by yFiles is long. For the common graph algorithms, we use the traditional implementations with the standard optimizations. For many of the layout algorithms, ideas for the implementation base on publicly available papers. Some algorithms (specifically the orthogonal layout and the balloon layout) we created and helped with the creation of the algorithms and (co-)published the papers for the algorithms. Most layout algorithms have been vastly modified, tuned, and enhanced, though, and don’t follow the original implementation ideas, anymore. yWorks added useful features to these implementations to make the algorithms work in less theoretical environments. We removed previously existing constraints of the original implementations and added new ideas to make the algorithms useful for real-world usage. For most of these changes and improvements, no papers have been published.

Can I get the papers for the layout algorithms used in yFiles?

For some of the algorithms, you will find papers that describe the core idea of the layout algorithms. For most algorithms, yWorks massively enhanced and modified the algorithms to support more advanced features that are frequently required in real-world diagrams. For these modifications, we did not publish any papers. As a commercial yFiles customer, you can obtain a license to the source code of yFiles where you can read, learn about, and modify the algorithms in documented source code form, according to the license terms.

Hide Description
Open in yEd LiveDownload