IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

webMethods Estimation

  • 1.  webMethods Estimation

    Posted Mon January 15, 2007 02:43 PM

    Anyone has any idea----how to calculate the size in webMethods, like for any other programming language we used to have “LOC”(Lines of Code)Mechanism. Here how will we do the size calculation and if possible what are the esssentials steps need to be taken care of?

    Regards,


    #webMethods-Upgrade
    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: webMethods Estimation

    Posted Mon January 15, 2007 08:03 PM

    You can do that via “Number of Flow Steps” mechanism. Though let me warn you that its not a easy approach.


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods-Upgrade
    #webMethods


  • 3.  RE: webMethods Estimation

    Posted Tue January 16, 2007 09:45 PM

    You could also check the size of the package by looking at the zip file in the replicate/outbound directory of the IntegrationServer…


    #webMethods
    #webMethods-Upgrade
    #Integration-Server-and-ESB
    #webMethods-General


  • 4.  RE: webMethods Estimation

    Posted Tue January 16, 2007 10:10 PM

    I’m not sure that the size of a package is useful as the \pub folder in a package could contain lots of large documents and the Flow services in the package could contain lots of unused services or large blocks of disabled statements.

    Metrics like lines of code seldom measure what management is really attempting to get at (well designed, well tested functionality created per person per unit of time).

    Mark


    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods
    #webMethods-Upgrade


  • 5.  RE: webMethods Estimation

    Posted Wed January 17, 2007 06:49 AM

    If you’ve got UNIX, or Unix shell tools installed, you could try this shell command to estimate LOC for a Flow service:

    grep "<MAP MODE=\"STANDALONE\"\|<INVOKE \|<BRANCH \|<LOOP \|<EXIT \|<REPEAT \|<SEQUENCE " flow.xml | grep -v "DISABLED=\"true\""  | wc -l

    This command applies to ‘flow.xml’ files under the package ‘ns’ folder. It basically counts each non-disabled FLOW statement as 1 line of code. Each standalone MAP step only counts as 1 LOC, irrespective of the number of connectors between the input and output (i.e. it does not treat each connector as a distinct assignment statement)

    Adding '<MAPINVOKE ’ to the grep pattern above counts transformers within MAP steps, and adding '<MAPCOPY ’ counts all explicit connectors (I think…)

    DSP and template files would be probably estimated by counting lines in each HTML or DSP file under the ‘pub’ folder. Java services can be estimated by base64-decoding the content of ‘’ within the java.frag files, then line-counting the decoded java fragment.


    #webMethods-Upgrade
    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General


  • 6.  RE: webMethods Estimation

    Posted Wed January 17, 2007 03:45 PM

    Adding to Sonam’s post:

    If you run IS on Windows but you’d still like to run the command suggested by Sonam, you can try these utilities: [URL=“http://unxutils.sourceforge.net/”]http://unxutils.sourceforge.net/[/URL]

    I use some of the commands frequently (ex. tail, grep, cut, wc) and they work great.

    • Percio

    #webMethods
    #Integration-Server-and-ESB
    #webMethods-Upgrade
    #webMethods-General


  • 7.  RE: webMethods Estimation

    Posted Wed January 17, 2007 04:58 PM

    I seriously question the value of any LOC type of measurement.


    #webMethods-General
    #webMethods-Upgrade
    #Integration-Server-and-ESB
    #webMethods


  • 8.  RE: webMethods Estimation

    Posted Thu January 18, 2007 12:32 AM

    Thanks for adding Percio. Adding info on my preferred Unix-on-Windows environment: it’s cygwin ([url]http://cygwin.com/[/url])

    Rob - You could be right. :slight_smile:


    #Integration-Server-and-ESB
    #webMethods
    #webMethods-General
    #webMethods-Upgrade


  • 9.  RE: webMethods Estimation

    Posted Thu January 18, 2007 05:44 PM

    I do, to somewhat degree, agree with Rob/Mark; But with some SEI/CMM Level 4/5 companies/projects you don’t have a choice but to do estimates for every project; “LOC” is the frequently used metric for estimation - and hence people try to extend this for webMethods FLOW services.

    I (and am sure many developers) hate when @ certain quality conscious companies/projects, to even make a single line of change you have to go through five different quality process documents.

    Thanks to Sonam for suggesting an easier way to calculate number of flow steps unix-script style.


    #webMethods
    #Integration-Server-and-ESB
    #webMethods-General
    #webMethods-Upgrade


  • 10.  RE: webMethods Estimation

    Posted Thu January 18, 2007 06:24 PM

    Good points Saurabh. Companies do indeed use LOC as one data point in a larger set of data points to assist in their estimating efforts. I don’t know that I’ll ever agree that LOC is all that useful, though.

    I’m reminded of a saying, though I can’t remember who to attribute it to: “Measuring software by counting lines of code is like measuring hardware by weight.” Interesting but not typically useful. I believe there are other estimation techniques that are better predictors.

    Anyway, my kudos to Sonam for providing an approach to get the LOC.


    #webMethods-General
    #webMethods
    #Integration-Server-and-ESB
    #webMethods-Upgrade


  • 11.  RE: webMethods Estimation

    Posted Fri January 19, 2007 03:41 AM

    Thanks guys.

    Here’s another one-liner that calculates “effective LOC” of flow services in an IS instance. To run it, go to the /packages directory, and use ‘find’ with a wildcard pattern to identify the non-WM packages of interest.

    This example counts LOCs of flows in all packages beginning with ‘DD…’:

    find DD* -name "flow.xml" | xargs -n1 grep "<MAP MODE=\"STANDALONE\"\|<INVOKE \|<BRANCH \|<LOOP \|<EXIT \|<REPEAT \|<SEQUENCE \|<MAPINVOKE \|<MAPCOPY " | grep -v "DISABLED=\"true\""   | wc -l

    Note, contrasted with my earlier post, this code counts each transformer (MAPINVOKE) and explicit connector (MAPCOPY) towards the LOC. This is because each transformer is effectively a subroutine invoke, and each explicit connector is an assignment statement.

    Precisely counting Java LOC requires a more involved script - it’s easier to count the java.frag files and assume an average LOC per file.
    Counting DSPs and HTML templates should be easy - just modify the statement above to search for suitable files and linecount the contents.


    #webMethods
    #webMethods-Upgrade
    #webMethods-General
    #Integration-Server-and-ESB


  • 12.  RE: webMethods Estimation

    Posted Fri January 19, 2007 11:04 PM

    You can count the Java LOC by counting number of lines in the *.java files under package/code/source

    You dont need anything complex as in going to java.frag files or am I missing something here? Remember this is for estimation purposes only!!


    #webMethods-Upgrade
    #webMethods-General
    #Integration-Server-and-ESB
    #webMethods


  • 13.  RE: webMethods Estimation

    Posted Mon January 22, 2007 01:08 AM

    Thanks. I missed out on the consolidated Java files under /code/source/.

    Just I had a look - there is one problem though with line-counting these files. IS inserts autogenerated code. The main issue is comments - IS recurses down a service’s input/output data structures and adds one comment for each each node. For eg:

    
    // --- <<B2B-START(updateList)>> ---
    // @subtype unknown
    // @sigtype java 3.5
    // [i] record:0:required packages
    // [i] - field:0:required name
    // [i] - field:0:required enabled
    // [i] - field:0:required loadok
    // [i] field:0:required servers
    // [i] record:1:required in
    ...

    A simple Java service with a complex datastructure would get “bulked-up” by this.

    A approximation around this could be using an LOC counting tool, and getting it to exclude comments.


    #webMethods
    #webMethods-General
    #webMethods-Upgrade
    #Integration-Server-and-ESB


  • 14.  RE: webMethods Estimation

    Posted Mon January 22, 2007 04:17 PM

    And actually, wikipedia entry goes over this in the “Measuring SLOC” section…


    #webMethods-Upgrade
    #webMethods
    #webMethods-General
    #Integration-Server-and-ESB


  • 15.  RE: webMethods Estimation

    Posted Tue January 23, 2007 11:16 PM

    That’s a good reference - I read that same Wikipedia entry before posting.

    My ‘strip-out comments’ idea is useful for Java services with complex input/outputs as IS seems to recurse down the input/output structures and autogenerate one comment per node.


    #webMethods-General
    #webMethods-Upgrade
    #webMethods
    #Integration-Server-and-ESB