c# - Bestpractice approaches for reverse engineering VB6 code with out knowledge of the domain -


target state: porting vb6 code c#, undertake whole project conceivable processes involved.

what approach if not have knowledge domain?

there documentation, legacy code (up 100.000 - 300.000 lines of code , comments vb6 files contain 14.000 lines of code) written in vb6.

disclaimer: work great migrations

we rewrite large vb6/asp/com applications .net (primarily c#) living , have developed software analysis , reengineering tool it. tool vb6/asp/com compiler , decompiler authors .net codes. of course since vb6 platform different .net, direct compile/decompile not desirable or viable, our tool has "analyzer" implements various code reengineering algorithms deal vb6-c# incompatibilities. there programmable "author" allows migration team prescribe rules setting .net code files, restructuring code, , doing things replacing com apis , activex controls .net classes -- depending on team needs or wants.

as product of compiling , analyzing code our tool produces model of entire vb6/asp/com system being upgraded. model can used produce extremely detailed reports internal structure of system. these models can used reverse-engineer code -- if know right questions ask , need understand problem domain job.

of course once have build-complete .net, can use various analytics , code review tools work off assemblies. versions of visual studio have these tools , there open source tools such fxcop, ndepends). there fantastic dynamic analysis tools (equatec tracer) have used.

in end though migration teams going hard pressed verify unknown system. if staying on same platform, unable prove application "correct" if not know how run , how setup/enter expected inputs , find/verify expected outputs. leave customer!

if doing verification customer, rely heavily on side-by-side testing validate new version of system -- assuming know how run legacy application assume given same sets of inputs , usecases should exhibit same behaviors , produce same results. have heard approval tests in unit testing circles.

i admit rely heavily on knowledge vb6/com code complete, detailed, formal , production tested description of data structures , logic of system , putting information through tested , retested systematic transformation. have been developing compilers since 1977 , have worked hard on vb6/asp compiler make sure .net codes generate preserves semantics of original vb6. not 100% every time - getting closer time. again doing things hand not guarantee 100% correct code on first try either...


Comments

Popular posts from this blog

c++ - How do I get a multi line tooltip in MFC -

asp.net - In javascript how to find the height and width -

c# - DataTable to EnumerableRowCollection -