Tools For Java Object Oriented Metrics For Mac



home | jclic |info |java

What is Java?

Java is a programming tool (as C, C++, BASIC, Pascal or Logo) used for creating computer applications. Some of its most outstanding characteristics are:

Test Metrics Free LocMetrics: Metrics tool for C#, C, Java, and SQL 1: Mr.Jung: 49303: 1774 Code Review Free SCLC: Source Code Line Counter Mr.Jung: 6480: 1773 Test Metrics Paid CodeMetrics: Quality Assessment Capability tool Mr.Jung: 4201: 1772 Test Management Paid VisibleThread: Project & Test Management Tool Testing: 4378: 1771. An overview of object oriented design metrics 10 2 Object Oriented Design Object oriented design is concerned with developing an object-oriented module of a software system to apply the identified requirements. Designer will use OOD because it is a faster development process, module based architecture, contains high reusable.

  • A same application can work in different types of computers and operating systems: Windows, Linux, Solaris, Mac OS X... as in other intelligent devices.
  • The Java programmes can be independent applications (which runs in their own window) or 'applets': small interactive programs that are embedded on web pages and can be displayed in any type of browser: Explorer, Mozilla, Opera...
  • It is a 'object-oriented' language. This means that the programmes are built from independent modules, and that these modules can easily be transformed or extended.
  • Its development is supported by a wide group of companies and organizations which is bound up with the spirit of collaboration that inspires the Clic project.

You can find more information on Java in http://java.sun.com.

What is Java WebStart?

Java WebStart is a system that facilitates the downloading, installation, launching and automatic updating of Java applications. Its mechanism of operation is:

  1. The first time that you want to launch an application, you must to go to a web page and click on a textual or graphic link. For example, to start JClic you must click on the corresponding button on this page.
  2. Java WebStart is launched and downloads the components needed by the application. Once downloaded, it usuallly asks the user for permissions and starts off the programme.
  3. From there there are three ways of starting the application:
    1. By returning to the web page and clicking again in the link.
    2. By launching the Java WebStart control panel, looking for the icon of the application and clicking on it. You will find the control panel searching in the Start menu - Programmes (in Windows) or in the Applications folder - Utilities in Mac OS X. In Linux and Solaris you can usually launch it by writing 'javaws' in a terminal.
    3. By creating an icon in the desktop and/or in the start menu. The versions of Windows and Mac usually ask the user whether he wants to create these icons the second time that an application is launched. See the FAQ for more information about how to create these icons.
  4. If at the moment of launching the application you have Internet connection, WebStart checks whether there is any new version of the program and, if it exists, it downloads and installs it automatically.

WebStart is a standard feature in the most modern versions of Java (from 1.4).

A great software design lead to a great piece of software product. With the help of VP-UML, Mac users can design software system on their Mac easily. What’s more, VP-UML’s supports both code generation and reverse engineering, which aid in the seamless transition between software design and source code. Its Hibernate support also makes database application development much easier by producing the object layer (both library and code) essential in building a database application in an object-oriented fashion. In this article, we will demonstrate the various ways of source code generation with VP-UML. Eclipse IDE will be used at the parts that involve coding.

Instant Code Visualization with Instant Reverse

There are many reasons you might want to produce a UML class diagram from your source code. First, you might want to understand the code easier by studying a diagram instead of a full page of text. You might also want to to discuss your code with your colleague in a more effective way. Sometimes, you are asked to write a design specification that requires showing the software design ideas instead of the actual source code.

Tools For Java Object Oriented Metrics For Mac

Whenever you want to visualize your source code with UML class diagram, the Instant Reverse feature can help. Instant Reverse was designed to be a one-off reverse engineering tool that helps you reverse engineer class diagram from an instant of source code, like taking a snap-shot for the code. Throughout the entire software development cycle, you may need to keep recording your software design time after time. Every time you need to produce a software design, run Instant Reverse.

Note that every time you reverse engineer class diagram with Instant Reverse, the previously created models will be overwritten. In other words, if you make change to the UML classes and run Instant Reverse again, you will lost your changes.

Tools for java object oriented metrics for macroTools for java object oriented metrics for macro

To run Instant Reverse:

  1. Select Tools > Code Engineering > Instant Reverse > Java… from the main menu.
  2. In the Instant Reverse window, click on Add Source Folder… .
  3. In the Select Directories window, select the source folder of your Eclipse project. Note that you are required to select the source folder instead of the root folder of your Java project, which means, if you place your source code inside the src folder, you should select the src folder here, rather than the project root.
  4. At the bottom left corner of the Instant Reverse window there is an option called Reverse source on demand, which is used to determine whether or not you want VP-UML to analyze and create UML classes from all the Java classes immediately when you continue from this screen.
    No doubt the time required to analyze and create UML classes depends on the classes required to process. The more classes to process, the longer time required. If you have a large code base and you do not have the immediate need to visualize all of the classes, we recommend you keep Reverse source on demand checked. When the option is checked, VP-UML will just build an index tree for the selected sources WITHOUT analyzing the code content of any class. Anytime when you need to visualize a class, press on a class (node) in the index tree and drag it into a class diagram. VP-UML will then perform the actual reverse engineering process for the selected classes.
  5. Click OK.
  6. If you have unchecked Reverse source on demand, you are prompted to form a diagram.

    Form a class diagram

    Select the packages and classes to form a diagram.By clicking OK, a new diagram is produced.

  7. If you have checked Reverse source on demand, you won’t be prompted to form a diagram. Instead, you may form diagram manually by opening the Class Repository, selecting the classes you want to show in a class diagram and drag them onto the diagram.

    Form a class diagram manually

Instant Code Generation with Instant Generator

While Instant Reverse enables you to produce UML class diagram from Java source code, the Instant Generator feature works in the opposite way by enabling you to generate the Java code from a UML class model. Similar to Instant Reverse, every time you generate code with Instant Generator, the previously generated files will be overwritten completely. In other words, if you make change to the code content and run Instant Generator again, you will lost your changes.

Let’s say you have designed an online bookstore with UML class diagram, like this:

To generate Java code:

  1. Select Tools > Code Engineering > Instant Generator > Java… from the main menu.
  2. In the Instant Generator window, specify the output path, which is the folder where the code will be generated to. Here you need to select the source folder of you Java project in Eclipse. Same as Instant Generator, do remember to select the source folder, not the project root folder.

    Generate an instant of code

  3. Select the diagram to generate code. Packages and classes in the diagrams will be generated to code.
  4. Instead of select diagrams, as an alternative, you can select directly the classes to generate code, under the Model Elements tab.
  5. Click Generate.
  6. Refresh your Java project in Eclipse. You can see the classes produced.

    Source code in Eclipse

Round-trip Engineering

While Instant Generator and Instant Reverse, as described in the previous sections, allow you to produce an software design or source code from an instant of code or UML model, the round-trip engineering features allow you to produce and keep the software design and source code synchronized.

Round-trip engineering allows you to generate and update source code from UML model as well as from UML model to source code. Unlike Instant Generator and Instant Reverse, round-trip engineering takes the “merge” approach instead of overwriting changes you make.

To produce/update source code from UML model:

  1. Select Tools > Code Engineering > Java Round-trip > Generate Code… from the main menu.
  2. In the Generate Code window, double click on the source path to specify the source folder of your Java project in Eclipse.
  3. Click OK.

To produce/update UML model from source code:

  1. Select Tools > Code Engineering > Java Round-trip > Reverse Code… from the main menu.
  2. In the Reverse Code window, double click on the source path to specify the source folder of your Java project in Eclipse.

    Round-trip reverse engineering

  3. Click OK.

Hibernate Oriented Relational Mapping (ORM)

Writing SQL statements is not easy. As an advocate of object oriented software development, Visual Paradigm suggests to develop database application in an entirely object oriented approach – no more SQL. To generate the ORM persistence layer for developers to use as an API for interacting with database, perform the steps below:

  1. Select Tools > Hibernate > Generate Code… from the main menu.
  2. In the Database Code Generation window, specify the Output Path, which is the project root folder of your Java project in Eclipse. Please pay special attention here. Unlike Instant Generator, Instant Reverse and round-trip, here you have to fill in the root folder of your Java project here. This is because the generator will generate not just the source files, but also the libraries and configuration files essential in compiling and executing the code. These files will be generated to different sub-directories under the project folder.
  3. Click OK.
  4. Refresh the Java project in Eclipse. You may see a lot of compilation errors. Don’t worry, just add lib/orm.jar into build path, the errors will then be resolved.

    Add orm.jar into build path

Related Articles

Tools For Java Object Oriented Metrics For Machine Learning

Related Links