Evaluation of some CASE tools for reverse engineering and application generators - PowerPoint PPT Presentation

oshin
evaluation of some case tools for reverse engineering and application generators l.
Skip this Video
Loading SlideShow in 5 Seconds..
Evaluation of some CASE tools for reverse engineering and application generators PowerPoint Presentation
Download Presentation
Evaluation of some CASE tools for reverse engineering and application generators

play fullscreen
1 / 36
Download Presentation
Evaluation of some CASE tools for reverse engineering and application generators
1196 Views
Download Presentation

Evaluation of some CASE tools for reverse engineering and application generators

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript

  1. University of Zagreb Faculty of Electrical Engineering and Computing Krešimir Fertalj Evaluation of some CASE tools for reverse engineering and application generators

  2. Computer-aided software engineering • Computer-aided software engineering (CASE) • Software to support software development and evolution processes [Sommerville]. • Automated software tool used by systems analysts to develop information systems [Hoffer et al]. • CASE Classification [Sommerville] • 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.

  3. Functional perspective Tool classification Process perspective FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  4. Tools Support individual process tasks such as design consistency checking, text editing, etc. Workbenches Support a process phase such as specification or design, Normally include a number of integrated tools. Environments Support all or a substantial part of an entire software process. Normally include several integrated workbenches. CASE integration FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  5. Components of CASE [Hoffer et al] • Upper CASE • 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 • Lower CASE • CASE tools designed to support the implementation and maintenance phases of the SDLC • Cross life-cycle CASE • CASE tools designed to support activities that occur across multiple phases of the SDLC • Integrated CASE (I-CASE) • Automated systems development environment that provides numerous tools to create diagrams, forms and reports, and code generation facilities, by using the central repository • Types of CASE tools • 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.

  6. UML Tools for Reverse Engineering

  7. Basic reverse engineering steps (in general) Decompilation of executables to get the source code Analysis of software components to produce the models Evaluation of CASE tools capable of source code analysis Analysis of application Bank, described in Rational Application Developer V6 Programming Guide, available at ftp://www.redbooks.ibm.com/redbooks/SG246449/6449code.zip Evaluation of Reverse Engineering Capabilities FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  8. Candidate Tools FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  9. AmaterasUML Eclipse plugin • 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.

  10. ArgoUML • The tool can analyze whole folders but has no filter to choose only interesting components • Raster formats (PNG i GIF) and vector formats (SVG, PS and EPS) • Check list of actions recommended to improve the code • 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.

  11. Drag&drop selection of components to be analyzed Raster (GIF, BMP, JPEG, PNG) and vector (SVG) formats RSA recognizes inheritance but not associations (although the tested code was generated by the RSA v6 !?) Full sync of code and diagrams IBM Rational Software Architect 7.0 FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  12. jGRASP • Import of individual components into project • Shows only classes, not attributes nor methods • Missing associations, other relationships are shown only when the source is compiled by using the tool • Several automatic layout features, all of them weak • No feature to export diagrams as graphics FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  13. Complete development environment Good automatic layout features (hierarchical, orthogonal, symmetric) Raster(JPEG, PNG) and vector (SVG) formats supported No sync between diagrams and code Very robust NetBeans FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  14. StarUML • 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.

  15. VisualParadigm for UML • 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-tripfeature to keep source and diagrams in sync FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  16. Conclusions regarding evaluated UML tools • Visual Paradigm is the only tool that enables preview of complete structure of the project. It can be integrated into Eclipse and NetBeans IDEs. • ArgoUML, NetBeans and StarUML very useful where there is no need to analyze project as a whole. • IBM Rational Software Architect shows some unexpected weaknesse. • The other tools are not mature enough. FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  17. Code Generators

  18. Forms of Active Code Generation [Herrington] • Code munging • inputs source code files, most likely using regular expressions or simple source parsing, and then uses built-in or external templates to build output • Inline code expanding • takes source code as input and creates production code as output, by expanding special markups • Mixed-code generation • reads a source code file and then modifies and replaces the file in place, e.g. by looking for and filling specially formatted comments • Partial-class generation • reads an abstract definition file that contains enough informationto build a set of classes. Next, it uses templates to build the output base classlibraries. • Tier or layer generation • the generator builds one complete tier of an n-tiersystem. • An example of tier generation is model-driven generation, wherein a UML authoringapplication 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.

  19. Template based tool that generates C#, VB, J# or any other ASCII based programming language. The templates can be customized by using the syntax similar to ASP.NET Standard and Pro edition. CodeSmith • Some features • CodeSmith Studio - IDE • Fast Compiler & Template Caching – compilation and execution of templates • Template Debugging • XML support • Console client – automated generation • SQL script execution FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  20. Iron Speed • Generator of .NET Web Applications • generates UI, web page logic, data access layer • cappable of generating almost 80% of application • application logic should be coded manually • Enterprise, Pro and Free edition. • Some features • Application wizard • Page style templates • Role based security • Menu configuration • ... FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  21. MyGeneration • Template based generator • Templates can be written by using JScript, VBScript, C#, VB.NET. • Supported architectures: • dOOdads, EntitySpaces, EasyObjects.NET/EntLib, Gentle.NET, Opf3, NHibernate, Microsoft's DAAB, DotNetNuke, iBatis. • Supported databases: • Microsoft SQL, Oracle, IBM DB2, PostgreSQL, Microsoft Access, FireBird, Interbase, VistaDB, SQLite, MySQL, Advantage, Pervasive FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  22. Mia-Generation • Model based generator, link between UML modeling tools and IDEs • Main features: • 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/J2EE, etc) FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  23. Conclusions Regarding Code Generators • Properly used, the source code generators can • Shorten the coding time • Reduce the number of errors • Make customization of programs more efficient • Contribute to writing of consistent and quality code • Potential risks • 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.

  24. Web Application Generators

  25. Web Application Generators Context • Web applications today • more and more common and complex • replacing stand-alone applications in many areas • often object-oriented, n-tier • extensive data input, reporting • common problems with development • slower than development of stand-alone or client applications • client and server code • Evaluated Tools • CodeCharge • CodeJay • Visual Studio .NET • ASP.NET WebMatrix FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  26. Supported Technologies • Web Servers • often determine the programming language used (i.e. IIS and ASP) • script engine process the dynamic Web pages • Web Programming Languages • ASP, JSP, PHP, ColdFusion, Perl, ASP.NET, Java servlets,... • languages: compiled, interpreted; object-oriented • sometimes require unique approach for problem solution • Databases • database connection technologies: OLEDB, ODBC, JDBC, ... • different databases supported: • Informix, Access, SQL Server, Oracle, mySQL, PostgreSQL,... • Web applications usually optimized for one database • different connection settings, SQL commands, features • generating SQL statements using visual relationships between tables (WebMatrix) FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  27. Features of Web Application Generators • Integrated Development Environments (IDE) and Wizards • 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 • Security management • 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 (CodeCharge) FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  28. Features of Web Application Generators • Forms • 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 • Reports • 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.

  29. Features of Web Application Generators • Templates and customizable design • 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 (CodeCharge) • Menus and navigation • Limited support by Web application generators • Stand-alone menu with links to other pages • Various third party components for Web menus • Publishing • LAN, FTP, FrontPage extensions • Synchronization of files FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  30. Quality of Generated Code • Separation of server-side code and Web page design • 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 • Linear or Object-oriented design • 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.

  31. Quality of Generated Code • Code Maintenance and Modification • Can all desired functions be generated? • Code readability • Support for external developer tools and integration • Use on existing projects • Code duplication or library • Database Access Code and Stored Procedures • 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 (CodeJay) FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  32. Quality of Generated Code • Error Handling and Logging • 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 • Comments and Documentation • 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.

  33. Conclusions regarding Web application generators • Many Web application generators on the market • Quick results on new projects, harder customization • Often not implementing best programming practices • Inability to fully customize code generation process • 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.

  34. References

  35. References • 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 25th International Conference on Information Technology Interfaces, June 16-19, 2003, Cavtat, Croatia, ISBN 953-96769-6-7, pp. 639-644. • 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, McGraw-Hill, 2004. • I. Sommerville: Software Engineering, 7th ed. Addison-Wesley Publishing Company. 2004. FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.

  36. URLs • 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.