天天看點

成為SAP開發的ABAP/Java雙語者(翻譯)

譯者:Java在Oracle ERP軟體上的成功,客戶跨平台和內建電子商務的需求,都對SAP公司C/S構架的R3提出了挑戰。SAP R3到4.6D版本提供了很多優秀的接口(RFC、BAPI、IDOC等),也有分布式Java Gui用戶端解決方案,但全面支援Java,已是SAP開發者和上司層不得不考慮的問題。也許,當全新的SAP R3 5.0版釋出時,将給業界一個驚喜。下面的短文,對業界顧問、開發人員和ERP廠商也許有一點參考價值。

從一開始,ABAP似乎是SAP開發唯一可選擇的語言。

這一切在11月(2001年11月-譯者注)得到改觀,SAP公司和副主席Hasso Plattnert先生張開懷抱,宣布Java将成為SAP的第二開發語言。從此以後,SAP所有的産品都将遵循Java的技術标準,也就是說,現在你可以選擇用何種語言進行SAP的開發。

那麼哪一個開發語言更适合工作呢?業内的ABAP開發人員有必要再多掌握Java語言嗎?Java,或者J2EE是很特别的,從技術上看比ABAP更有優勢。但這并不是說曾經風光的ABAP語言已經落後或需要出局了。實際上,兩種語言各有短長,這是勿庸質疑的。

哪個開發工具更适合工作?

Karl Kessler(SAP商業開發語言和構架經理)認為如果将來一切都放在Web上,那Java無疑是老大。他說,很顯然SAP的選擇是為了在Java上運作Web使用者接口。按Axel Kratel(Borland公司Java商業應用産品經理)的說法,Java的強大在于它的開放性。它的一些自由開發社團多年來的努力,保證着Java技術的持續改進和領先,使Java的前途一片光明。Java的執行效率常常是被攻擊的要害,但新的版本無疑在這方面有了長足的進步。

“Java已被證明了,是易于移植的開發平台”,Kratel如是說,“它提供了強大的跨平台能力,從企業開發到移動應用都有它的身影。現在,Java不僅僅應用于Web。”

ABAP,另一方面也是非常成熟和穩定的綜合開發平台,Kessler說。ABAP受益于強勁的背景伺服器支援,還有它良好的資料庫程式設計性能,ABAP的優勢還在于它強大的性能和輕巧簡潔。ABAP顯然并不沒有日落西山。

以一個開發人員的角度看,Java和ABAP有很多相似之處,Kessler說。它們都面向對象,都可以被編譯成位元組碼,都應用于企業開發服務。

它們的差別在于,ABAP有更多的4GL(第四代語言)資料庫程式設計的功能,而Java則沒有。另一方面,ABAP隻能運作于伺服器端,而Java除此以外也可運作于用戶端。還有,ABAP的文法是關鍵字導向的(類似于Cobol),Java的文法則更象C。

最好掌握兩種語言!

和生命中其它事情一樣,有選擇就好。懂兩種開發語言可以讓你根據手中的任務,選擇最适合工作的工具。在很多開發案例裡,并用開發是相當不錯的,但結果取決于開發者的偏好。

Kessler相信,職業背景決定了你選擇開發語言的偏好。

“如果你是計算機科學家,你可能更喜歡Java,”他說,“如果你是從醫師轉行做開發,ABAP可以讓你更快的上手。”

學習Java。

如果你已經了解ABAP,是不是轉入Java很容易呢?顯而易見,無論你學何種新語言,你以前程式設計的經驗都将發揮作用。特别在ABAP開發者轉學Java這點上,将更容易些。

“SAP多次在介紹ABAP概念的課程中強調ABAP和Java的相似性,” Kratel說到。

舉個例子,先從學習ABAP的面向對象概念入手,比如學習ABAP類、接口、例外等等,然後再學習Java的文法,比較兩者之不同,Kessler如是說。這兩種語言非常相似(感覺有點言過其實—譯者注),了解你已知的和你要學的知識的内在關聯,會加速你的學習進度。

Kratel認為開始學習Java的最好方法,是充分利用強大的網際網路,那兒有大量的文章、指南和有用的小程式幫助你開始學習。

Java相對其它進階開發語言是比較容易學習掌握的(Kratel可能指Java文法相對C++而言吧—譯者注)。也就是說,Java天生的強大和靈活性使它成為值得去掌握的複雜開發平台。學習的過程,就是經驗的積累,需要很多很多的經驗。幸運的是,有IBM Robocode這樣的線上輔助學習系統寓教于樂,讓學習者輕松地提高技巧。如果你希望迅速開始開發,Borland公司的JBuilder個人版不僅免費,而且對學習Java開發很有幫助。

沒有什麼理由不趕快行動起來,至少應把熟悉Java程式設計基礎知識做為學習的一個方向。

“Java是外面每個獨立開發者的興趣所在,”Kratel談到,“如果你将來準備在SAP的體系下做開發,同時掌握ABAP和Java雙語,将是你最好的裝備。”

原文:

Becoming ABAP/Java bilingual

By Matt Danielsson, Assistant Site Editor

24 Jan 2002,

Since the dawn of time, it seems, ABAP was THE programming language for SAP developers.

That all changed in November, when cochairman Hasso Plattner and SAP opened their arms to Java and announced that SAP would become bi-lingual. Going forward, all SAP products will adhere to strict standardization, meaning that you can now choose which language to use based on personal preference.

So which tool is best for which job, and should a current ABAP developer spend the time and energy to become ABAP/Java bi-lingual? Java, or Java 2 Enterprise Edition (J2EE) to be specific, has certain advantages over ABAP. But that is not to say that good old ABAP is down and out. In fact, both languages have their own sets of pros and cons, as is to be expected.

Which tool for the job?

Karl Kessler, product manager of business programming languages and framework at SAP, concludes that when it comes to anything on the Web, Java is king. It is the obvious choice since SAP decided to implement its Web user interfaces in Java, he said. Online resources 

We have gathered some links to get you started, but keep in mind that these are only a fraction of what's out there. You can try our new and improved search-feature to pinpoint SAP-oriented Java articles and tutorials across the Web. Also, since the beginning of this year, searchSAP offers free developer tips dedicated to SAP-oriented Java developers twice a month.

Java's primary strength is its openness, according to Axel Kratel, product manager of the Java Business Unit of Borland. Its community-driven nature will keep it sharp and ever growing in the years to come, making it a good bet for the long haul. Performance used to be the Achilles heel of Java, but newer releases have sped things up and all signs point to continued refinement and increased momentum.

"Java is a proven, well-established platform," Kratel said. "It provides powerful solutions across the board, from enterprise processes to mobile applications. Today, Java is not just for the Web."

ABAP, on the other hand, has the power of maturity and its integrated development environment, Kessler said. ABAP benefits from its robust server runtime environment, as well as the nice database programming capability. In that regard, ABAP has an advantage thanks to its powerful performance and portability abilities. ABAP is obviously not going to ride into the sunset anytime soon.

From a developer standpoint, Java and ABAP have many similarities, Kessler said. Both are object-oriented and are compiled to byte code, and both address the enterprise server.

As for differences, ABAP has a lot of 4GL features such as database programming, while Java doesn't. On the other hand, ABAP only runs on the server side, while Java handles both. Also, the syntax of ABAP is keyword oriented (like Cobol), while Java has a more C-like syntax.

Best to be bilingual

Like with most other things in life, it's nice to have a choice. Knowing both languages will allow you to pick the best tool for the job, based on the task at hand. In many cases, both will work equally well and the decision will be based purely on personal preference.

Kessler believes your background will help determine which language becomes your favorite.

"If you are a computer scientist, you will probably like Java," he said. "If you are a physician taking up programming, ABAP can make you productive more quickly."

Learning Java

If you already know ABAP, is it easier to learn Java? Obviously, any kind of previous programming experience will give you a head start in whatever new language you take on. In the specific case of ABAP developers learning Java, it should be even easier. 

"SAP has done a lot in terms of introducing concepts into ABAP that are similar to Java," Kratel said, pointing to the similarities between the two languages.

One way to get a head start is to study ABAP's object oriented features such as classes, interfaces and exceptions, then start learning the Java syntax and compare their features, Kessler said. The two languages are very close to each other, and making the mental connection between what you know and what you're learning can speed up the learning process considerably.

Kratel thinks the best way to get started on learning Java is to tap the power of the Web. There are tons of articles, tutorials, and helpful free gizmos to get started.

Java is a relatively easy language to learn compared to other advanced programming languages. That said, its powerful and flexible nature can make it a complex platform to master. Getting good takes practice, lots of practice. Fortunately, online aids such as IBM's Robocode can help hone skills in a playful and fun way. If you want to get started quickly, Borland's JBuilder Personal is available for free and is geared towards learning Java.

There's no reason to get left behind, so make it a point to at least familiarize yourself with the basics.

"Java is of interest to every single ABAP developer out there," Kratel said. "If you're going to be programming in the SAP ecosystem, you're going to be best equipped to do so if you have both ABAP and Java."