Presentation on theme: "Perspectives On Application Development Using Sybase Tools"— Presentation transcript:
1Perspectives On Application Development Using Sybase Tools Donald D. Clayton President, Intertech Consulting, Inc. (713) April 27, 2004
2ObjectivesReview some decision frameworks regarding the use of Sybase toolsUnderstand the Sybase tools strategy for application developmentPowerBuilderPowerBuilder in a .Net WorldNext Generation Web DataWindowPowerDesignerPowerDesigner For PowerBuilder Developers and PowerDesigner Futures
3Audience Review Which version of PowerBuilder are you on? How many applications are you supporting?How many of those are PFC?What do your enhancement requests look like?Bug fixes onlyNew functionalityNeed to move functionality to WebWhat are your company’s current development standards?
4Decision Framework #1 Maintenance vs. New Requirements Web vs. Non Web Looking for a Silver Bullet?It is important to have an effective baseline and know where you want to goStep 1: Know your PowerBuilder Code
5Maintenance Mode Only If it isn’t broken, don’t try to fix it. There is lots of maintenance mode PB out there, mostly PB 6.5.1, with post Y2K fixes, etc.But what if there are new requirements?Stick with PB 6.5, which seems to work… Or…move to newer version of PowerBuilder
6Deployment ConcernsA major reason for moving to web-based computing is the elimination of deployment concernsHow many of you would like to eliminate the tedious installation of new and upgraded software onto the many PCs in your far-flung company?Many companies use CITRIX or Terminal ServicesThere are other options availableSoftricity's SoftGridExent TechnologiesStream TheoryAppstreamEgenera
7Do You Need to Get To The Web? There are numerous ways to get to the web with Sybase productsPowerBuilder/EAServer ComboHTML DataWindowWeb Services Tools in EAServer3rd Party Code Generators or MigratorsAppeonMetex
8Decision Framework #2What development tools do your strategic and tactical application development platforms call for?Sybase sees the App Dev World splitting into two large camps with several smaller camps around themLarge CampsMicrosoft Visual Studio and .NetJavaSmall CampsBorland DelphiPowerBuilderCenturaOracle Forms
9The .NET World of Microsoft .The Future According to MicrosoftMicrosoft’s vision of Windows application development is an all encompassing environment with many benefitsCommon runtime systemType safe programmingEasy communication between different languagesMassive class library, from soup to nuts.I took a C# class recently and the instructor had been long involved in the .NET initiative as a consultant and advisor. He thinks, and I am inclined to agree that Microsoft intends to do all their applications development and more under .NET. C# will be the language of choice for everything that is not of the kernel.The scope of the runtime system and the class libraries is almost breath taking.Microsoft believes in this architecture strongly enough to have upset their very large base of Visual Basic developers with a radically (for them) new version Visual Basic.
11The .Net Cool-aidMicrosoft intends to do all their applications development and more under .NET.C# will be the language of choice for everything that is not of the kernel, which will remain in C/C++.The scope of the runtime system and the class libraries is almost breath taking.Microsoft believes in this architecture strongly enough to have upset their very large base of Visual Basic developers with a radically (for them) new version Visual Basic.
12Powerbuilder’s Place in .NET Powerbuilder offers alternatives to Microsoft’s vision.Sybase announced and has committed to a 4 phased .Net strategyRelease 9.0Supports Web Services and XMLRelease 10.0More support for Web ServicesDataWindow .NETRelease 11.0PB 11.0 will introduce compiler support for .NET, compiling Powerscript directly to MSILPowerbuilder access to .NET class librariesAllow .NET applications to access Powerbuilder objects.I took a C# class recently and the instructor had been long involved in the .NET initiative as a consultant and advisor. He thinks, and I am inclined to agree that Microsoft intends to do all their applications development and more under .NET. C# will be the language of choice for everything that is not of the kernel.The scope of the runtime system and the class libraries is almost breath taking.Microsoft believes in this architecture strongly enough to have upset their very large base of Visual Basic developers with a radically (for them) new version Visual Basic.
13Powerbuilder’s Place in .NET Coming in the next releaseThe DataWindow .NETWill be a citizen of the .NET worldThe DataWindow technology will be extended to all languages supported in the Common Language RuntimeVisual Basic.NET, C#, C++For the Visual Basic programmerA worthy competitor to the DataGrid controlThe DataWindow offers features that will be enticing to VB programmersFor the Powerbuilder programmerWhere development in .NET is mandated, the investment in DataWindows is protected.The DataWindow will be familiarThe cool thing I first noticed about .NET was the Common Language Runtime. An execution engine (do not call it a VM within earshot of Microsoft) that makes it possible for different languages to interact with little regard for the what languages your talking about. This meant to me that a runtime C# front end of the existing DataWindow engine could be accessed by any other .NET language, Visual Basic, Cobol, Fortran … whatever CLR language you want.Any .NET language can consume a DataWindow.Powerbuilder shops who might be mandated to use .NET languages for some things do not have to abandon their DataWindow investments“Enticing to .NET programmers/Familiar to Powerbuilder programmers”
14The DataWindow .NET initiative What is the DataWindow.NET?A .NET data aware controlDrop it on a Window FormIt supports the familiar set of DataWindow properties, events and methodsThe .NET data aware objectInstantiated using “new”.Like the DataWindowControl, it will expose DataStore methods events and properties.The Powerbuilder database driversThe DataWindow BuilderFor DataWindow creation without PowerbuilderThe C# layer exposes functionality such that any .NET language can use a DataWindow and use such familiar programming as dw_1.Retrieve ( );
15The DataWindow .NET Initiative ImplementationThe DataWindowControlIs a custom authored Windows Form.Can be dropped on a Windows FormBacked up by a C# class library that maps DataWindow functionality to applications running within the Common Language RuntimeThis class library includes the DataStore.The DataWindow engine (server)Powerbuilder DataWindow engineLoads DataWindow definitions from pbls and pbrsCommunicates with the database driversProcesses UI events in the screen real estate of the DataWindowControlDoes the screen painting.
16The DataWindow .NET Implementation How do you use itFrom the Visual Studio .NET toolboxSelect and drop the DataWindowControl onto a Windows Form.Two important properties are exposed:Enter the name of the DataWindow Object to use in the DataWindowControlEnter a library name from where to load the DataWindow Object.
17DataWindow .NET Implementation How do you use it?DataWindow Events..The DataWindowControl will support the same set of events as the DataWindow
18Powerbuilder’s place in .NET Powerbuilder futuresA future release of Powerbuilder will:Compile Powerscript code to MSILAllow Powerscript to run under the Common Language RuntimeAllow Powerscript access to .NET class librariesAllow Powerscript to consume both Microsoft and other .NET objectsAllow .NET objects to access Powerbuilder objectsNVO etc.Engineers are now working with the Powerscript compiler to modernize it and allow it emit MSIL and run in the CLR. As it will be code executing in the CLR it ought to work hand in hand with other .NET programming that is also running under the CLR. Powerscript and Powerbuilder will be full fledged citizens of the .NET world.
19PowerScript.NET Create a .NET target How to create a PB target for .NET?Create a .NET targetWhen creating a PB target, you will be able to create a .NET target. In this target you can import and extend .NET classes written in other languages.Create a normal target and compile it into MSILWhen creating a PB target, if you choose to create a normal target, you can create a project to compile the target into a .NET application. However, in this target, you cannot import or extend.NET classes written in other languages.
20PowerScript.NET Compile a PowerBuilder target into a .NET application. What can you do with it?Compile a PowerBuilder target into a .NET application.Import and use .NET classes written in other languages.Extend .NET classes written in other languages.A future version of PowerBuilder will provide a .NET compiler, which can make PowerBuilder a .NET provider, a .NET consumer, and also a .NET extender.A .NET provider can provide .NET classes for others to use.A .NET consumer can use .NET classes developed by others in any languages.A .NET extender can extend (inherit from) .NET classes developed by others.
21PowerBuilder 10: The “XML Web DataWindow” SolutionUtilize latest web technologies:XHTMLClient-side XMLClient-side XSLTStandalone CSS stylesheet (with cascaded absolute positioning)
23Why Use XHTML? Benefits: Separation of presentation markup from contentMost fundamental principle in web developmentUse of XML-specific technologies in architectureDOM-based generation and parsingUse of XML-specific tools for customizingTreeView-based editing
24Separating Presentation from Content Within DataWindow:Content = data values of column, compute, and text controlsPresentation = visual and functional properties of DW controlsBenefits of Separating:AccessibilityTargeted presentation using stylesheetsImproved processing by browser
25XHTML BenefitsAccessibilityXHTML’s separation of visual elements from actual content make page much more accessible to people with disabilitiesXHTML more easily understood by people with visual impairments using screen readers and voice browsersPresentation can now be stored in separate stylesheet documents (CSS and XSL) for XHTML pageDifferent stylesheets more easily generated for different browsersUnited States, Section 508 of the Usability Act
27XSLT Extensible Stylesheet Language Transformations Provides a way of transforming XML documents into other document formatsFor XHTML (which is fundamentally XML), XSLT can be used to transform an XML document into a styled XHTML web page for display in a browserXSLT goes beyond CSS by allowing rules that change or infuse the content with layout and structure
28Why Use Client-Side XSLT? Benefits:Saves bandwidthClients only need to download and cache XSLT code once for DataWindow sessionServer processing is reduced with more work being done on client
31PowerBuilder 11: New Language Features PackageA language feature that allows programmers to organize their program into sets of modules.Help avoid name conflicts.Support team programming efforts.Packages can be nested.
32New Language Features Usage 1 Usage 2 Package mypackage Declare a packageUsage 1Package mypackageUsage 2Package FirstLevelPackage.SecondLevelPackage
33New Language Features Usage 1 Usage 2 import system Import a packageUsage 1import systemUsage 2// import a package (actually a .NET namespace)import system.text.regularexpressions as stRegex r = create st.Regex(“abc”)Match m = r.match("123abc456")String strIf m.success thenstr = “The position of abc is at ” + string(m.index)end if
34PowerScript.NET // use a .NET namespace Import and use a .NET class// use a .NET namespaceimports System.Text.RegularExpressions// create an instance of a .NET classRegex r = create Regex("abc")Match m = r.Match("123abc456")String strIf m.success thenstr = “The position of abc is at ” + string(m.index)end ifTo use the Regex class of .NET in PowerScript, import the namespace that the Regex class is in, create an instance of Regex, and call its Match() function.
35PowerScript.NET // use a 3rd party namespace Extend a .NET class// use a 3rd party namespaceimports ThirdPartyNameSpace// Declare a class inheriting from a 3rd party classtype MyClass extends ThirdPartyClassint ii_varend// overriding a functionforward prototypespublic function int doSomething(string s)return doSomethingElse(s)Let’s there is a ThirdPartyClass declared in the ThirdPartyNameSpace, and we want to extend the class in PowerScript in order to override the function doSomething(), here is the syntax.
36New Language FeaturesParameterized constructorsA language feature that allows programmers to define constructors with parameters.Constructor(string name, int id)With parameterized constructors, you can create an instance in several different ways.Employee e = create employee(“xxx”, 123)
37New Language FeaturesInterfacesAn interface declaration introduces a new reference type whose members are abstract methods.Interfaces can help reduce the couplings between classes and packages, and improve testibility.A class can implement more than one interfaces.
38New Language Features Public interface IEmployee Declare an interfacePublic interface IEmployeefunction string getName()subroutine adjustSalary(real adjustment)event companyClosed()EndInterface IDeveloper extends IEmployeesubroutine assignProject(string projectName)end
39New Language Features A class can implement one or more interfaces. Use an interfaceA class can implement one or more interfaces.Interfaces can be used as parameters or return values.Class Page implements IPrintablepublic subroutine print()public subroutine addItem(IItem item)Public function IItem getItem(int x, int y)End
40New Language Features User-defined enumerations Class methods Other featuresUser-defined enumerationsClass methodsBit-wise operationsNew data typesHashtableListRegular expression…
41PB 11 Complier FrameworkWhy have a new compiler frameworkTo lay a solid foundation for writing the PB p-code compiler, .NET compiler, and Java compiler.To be able to write utilities, e.g. cross-referencing tool, based on the compiler framework.
43Complier Framework Syntactic analysis Contextual analysis What does the compiler framework doSyntactic analysisParse the given source code and generate an Abstract Syntax Tree (AST).Contextual analysisIdentification – Resolve the identifiers, load other classes if necessary.Type checking – to ensure there is no type error.
44Complier FrameworkMake use of the compiler frameworkThe compiler framework provides an interface IPSVisitor for traversing the AST tree.With the visitor interface and the AST tree, many things can be done:Emit PB p-codeEmit .NET MSILEmit Java byte codeCreate a cross-reference databasePBDoc like javadocRefactoringReverse engineering…
45Complier FrameworkPre-processorA pre-processor can introduce some keywords to the PowerScript language.A pre-processor is responsible for translating the keywords into “real” PowerScript code.Examples:Design by ContractAspect-Oriented Programming…
46Next-Generation PowerScript Langauge Going forward…Continue to be a productive languageA general-purpose languageMore object-orientedA high-level language but can do low-level thingsSupport both .NET and JavaExtensibleLots of utilities
47Agenda PowerDesigner Overview PowerDesigner 9.5.2 for PowerBuilder PowerDesigner RoadmapPowerDesigner 10 and PowerBuilder 10 Together
48Design Tools Market Landscape Three markets convergingBusiness Process Modeling (emerging standards)Business Analysts LOBs CIOsTraditional E/R Data Modeling (James Martin)Object-oriented Modeling(UML techniques)So, nowadays, we see three different segments in the modeling (or design) market space:Data Modeling : this is where it all started, with modeling techniques like Entity/Relationship (this explains E/R) created by James Martin, famous for a methodology called James Martin Information EngineeringUML modeling : James Martin Information Engineering was and still is very effective for database modeling, but was weak for application logic modeling. UML – Unified Modeling Language – although a generic notation, has proven its capabilities in recent years especially in the area of application/business logic modeling, especially because, if properly implemented, it allows automatic code skeleton generation and roundtrip engineeringBusiness Process Modeling : BP Modeling has been around for a while, especially within Business Process Re-engineering companies. We have seen growing interest in BP modeling during recent years, mostly because of the new opportunities that the Internet brings to businesses. The Internet basically empowers enterprise to integrate – at information system level – with their customers and partners. In order to leverage these new opportunities, you do need 1) to understand your business process, 2) understand your customers / partners business processes and 3) design the interaction. BP modeling is a great tool for this.Designers/Analysts, DBAs, Database DevelopersDesigners/Analysts, Developers, Programmers
49PowerDesigner 9.5.2 Repository Business Analysis Analysis & Design Integrated Enterprise Modeling ToolBusiness-centric Control Flow diagramBusiness AnalysisBusiness centricUML modeling (all diagrams)Entity/ Relationship modeling (and DW extensions)Analysis & DesignRepositoryTemplates, Generic Generators, UML profiles, model-to-model generation…IT centricThis is PowerDesigner architecture.As explained, you will see on the left that the goal is to go from business analysis, to analysis and design and to development. On the right side, we display that there is a mixture of business-centric people and IT-centric people performaing design.Our features serve those roles based on a common architecture build of a central repository and common services like templates, generic generators, UML profiles, scripts, etc. The detailed features area business process model – control flow diagram – simple and intuitive for non-IT business usersE/R modeling for Databases and UML for application designCode generation for databases structures and key target platformsPlus interfaces with common IDEs and Application ServersRDBMS structures Object Relational mappingJava, .Net, XML, PB... supportIDEs & App Server supportDevelopmentSource Sybase
51PowerDesigner for PowerBuilder Features Summary PowerDesigner introduces complete support for all PowerBuilder objects reverse engineering and generationSupport libraries (.pbl) and source files (.sr*)Support PowerBuilder 6, 7, 8 and 9PowerBuilder tool palette for creating new objectsModel verificationGenerate & reverse PowerBuilder extended attributes in PDM
52PowerDesigner Value Proposition Help users to understand how the application was developed.Help users to visually see the relationship between objects.Help users to improve existing code, refactor the code.Regenerate PowerBuilder application.Generate documentation (report) in HTML and RTF format.
54Defining Inheritances A parent class could be a shortcut representing a class defined in another model for example for system classes.
55Overriding Properties In the Attributes tab of the class property sheet, the Inherited button allows you to select the properties to override.
56Previewing PowerBuilder Code Open the properties of an object. Select the Preview tab.Change the code in the Preview window (add attributes, modify operations, …), the model will be updated to reflect the changes.For DataWindow, Menu, Query, …, change the code in the Script tab
57PowerDesigner and PowerBuilder Together SummaryPowerDesigner: A Plugin Component in PowerBuilder 10Reverse Engineer From PowerBuilderDesign and Generate PowerBuilder Code Using PowerDesignerNavigation Between PowerDesigner and PowerBuilder
58PowerDesigner and PowerBuilder Together PowerDesigner: A Plugin Component in PowerBuilder 10
59PowerDesigner and PowerBuilder Together Design and Generate PowerBuilder Code Using PowerDesignerAdd Classes and Do DesignAlthough PowerBuilder doesn’t support interfaces yet, user can define interface in PowerDesigner, then implement interface in a PowerBuilder user object.
60PowerDesigner and PowerBuilder Together Design in PowerDesignerGenerate PowerBuilder CodeModify in PowerBuilderDebug and RunReverse Engineer to Update Class Diagram
61Future DirectionPowerDesigner 10.0 will support tight integration with PowerBuilder 10PowerBuilder 10 will be able to embed PowerDesigner views inside PowerBuilderPowerBuilder will be able to control PowerDesignerPowerDesigner will generate complete PowerBuilder application code (post 10.0)
62PowerDesigner Roadmap PowerDesigner Athena (V10, December 2003)Integration with PowerBuilderIntegration with Eclipse (Q1 2004)Major BPM improvementsXML modelFully support MDAPowerDesigner Minerva (end of 2004)Enterprise features (requirements, impact analysis, …)XML and Web Services in databaseUML 2.0Design patterns
63Other Athena Features Support C# and VB .NET reverse engineering Improve Web Services support (support Apache Axis, …)