d9cb909ce86a1a5662909ed505e36b67.ppt
- Количество слайдов: 36
University of Zagreb Faculty of Electrical Engineering and Computing Krešimir Fertalj Evaluation of some CASE tools for reverse engineering and application generators
Computer-aided software engineering q Computer-aided software engineering (CASE) n n Software to support software development and evolution processes [Sommerville]. Automated software tool used by systems analysts to develop information systems [Hoffer et al]. q CASE Classification [Sommerville] n n n Functional perspective • Tools are classified according to their specific function. Process perspective • Tools are classified according to process activities that are supported. Integration perspective • Tools are classified according to their organisation into integrated units. FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 2
Functional perspective Tool classification Process perspective FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 3
CASE integration q Tools n Support individual process tasks such as design consistency checking, text editing, etc. q Workbenches n Support a process phase such as specification or design, Normally include a number of integrated tools. q Environments n Support all or a substantial part of an entire software process. Normally include several integrated workbenches. FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 4
Components of CASE [Hoffer et al] q Upper CASE n CASE tools designed to support the information planning and the project identification and selection, project initiation and planning, analysis and design phases of the SDLC q Lower CASE n CASE tools designed to support the implementation and maintenance phases of the SDLC q Cross life-cycle CASE n CASE tools designed to support activities that occur across multiple phases of the SDLC q Integrated CASE (I-CASE) n Automated systems development environment that provides numerous tools to create diagrams, forms and reports, and code generation facilities, by using the central repository q Types of CASE tools n n n Diagramming tools Computer display and report generators Analysis tools used to check for incomplete, inconsistent or incorrect specifications A central repository Documentation generators Code generators FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 5
UML Tools for Reverse Engineering
Evaluation of Reverse Engineering Capabilities q Basic reverse engineering steps (in general) n n Decompilation of executables to get the source code Analysis of software components to produce the models q Evaluation of CASE tools capable of source code analysis n Analysis of application Bank, described in Rational Application Developer V 6 Programming Guide, available at ftp: //www. redbooks. ibm. com/redboo ks/SG 246449/6449 code. zip FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 7
Candidate Tools FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 8
Amateras. UML Eclipse plugin q q q Does not recognize relationships between classes. No automatic layout feature. Diagram can be saved only as JPEG image. Eclipse can crash for models with 50 classes or more. No automatic synchronization between diagram and source code. FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 9
Argo. UML q The tool can analyze whole folders but has no filter to choose only interesting components q Raster formats (PNG i GIF) and vector formats (SVG, PS and EPS) q Check list of actions recommended to improve the code q Automatic sync of source code with diagrams, but not vice versa FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 10
IBM Rational Software Architect 7. 0 q Drag&drop selection of components to be analyzed q Raster (GIF, BMP, JPEG, PNG) and vector (SVG) formats q RSA recognizes inheritance but not associations (although the tested code was generated by the RSA v 6 !? ) q Full sync of code and diagrams FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 11
j. GRASP q Import of individual components into project q Shows only classes, not attributes nor methods q Missing associations, other relationships are shown only when the source is compiled by using the tool q Several automatic layout features, all of them weak q No feature to export diagrams as graphics FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 12
Net. Beans q Complete development environment q Good automatic layout features (hierarchical, orthogonal, symmetric) q Raster (JPEG, PNG) and vector (SVG) formats supported q No sync between diagrams and code q Very robust FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 13
Star. UML q q q Java analyzed package by package Automatic layout supported by default Raster (JPEG i BMP) and vector (EMF i WMF) exports supported Synchronization between diagrams and code possible For models with over 50 classes, some objects may not be shown on diagram FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 14
Visual. Paradigm for UML q q q q Instant reverse wizard Analysis of folders and ZIP archives The tool is capable of analyzing both JAR and class files Good automatic layout feature Raster (JPEG, PNG) and vector (SVG i EMF) formats Generation of various reports (HTML, PDF, Word, etc. ) Java Round-trip feature to keep source and diagrams in sync FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 15
Conclusions regarding evaluated UML tools q Visual Paradigm is the only tool that enables preview of complete structure of the project. It can be integrated into Eclipse and Net. Beans IDEs. q Argo. UML, Net. Beans and Star. UML very useful where there is no need to analyze project as a whole. q IBM Rational Software Architect shows some unexpected weaknesse. q The other tools are not mature enough. FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 16
Code Generators
Forms of Active Code Generation [Herrington] q Code munging n inputs source code files, most likely using regular expressions or simple source parsing, and then uses built-in or external templates to build output q Inline code expanding n takes source code as input and creates production code as output, by expanding special markups q Mixed-code generation n reads a source code file and then modifies and replaces the file in place, e. g. by looking for and filling specially formatted comments q Partial-class generation n reads an abstract definition file that contains enough information to build a set of classes. Next, it uses templates to build the output base class libraries. q Tier or layer generation n n the generator builds one complete tier of an n-tier system. An example of tier generation is model-driven generation, wherein a UML authoring application is used in conjunction with a generator and an input definition file (often in XML) to output one or more tiers of a system. FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 18
Code. Smith q Some features q Template based tool that n Code. Smith Studio - IDE generates C#, VB, J# or any other n Fast Compiler & Template Caching – ASCII based programming compilation and execution of templates language. n Template Debugging q The templates can be customized n XML support by using the syntax similar to n Console client – automated generation ASP. NET n SQL script execution q Standard and Pro edition. FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 19
Iron Speed q Generator of. NET Web Applications n n generates UI, web page logic, data access layer cappable of generating almost 80% of application logic should be coded manually Enterprise, Pro and Free edition. q Some features n Application wizard n Page style templates n Role based security n Menu configuration n. . . FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 20
My. Generation q Template based generator n Templates can be written by using JScript, VBScript, C#, VB. NET. q Supported architectures: n d. OOdads, Entity. Spaces, Easy. Objects. NET/Ent. Lib, Gentle. NET, Opf 3, NHibernate, Microsoft's DAAB, Dot. Net. Nuke, i. Batis. q Supported databases: n Microsoft SQL, Oracle, IBM DB 2, Postgre. SQL, Microsoft Access, Fire. Bird, Interbase, Vista. DB, SQLite, My. SQL, Advantage, Pervasive FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 21
Mia-Generation q Model based generator, link between UML modeling tools and IDEs q Main features: n n n UML model based Support for Rose, Rhapsody, Together, Poseidon and other XMI tools Code generation based on templates Templates written in Java Integration of manually written source code Support for all major technologies (Microsoft, Java/J 2 EE, etc) FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 22
Conclusions Regarding Code Generators q Properly used, the source code generators can n n Shorten the coding time Reduce the number of errors Make customization of programs more efficient Contribute to writing of consistent and quality code q Potential risks n n n Dependability on producer of the tool Bad applications as the result of bad templates Use of inadequate tools or templates can be contra productive FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 23
Web Application Generators
Web Application Generators Context q Web applications today n n more and more common and complex replacing stand-alone applications in many areas often object-oriented, n-tier extensive data input, reporting q common problems with development n n slower than development of stand-alone or client applications client and server code q Evaluated Tools n n Code. Charge Code. Jay Visual Studio. NET ASP. NET Web. Matrix FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 25
Supported Technologies q Web Servers n n often determine the programming language used (i. e. IIS and ASP) script engine process the dynamic Web pages q Web Programming Languages n n n ASP, JSP, PHP, Cold. Fusion, Perl, ASP. NET, Java servlets, . . . languages: compiled, interpreted; object-oriented sometimes require unique approach for problem solution q Databases n n n database connection technologies: OLEDB, ODBC, JDBC, . . . different databases supported: • Informix, Access, SQL Server, Oracle, my. SQL, Postgre. SQL, . . . Web applications usually optimized for one database different connection settings, SQL commands, features generating SQL statements using visual relationships between tables (Web. Matrix) FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 26
Features of Web Application Generators q Integrated Development Environments (IDE) and Wizards n n HTML designer, code editor, Web page preview, debugger application builders and wizards Visual Studio. NET – advanced development platform, but lacking code generation features editing projects with other development tools q Security management n n Often depending on system’s architecture, database design, user roles, use of cookies, etc. Some simple/more advanced autorization scenarios can be generated automatically given specific parameters (Code. Charge) FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 27
Features of Web Application Generators q Forms n n n Basis of the majority of Web applications Most challenging part of the application (user input data validation, database access, interaction with other controls on the page) Errors in design can result in corrupted data in the database and application instability Knowing the database table structure most generators can generate different types of forms User-friendly forms often require manual modification of generated code – good quality code is essential q Reports n n n Easier to implement, especially reports with no user input Common problems: multiple level selection reports, paging Visual representation of data is helpful FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 28
Features of Web Application Generators q Templates and customizable design n Consistent appearance accross pages helps users Templates often use CSS to achieve that Changing the template involves updating links to all pages to new style sheet (Code. Charge) q Menus and navigation n Limited support by Web application generators Stand-alone menu with links to other pages Various third party components for Web menus q Publishing n n LAN, FTP, Front. Page extensions Synchronization of files FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 29
Quality of Generated Code q Separation of server-side code and Web page design n n Should be used when supported by the language ASP. NET provides framework for that separation • ASPX files: HTML and bound fields • Code behind files: getting the data and preparing it for display Easier design changes Better code reuse q Linear or Object-oriented design n n Large applications require further code separation • database access classes • business layer(s) Database access class enables: • Multiple database support • Easier error handling and logging Generating one form may result in many files and classes OO approach also useful in defining general page layout FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 30
Quality of Generated Code q Code Maintenance and Modification n n Can all desired functions be generated? Code readability Support for external developer tools and integration Use on existing projects Code duplication or library q Database Access Code and Stored Procedures n n n Support for both SQL statements in code and stored procedures (both needed in some cases) Using stored procedures as data source Generating stored procedures SQL statements outside database access classes – usually harder to maintain and reuse Mixing SQL and HTML code should be avoided (Code. Jay) FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 31
Quality of Generated Code q Error Handling and Logging n n Centralized error handling supported by several programming languages (e. g. ASP. NET) Logging all relevant events and errors (with context) to database increases security and debugging q Comments and Documentation n n Generated code needs customization Comments explaining generated code Comments showing where to insert the custom code Automatic generation of documentation often not supported FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 32
Conclusions regarding Web application generators q Many Web application generators on the market q Quick results on new projects, harder customization q Often not implementing best programming practices q Inability to fully customize code generation process q A limited number of real projects can fully benefit from Web application generators FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 33
References
References n n n n F. Budinsky et. al: Automatic Code Design from Design Patterns, Toronto Software Laboratory, T. J. Watson Research Center. E. Eilam: Reversing : Secrets of Reversing Engineering, Wiley Publishing, Inc. , Indianapolis, Indiana. 2005. T. Helman, K. Fertalj: “A Critique of Web Application Generators”, Proceedings of the 25 th International Conference on Information Technology Interfaces, June 16 -19, 2003, Cavtat, Croatia, ISBN 953 -96769 -6 -7, pp. 639644. J. Herrington: Code Generation in Action, Manning Publications, 2003. J. A. Hoffer, J. F. George, J. S. Valacich: Modern Systems Analysis and Design, 3/e, Prentice Hall College Div, 2001. R. S. Pressman: Software Engineering: A Practitioner's Approach, 6/e, Mc. Graw-Hill, 2004. I. Sommerville: Software Engineering, 7 th ed. Addison-Wesley Publishing Company. 2004. FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 35
URLs n n n n http: //amateras. source. jp http: //argouml. tigris. org http: //www. codecharge. com http: //www. codejay. com/ http: //www. codesmithtools. com/ http: //www. codegeneration. net/ http: //www. jgrasp. org/ http: //www. ironspeed. com/ http: //www. mia-software. com http: //www. mygenerationsoftware. com http: //www. netbeans. org/ http: //www-306. ibm. com/software/awdtools/architect/swarchitect/index. html http: //staruml. sourceforge. net/en http: //office. microsoft. com/en-us/visio/default. aspx http: //www. visual-paradigm. com http: //www. asp. net/webmatrix/ FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007. 36
d9cb909ce86a1a5662909ed505e36b67.ppt