Has anyone used Enterprise Architect to reverse engineer perl? - perl

I would like to reverse engineer a perl application in Enterprise Architect.
I have created perl as a New Language in Settings -> Code Generation Templates and I am guessing that I need a template for a new file, Attribute/Declaration, Operation/Declaration/Body.
I also guess that the operation should indicate "sub xxx" and the operation should indicate "x=y", however I am getting a bit stuck as to how to do this.
I can't be the first person to reverse perl so is there any Code Generation Templates out there?

First off, EA does not (in version 10.0.1009) natively support forward or reverse engineering of perl.
Secondly, these templates, which are part of the Code Template Framework, are for code generation only: they cannot be used for reverse engineering.
What you want instead is the Grammar Framework (see the help file under Extending UML Models -- MDG Technology SDK). This allows you to construct a grammar for a language, which specifies what UML elements EA should create when reading source files in that language.

Related

How to automatically generate Sequence diagram for NUnit project using Sparx Enterprise Architect

Hi How do we Autogenerate Sequence diagrams using Enterprise architect software? I have gone through article http://blog.lieberlieber.com/2012/03/13/tutorial-nunit-and-sequence-diagram-recording-in-enterprise-architect-9-3/ but in that blog, its not shown how to generate diagrams using NUnit project. He has mentioned that we could do using nUnit, but its not explained how to do. Also is there any way to generate same diagrams using SpecFlow project?
Thanks in advance.
Sparx EA uses debug symbol output to identify sequences of calls between in-memory objects and build a sequence diagram, e.g. from the call stack. To leverage this you need to attach EA into a process that is emitting debug symbols (in a similar way to how you might attach an IDE into a process to debug it) and use the EA 'debug' tools to add breakpoints, step through lines and so on. How you get hold of these tools depends on the version of EA that you're using (ribbon, menus etc often get changed between versions), but somewhere you will find the Debugger window. From there just follow your nose.

Are there any alternatives to T4 templates and EnvDTE for cross platform asp.net 5 development?

We currently use T4 templates to generate C# code files based on C# Code (Entity POCO's) and the EDMX (in older applications)
Moving to ASP.NET 5 with a view to support cross platform development, are there any code generation tools available that can read a projects class & meta data structures, and to generate C# files at design time, similar to T4 templates?
You can try Scripty - it is Roslyn based scripting.
Syntax highlighting for *.csx files works out of the box;
VS extension exists to process scripts on save;
MSBuild task exists to process scripts during buld process;
Script allows you to traverse a hierarchical model of the project;
Multiple files generation from single script is supported;
yeoman seems to be a good option. There exist some generators already for scaffolding asp.net 5 apps and you can create your own generators
It is cross platform and can be used on linux/mac/windows.
Even tt templates weren't supported earlier in asp.net-5 projects. It has been added recently (in Visual Studio 2015 Update 1).
The discussion is here: https://github.com/aspnet/Home/issues/272
And in the thread, Eilon said the Roslyn is the way to analyse the code and generate new ones... And he again said the ASP team has no immediate plan. So currently we have no solution from Microsoft.
But I did some search and didn't find any cross platform community tool to generate codes based on other codes. :(
Scriban worked for me as an alternative to replace T4 templates for generating unit test code. But it's a pure templating engine.
The new LeMP preprocessing engine for C# can be used as an alternative to T4 templates. May I ask what specifically you mean by "projects class & meta data structures"?
For this purpose I created a simple python
script called "autogen".
How it works: the script takes jinja template file (instead of T4) and data file (json) and generates one or multiple output files (e.g. C#, or any format) based on the template.
How it can be used (example): describe interface (methods, parameters) definition in json file, create *.j2 template files for C#, Java, Python, etc.. Then run autogen.py script and files for proxy/stub for all languages will be created.
This can help to create lot of similar code without copy/pasting and make code changes by simply changing single json file.
Moreover it can be integrated with build pipiline, msbuild (.net, .net core) and is cross-platform.
I have been looking into this same sort of thing, although not specifically with ASP.NET MVC but across project types as I move to .Net Core. I kept my T4 relying on EDMX early on. Which works out since EF7 moves beyond the file format in favor of code. Where I was planning on going with my code generation was a combination of ScriptCS and C# REPL. Roslyn complicates things for me a tad since there are no design time assemblies from what I understand. So the trick may be to understand and introspect cs files from within the project.

Free Pascal without Lazarus

Could any of you chaps point me in the direction of a good tutorial or book for Free Pascal that does not rely on using Lazarus? Ideally I would like just to write code in a text editor and compile/link using the command-line. I have no existing knowledge of Pascal at all.
Unfortunately all the material I have uncovered through Google assumes the use of Lazarus, prior knowledge of Pascal or refers only to the pre-Delphi/FPC versions of Pascal without 'modern' features such as dynamic strings, objects and so forth.
Lazarus doesn't change the base dialect possibilities. It is only an IDE and visual library over freepascal, nearly everything nonvisual is FPC.
Just install FPC and compile with
fpc <programname>
As reference for the dialect see the Free Pascal reference guide, which contains nonvisual examples. When you have a base level of knowledge, you can adapt Lazarus related examples to your own environment.

UML tool for reverse engineering an eclipse project

I am currently working on a project in Eclipse but the problem is that this project is very big (a lot of codes, classes, packages, etc) and undocumented. Since, the project is written in Java, my idea was to make a reverse enineering of the project to see his architecture in UML. Do you know an eclipse plugin who can complete this task very easily? Thanks for your answer !!
I think MoDisco is what you are looking for ( here for a short intro)
It seems that the question is dealing with Eclipse plugin therefore Modisco and StartUML are not a possible choice because they are either not a graphical class diagram viewwer or an Eclipse plugin.
The tools that I have evaluated and selected are:
Topcased can reverse a project and gives an UML view. The reverse is good even if not recursive. I mean that you can detect only object having their own information such as class, interface, package, method and attributes but you can not detect calls between classes because this require a recursive reverse.
eUML will give you a visual class diagrams and the possibility to navigate but no model only EMF tags inserted inside your own code. I like the visual representation of the class diagram but having EMF tags in my code is too intrusive !!
You can try RSA which is a pretty good reverse having a real UML model but you will also get EMF tag in your code
The best for me and with no doubt is EclipseUML Omondo with no tag in the code and a high quality UML model but it is really too expensive !!
I'd advise StarUML or StavrUML, the unofficial fork. It reverse engineers code compliant with Java versions before 1.6 or something. Yes, the project was abandoned years ago, but the UML editor remains incredibly strong and powerful.
However, I'd avoid using reverse engineering a UML diagram. You'll probably get an unreadable mess out if it. Just get stuck in and make it manually :)
I'm sure you can find a suitable tool for your needs if you check these.

Visual software tool for creating complex branching logic

Is there a visual software tool (no batch coding/programming language) which can enable an end user to create complex branching logic like this tool : http://www.visuallogic.org/VLTutorial.html . Any eclipse plgun-in similar to this. I want that complex logic expressed by the end user to be represented in XML form
A set of plug-ins called vIDE might help you - it's a tool based on GMF I am currently developing. You can check out the project here.
It's still far from stable or finished, but you can draw flowcharts in it which get dynamically converted to Ecore models (which in term can be exported to XML).
My current effort is to support generation of executable Python code from the drawn flowchart.
Take a look at UniMod
In term of pure flowchart diagrams (and not UML diagrams), I didn't find anything recent.
flowchartstudio is not supported on recent Eclipse version
flowchart4j (not free) is interesting (for Java programs, so no XML representation)
DRAKON Editor
http://drakon-editor.sourceforge.net/
It it supports visual programming in several programming languages, including Java, Processing.org, D, C#, C/C++ (with Qt support), Python, Tcl, Javascript, Lua and Erlang.
Why to use DRAKON than other diagramming systems?
No line intersections. You will never find in DRAKON diagram two or
more lines intersecting each other! Not seen in other diagramming
systems!
Silhouette structure. It allows to break one diagram in to several
logical parts. Not seen in other diagramming systems!
No slanting or curved lines. Only straight lines with right angles.
Icons are placed only on vertical lines.
Branching is done in a simple, visible and consistent way.
Each diagram has one entry and one exit.
More about DRAKON here:
http://en.wikipedia.org/wiki/DRAKON
Take a lool at TUM.CMS.VplControl