This disclosure relates generally to user interface development tools, and more particularly to a model-based integration into a user interface (UI) framework of business logic implemented in Enterprise JavaBeans.
Programming models can be used to develop UIs and provide support when developing web-based business applications. One such programming model is SAP's Web Dynpro, a client-independent programming model of the SAP NetWeaver technology platform. The Web Dynpro model is based on the Model View Controller (MVC) paradigm: the model forms the interface to the back end system and thus enables the application access to data. The view also provides the representation of the data in the browser. The controller lies between the view and the model, and formats the model data to be displayed in the view, processes the user entries made by the user, and returns them to the model.
Each programming model features a clear separation of business logic and display logic, and utilizes a uniform metamodel for all types of user interfaces. Further, UIs developed in such an environment can be executed on any of a number of client platforms. To create an application, a set of tools are used to describe the properties and functions of the application. The data created in this way is stored in tables as metadata. Later, the necessary source code, which is executed at runtime, is created from this metadata. Therefore, the metadata itself is independent of the rendering technique used at runtime.
Enterprise JavaBeans (EJB) are the server-side component architecture for the Java Platform, Enterprise Edition (Java EE). Java is a programming language designed for use in distributed environments of the Internet. Java is based on the “look and feel” of the C++ language, but it simpler and more of an object-oriented programming model. Java can be used to create complete applications that run on a single computer, or that are distributed among servers and clients in a network.
Java EE is a computing platform designed for mainframe-scale computing of medium to large enterprises, and is designed to simplify application development in a thin client-tiered environment. Java EE simplifies application development and decreases the need for programming and programmer training by creating standardized, reusable modular components and by enabling many aspects of application programming automatically.
EJBs enable rapid and simplified development of distributed, transactional, secure and portable Java-based applications. Each EJB is an object-oriented programming interface for building re-useable applications or program building blocks, called components, that can be deployed in a network on any major operating system platform. EJBs can be used to give web pages (or other applications) interactive capabilities, such as computing interest rates or varying page content based on user or browser characteristics, for example.
Currently there is no suitable tool to support the usage of EJBs inside a UI component such as WebDynpro. A developer now has to write all the “glue” code required for invoking business methods on an EJB, and binding the data to the programming model component. There is also no mechanism for metadata provisioning and dynamic access of EJB components at runtime.
In general, this document discusses a system and method for model-based integration of business logic implemented in EJBs into a UI framework. A dedicated model-based integration of EJBs and a programming model such as Web Dynpro includes an analyzer and importer component, code generation facilities, a generic runtime component and a metadata retrieval mechanism.
In one aspect, a method for using EJBs in a user interface component of an application includes computer-executed steps of generating a model representation of one or more EJBs, storing the model representation of each of the one or more EJBs with additional metadata, and during runtime of the application, accessing the one or more EJBs in the user interface via a generic model component that accesses the model representation of each of the one or more EJBs.
In another aspect, a method includes computer-enabled steps of providing one or more EJBs to a developer and receiving, from the developer, an indication of selected EJBs from the one or more EJBs to be used in the user interface. The method further includes steps of generating a model representation of the selected EJBs, and storing the model representation of each of the one or more EJBs with additional metadata.
In yet another aspect, a system for integrating business logic implemented in Enterprise JavaBeans (EJBs) into a user interface framework includes a design-time environment having an analyzer that analyzes selected EJBs and generates a model representation of the selected EJBs, and a metadata provider to provide additional metadata to the model representation. The system further includes a runtime environment having a generic model component to access the selected EJBs based on their model representation, and executes the selected EJBs in the user interface framework.
The details of one or more embodiments are set forth in the accompanying drawings and the description below. Other features and advantages will be apparent from the description and drawings, and from the claims.
These and other aspects will now be described in detail with reference to the following drawings.
Like reference symbols in the various drawings indicate like elements.
This document describes a model-based integration system and method to support the usage of EJBs inside a user interface (UI) component, and to simplify the development process of EJB-based UIs. The system and method includes a model representation of an EJB component, which provides necessary information to a design time environment of a programming model such as SAP's Web Dynpro. In this way, the consumption of an EJB is as simple and intuitive as the consumption of other objects such as Web Services or Remote Function Calls (RFCs).
The system and method for using EJBs inside a UI component includes two parts: design-time and runtime.
The design-time environment 100 includes an importer 110 that identifies and classifies EJBs based on inputs from the application developer 102, and analyzer 112 that looks at classes, operations, and parameters, and then stores this information as metadata for the model representation 106. A metadata provider 114 provides the metadata to the model representation 106. A code generator 116 generates Java code for the typed model class files 108 based on the model representation 106, which is primarily metadata. The design-time environment 100 also includes a set of design-time tools 118 that enable the developer 102 to generate the model representation 106.
At 410, the typed model class files are generated from the model representation. The typed model class files use the generic model classes at runtime in order to call the desired set of EJB business methods. This solution can also be applied in the consumption of a service as provided by a Composite Application Framework (CAF) in a Web Dynpro component, and in the consumption of a CAF service in a Visual Composer environment.
Some or all of the functional operations described in this specification can be implemented in digital electronic circuitry, or in computer software, firmware, or hardware, including the structures disclosed in this specification and their structural equivalents, or in combinations of them. Embodiments of the invention can be implemented as one or more computer program products, i.e., one or more modules of computer program instructions encoded on a computer readable medium, e.g., a machine readable storage device, a machine readable storage medium, a memory device, or a machine-readable propagated signal, for execution by, or to control the operation of, data processing apparatus.
The term “data processing apparatus” encompasses all apparatus, devices, and machines for processing data, including by way of example a programmable processor, a computer, or multiple processors or computers. The apparatus can include, in addition to hardware, code that creates an execution environment for the computer program in question, e.g., code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of them. A propagated signal is an artificially generated signal, e.g., a machine-generated electrical, optical, or electromagnetic signal, that is generated to encode information for transmission to suitable receiver apparatus.
A computer program (also referred to as a program, software, an application, a software application, a script, or code) can be written in any form of programming language, including compiled or interpreted languages, and it can be deployed in any form, including as a stand alone program or as a module, component, subroutine, or other unit suitable for use in a computing environment. A computer program does not necessarily correspond to a file in a file system. A program can be stored in a portion of a file that holds other programs or data (e.g., one or more scripts stored in a markup language document), in a single file dedicated to the program in question, or in multiple coordinated files (e.g., files that store one or more modules, sub programs, or portions of code). A computer program can be deployed to be executed on one computer or on multiple computers that are located at one site or distributed across multiple sites and interconnected by a communication network.
The processes and logic flows described in this specification can be performed by one or more programmable processors executing one or more computer programs to perform functions by operating on input data and generating output. The processes and logic flows can also be performed by, and apparatus can also be implemented as, special purpose logic circuitry, e.g., an FPGA (field programmable gate array) or an ASIC (application specific integrated circuit).
Processors suitable for the execution of a computer program include, by way of example, both general and special purpose microprocessors, and any one or more processors of any kind of digital computer. Generally, a processor will receive instructions and data from a read only memory or a random access memory or both. The essential elements of a computer are a processor for executing instructions and one or more memory devices for storing instructions and data. Generally, a computer will also include, or be operatively coupled to, a communication interface to receive data from or transfer data to, or both, one or more mass storage devices for storing data, e.g., magnetic, magneto optical disks, or optical disks.
Moreover, a computer can be embedded in another device, e.g., a mobile telephone, a personal digital assistant (PDA), a mobile audio player, a Global Positioning System (GPS) receiver, to name just a few. Information carriers suitable for embodying computer program instructions and data include all forms of non volatile memory, including by way of example semiconductor memory devices, e.g., EPROM, EEPROM, and flash memory devices; magnetic disks, e.g., internal hard disks or removable disks; magneto optical disks; and CD ROM and DVD-ROM disks. The processor and the memory can be supplemented by, or incorporated in, special purpose logic circuitry.
To provide for interaction with a user, embodiments of the invention can be implemented on a computer having a display device, e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor, for displaying information to the user and a keyboard and a pointing device, e.g., a mouse or a trackball, by which the user can provide input to the computer. Other kinds of devices can be used to provide for interaction with a user as well; for example, feedback provided to the user can be any form of sensory feedback, e.g., visual feedback, auditory feedback, or tactile feedback; and input from the user can be received in any form, including acoustic, speech, or tactile input.
Embodiments of the invention can be implemented in a computing system that includes a back end component, e.g., as a data server, or that includes a middleware component, e.g., an application server, or that includes a front end component, e.g., a client computer having a graphical user interface or a Web browser through which a user can interact with an implementation of the invention, or any combination of such back end, middleware, or front end components. The components of the system can be interconnected by any form or medium of digital data communication, e.g., a communication network. Examples of communication networks include a local area network (“LAN”) and a wide area network (“WAN”), e.g., the Internet.
The computing system can include clients and servers. A client and server are generally remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other.
Certain features which, for clarity, are described in this specification in the context of separate embodiments, may also be provided in combination in a single embodiment. Conversely, various features which, for brevity, are described in the context of a single embodiment, may also be provided in multiple embodiments separately or in any suitable subcombination. Moreover, although features may be described above as acting in certain combinations and even initially claimed as such, one or more features from a claimed combination can in some cases be excised from the combination, and the claimed combination may be directed to a subcombination or variation of a subcombination.
Particular embodiments of the invention have been described. Other embodiments are within the scope of the following claims. For example, the steps recited in the claims can be performed in a different order and still achieve desirable results. In addition, embodiments of the invention are not limited to database architectures that are relational; for example, the invention can be implemented to provide indexing and archiving methods and systems for databases built on models other than the relational model, e.g., navigational databases or object oriented databases, and for databases having records with complex attribute structures, e.g., object oriented programming objects or markup language documents. The processes described may be implemented by applications specifically performing archiving and retrieval functions or embedded within other applications.