Enterprise J2ME Developing Mobile Java Applications [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Enterprise J2ME Developing Mobile Java Applications [Electronic resources] - نسخه متنی

Michael Juntao Yuan

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید


14.3 Legacy Applications


For companies with a lot of data on legacy mainframe systems, any mobile commerce strategy requires remote access to the mainframes from either the mobile clients or mobile middleware. However, neither SQL nor JDBC works with mainframe systems. Legacy applications use proprietary wire protocols over TCP/IP raw sockets or even serial lines. We need to hire developers who understand the proprietary protocols and ask them to code the protocol library manually in Java. That is an expensive and slow process.


14.3.1 Screen Scraping


A relatively simple way to access legacy systems without messing with the proprietary wire protocols is to use a technique called screen scraping. It works as follows: A recorder (or a screen scraper) is a software agent that records every keystroke and all screen displays from a terminal during a period of time. With the recorder turned on, a mainframe user is asked to perform a certain task during an interactive session. The recorder then generates Java code to replicate the same process.

Now, let's have a look at the process the user goes through to search computer inventory in a legacy system. In the first screen (Figure 14.1), the system prompts the user for authentication credentials. In the second screen (Figure 14.2), the user enters the text string computer and the systems displays search results. You can use predefined keys (Ctrl-N, in this case) to scroll between pages.


Figure 14.1. Search inventory on a mainframe, screen 1.



Figure 14.2. Search inventory on a mainframe, screen 2.


The recorder records when and how to connect the server, send out the username/password combo, send out the query string, scroll result pages, and parse needed information from the formatted display screen. Then, it generates a Java stub method that returns search results when invoked with a query string and user credentials. In mobile applications, the stub can reside inside a gateway servlet that interacts with mobile clients through standard HTTP remote procedure call (RPC; for more information, please refer to Chapters 5 and 16). We discuss this scenario in the next section.


/ 204