Guidelines for UML Class Diagrams - Part 1

A few months back, we gave you a heap of informative articles on UML design that started with this. If you have not read it, we do urge you to do so since it does offer a nice introduction to class diagrams, which is the focus of this post. When it comes to system construction, a class diagram is the most widely used diagram. A class diagram generally consists of interfaces, classes, associations and collaborations. Such a diagram would illustrate the object-oriented view of a system, which is static in nature. The object orientation of a system is indicated by a class diagram.

In this post we’ll discuss the numerous guidelines that are present when it comes to class diagrams. But before we dig into the details of the guidelines, it makes sense to begin by highlighting the points that are going to be covered:

  1. General issues
  2. Classes
  3. Interfaces
  4. Relationships
  5. Inheritance
  6. Aggregation and Composition

Due to the extensive nature of the subject, we thought it would be apt to break this down into two parts. In this specific post, we will indicate the guidelines that will relate to the areas of General Issues, Classes and Interfaces as has been mentioned above.

   

Since class diagrams are used for many different purposes, such as making stakeholders aware of requirements to highlighting your detailed design, you need to apply a different style in each circumstance.  This section describes style guidelines that are relevant to various types of class diagrams.

1. Show visibility only on design models

2. Assess responsibilities on domain class diagrams

3. Highlight language-dependent visibility with property strings

4. Highlight types only on design models

5. Highlight types on analysis models only when the type is an actual requirement

1. Design class diagrams should reflect language naming conventions. In the “Analysis and design version of a class” image you see that the design version of the Order class uses names that conform to common Java programming conventions such as placementDateand calculateTaxes().

1. Model association classes on analysis diagrams. The image that shows the “Modelling association classes” indicates the association classes that are depicted as class attached via a dashed line to an association – the association line, the class, and the dashed line are considered one symbol in the UML.

2. Do not name associations that have association classes.

3. Center the dashed line of an association class.

   

A class is basically a template from which objects are created.  Classes define attributes, information that are relevant to their instances, operations, and functionality that the objects support.  Some of the more important guidelines pertinent to classes are listed down below.

1. Put common terminology for names

2. Choose complete singular nouns over class names

3. Name operations with a strong verb

4. Name attributes with a domain-based noun

5. Do not model scaffolding code.  Scaffolding code refers to the attributes and operations required to use basic functionality within your classes, such as the code required to implement relationships with other classes.  The image above depicts the difference between the OrderItem class without scaffolding code

6. Never show classes with just two compartments

7. Label uncommon class compartments

8. Include an ellipsis ( … ) at the end of incomplete lists

9. List static operations/attributes before instance operations/attributes

10. List operations/attributes in decreasing visibility

11. For parameters that are objects, only list their type

12. Develop consistent method signatures

13. Avoid stereotypes implied by language naming conventions

14. Indicate exceptions in an operation’s property string. Exceptions can be indicated with a UML property string, an example of which is shown in the above image.

An interface can be defined as collection of operation signature and/or attribute definitions that ideally defines a cohesive set of behaviors.  Interfaces are implemented, “realized” in UML parlance, by classes and components. In order to realize an interface, a class or component should use the operations and attributes that are defined by the interface.  Any given class or component may use zero or more interfaces and one or more classes or components can use the same interface.

1. Interface definitions must reflect implementation language constraints.  In the above image, you see that a standard class box has been used to define the interface PersistentObject (note the use of the «interface» stereotype).

2. Name interfaces according to language naming conventions

3. Apply “Lollipop” notation to indicate that a class realizes an interface

4. Define interfaces separately from your classes

5. Do not model the operations and attributes of an interface in your classes. In the above image, you’ll notice that the shipment class does not include the attributes or operations defined by the two interfaces that it realizes

6. Consider an interface to be a contract

It’s true that UML design is a vast and complicated subject that needs quite a bit of respect. While this whole subject may seem rather complex in nature, we have tried out best to simplify it, so that both professional software engineers and those who are just getting into UML design will find this whole post useful. As always, we are more than happy to field in any questions or doubts you may have. Till our concluding post, which we will release this week, keep those UML diagrams coming!

Reference: http://www.agilemodeling.com/style/classDiagram.htm

Posted via email from Creately | Comment »

Creately Blog » How we Converted our Online App into a Plugin

posted19/06/10

How we Converted our Online App into a Plugin

Features, flex, release, technology

Creately PluginHere at Cinergix, we are committed to delivering Creately to all of  you who have the burning need to put that great idea into a nice picture. Over time we have heard and felt the love from everyone who’s been using Creately.  Our desire to reach out to you gave birth to the idea of a Creately Plugin - an architecture that would allow us to integrate Creately to different platforms so you can continue to use Creately right within the platforms you work in every single day. And Creately for FogBugz is just the first in many more to come.

The Approach

Taking the current version of Creately that was built as a SAAS service and turning it into a portable component that works on any platform was quite a lot of fun and somewhat challenging. When we designed the Creately Plugin we had to make sure it could be easily reused and quickly integrated into any platform out there. This way Creately can be made available on your favorite wikis, blogs, case management and productivity tools in the near future with minimal rework.

Creately SWF & Wrapper

Basically, there are two parts to converting an online application like Creately to support a plugin infrastrusture. The first is the the actual application, Creately, that can be compiled in 2 different modes. The Online SWF Mode for SAAS delivery and the Plugin SWF Mode for integrating into plugin platforms.

The second component, the Plugin Wrapper, is responsible for integrating the application into the platform that hosts the plugin. This Plugin Wrapper needs to be built specifically for the platform that it is hosted on, using the platform’s API’s. Platforms like FogBugz have detailed documentation on how a plugin can be built for it. In the case of FogBugz, we also had the folks at FogCreek helping us get the best diagramming plugin out to you guys. Thanks, we couldn’t have done it without you guys.

The Creately Plugin Concept

Deconstructing the Application

So we started with the most important component, the Creately SWF, the flex code that runs in the Flash Player in your browser. We worked in a layer of separation to enable us to compile the Creately SWF to run in different modes. Based on the mode, the Creately front end functionality and the backend interaction would work completely differently. The mode is specified in a configuration file that is used when compiling Creately.

The Online Mode SWF uses Remote Objects to connect and interact with the Creately backend services (Jupiter Service). The Plugin Mode SWF would expect a set of http endpoints to be available for it to communicate, to send and receive the required data. The Plugin Wrapper would expose these endpoints required by the Plugin Mode SWF and are configured in the configuration file.

This way by simply switching the configuration file and compiling, the Creately swf can be used to either generate Creately to run as a SaaS service or as a FogBugz plugin or a plugin for a completely new platform. This method not only enables us to easily build Creately plugins for more platforms but also lets us deliver all the cool new features we build into Creately to all distributions of Creately. Its great to be able to do this without ever splitting our code base.

More Ideas!

You think thats cool? Well then you are going to like what I have to say next. This very approach will enable us to build a desktop version of Creately for you in the future. :-) How about that?

Tell us what you think and how much you like the idea of Creately on your desktop. Also, if there’s another platform out there you’d love to see Creately on drop leave us a note here.

@Hiraash

Header Image by Jake Mates / CC BY-NC-ND 2.0 Try Creately Now

via creately.com

Posted via web from Creately | Comment »

Creately brings diagramming to the FogBugz platform

Creately brings diagramming to the FogBugz platform

Creately’s plugin for FogBugz helps developers communicate clearly with their team by quickly adding diagrams to their favourite software project management system.

Melbourne, Australia June 14th 2010

Today, Cinergix announces the launch of the Creately for FogBugz plugin, making it easy for FogBugz customers to add Use Case diagrams, mockups, flowcharts, UML designs or any other diagrams to their bug reports, cases and wiki pages. Creately will provide software developers a better way to communicate with their teams and document software projects visually on the popular Fogbugz platform developed by FogCreek Software.

“Capturing requirements clearly and accurately saves project teams a lot of time. With Creately for Fogbugz, software and support teams can now quickly add wireframes, use cases, UML designs and flowcharts into Fogbugz feature requests, bug reports and project wiki so everyone’s on the same page,” said Chandika Jayasundara, CEO, Cinergix Pty Ltd. “Traditionally Fogbugz has been a text-based collaboration platform, but with the Creately plugin, software teams can communicate visually, directly impacting the team’s productivity. As they say, a picture is worth a thousand words.” added Mr Jayasundara.

Creately for Fogbugz is integrated into the core workflow of the Fogbugz platform and offers the same easy to use Creately interface. “We want to ensure this powerful new visual collaboration paradigm is adopted by the Fogbugz community, so we’ve designed it to fit seamlessly into the Fogbugz interface and developers’ daily work routines.” concluded Mr Jayasundara. Fogbugz users can directly edit their software diagrams in the browser, making it easy to keep project document up-to date and removing the need for expensive desktop-based diagramming software.

Creately for FogBugz plugin is available for installation on your own Fogbugz server starting from $85/user with bulk discounts available for larger teams. A hosted version for FogBugz OnDemand will be announced shortly.

Creately for Fogbugz is now available at the FogBugz Plugins website and includes a free 14-day trial – http://bit.ly/createlyforFB More details on this announcement can be found on the Creately Blog – http://creately.com/blog/announcements/diagrams-in-fogbugz/

About Cinergix

Cinergix is an Australia based company that builds and sells Creately - a diagramming platform and its patent-pending KObject technology. Creately is a powerful web-based software with an interactive interface and collaborative capabilities that are changing the way teams communicate and collaborate online. This new paradigm of leveraging user-generated content for design work will enable Cinergix to support the long trail of design problems. Started in 2008 by a team from Sri Lanka, the UK, and Singapore, the company also runs a research and development centre in Colombo, Sri Lanka. For more information, visit http://creately.com/about-us.

Contact Info

Charanjit Singh
Cinergix Pty Ltd
charan@cinergix.com
+628118600450 

Posted via web from Creately | Comment »

Creately Blog » And now, Diagrams for your Fogbugz platform

And now, Diagrams for your Fogbugz platform

collaboration, Features, news, partners, release, teams

FogBugz LogoToday, we’re happy to announce the release of Creately for FogBugz, a brand new plugin for everyone’s favourite software project management and bug-tracking system, FogBugz from FogCreek Software.

Creately for FogBugz lets everyone on your project team communicate clearly by easily creating and including diagrams in FogBugz. With full integration into the FogBugz interface, you can easily add Use Cases, Wireframes, Flowcharts, UML or any other diagrams to FogBugz cases and wiki pages.

Creately for Fogbugz plugin

Squash’Em Bugs

Bugs fixing will go a lot smoother when you can clearly explain the issues to developers. As they say, a picture is worth a thousand words, so get everyone on the same page by adding annotated wireframes, or updated Use Cases to every FogBugz case. Anyone working on the case can edit and and modify diagrams as the case or feature is worked on.

Up-to-date Documentation

The ability to quickly add diagrams directly within Wiki pages will make documenting your software projects a lot less of a chore. No more attaching external Visio files, and no more expensive desktop-based software. With Creately for FogBugz, the whole team can update project documentation right within the browser, saving time and more importantly helping keep your specifications up-to-date.

Creately for FogBugz Pricing

Get it now!

Creately for FogBugz plugin is available for installation on your own Fogbugz server starting from $85/user with bulk discounts available for larger teams. Currently we only support Fogbugz on the Windows platform,  but a Linux and hosted version for FogBugz OnDemand will be announced shortly.

Download Free 14-day trial

Installation Help

Give yourself the advantage of Creately for Fogbugz by purchasing your license right now or if your not quite ready you can also download the free 14-day trial.

Try Creately Now

via creately.com

Posted via web from Creately | Comment »