+ All Categories
Home > Documents > New 11g Features in Oracle Developer Tools for Visual Studio

New 11g Features in Oracle Developer Tools for Visual Studio

Date post: 30-Dec-2016
Category:
Upload: nguyenthuan
View: 229 times
Download: 3 times
Share this document with a friend
13
New 11g Features in Oracle Developer Tools for Visual Studio An Oracle White Paper January 2008
Transcript

New 11g Features in Oracle Developer Tools for Visual Studio

An Oracle White Paper January 2008

New 11g Features in Oracle Developer Tools for Visu al Studio Page 2

New 11g Features in Oracle Developer Tools for

Visual Studio

Introduction ....................................................................................................... 3 Integration with Visual Studio 2008 ............................................................... 4

Automatic .NET Code Generation ........................................................... 5 Code Generation for Microsoft Office and ASP.NET........................... 5

ASP.NET Web Developer Support ............................................................... 5 Oracle Database Project with Source Control Support............................... 6 Oracle SQL Script Editor................................................................................. 7 Built in Support for Executing SQL*Plus Scripts ........................................ 8 Integration with Microsoft Query Designer.................................................. 8 New Designer for Granting/Revoking Schema Privileges ......................... 9 New User-Defined Type Support................................................................. 10

UDT Custom Class Code Generation Wizard....................................... 10 Import Table Wizard ...................................................................................... 10 Additional Enhancements.............................................................................. 11

Query Window Enhancements – Explain Plan, Auto-Commit .......... 11 Customizations via the ODT Options Page........................................... 12

Conclusion........................................................................................................ 12

New 11g Features in Oracle Developer Tools for Visu al Studio Page 3

New 11g Features in Oracle Developer Tools for

Visual Studio

INTRODUCTION

The 11g release of Oracle Developer Tools for Visual Studio (ODT) includes a

host of powerful new features that make Oracle and .NET development easier and

faster. These features make it convenient for Microsoft Visual Studio developers to

stay in Visual Studio for the entire development lifecycle.

The new features in this release include:

• Enhanced integration with Visual Studio 2008 and Visual Studio 2005

• Improved ASP.NET web developer support

• Support for automatic code generation in Microsoft Office projects

• An Oracle Database Project to provide source control of Oracle SQL scripts

• An Oracle SQL script editor

• Built in support for automatically generating and executing SQL*Plus scripts

• Integration with Microsoft Query Designer

• Oracle User-Defined Types (UDT) support including custom class .NET

code generation

• A new designer for granting and revoking database privileges

• An Import Table Wizard for copying tables and their data from external data

sources such as Microsoft SQL Server, Microsoft Access and Excel

spreadsheets into Oracle Database.

• Additional enhancements

The new features detailed in this paper are available for Visual Studio 2008, Visual

Studio 2005 and Visual Studio .NET 2003. This release supports Oracle Database

version 9.2 or later and is also compatible with any version of the Oracle Data

Provider for .NET (ODP.NET) that your application may currently be

standardizing on.

The Oracle Developer Tools for Visual Studio is a free product that is available for

download today from the Oracle Technology Network.

The Oracle Developer Tools for Visual

Studio is a free product that is available for

download today from the Oracle

Technology Network.

The features detailed in this paper are

available for Visual Studio 2008, Visual

Studio 2005 and Visual Studio .NET 2003.

This new release supports Oracle Database

version 9.2 or later and is also compatible

with any version of the Oracle Data

Provider for .NET (ODP.NET) that your

application may currently be using.

New 11g Features in Oracle Developer Tools for Visu al Studio Page 4

INTEGRATION WITH VISUAL STUDIO 2008

The Oracle Developer Tools for Visual Studio is fully integrated with Visual Studio

2008 and Visual Studio 2005. This integration starts in the Microsoft Server

Explorer tree control. This tree control makes it easy to browse database schema

objects which are represented as nodes in the Server Explorer tree. Each schema

object node offers context menus which allow operations on that node. For

example, a table node offers a “Retrieve Data” menu item, which opens up the

Oracle Data Window. It also offers a “Design” menu item which opens up the

Oracle Table Designer for easy creation or modification of an Oracle table.

Similarly, the many other various Oracle schema types have item specific menus.

The Visual Studio Properties Window shows metadata for any Oracle Database

schema node that is currently selected. For example, selecting a table column node

will show the Oracle data type of that column in the Properties Window.

Figure 1: Server Explorer and a Table Node Context Menu

ODT is fully integrated with Visual Studio

2008 and Visual Studio 2005. This

integration starts in the Microsoft Server

Explorer tree control.

New 11g Features in Oracle Developer Tools for Visu al Studio Page 5

Automatic .NET Code Generation

For rapid application development, ODT is also fully integrated with Visual

Studio’s automatic code generation features. In Visual Studio, code generation

starts with the Data Sources window, where data sources are created and defined

via the Data Source Configuration Wizard. These data sources can then be dragged

and dropped onto the design surface to immediately create runnable .NET code

which accesses an Oracle Database. This code can be easily and visually wired up

to widgets on the design surface (such as a Gridview control) resulting in a

runnable application with very little coding required.

To aid in customizing the code that is auto generated, Visual Studio designers and

wizards associated with automatic code generation are also fully supported, for

example the Table Adapter Configuration Wizard and Dataset Designer. These

designers make it easy to customize the application and to create master-detail

relationships.

Code Generation for Microsoft Office and ASP.NET

Developers utilizing Microsoft Visual Studio Tools for Office (VSTO) can rapidly

generate Microsoft Office based applications by simply dragging and dropping an

Oracle Datasource onto an Excel spreadsheet or Microsoft Word application. For

example, an Oracle Data Source for the HR.EMPLOYEES table can be created

via the Microsoft Data Source Wizard in Visual Studio. After dragging this data

source and dropping it on the Excel design surface, the table data will

automatically be displayed in the Excel spreadsheet when it is loaded and it can

then interact with other Excel macros.

Automatic code generation for ASP.NET web applications is also supported and is

described below.

ASP.NET WEB DEVELOPER SUPPORT

Integration with ASP.NET automatic code generation means that web developers

can create working ASP.NET web applications with very little or no .NET or SQL

coding required. Dragging a widget (such as the Gridview control) onto the Visual

Studio Web Site design surface launches the Microsoft SQL Data Source Wizard.

This wizard automatically generates the required code for data access and then

wires this code to the GridView control. Building and running the web application

launches a built-in web server within Visual Studio. A web browser is also

automatically launched to enable the execution and debugging of the running

application.

In Visual Studio, code generation starts

with the Data Sources window. These data

sources can then be dragged and dropped

onto the design surface to immediately

create runnable .NET code.

Developers utilizing Microsoft Visual Studio

Tools for Office (VSTO) can rapidly

generate Microsoft Office based

applications by simply dragging and

dropping an Oracle Datasource onto an

Excel spreadsheet or Microsoft Word

application.

New 11g Features in Oracle Developer Tools for Visu al Studio Page 6

Figure 2: ASP.NET Design Surface (above); A running ASP.NET application in browser (below)

The ASP.NET Providers for Oracle, (a separately installable product included with

the ODT download) makes it easy for Oracle web application developers to take

advantage of Visual Studio web controls (for example, the Login control or

Sitemap control). Developers can use these controls to rapidly generate web

applications without writing code and store the corresponding control data in

Oracle. Using the Microsoft ASP.NET Website Administration tool, the web

server can easily be configured to store the web site data (such as login

authentication information or web site data caching) into Oracle Database with

just a few clicks of the mouse.

ORACLE DATABASE PROJECT WITH SOURCE CONTROL SUPPORT

The new Oracle Database Project provides a simple and convenient way to

manage the SQL scripts associated with a .NET application. Scripts can be

Integration with ASP.NET automatic code

generation means that web developers can

create working ASP.NET web applications

with very little .NET or SQL coding

required.

New 11g Features in Oracle Developer Tools for Visu al Studio Page 7

checked in and out of any MSSCCI compliant source control server (for example,

Microsoft Source Safe, Microsoft Team Foundation Server, or Subversion) via

simple menu items in the Database Project window. Scripts can also be

automatically generated directly from Oracle Database and put into the Oracle

Database Project via the “Create Script to Database Project” menu item in the

Server Explorer tree control.

Source control support makes it easy to collaborate with other team members and

simplifies the deployment of the SQL Scripts associated with a .NET application

Figure 3: Oracle Database Project with source contr ol support

ORACLE SQL SCRIPT EDITOR

Double clicking on any script file in the Oracle Database Project opens the script

in the Oracle SQL Editor. The editor is file based and features syntax coloring and

integration with the Oracle Online Help documentation. The Oracle Database SQL

ODT provides a simple and convenient way

to manage the SQL scripts associated with

a .NET application. Scripts can be

automatically generated, edited, executed

and checked in and out of any source

control server (for example, Microsoft

Source Safe, Microsoft Team Foundation

Server, or Subversion).

New 11g Features in Oracle Developer Tools for Visu al Studio Page 8

Reference, PL/SQL User’s Guide and Reference and the Error Messages, manual are all

indexed and included inside of the Visual Studio help system. The extensive

keyword indexing of the online help means that highlighting any keyword and

pressing the “F1” help key launches the online help to the topic desired.

The SQL Script can also be easily executed via a context menu item in the editor.

BUILT IN SUPPORT FOR EXECUTING SQL*PLUS SCRIPTS

Oracle Developer Tools for Visual Studio adds a SQL*Plus compliant SQL Script

execution engine to Visual Studio. This means that scripts can be run either

directly from the Visual Studio menu (“Run SQL*Plus Script” menu item), from a

context menu (“Run”) from the Oracle SQL Script editor, or directly from the

Oracle Database Project. The SQL script will execute in precisely the same way as

it would if run from the SQL*Plus command line, with any output going to the

built-in Oracle Output window.

Figure 4: Run SQL*Plus Script dialog

INTEGRATION WITH MICROSOFT QUERY DESIGNER

Microsoft Query Designer makes it simple to design SQL Queries using a

sophisticated GUI design surface. Table relationships can be set up by dragging

and dropping, queries can be tested, and the final SQL statement representing the

design is generated. These designers are integrated throughout Visual Studio such

as in the Dataset Designer. Wherever a SQL statement is required, the Query

Designer can be easily launched.

SQL scripts can be run either directly from

the Visual Studio menu (“Run SQL*Plus

Script” menu item), from a context menu

(“Run”) from the Oracle SQL Script editor,

or directly from the Oracle Database

Project.

New 11g Features in Oracle Developer Tools for Visu al Studio Page 9

Figure 5: Oracle integration with Microsoft Query D esigner

NEW DESIGNER FOR GRANTING/REVOKING SCHEMA PRIVILEGE S

The Oracle Developer Tools for Visual Studio includes a new designer that makes

it easy to grant and revoke privileges on schema objects to other users or roles.

Simply launch the designer from the “Privileges” context menu item in Server

Explorer and then choose which privileges to grant and to which user or role to

grant them to. Of course, the user can only grant privileges to the degree

permitted by the Oracle DBA.

Figure 6: Grant/Revoke Privileges Wizard

Microsoft Query Designer makes it simple

to design SQL Queries using a

sophisticated GUI design tool.

New 11g Features in Oracle Developer Tools for Visu al Studio Page 10

NEW USER-DEFINED TYPE SUPPORT

Oracle user-defined types (UDTs) are fully supported and integrated throughout

Visual Studio. This feature is highly sought after by developers who use UDTs

extensively, including Oracle Spatial users and developers who use VARRAY and

Nested Table types in stored procedures and functions.

Server Explorer can now be used to explore all aspects of UDT’s in Oracle. A

“User Defined Types” node is included to allow users to view, create or edit type

definitions using new graphical UDT designers. Oracle table columns and stored

procedure parameters which use UDT types can also be explored.

When creating new tables or procedures, the Oracle Table Designer and the

Oracle Stored Procedure/Stored Function Wizard include all UDT’s in a drop

down list of potential data types. The Oracle Data Window now displays table data

that includes UDTs as output. The data is displayed in an XML format.

UDT Custom Class Code Generation Wizard

A powerful UDT Custom Class wizard is provided to make access to UDT data

from .NET code (with the Oracle Data Provider for .NET ) easy and fast. A single

click from a menu item in the User-Defined Types Server Explorer node launches

the wizard. When the wizard completes, the generated code is added to the user’s

.NET project. This .NET code defines the UDT in C# or VB.NET code and

makes accessing the UDT data as easy as accessing any other data type.

In conjunction with the other automatic code generation features discussed in the

first section of this paper, an application can then be rapidly created that utilizes

UDTs with almost no coding required.

Figure 7: Server Explorer User-Defined Types node ( left); Generate Custom Class context menu item

(middle); Generated Custom Class code (right)

IMPORT TABLE WIZARD

Developers often need to import tables and data into their test database. These

tables may need to be imported from another Oracle Database or from other

Server Explorer can now be used to

explore all aspects of UDT’s in Oracle. A

“User Defined Types” node is included to

allow users to view, create or edit type

definitions.

A powerful UDT Custom Class wizard is

provided to make access to UDT data from

C# or VB.NET code easy and fast and an

application can be rapidly created that

utilizes UDTs with almost no coding

required.

New 11g Features in Oracle Developer Tools for Visu al Studio Page 11

heterogeneous data sources such as Microsoft SQL Server, Microsoft Access or

Excel spreadsheets. The Import Table Wizard makes this easy and requires only a

few clicks. The imported table structure can be easily customizable via the wizard.

Any third party database or file format for which there is installed an ADO.NET

2.0 compliant data provider can act as a data source.

Figure 8: Import Table Wizard

ADDITIONAL ENHANCEMENTS

This release includes new features to enhance the user experience of ODT users.

Query Window Enhancements – Explain Plan, Auto-Comm it

The Oracle Query Window makes it easy to execute single or multiple SQL

statements and view the output in a grid or in text format. The SQL text can be

typed in by hand, or can be created automatically by dragging and dropping from

tables listed in Server Explorer.

The Query Window is now enhanced to include the ability to execute an “Explain

Plan” to determine the Oracle Database execution plan of a particular query. This

plan can then be cut and pasted into an email, instant messenger session, or text

document and provided to interested parties such as the Oracle DBA.

Additionally, an auto-commit toggle button makes it easy to enable or disable auto-

commit if so desired.

The Import Table Wizard makes it easy to

import tables and table data from another

Oracle Database or from other data

sources such as Microsoft SQL Server,

Microsoft Access and Excel spreadsheets.

New 11g Features in Oracle Developer Tools for Visu al Studio Page 12

Figure 9: Oracle Query Window with Explain Plan out put

Customizations via the ODT Options Page

Various options pages have been added to allow the user to customize their user

experience. This includes options to control the displayed schema objects in Server

Explorer, the maximum number of rows to be fetched by the Oracle Data

Window, as well as controlling the metadata to returned by the Explain Plan

feature of Query Window.

CONCLUSION

The Oracle Developer Tools for Visual Studio is a free product that is available for

download today from the Oracle Technology Network.

It includes a host of powerful features that make Oracle and .NET development

easier and faster. These features also make it convenient for Visual Studio

developers to stay in Visual Studio for the entire development lifecycle.

The Query Window is now enhanced to

include the ability to execute an “Explain

Plan” to determine the Oracle Database

execution plan of a particular query.

New 11g Features in Oracle Developer Tools for Visu al Studio

January 2008

Author: Christian Shay

Oracle Corporation

World Headquarters

500 Oracle Parkway

Redwood Shores, CA 94065

U.S.A.

Worldwide Inquiries:

Phone: +1.650.506.7000

Fax: +1.650.506.7200

oracle.com

Copyright © 2008, Oracle. All rights reserved.

This document is provided for information purposes only and the

contents hereof are subject to change without notic e.

This document is not warranted to be error-free, no r subject to any

other warranties or conditions, whether expressed o rally or implied

in law, including implied warranties and conditions of merchantability

or fitness for a particular purpose. We specificall y disclaim any

liability with respect to this document and no cont ractual obligations

are formed either directly or indirectly by this do cument. This document

may not be reproduced or transmitted in any form or by any means,

electronic or mechanical, for any purpose, without our prior written permission.

Oracle is a registered trademark of Oracle Corporat ion and/or its affiliates.

Other names may be trademarks of their respective o wners.


Recommended