Wednesday, November 29, 2006

WS-* At Your Service With eDeveloper V10

A Little Magic for Web Services

The World Wide Web Consortium (W3C) defines a Web service as "a software system designed to support interoperable machine-to-machine interaction over a network. It has an interface described in a machine-processable format (specifically WSDL). Other systems interact with the Web service in a manner prescribed by its description using SOAP messages, typically conveyed using HTTP with an XML serialization in conjunction with other Web-related standards."

eDeveloper V10 provides powerful capabilities for creating and integrating applications that utilize Web services. Internally, eDeveloper V10 uses the Systinet Web Services framework (specifically "Systinet Server for Java") for providing and consuming Web Services. Fortunately, you don't have to do any Java programming in order to develop programs that take advantage of this foundation.

The WS standards supported by eDeveloper include SOAP 1.1 and SOAP 1.2; WSDL 1.1; SOAP Attachments; WS-I conformance; transport level security; and WS-Security for authentication, encryption and digital signing of SOAP messages. For reference, SOAP is Simple Object Access Protocol, WSDL is Web Services Description Language, UDDI is Universal Description Discovery and Integration, and WS signifies Web Services. WS-* refers to any of several enhancements or extensions to the basic SOAP, WSDL and UDDI standards, including WS-Interoperability and WS-Security.

I like to think of Web services as shared application logic (and associated data). For example, a Web service might be used to provide access to changing data such as stock ticker symbols (companies are listed and delisted). A service is said to be finely grained when it performs a narrow function, for example, a service that returns the range between the minimum and maximum value in a series of numbers. A coarsely grained web service might contain fairly complex functionality, such as a Web service that processes an order, calculates shipping charges and sends confirmation emails – in a single web service. The object of the game is to create fine grained services, but not too finely grained, so as to avoid the inflexibility of coarsely grained services on the one hand and the complex orchestration of finely grained services on the other.

To use eDeveloper as a Web Services consumer you can either use the Web Service Composite Generator or the Invoke Web Service operation.

To use eDeveloper as a Web Services provider, you should generate a service using the Web Service Interface Builder. To deploy and use the service you should make sure the following Windows OS service is started – “Systinet Server for Java”.
For information about how eDeveloper V10 deals with migration of Web Services from eDeveloper 9.4 applications, see Conversion Process Modifications.

The Web Service Composite Generator is a wizard used to generate a component that accesses a Web Service.

The How-to is fairly straightforward. First, you access the composite generators by following the Main Wizard Module steps. In the Web Service Location screen, click the WSDL URL or UDDI Search option. If you selected WSDL URL, enter the location of the WSDL. You can enter up to 256 characters in the WSDL URL field. You can click the Browse button to search for the WSDL file on the disk. The you click Next and eDeveloper will access and parse the WSDL file. If a WSDL file is not found or if the WSDL file is invalid, an error message will appear.

If you selected the UDDI Search option, the UDDI Server and Search String screen will appear. If you selected the WSDL URL option, the Operation Selection screen will appear. But we won't get into those details here (you can find more information in the documentation).

To see what happens once you finish using the Web Service wizard, see the Generated Web Service Component topic in the documentation.

Invoke Web Service lets you call a Web Service by using the SOAP protocol. When you select the Invoke Web S (Service) operation, you select a service that has been defined in the Service repository as a SOAP type. Zoom from the space to the right of Web S to open the Web Service dialog box, where you can define the Service, Operation, and Fault properties.


The Web Service Interface Builder lets you provide Web Services using eDeveloper by exposing public batch programs. The builder will generate a service JAR file and optionally deploy it on a Systinet™ server (which is installed as part of the eDeveloper installation, identified as a Web Services framework).

To successfully generate and deploy the Web Service, you should make sure that the following Windows service is started: "Systinet Server for Java". The Web Service Interface Builder is not available in the eDeveloper Discovery version.

With eDeveloper V10, you can also easily see the available Web services that you have created. The Available Web Services screen is a list of previously created Web Services as well as additional details. You can view and delete the available Web Services from the list, but you cannot modify the data in this screen.
As those who have published and subscribed to Web Services in eDeveloper 9.4 will tell you, this is a much more elegant and straightforward implementation and has the great advantage of being compliant with WS-Interoperability and WS-Security : two more great reasons to upgrade to eDeveloper V10. For all the details, see the user documentation online at www.magicsoftware.com.

Tuesday, November 07, 2006

eDeveloper and SNMP: Part Two – Making it Happen

Using eDeveloper and SNMP
eDeveloper applications and various components or modules can send trap messages to a pre-configured Network Management Station (NMS), also referred to as an SNMP monitor, which lets the system administrator query and control the eDeveloper application or module when alarms, failures, or other exceptional events occur.

The SNMP DLL
Needless to say, the SNMP agent must be present on the operating system and the eDeveloper SNMP extension, the Mgsnmp.dll file, must be placed in the eDeveloper root during installation.

The MIB files
eDeveloper supplies two Management Information Base (MIB) files, Magic.mib and Magic_trap.mib. These are located in the eDeveloper Support directory. The MIB files are compiled according to the NMS version installed. You should copy the MIB files to the NMS server.

Overview of SNMP Use in Magic
You can set various values for the SNMP parameters, defined in the Mgreq.ini and Mgrb.ini files, to specify when the Magic Requester and Magic Requester Broker will send trap messages.

The SNMPNotify function is utilized to issue SNMP messages with the available parameters of message, severity.

When an alarm or error occurs outside of the application development process, SNMP trap messages are sent to the Network Management Station (NMS).

Examples of the types of trap messages sent are:

  • A thread crash or fatal error of eDeveloper or the eDeveloper gateway.
  • Termination due to the license limit.
  • Unable to connect to a specified DBMS.
  • Database connection threshold exceeded.
  • An enterprise server was stopped and started. The trap message contains the address of the enterprise server.
  • An enterprise server aborted its connection to the Magic Request Broker. The trap message contains the address of the enterprise server.

    Anyway, this is an overview of SNMP and eDeveloper. If you are not familiar with SNMP applications, such as IBM Tivoli, then some of this discussion may seem like a foreign language discussion. For more information on SNMP, try the official Internet Engineering Task Force website for official information contained in the Request for Comments (RFC) documents. But for those familiar with SNMP for application monitoring, you can see from this overview that eDeveloper "plays well" with SNMP application monitors and other SNMP oriented software.
  • Monday, November 06, 2006

    SNMP and eDeveloper: Part 1 – Theory and Use

    eDeveloper supports Simple Network Management Protocol (SNMP) and works with Microsoft Windows SNMP Agent, the Net-SNMP Agent in UNIX environments, and the Native SNMP Agent in the i5OS (OS/400) environment for IBM System i (iSeries).

    SNMP is a standard in the application layer of the Internet protocol suite for management of various nodes on an IP network. SNMP enables network administrators to manage network performance, find and solve network problems, and plan for network growth. For developers, SNMP is the standard that you can use to communicate with application monitoring and other monitoring tools.

    The SNMP architectural model involves a set of network management stations and network elements. The purpose of the network management stations is to host management applications that control and monitor network elements. The network elements are devices that serve as gateways, hosts, terminal servers, etc. These various network elements have management agents that execute management functions requested by the network management stations. SNMP, as a protocol, includes the message format used to communicate between the stations and the elements.

    In general, application monitoring can be applied for any of these five broad requirements:

    Fault
    The most obvious use of application monitoring is to detect faults which can be major errors related to one or more elements within the architecture. eDeveloper can be configured to send only specific error codes to the monitor, or the entire range of errors. Normally, you would want to report only significant error conditions that affect the operational integrity of the application or quality of the users' application experience.

    Performance
    External monitors may want to track application performance. Performance monitoring is useful in detecting sub-optimal software performance, as measured by average wait time, number of pending requests, number of currently processing requests, and so on. Performance problems usually correlate to increased user requests. When the load outstrips the ability of the application and systems to perform the required function within expected response times, a degraded quality of user experience occurs. Application monitoring can provide us with useful metrics for performance optimization related to both applications and the network itself.

    Security
    You may want to employ SNMP for certain types of security monitoring such as authentication failures.

    Configuration
    By monitoring certain configuration settings, you can ensure that key configuration variables affecting application performance and stability stay within specified limits. For example, if the Maximum Connection property is set to 10 for a specified DBMS and the SNMP Database Connections Utilization Threshold is set to 50, eDeveloper sends a trap message to the Network Management Station (NMS) when 5 connections (50% of 10) to the DBMS have been opened.

    Accounting
    Another application for application monitoring is accounting, for administration of things like usage fees and maintenance fees. SNMP is used when a third party application tracking these fees utilizes SNMP to monitor the activity to be accounted for. Since an eDeveloper can easily track these elements within the application itself or through another eDeveloper application, SNMP is only likely to be used in rare instances where an enterprise wide IT policy has introduced SNMP as an accounting standard, especially in environments where there is a mix of eDeveloper and non-eDeveloper applications being accounted for.

    Application monitoring via SNMP can be implemented using applications such as IBM Tivoli. For example, IBM Tivoli Business Application Management (BAM) products help ensure the availability and performance of your business-critical applications, including portal and Service Oriented Architecture (SOA)-based technologies. In Part Two, we'll look at some of the how-to required to support SNMP monitoring of an eDeveloper application.

    Friday, November 03, 2006

    Quote of the Day -- Mark Bailey

    As seen on the Magic List at Yahoo! Groups.

    "I am currently converting ALL of my apps to eDeveloper V10.

    Everything I have converted so far works and the extra effort I am putting in is just to take advantage of the new features.

    The more I use it, the more I love it. Never ceases to amaze me how many programs I have with no logic and it takes a bit of getting used to, opening a program and not seeing the Task or Record levels sitting there empty.

    And, man o man. The Subforms and User Functions are Brilliant!!!!"

    Mark Bailey, Australia

    Thanks, Mark! Glad to hear it. I'll have to buy you a Foster's at the next MIUG in Vegas. [emphasis added].

    Thursday, November 02, 2006

    What's in the Kitchen Sink, Anyway?

    With eDeveloper V10, the feature list goes on an on. 51 reasons clearly are not enough as this review misses major enhancements like full Unicode support, superior XML handling, the new report writer and much more. But before we look at the bonuses and extras not included in Magic's list of reasons, let's look at the general enhancements they do mention in the list of 51.

    In the list of 51 reasons to upgrade to eDeveloper V10, reasons 47 through 51 are dedicated to an assortment of improvements, this where Magic's R&D department has "thrown in the kitchen sink" and now I get to describe it. No snoring! There actually is some good stuff in here!

    47. Preload View Have every data-view fully loaded upon task execution for improved scrolling and for retrieval full view related information.

    I think this advantage could have been expressed more clearly. Have you ever loaded a really large file and noticed that your scrollbar slider adjusted its size to the number of records. Well that's what we're talking about here. Now eDeveloper programmers don't have to come up with tricks and schemes to size the thumb on the scrollbar slider, it's built-in.

    The scrollbar thumb reflects the size of the table content according to the number of records that are fetched while the task is running. When opening a task, the table reads the first set of records and the thumb size is based on that first set. Then, as an end-user scrolls through the records, the thumb is progressively updated.

    48. Dynamic Menus Construct modular menu structures based on menu subsets that can be automatically added or removed from the pulldown menu.

    eDeveloper V10's new menu-related functions let you dynamically add and remove menus to the menu structure. The functions allowed are MnuAdd and MnuRemove which enable the programmer to dynamically add or remove a menu structure to the current runtime pulldown menu structure. There is also a MnuReset function that restores the default pulldown menu structure. This gives you some very sophisticated contextual control over the user experience that can streamline and enhance the user experience.

    49. Windows Menu Easily set the application menu system to cascade all selected open windows for easier end-user window navigation.

    To quote on of my favorite lines from the movie Joe Versus the Volcano, "I have no response to that."

    50. DateTime Support Simplify the retrieval and storage of DateTime data types by letting the Magic Rules Engine automatically map them into simplified and separated Date and Time units.

    While many of you may have developed workarounds for this in the past, I am sure it will be nice to have automated conversion between DateTime and Date and Time.


    51. Standard Keyboard Mapping Easily adopt a new Keyboard mapping scheme that corresponds to the accepted keyboard mapping standards.

    Keyboard shortcut standards seem to change all the time. I've also found that certain user communities have differing expectations. eDeveloper users expect F5 to "zoom" of course, but what if your end users have a completely different map in their head because of some other application pervasive throughout their organization? Wouldn't it be better to change the keyboard mapping used in your eDeveloper application, rather than try to force all your users to learn a new set of keystrokes? Probably, so eDeveloper V10 gives you that option. You can map eDeveloper's studio keyboard map as well as the map used in your application at runtime.

    The Keyboard Mapping settings you edit are kept in a special file. The file eDeveloper uses is named in the Keyboard Mapping File setting in the Options/Settings/Environment dialog box. By default this file is ACT_STD.ENG. You can create and use different mapping files. On conclusion of an editing session of the Keyboard Mapping repository, eDeveloper prompts you to save the changes with the File Save dialog box. You can save these changes to a file different from the one currently used by eDeveloper, by specifying a different name in the Save As... property.

    This concludes our analysis of the original list of 51 "numerous reasons to migrate to eDeveloper V10." But don't worry, here in blogland, we've come up with some important reasons of our own. So stay tuned.

    Wednesday, November 01, 2006

    Parallel Parking and Other eDeveloper V10 Tricks

    The eDeveloper enterprise server supports parallel execution of tasks or multithreading. Whether your tasks are truly executed in parallel or are conducted in pseudo-parallel mode through a technique called time slicing is dependent on your hardware and operating system. With traditional programming tools, the programmer must carefully design the program in such a way that all the threads can run at the same time without interfering with each other. With eDeveloper, multiple contexts are maintained automatically and controlling contexts is simplified tremendously compared to unnecessarily complex 4GL and 3GL development systems.

    And the good news, no the great news, is that multiple document interface (MDI) and single document interface support is now built-in to eDeveloper, further simplifying development of applications that meet the needs and demands of your users.

    In the list of 51 reasons to upgrade to eDeveloper V10, reasons 42 through 46 are dedicated to parallel execution, i.e., multithreading. Let's take a closer look at each claim to better understand what's behind it.


    42. Concurrent Task Execution Provide a greater application productivity level by enabling the end-user to run several processes - online and batch - simultaneously.

    In eDeveloper v9.x, multithreading was available for background processing only. Now with eDeveloper V10, background enterprise servers and Online programs are multi-threaded. This gives you the ability to have parallel task execution in your projects for both batch and online tasks.

    Each thread accesses a different Runtime context, and does not interact with other threads, in other words, it is stateless.

    To work with multiple threads in Online programs, eDeveloper V10 provides you with powerful new Multiple Document Interface (MDI) and Single Document Interface (SDI) functionality.


    43. Single Instance Easily control concurrently running tasks to keep a single instance for proper implementation of console screens, palettes, and property sheets.

    When you are using parallel tasks, and you call a program again, a new instance of the program opens. To better illustrate what we mean, consider what happens with a well-known application like Internet Explorer. The first time you open Internet Explorer, one instance of it opens to your default home page. When that instance is open and you open Internet Explorer again, a second instance opens to the default home page regardless of the context, i.e., the current URL of the already open browser window. However, sometimes you want the same context to open, such as when you use the "New Window" option in Internet Explorer and you get a second window with the same context as the previous window. A third option is that you do not want multiple windows and contexts. You want the new instance with its new URL to open in the already open window. Internet Explorer allows the user or the developer to control this kind of functionality.

    eDeveloper V10 now supports both multiple document interfaces and single document interfaces and gives you as the developer, control over the way contexts are handled. In those situations where you want the second call to return to the original instance, this is what eDeveloper's Single Instance task property does. When you select this property, when a program is called for a second time, the focus will be set on the already running instance. However, there will be no initialization steps (such as preparing the data view).

    44. Event Posting Enable full interaction between all concurrent processes using the inter-context event posting mechanism.

    Most of the time, you will probably want instances to execute independently, but there are some events that may require you to enable events to be sent between contexts. Using eDeveloper V10's event posting functionality is accomplished via the Destination Context Name property of the Raise Event operation. The mechanism allows for synchronous and asynchronous events. If a synchronous event was raised, the context waits until the receiving handler ends. I like the fact that eDeveloper V10 gives the developer all of these options and doesn't restrict the developer to stateless contexts without interaction.

    45. Single & Multiple Document Interface You now have the freedom to choose the layout by which your parallel tasks will be presented. You can have a parallel task be displayed as yet another MDI child window or an independent SDI window.

    This is another new eDeveloper V10 feature that standing completely on its own will justify the upgrade in the minds of many developers. eDeveloper lets you define a Multiple Document Interface (MDI) as well as a Single Document Interface (SDI).

    In the most basic of terms: the MDI and SDI functionality allows an application to open and concurrently run several tasks. That is, it enables a program to be opened concurrently without the need to open a new instance of eDeveloper.
    The eDeveloper engine can maintain multiple concurrent instances, executing programs within the same application and within the same eDeveloper instance.
    In eDeveloper, concurrent execution is implemented using contexts. When a program is run concurrently and a new context is opened, the new context will have its own Main Program. This Main Program and context are independent of the other contexts running under this process. Read up on the MDI and start using it, your users will applaud.

    46. Window Focus Management Using a simple set of functions and events eDeveloper gives you a full control over the focus management of all your windows. Easily handle lost-focus events and easily instruct a window to get focus.

    The default behavior for contect management is pretty much as you would expect: When focusing on a window in a different context, eDeveloper will not lose track of the control in the current context. In this fashion, when focus is passed back to this original window, it will pass back to the same control. Similarly, if there is a window that is not in focus, and a dialog box appears, such as a Verify operation or the window's own form with a Window Type property of Modal, the focus will pass to the dialog box. If a different context opens a window, the focus will pass to that window. Using the expression editor, you can utlilize the SetWindowFocus function to determine the particular window in the Window list that will be in focus. During runtime, if the window does not exist (the name does not exist or the name is blank or Null), focus will remain on the current window and the function will return False.

    So all in all, parallel execution is another home run for eDeveloper V10, if you will forgive the baseball metaphor. The multi-threaded architecture of eDeveloper can now be enjoyed in both online and batch mode. Just in time, I think, as duo core and quad core processors are becoming commonplace on client desktops. You'd better get ready now as the world of parallel processing has entered the mind of the everyday user and they will demand the functionality that eDeveloper V10 delivers.