Getting Started
Total Page:16
File Type:pdf, Size:1020Kb
VISUAL EXPERT Getting Started http://www.visual-expert.com Getting Started With Visual Expert 1 Contents ABOUT THIS GUIDE 3 INTRODUCTION TO VISUAL EXPERT 4 EXPLORING AN APPLICATION 5 Graphical interface overview 5 Starting the exploration – the entry points 6 The Treeview Navigation bar 7 Exploring the application structure 7 Exploring the inheritance relation 11 Previewing objects 14 Locating a control from a Preview 15 PERFORMING AN IMPACT ANALYSIS 17 Impact analysis on a column 18 Impact analysis on an attribute 19 Impact analysis on a function 20 Navigating through the source code 21 Impact analysis on a global variable 24 Searching for text in the application 25 Saving results in a view & Creating a view from another view 27 Impact analysis on a stored procedure 30 Viewing a stored procedure in the source code 31 GENERATING TECHNICAL DOCUMENTATION 31 The documentation templates 31 How to generate documentation 32 IMPROVING THE SOURCE CODE 37 Development rules and standards 37 Unused components 41 PRACTICAL EXCERCISES 44 Exploring an application 44 Generating technical documentation Global search with stored procedures and text files 45 ADVANCED FEATURES 477 Overridding functions 48 DropDown datawindows and Dynamic datawindows 49 DLL impact analysis 47 Getting Started With Visual Expert 2 ABOUT THIS GUIDE Welcome to Visual Expert. This manual is intended to show you how to use the product; it will guide you through the main features. You will work on a sample application installed with Visual Expert, which will run automatically when you launch the product for the first time. Do not hesitate to contact us if you have any questions about Visual Expert. Audience This guide is intended for any PowerBuilder developer. No specific technical skill level is required. Installing Visual Expert Minimum configuration: • Windows 98, NT 4.0, 2000 or XP • PC Pentium II or over. • 64 Mb. RAM. • 100 Mb. of free space on hard drive. • Microsoft Word 6 (or later). • An Html browser (IE 4 / Netscape 4 or later). Installing the evaluation version: Open index.htm file from the CD-ROM and follow the instructions. We strongly recommend you to go through this Getting Started section. Installing the full version: Launch the setup.exe file from the directory \setup of your CD-ROM and follow the steps in the install procedure wizard. Getting Started With Visual Expert 3 INTRODUCTION TO VISUAL EXPERT Visual Expert instantaneously analyzes your application code, data and comments. All of the extracted information is viewed on screen or formatted to automatically generate documentation. Candidate applications for VE analysis All applications developed with PowerBuilder, versions 4 to 10. Applications of any size (Visual Expert can analyze several hundred PowerBuilder libraries). Any framework or object library developed with PowerBuilder. Visual Expert includes powerful source code parsers. It will analyze 10 to 30 Mbytes of code per minute depending on your machine speed. Comments inserted in the source code are not required by Visual Expert to analyze your application. However, if your application does contain comments, Visual Expert can include them in the information provided to the developers. Getting Started With Visual Expert 4 EXPLORING AN APPLICATION Graphical interface overview TREEVIEW DETAIL VIEW It is the core of Visual Expert. gives Information about the It displays the application components component selected in the and their relations. treeview. TREEVIEW NAVIGATION BAR SOURCE CODE VIEW presents various actions according displays the Source code of the to the component selected in the selected component. treeview. It works as an HTML browser. Getting Started with Visual Expert 5 Starting the exploration – the entry points After opening a project, the treeview displays a list of items sorted by type. Each item is a possible entry point to explore the application: PowerBuilder Components: Objects created with PowerBuilder. Database Components: DB items referenced by the PowerBuilder Application Visual Expert does not connect to the Database; References are found in the PB Code. Getting Started With Visual Expert 6 The Treeview Navigation bar The Navigation bar layout depends on the component selected in the treeview. Navigation bar options are grouped in 4 sections. Each section provides a different type of information: DESCRIPTION Detailed information about the selected component • What does it contain? Content description (controls, functions, etc.) • Where is it defined? (PBL, object, etc.) • What is its ancestor? Its descendants IMPACT ANALYSIS • Which objects are related to the selected component? • If the selected component is modified, which objects will be impacted? ARCHITECTURE Application architecture around the component: • What are the successive ancestors of the selected component? • What are all its descendants? • What is the structure of this component? • What is it composed of? (controls, methods, attributes) MISCELLANEOUS • Where is the component located? • See a graphical preview ( window, userobjects, DW) • What are the unused items, un- referenced items, of this component (functions and attributes) application? Getting Started with Visual Expert 7 Exploring the application structure In the Navigation bar, some options of the section Description show the CONTAINER/CONTENT relation between the components. Example of the “contents” link In the treeview, go to Project list and select the sample project. In the Navigation bar, select PBL List to see the PBL related to this project. • Select the PBL demopfc, click on Component List in the Navigation bar. • Select w_resp_customer_search, click on Control List. • Select dw_master, click on Control List. • A datawindow appears, select it and ask for the Content • Click on the SQL icon: see the code appear in the source code view. All those relationships are “contents” links. They allow you to deeply explore the application structure. For each kind of relation, a reverse relation is available: in this case, the reverse of content is container. Getting Started With Visual Expert 8 Example of the “container” link The container of a window is a PBL; the container of a control is a window... From our last example: • Select dw_master, click on Container in the Navigation bar. • The window w_resp_customer_search appears again. • Select the window, click on PBL: demopfc is displayed again. Notes: • The “container” option will have a different label according to the selected object (container for controls, PBL for windows, etc.). • This label appears clearly in the treeview as a title (see “Control List”, “Container” and “PBL” in the screenshot above); the opened treeview is therefore very easy to read. Advanced options Display all successive containers of a component in one click • Select dw_master again, click on Container Hierarchy in the Navigation bar. • The Window, PBL and Project containing dw_master will all appear. Getting Started with Visual Expert 9 You can also move in the opposite direction, displaying all successive contents of a component. • Select the window w_resp_customer_search again, click on Control Architecture. • The complete hierarchy of controls appears. Getting Started With Visual Expert 10 If you want to see functions and events at the same time, try General Architecture: This option displays a combination of Control List and Functions and Events links, showing the complete interweaving of components. With a single click you display the complete structure of the selected component. Exploring inheritance relationships Visual Expert displays the ancestors or the descendants of each inherited object (Windows, UserObjects and Menus). This improves your understanding of an existing application, as well as the one of the framework used. Example of “Ancestor/Descendant” links From our last example: • Select w_resp_customer_search, click on Ancestor: w_response appears. • Select w_response, click Descendants: several windows appear, Showing that w_response has been inherited several times. Getting Started with Visual Expert 11 Advanced options You can display several levels of inheritance at once - For example: • select w_response, click on Descendant Hierarchy Not only are the direct descendants of w_response displayed, but so are the successive descendants. Use this feature, for instance, to list the descendants impacted by a modification on the ancestor w_response. The opposite feature is also available: • Select w_response again, click on Ancestor Hierarchy: all the successive ancestors of this window appear. Getting Started With Visual Expert 12 Your application's inheritance tree With a single click, you can see the complete inheritance tree of your application - For example: • Press the key [F5] to close the treeview and refresh the view. • Go to the section PowerBuilder components of the treeview, select window, • Click on Descendant Hierarchy in the Navigation bar. • Then Visual Expert displays the ancestor windows and all successive descendants. You can also get the inheritance tree for userobjects and menus. If you wish, you can print this tree; select [File - Print - Treeview]. Getting Started with Visual Expert 13 Previewing objects To visualize or test graphical component, Visual Expert allows you to rapidly preview any of them (Windows, visual UserObjects and Datawindows). For example: • In the treeview, go to Project list and select the sample project. • In the Navigation bar, click on PBL List, and select demopfc • Click on Component List in