Sponsored by Powered by Moving at the Speed of Change May 2015 Charlotte PowerBuilder Conference...

Post on 22-Dec-2015

213 views 0 download

Tags:

Transcript of Sponsored by Powered by Moving at the Speed of Change May 2015 Charlotte PowerBuilder Conference...

Sponsored byPowered by

Moving at the Speed of Change May 2015

Charlotte PowerBuilder Conference

Using PowerBuilder Nonvisual Assemblies In VS.Net

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Development lead with Integrated Data Services for last 11 years

Previously spent 15 years as an independent PowerBuilder consultant

Have been using PowerBuilder since version 1.0.B

Bruce Armstrong

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Charter member of TeamSybase (formerly TeamPS), a PowerBuilder MVP and an SAP Mentor.

Contributing author to SYS-CON's PowerBuilder 4.0 Secrets of the Masters and an editor of SAMs' PowerBuilder 9: Advanced Client/Server Development

Bruce Armstrong

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Contributed numerous articles to the PowerBuilder Developer's Journal (PBDJ) and the ISUG Tech Journal

Editor-in-chief of PBDJ from 2004 to 2013

At one point, a technical editor for the ISUG Tech Journal

Bruce Armstrong

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

AGENDA

• Generating .Net Assemblies with Classic PowerBuilder • Generating .Net Assemblies with PowerBuilder.Net • Using Powerbuilder Generated .Net Assemblies in Visual

Studio.Net

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

GENERATING .NET ASSEMBLIES USING POWERBUILDER CLASSIC

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

New Target -> .NET Assembly

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Start from scratch or use existing files

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

For a new target, specify the nonvisual class to create

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Indicating the namespace for the assembly and the assembly name

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Selecting methods to expose and giving them .Net friendly names

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Signing an assembly to give it a strong name

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

GENERATING .NET ASSEMBLIES USING POWERBUILDER.NET

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

New Target -> .Net Assembly

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Specify the class to use to create the assembly

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

USING POWERBUILDER GENERATED .NET ASSEMBLIES IN VS.NET

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Add Reference

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Navigate to location of assembly

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

ADD RUNTIME LIBRARIES

atl71.dllmsvcp71.dllmsvcr71.dllSybase.PowerBuilder.Common.dllSybase.PowerBuilder.Core.dllSybase.PowerBuilder.DataWindow.Interop.dllSybase.PowerBuilder.DataWindow.Win.dllSybase.PowerBuilder.Win.dllSybase.PowerBuilder.WinWebDataWindowCommon.dll

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

ADD CODE TO USE ASSEMBLY

private void button1_Click(object sender, EventArgs e) { TeamSybase.ClassicAssembly ca = new

TeamSybase.ClassicAssembly(); ca.HelloWorld(); }

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

CHANGE CLIENT PROFIE TO .NET FRAMEWORK 4

It usually defaults to .Net Framework 4 Client Profile, which doesn’t contain all the references that the PowerBuilder assembly needs

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

AND RUN THE CODE

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

• All of my PowerBuilder samples, including the source code for the demos I've done at various conferences are available in the PowerBuilder Samples folder on my Google Drive: http://goo.gl/VXouQ

• The PowerBuilder Developer's Journal may have gone away, but I'm going a free "magazine" on FlipBoard. It's basically just collection of articles from all over the internet on PowerBuilder: http://goo.gl/Mrd3Ql

• I've done a number of videos for the SAP Database and Technology Academy. The PowerBuilder related videos, including mine, are available at:http://goo.gl/53pe7a

SOME LINKS

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

• I've done a number of webinars for PowerBuilder.TV. The archives of the webinars related to PowerBuilder, including mine, are available at: http://goo.gl/IUHN1N

• Also, don't forget the PowerBuilder Developer Center, where a bunch of us hang out to answer questions, write blogs and documents: http://goo.gl/DtaS58

• You might also want to check out the PowerBuilder Central site. It's an attempt to collect references to different resources like this and make the available in a central location: http://goo.gl/WVyNo7

SOME LINKS

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

• If you're looking for PowerBuilder training, be sure to check out Yakov Werde's training offerings (as well as his consulting services) at: elearnitonline.com

SOME LINKS

Charlotte PowerBuilder ConferenceMoving at the Speed of Change May 2015

Questions and Answers