When working in Java, SAP NetWeaver Developer Studio is the integrated tool set for any applications designed for SAP NetWeaver and running on SAP Web Application Server. SAP NetWeaver Developer Studio supports a variety of ways to design these programs, each with its own approach to modeling the resulting application. J2EE SAP adheres to open standards, and supports J2EE 1.3. From SAP NetWeaver Developer Studio, users can develop a J2EE-compliant application using wizards for servlets and JSPs, and all kinds of Enterprise JavaBeans. In SAP NetWeaver Developer Studio, a graphical display shows all J2EE elements in a diagram to be used to start editing or to maintain relationships between the J2EE elements.
J2EE cannot solve some inherent problems common in business applications, so SAP also offers higher-order frameworks such as Web Dynpro that dramatically reduce development time, transforming development work from pure coding to a more model-oriented approach. As a result, the whole user interface is modeled with graphical tools, from layout with controls to management of navigation and data flow. On the business logic level are Web services, which are well suited to integration with external systems. Web services map nicely into Web Dynpro, but can be used independently of the user interface.
But before users actually dive into the details of J2EE, Web Dynpro, or Web services, they must consider the overall architecture of their application. This is where the Unified Modeling Language (UML) comes into play – especially for larger projects. Indeed, when creating the SAP Web Dynpro project – both runtime and designtime – SAP’s developers used UML diagrams to model Web Dynpro in a platform-independent way. Both the Java implementation (released with SAP NetWeaver 2004) and the ABAP implementation (released with mySAP ERP 2005) are derived from the original UML model.
UML offers some important benefits compared to traditional modeling approaches. First, UML is the standard for software modeling and provides a standardized language to express various aspects of the system to be implemented. Standardization helps avoid human error when sharing project information – errors that developers readily admit are quite common, especially in the early phases of a major development project. The standardized language and graphical notation of UML also supports discussion of architectural aspects much better than a textual representation. What’s more, UML is the starting point for roundtrip engineering, meaning customers start with the model, but can then automatically generate or change code, revisit the model, and so on.
Although SAP NetWeaver Developer Studio offers graphical tools that are model- rather than code-driven, it has no direct support for UML. Fortunately, the architecture of the Studio and its underlying Eclipse foundation, an open-source, Java-based development platform, has the flexibility to integrate an UML tool. The various tool sets and perspectives from SAP are not built directly on top of the Eclipse foundation. Instead, a modeling layer) resides in between. This layer abstracts the SAP tools and perspectives from physical Eclipse resources, and offers a modeling environment that comes with graphical tools. The modeling layer is used both in SAP’s Web Dynpro and J2EE tools. On top of it, SAP Software partner Borland offers tools for UML modeling, documentation generation, and metrics that fit into the technical architecture of the Developer Studio: under the name of SAP Together Edition for SAP NetWeaver Developer Studio. This complements the portfolio of the Developer Studio with helpful features such as
patterns and templates to speed up development time, source code checks for improved quality assurance, ongoing support for documentation, or insight into development projects by exporting and importing models.
The nature of Eclipse allows to add the Together Edition plug-in seamlessly into Developer Studio. Customers can easily switch between the perspective offered by SAP and the UML modeling perspective offered by Borland, and, of course, combine the views delivered by SAP and Borland to their perspectives.
Standard UML diagrams
To execute model-driven development for analysis, design, and implementation, Together Edition supplies all standard UML diagram types: use case, activity, state, class, sequence, collaboration, deployment, and component diagrams. The diagrams are stored as individual files in the file system and are versioned using the incorporated version control system. Even individual design elements can be stored as separate files. In this way, the lock level for the stakeholders involved can be set very specifically. All the delivered diagrams support various phases of analysis and design; however, the strengths of Together Edition lie in its source code-based diagrams – classes and sequence diagrams.
Building UML class and sequence diagrams
In the case of class diagrams, Together Edition for SAP NetWeaver Developer Studio determines all the information directly from the sources, without having to store metadata in other (diagram) files. This is in keeping with Together’s focus on “Synchronous Roundtrip Engineering” – changes in the sources are displayed immediately in the diagrams, and changes in the class diagram are displayed in the sources, without any detour.
Within a new UML modeling project, users can switch immediately to the diagram view. They can easily create new items using a palette. All changes customers make to the diagram are immediately reflected in the code window, so the model stays synchronous. Similarly, if a class name has ben changed in the code window, the change appears immediately in the diagram. This is helpful for reverse-engineering any existing code base by providing graphical views of sources and allowing users to navigate through them. When the user clicks on a graphical item in the class diagram, the corresponding position is highlighted in the source code.
Customers can also use sequence diagrams to generate code. Although sequence diagrams are not entirely synchronous, it is possible to work with them “almost synchronously” forward and backward – generating source code from sequence diagrams and generating sequence diagrams from source code. The sequence diagram looks like a swim lane diagram, where each lane represents the responsibility of an object of a given class. This diagram shows the flow of control once an action is triggered by the end user. In the typical proceeding of model-driven development, designers reach this point when they want to model the technical behavior of each use case. The sequence diagram displays the actor (end user) and the objects distributed among several lanes. Control is handed over via message invocation from the actor to one of the objects; this object in turn passes control to another object, and so forth.
Class and sequence diagrams work hand in hand. If customers want to know how a function of one of their existing sources has been implemented, they can simply select the “Generate Sequence Diagram” function directly from their class diagram. The resulting sequence diagram saves time by documenting the behavior of the functions in the current application.
In addition to bringing the benefits of UML to customers SAP NetWeaver Developer Studio projects, Together is fully integrated in the Eclipse-based environment and behaves fully and entirely in an Eclipse-conformant manner, to keep the learning curve as flat for all users – developers and other stakeholders – as possible.
For more on the Together plug-in, please visit info.borland.com/techpubs/together/tsap62/viewordownloadgsg.html.
Source: SAP Insider