PowerBuilder 11: Windows Forms and .NET Interoperability

Slides:



Advertisements
Similar presentations
What is.Net Gary Devendorf. .Net Framework.Net framework works like the Domino Objects only much lower level and very complete It is part of the OS (or.
Advertisements

Copyright © 2008 Pearson Education, Inc. Publishing as Pearson Addison-Wesley Chapter 12 Introduction to ASP.NET.
Extending Eclipse CDT for Remote Target Debugging Thomas Fletcher Director, Automotive Engineering Services QNX Software Systems.
1 Introduction to ASP.Net 4.0 Development David Ringsell MCSD MCT MCPD.
Unit 1: Overview of the Microsoft.NET Platform
6 Copyright © 2005, Oracle. All rights reserved. Building Applications with Oracle JDeveloper 10g.
17 Copyright © 2005, Oracle. All rights reserved. Deploying Applications by Using Java Web Start.
.NET Technology. Introduction Overview of.NET What.NET means for Developers, Users and Businesses Two.NET Research Projects:.NET Generics AsmL.
Web Services Bruce Armstrong TeamSybase
PowerBuilder 11: The Web Service Source DataWindow
PowerBuilder 11: .NET Web Forms
Microsoft SharePoint 2010 technology for Developers
Using.NET Platform Note: Most of the material of these slides have been taken & extended from Nakov’s excellent overview for.NET framework, MSDN and wikipedia.
Enhancing Spotfire with the Power of R
PowerBuilder 11 Overview
PowerBuilder 11: Deploying Business Logic as .NET Assemblies
Building Localized Applications with Microsoft.NET Framework and Visual Studio.NET Achim Ruopp International Program Manager Microsoft Corp.
PowerBuilder.NET Guided Tour. PowerBuilder A New PowerBuilder IDE for.NET Development.
Web Development Using ASP.NET CA – 240 Kashif Jalal Welcome to week – 1.1 of…
Using Visual Basic 6.0 to Create Web-Based Database Applications
Advanced Object-Oriented Programming Features
Intro to C# Language Richard Della Tezra IS 373. What Is C#? C# is type-safe object-oriented language Enables developers to build a variety of secure.
POWERBUILDER Strategy and Roadmap
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
Platforms and tools for Web Services and Mobile Applications Introduction to C# Bent Thomsen Aalborg University 3rd and 4th of June 2004.
Intro to dot Net Dr. John Abraham UTPA – Fall 09 CSCI 3327.
Module 15 Configuring and Deploying Windows Client Applications.
Windows.Net Programming Series Preview. Course Schedule CourseDate Microsoft.Net Fundamentals 01/13/2014 Microsoft Windows/Web Fundamentals 01/20/2014.
A Free sample background from © 2001 By Default!Slide 1.NET Overview BY: Pinkesh Desai.
Architecture Of ASP.NET. What is ASP?  Server-side scripting technology.  Files containing HTML and scripting code.  Access via HTTP requests.  Scripting.
Introduction to .Net Framework
Architecture of.NET Framework .NET Framework ٭ Microsoft.NET (pronounced “dot net”) is a software component that runs on the Windows operating.
 2002 Prentice Hall. All rights reserved. 1 Introduction to Visual Basic.NET,.NET Framework and Visual Studio.NET Outline 1.7Introduction to Visual Basic.NET.
.NET Overview. 2 Objectives Introduce.NET –overview –languages –libraries –development and execution model Examine simple C# program.
11 Getting Started with C# Chapter Objectives You will be able to: 1. Say in general terms how C# differs from C. 2. Create, compile, and run a.
CIS NET Applications1 Chapter 2 –.NET Component- Oriented Programming Essentials.
.NET Framework & C#.
 Internet providing backbone for applications  Use of several web sites and devices to provide one complete solution  Software as services  Quick software.
Understanding Code Compilation and Deployment Lesson 4.
Creating and Running Your First C# Program Svetlin Nakov Telerik Corporation
ASP.NET  ASP.NET is a web development platform, which provides a programming model, a comprehensive software infrastructure and various services required.
Obsydian OLE Automation Ranjit Sahota Chief Architect Obsydian Development Ranjit Sahota Chief Architect Obsydian Development.
Using Visual Basic 6.0 to Create Web-Based Database Applications
C# Overview and Features. Content I.History of C# II.Architecture III.How to install IV.Features V.Code Sample VI.Microsoft.NET Platform VII.Why use C#
9 Chapter Nine Compiled Web Server Programs. 9 Chapter Objectives Learn about Common Gateway Interface (CGI) Create CGI programs that generate dynamic.
.NET Framework Danish Sami UG Lead.NetFoundry
Programming in C#. I. Introduction C# (or C-Sharp) is a programming language. C# is used to write software that runs on the.NET Framework. Although C#
Introducing ASP.NET 2.0. Internet Technologies WWW Architecture Web Server Client Server Request Response Network HTTP TCP/IP PC/Mac/Unix + Browser (IE,
Dissecting the Windows CE Build Process James Y. Wilson Principal Engineer, Windows Embedded MVP CalAmp, Inc. James Y. Wilson Principal Engineer, Windows.
PRIOR TO WEB SERVICES THE OTHER TECHNOLOGIES ARE:.
Presented by Vishy Grandhi.  Architecture (Week 1) ◦ Development Environments ◦ Model driven architecture ◦ Licensing and configuration  AOT (Week 2)
Text Introduction to.NET Framework. CONFIDENTIAL Agenda .NET Training – Purpose  What is.NET?  Why.NET?  Advantages  Architecture  Components: CLR,
Introduction to ASP.NET development. Background ASP released in 1996 ASP supported for a minimum 10 years from Windows 8 release ASP.Net 1.0 released.
Introduction to ASP.NET, Second Edition2 Chapter Objectives.
Visual Programming Borland Delphi. Developing Applications Borland Delphi is an object-oriented, visual programming environment to develop 32-bit applications.
Preface IIntroduction Course Objectives I-2 Course Content I-3 1Introduction to Oracle Reports Developer Objectives 1-2 Business Intelligence 1-3 Enterprise.
Wednesday NI Vision Sessions
ClickOnce Deployment (One-click Deployment)
Jim Fawcett CSE687 – Object Oriented Design Spring 2001
Introduction ITEC 420.
Introduction to Visual Basic. NET,. NET Framework and Visual Studio
Introducing the Microsoft® .NET Framework
Packaging and Deploying Windows Applications
Introducing the Windows Mobile development
.Net A brief introduction to
.NET and .NET Core 2. .NET Runtimes Pan Wuming 2017.
Design and Consume DataWindows in Visual Studio 2005
Introduction to C# AKEEL AHMED.
Module 10: Implementing Managed Code in the Database
ClickOnce Deployment (One-click Deployment)
Presentation transcript:

PowerBuilder 11: Windows Forms and .NET Interoperability Jim O’Neil Principal Systems Consultant Sybase, Inc. joneil@sybase.com

PowerBuilder 11 Overview Web Service DataWindow (presented Nov. 20, 2007) Jim O’Neil Systems Consultant .NET Assemblies (presented Nov. 13, 2007) Jim O’Neil Systems Consultant .NET Windows Forms And Interoperability Dec. 4, 2007 Jim O’Neil Systems Consultant Web Service DataWindow Feb. 5, 2008 David Avera Staff Software Engineer PowerBuilder 11 .NET Deployment Web Casts .NET Web Forms Dec. 11, 2007 David Fish Engineering Evangelist .NET Web Services Jan. 29, 2008 David Fish Engineering Evangelist .NET Smart Client Jan. 15, 2008 John Strano Technology Evangelist

Agenda PowerBuilder roadmap Windows Forms overview Deploying Windows Forms applications Distributing Windows Forms applications .NET interoperability

PowerBuilder Roadmap Version 11 released in June 2007 11.1 Maintenance Release in November 2007 Delivers on third-phase of PowerBuilder’s .NET initiative Sybase Analyst Event August 2003

2008 PowerBuilder 11.2 2008 PowerBuilder 11.5 2009 PowerBuilder 12 AJAX support for Web Forms Applications EAServer .NET Client Support Miscellaneous fixes 2008 PowerBuilder 11.5 Core .NET enhancements Native DataWindow updates Updated database support Miscellaneous fixes 2009 PowerBuilder 12 .NET in IDE WPF/WCF support at design and run-time Fully managed code at deployment Complete .NET interoperability Language Independence Application Connectivity Multiple Platform Support Power And Performance Sybase Analyst Event August 2003

Windows Forms Overview 10 Sybase Analyst Event August 2003

Windows Forms Definition (Microsoft) What is a Windows Forms application? “Windows Forms is for creating Microsoft Windows applications on the .NET Framework. This framework provides a modern, object-oriented, extensible set of classes that enable you to develop rich Windows-based applications. With Windows Forms, you are able to create a rich client application that can access a wide variety of data sources and provide data-display and data-editing facilities using Windows Forms controls.” Windows Forms Application Win32 Application System.Windows.Forms System.Drawing System.Windows. Forms.VisualStyles System.ComponentModel KERNEL32.DLL USER32.DLL GDI32.DLL GDIPLUS.DLL MSCOREE.DLL (CLR) KERNEL32.DLL USER32.DLL GDIPLUS.DLL

Windows Forms Definition (English) What is a Windows Forms application? Windows Forms applications are an evolution of the Win32-based application development you know and love and, why should you care Win32 will go away, eventually For PowerBuilder users, Windows Forms is a prerequisite for Smart Client capabilities .NET interoperability

Deploying Windows Forms Applications 10 Sybase Analyst Event August 2003

Developing Windows Forms Applications Obvious relationship to traditional PowerBuilder applications generally means a smooth transition Same UI paradigms Same event model New Windows Forms wizard quickly creates requisite project and target New application Existing application leveraging same code base

Windows Forms Project Object 11.1

Windows Forms Project Object General tab: build type, output directory Resource files: images, INI files, etc. Library Files PBL files containing DataWindows, Pipelines, Queries External library files (DLLs, OCXs) referenced by application Version: file, program, and .NET assembly version Post-build: post deployment shell commands Security: embed manifest specifying execution level Run: run/debug application command line and arguments

PowerBuilder .NET Deployment PowerScript Source C# translation .NET EXE or Assembly CSC deploy PBDs (DataWindow objects, Pipelines, Queries) Syntax errors save/build Unsupported features PB2CS PowerBuilder System Library For .NET (managed code) DataWindow Engine Database Interfaces (unmanaged code) Sybase Analyst Event August 2003

Windows Forms Deployment Executable files and resources written to “Output path” Intermediate files written to .pbt_build directory source code directory .exe directory (Output path) files supporting incremental rebuild

Unsupported Features “Native” PowerBuilder constructs unsupported in Windows Forms applications PBNI extensions (excluding Web Services) Shared objects OLE automation server Tracing and profiling Dynamic Data Exchange (DDE) Garbage collection functions EAServer client support (coming in 11.2 with EAServer 6.1) Use of .NET visual classes

Partially Supported Features “Native” PowerBuilder constructs partially supported in Windows Forms applications Rich Text and OLE DataWindow styles In-process OLE controls (ActiveX) Limited event support Requires wrapper class generated using .NET utility Non TrueType fonts replaced with TrueType fonts Font-substitution display impact Unexpected cursor display (e.g., invisible in EditMask control) ALL visual controls are supported to varying degrees with exception of Other event IMEMode property (Japanese version only!)

Language Construct Caveats Partially supported syntax GOTO statement – disallowed when target label is out of ‘scope’ Invoking an indirect ancestor event – results in unexpected behavior w_1 w_2 w_3 IF y = 7 THEN GOTO a IF x = 10 THEN y = 5 a: z = 2 ELSE y = 8 z = 3 END IF w_1::EVENT foo() Win32 .NET

Language Construct Caveats Questionable practices allowed in “native” PowerBuilder applications but disallowed in .NET deployments this keyword in global functions RETURN statement in FINALLY clause Overloading event signatures Overriding function access scope Object casting outside of object hierarchy

Language Construct Caveats (concluded) External function calls Generic STRUCTURE argument type unsupported Requirement to pass structure arguments by reference when argument is a const pointer Requirement to re-initialize reference string arguments for each invocation

Distributing Windows Forms Applications 10 Sybase Analyst Event August 2003

Distributing Windows Forms Applications Required files Runtime packager Smart Client

Required Files .NET Framework 2.0 Microsoft Runtime Files PowerBuilder System Library for .NET PowerBuilder Runtime Dynamic Link Libraries Application files

Required Files .NET Framework 2.0 Redistributable package (dotnetfx.exe) SDK not required .NET Framework 3.0 extended 2.0 with additional features so fulfills the requirement

Required Files Microsoft Runtime Files msvcr71.dll msvcp71.dll atl71.dll

Applications using graphs Applications using DataWindows/DataStores Required Files PowerBuilder System Library for .NET Sybase.PowerBuilder assemblies Strongly-named so installable to Global Assembly Cache (GAC) Sybase.PowerBuilder.Common.dll Sybase.PowerBuilder.Core.dll Sybase.PowerBuilder.Interop.dll Sybase.PowerBuilder.Win.dll All Windows Forms applications Sybase.PowerBuilder.Graph.Win.dll Sybase.PowerBuilder.Graph.Core.dll Sybase.PowerBuilder.Graph.Interop.dll Applications using graphs Sybase.PowerBuilder.DataWindow.Win.dll Sybase.PowerBuilder.DataWindow.Interop.dll Applications using DataWindows/DataStores …using EditMasks …using RichText …using Web Services

Required Files PowerBuilder Runtime Dynamic Link Libraries Unmanaged code DLLs PBDWM110.DLL: DataWindow engine PBSHR110.DLL: Utility and memory management routines PBXERCES110.DLL: XML DataWindow import/export PBxxx110.DLL: Database drivers … Must reside on system path

Required Files Application files Application executable assembly (.exe) Configuration file (.config) Manifest file (.manifest) DataWindow libraries (.pbd) Resource files (images, INI files, etc.) Referenced external libraries (DLLs, OCXs, etc.)

Runtime Packager

2. Application specific files Runtime Packager Creates MSI file containing system files relating to selected functionality Registers self-registering DLLs Sets PATH variable Adds destination path to registry Adds PowerBuilder System assemblies to GAC What’s missing? 1. .NET Framework 2.0 2. Application specific files

“Publish” application to a central location Smart Client “Publish” application to a central location Access application from that location Application installs and runs locally Details from John Strano on Jan. 15th!!

.NET Interoperability 10 Sybase Analyst Event August 2003

.NET Interoperability Support for invocation of .NET non-visual classes in PowerBuilder .NET applications Windows Forms Web Forms .NET Assemblies Web Services String netVersion System.Reflection.Assembly assembly assembly = System.Reflection.Assembly.GetCallingAssembly() netVersion = assembly.ImageRuntimeVersion

Conditional Compilation Code Blocks New construct used to delineate .NET invocations #IF DEFINED PBDOTNET… #IF DEFINED PBWEBFORM… #IF DEFINED PBWINFORM… #IF DEFINED PBWEBSERVICE… Code blocks can contain… “Classic” PowerScript PowerScript extensions Code block contents examined only at deployment time No syntax checking when saving object Non-applicable code blocks not compiled into target image

PowerScript Enhancements Supporting Interoperability Parameterized constructor syntax Static method invocation Bitwise operators (viz., AND, OR, NOT, XOR) Non-integral array indexers (e.g., population[“Argentina”] = 40500000) Capability to reference .NET constructs Namespaces Interfaces Enumerations Sybase Analyst Event August 2003

Current .NET Interoperability Restrictions Only non-visual classes are supported Generic and nullable types not supported Method calls allowed only on classes .NET types converted to equivalent PowerBuilder base types, for example, following code will not compile in PowerBuilder System.Int32 x x = 5 MessageBox(“Value”, x.ToString()) Array basis is 1 in PowerBuilder, 0 in .NET Limited IDE support Sybase Analyst Event August 2003

Adding .NET References Add references to .NET assemblies via Target Properties Sybase Analyst Event August 2003

.NET Assemblies in System Tree Enumeration Class and methods

.NET Interoperability Code Snippet #if defined PBDOTNET then String netVersion System.Reflection.Assembly assembly assembly = System.Reflection.Assembly.GetCallingAssembly() netVersion = assembly.ImageRuntimeVersion st_netVersion.text = ".NET Version: " + Right(netVersion, Len(netVersion) - 1) #if defined PBWEBFORM then String browserVersion System.Web.HttpRequest request request = System.Web.HttpContext.Current.Request browserVersion = request.Browser.Browser + " " + & String(request.Browser.MajorVersion) + "." + & String(request.Browser.MinorVersion) st_browserVersion.text = "Client Browser: " + browserVersion #end if Sybase Analyst Event August 2003

Upcoming PowerBuilder Events ISUG “Leveraging PowerBuilder in the .NET World” Day-long, hands-on training event Multiple cities in North America through December Visit http://www.isug.com/pb11tour for details Sybase web casts Web Forms (Dec 11th) Smart Client (Jan 15th) Web Services Deployment (Jan 29th) Web Services DataWindow (Feb 5th) Visit http://response.sybase.com/forms/pbregistration to sign-up!! Final Week of Tour! Dec. 11 – Orlando Dec. 12 – DC (Dulles) Dec. 13 – Atlanta

Q&A