Web-based applications and WebSphere Studio Application Developer

In “Using integrated development environments” on page 178 you read about the key areas of DB2 development support in integrated development environments (IDEs) with WebSphere Studio, Microsoft Visual Studio, and DB2 Development Center. This section provides an overview of the WebSphere Studio Application Developer features that developers can use to create Web-based applications. WebSphere Studio Application Developer is designed for developers of Java and J2EE applications who require integrated Web, XML, and Web services support. This tool includes many built-in facilities and plug-ins that ease the task of accessing data stored in DB2 UDB databases. (A plug-in is the smallest unit of function that can be independently developed and delivered.)

Each WebSphere Studio product offers the same IDE and a common base of tools. Figure 10.4 shows the hierarchy of the WebSphere Studio products. From the bottom to the top of the hierarchy, each product builds on the function of the product beneath it with additional plug-in tools. For example, WebSphere Studio Application Developer includes all WebSphere Studio Site Developer function plus plug-ins for additional function such as Enterprise JavaBean support.

  • WebSphere Studio Site Developer offers a visual development environment that makes collaboration easy for Web development teams.

  • WebSphere Studio Application Developer provides a development environment for developers of Java applications and adds tools for developing EJB applications.

  • WebSphere Studio Application Developer Integrated Edition includes WebSphere Studio Application Developer function and adds tools for integration with back-end systems.

  • WebSphere Studio Enterprise Developer includes WebSphere Studio Application Developer Integrated Edition function and additional function such as z/OS application development tools.

Figure 10.4. Hierarchy of WebSphere Studio products


WebSphere Studio Application Developer provides an IDE for building, testing, debugging, and implementing many different components. Those components include databases, Web, XML, and Java components. Java components include Java J2EE applications, JSP files, EJBs, servlets, and applets.

Because WebSphere Studio Application Developer is portable across operating systems, applications that you develop with WebSphere Studio Application Developer are highly scalable. This means that you can develop the applications on one system (such as AIX) and run them on much larger systems (such as z/OS).

WebSphere Studio Application Developer supports the Java 2 Enterprise Edition (J2EE) server model. J2EE is a set of specifications for working with multitier applications on the J2EE platform. The J2EE platform includes services, APIs, and protocols for developing multitiered, Web-based applications. Figure 10.5 shows a multitiered application development environment that supports Web applications and J2EE applications.

Figure 10.5. Web application development environment


Each WebSphere Studio product uses perspectives. A perspective is a set of views, editors, and tools that developers use to manipulate resources. The following overview describes how you can use some of these perspectives to access DB2 databases.

Data perspective

Developers use the data perspective to manage the database definitions and connections that they need for application development. You can connect to DB2 databases and import database definitions, schemas, tables, stored procedures, SQL user-defined functions, and views. WebSphere Studio Application Developer provides an SQL editor that helps you create and modify SQL statements.

Using the data perspective, developers can create the following types of DB2 routines:

  • SQL and Java stored procedures

  • SQL user-defined functions

  • User-defined functions that read or receive messages from WebSphere MQ message queues

When developers write stored procedures that use JDBC or SQL, they can then create a wrapper for the stored procedure as a JavaBean or as a method within a session EJB. Wrapping a stored procedure avoids duplicating its business logic in other components and might result in a performance benefit. (A wrapper encapsulates an object and alters the interface or behavior of the object in some way. Session beans are enterprise beans that exist during one client/server session only.)

J2EE perspective

Developers work with the J2EE perspective to create EJB applications for accessing DB2. The J2EE perspective supports EJB 1.1 and EJB 2.0. This perspective provides graphical tools for viewing and editing DB2 schemas that help developers map entity EJBs to DB2 tables. Entity beans are enterprise beans that contain persistent data.

WebSphere Studio Application Developer also provides a feature that automatically generates a session EJB method to invoke a DB2 stored procedure.

Web perspective

Developers use the Web perspective to generate Web pages from SQL statements. WebSphere Studio Application Developer provides a tag library of JSP actions for database access. A tag library defines custom tags that are used throughout a document. Using the JSP tag libraries, developers can run SQL statements and stored procedures. They can easily update or delete the result sets that the SQL statements or stored procedures return.

Web services perspective

Developers use a built-in XML editor to create XML files for building DB2 Web service applications based on SQL statements.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.144.28.70