0301 Fertalj case tools by B898s5U

VIEWS: 12 PAGES: 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
   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.       2
         Functional
         perspective                               Tool classification
                            Re-en g i neeri ng t ool s

                            Test in g t oo ls

                            Debu gg i ng t oo ls

                            Prog ram analy si s t o ol s

                            Lang uage-p ro ces si ng
                            t oo ls

                            Meth od s up po r t t o ol s

                            Prot o ty pi ng t oo l s

                            Co nfi gurati on
                            management to ol s

                            Ch an ge man ag emen t t oo ls

                            Do cu men t at io n t oo ls

                            Ed it i ng t oo l s

                            Pl anni ng t o ol s


           Process
                                                                          i
                                                                   Sp eci f cat io n         Desi gn   Impl emen t at io n    eri
                                                                                                                             V ficat i on
          perspective                                                                                                             and
                                                                                                                               ali
                                                                                                                             V dat io n
FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.                                                  3
                                                    CASE integration
   Tools
              Support individual                                                                                  CASE
               process tasks such                                                                               techn olo g y
               as design
               consistency
               checking, text
               editing, etc.                                                                                Wor kb en ch es                Environ ments
                                                                            oo
                                                                           T ls
   Workbenches
              Support a process
               phase such as
               specification or                                                                     File                         Integ rated         Process-cen tr ed
                                                      Ed ito rs          Co mp ilers
               design, Normally                                                                 comp ar ators                   en viron ments        en viron ments
               include a number
               of integrated tools.
   Environments
                                                                                       An alysis and
              Support all or a                                                                             Pro gramming                  estin g
                                                                                                                                          T
                                                                                          desig n
               substantial part of
               an entire software
               process. Normally
               include several                                      Mu lti-metho d            Sin gle-meth od             General-pu rp ose         Lang uage-sp ecific
               integrated                                           workb en ch es             workb en ch es              workb en ch es             workb en ch es
               workbenches.


FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.                                                                          4
                         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.             5
UML Tools for Reverse
    Engineering
      Evaluation of Reverse Engineering Capabilities
   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/redboo
                ks/SG246449/6449code.zip




FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.   7
                                                     Candidate Tools
                                                                                                  Operating      Supported
                    Tool                                URL                            License
                                                                                                    systems      languages
              AmaterasUML                                                                          Microsoft
              Eclipse plugin                 http://amateras.source.jp                   free    Windows Linux      Java
                   1.2.2                                                                           Mac OS X
                                                                                                   Microsoft
                                                                                                   Windows
              ArgoUML 0.24                   http://argouml.tigris.org                   free                       Java
                                                                                                     Linux
                                                                                                   Mac OS X
               IBM Rational           http://www-306.ibm.com/software/                             Microsoft
                 Software            awdtools/architect/swarchitect/index.              comm       Windows          Java
               Architect 7.0                         html                                            Linux
                                                                                                   Microsoft
                JGrasp 1.8.6                  http://www.jgrasp.org/                     free      Windows          Java
                                                                                                   Mac OS X
                                                                                                                     C++
              Microsoft Visio            http://office.microsoft.com/en-                           Microsoft
                                                                                        comm                         C#
                  2007                         us/visio/default.aspx                               Windows
                                                                                                                 Visual Basic
                                                                                                   Microsoft
                                                                                                 Windows Linux
               NetBeans 5.5                 http://www.netbeans.org/                     free                       Java
                                                                                                   Mac OS X
                                                                                                    Solaris
                                                                                                                    Java
                                                                                                   Microsoft
               StarUML 5.0              http://staruml.sourceforge.net/en                free                       C++
                                                                                                   Windows
                                                                                                                     C#
             VisualParadigm                                                                                         Java
              for UML 6.0                                                                          Microsoft        C++
                                        http://www.visual-paradigm.com                  comm
               Enterprise                                                                          Windows          Ada
                 Edition                                                                                            PHP
FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.                                      8
                                  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.   9
                                                                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.   10
                        IBM Rational Software Architect 7.0
   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




FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.   11
                                                                  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.   12
                                                               NetBeans
   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




FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.   13
                                                                 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.   14
                                         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-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
   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.   16
Code Generators
        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 information to build a
               set of classes. Next, it uses templates to build the output base class
               libraries.
   Tier or layer generation
              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
  CodeSmith
   Template based tool that         Some features
    generates C#, VB, J# or any other   CodeSmith Studio - IDE

    ASCII based programming             Fast Compiler & Template Caching –

    language.                            compilation and execution of templates
                                        Template Debugging
   The templates can be customized
                                        XML support
    by using the syntax similar to
    ASP.NET                             Console client – automated generation
                                        SQL script execution
   Standard and Pro edition.




FER-ZPR, Fertalj: Evaluation of some CASE and Generators, DAAD workshop, Risan, sept 2007.   19
                                                             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.   20
                                                         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.   21
                                                       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.   22
               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.   23
Web Application Generators
                      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.   25
                                        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.   26
                 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.   27
                 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.   28
                 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.   29
                                      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.   30
                                      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.   31
                                      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.   32
            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.   33
References
                                                             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.   35
                                                                      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.   36

								
To top