Additional Blogs by Members
cancel
Showing results for 
Search instead for 
Did you mean: 
former_member182046
Contributor
0 Kudos

Introduction

Having only recently made the progression from „clueless newbie“ to „newbie“ in Java, I find tutorials, how-to documents and weblogs with step-by-step guides extremely helpful in making my way through the ever-growing, ever-changing capabilities of NetWeaver Java and the Composition Environment.

Alas, sometimes it’s hard to apply a tutorial. I will mention two causes and how they could be addressed.

Problem 1: Version differences can make it difficult to apply a tutorial

Obviously, version differences can be problematic because especially from release 7.0 to 7.1 huge changes have occurred, some of which are incompatible.

For example, some of the deployment descriptors used in a development for Java AS 7.0 will break a project in Java AS 7.1. Also, many configuration settings that were located in the Visual Administrator in 7.0 have moved to the NetWeaver Administrator or completely elsewhere in 7.1. What’s even nastier: Even if everything looks alike, the functioning of the tutorial may be version-dependent because a required feature is not stable in a particular release.

Given the current speed of NetWeaver development, I don’t expect this problem to go away by itself anytime soon.

Remedy: Add version information

To help remedy this situation, I suggest that tutorial authors state version information explicity. In which scenarios and versions does the tutorial definitely work? Release, Support Package Stack, and Enhancement Package should be the least.

This information could also be updated from time to time when new facts become known, such as when it has been found out that the tutorial works identically in a new release or when it becomes known that it doesn’t work with a new Enhancement Package.

Problem 2: Transferring project settings to DC properties is difficult

When programming Java for NetWeaver, you can choose whether or not to use the componentization features. (Unless you work with the NetWeaver Development Infrastructure, in which case you must use componentization.)

If you don’t use componentization, you just create Eclipse projects in the NetWeaver Development Studio. Dependencies are declared in the project properties tab or in deployment descriptors referencing Enterprise Archives in the server exactly like in non-SAP developments.

If you do use componentization, everything you program in NWDS is located in a development component and you get all the metadata and control over visibility and dependencies that come with the componentization feature in NetWeaver. (This should usually be your approach of choice unless you know from the start that deploying to non-SAP Java EE servers should be quicker and easier than deploying to SAP NetWeaver.)

Now when you have a tutorial which uses Eclipse projects but want to get it to work in an NWDI scenario, you need to transfer things such as bundled libraries, build path, referenced projects, declared run-time references from Eclipse project settings to NetWeaver Development Component properties.

This can be quite difficult, especially for SAP newbies (who constitute the target audience of many tutorials). Fiddling around with the project settings of a DC project can result in a terminally inconsistent state between the DC properties and the project settings, thus breaking the DC. I have seen expert J2EE developers both with SAP and non-SAP backgrounds give up on trying to repair such a broken DC.

Conversion of projects to DCs is theoretically possible, but doesn't always work. This is why I’m always glad when a tutorial about Java programming for SAP uses Development Components.

Remedy: Develop samples as local DCs

The solution is simple: use local DCs from the start. They can be set up without any effort, don't require an NWDI server, but allow easy migration to NWDI because you can simple drag and drop them into a DTR-controlled Software Component. 

Conclusion

In my own humble blogging efforts, I will try live up to these demands and give detailed version information whenever I can and use Development Components so that the programming examples can be easily transferred into NWDI scenarios.

2 Comments