|
Sponsored Links
Resources
Enterprise Java Research Library
Get Java white papers, product information, case studies and webcasts
|
News
News
News
|
Messages: 23
Messages: 23
Messages: 23
Printer friendly
Printer friendly
Printer friendly
Post reply
Post reply
Post reply
XML
XML
XML
|
 |
Linguine Maps visualization for Ant, XML DTD, Hibernate, OJB
Linguine Maps 1.1 has been released. This is an open-source utility that can automatically produce UML-style entity-relation diagrams from Ant build files, XML DTD, Hibernate mapping files, and Object relational bridge (OJB) mapping files.
The intent of the tool is to graphically show a given DTD, XML schema, or object-relational mapping, generated from XML (or, in the case of a DTD, a DTD).
There's an online installation, as well as a gallery of example graphs. In addition, the download can be used to generate custom graphs.
The specific filetypes supported, with the type of graph generated, are:
- Apache ANT build files (task dependency diagrams)
- Document Type Definition (DTD) for XML documents (entity relationships and attributes)
- Apache ObJectRelationBridge (OJB) mapping files (UML-style class diagrams)
- Hibernate mapping files (UML-style class diagrams)
|
|
Message #182275
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Purpose
Is this tool purely for documentation and communication purposes ? I'm interested to know the level of detail one can expect from the generated UML model, sometimes technical people will want to see a slightly different diagram than the client with whom business requirements/specifications are discussed .. is there anything like this planned or is the tool targetted to development teams only ?
Also: is there a way to customize the generated output, via templates or something ?
-- Wouter
|
|
Message #182292
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Apache Ant
Apache Ant
no known limitations for valid XML files that are validate and executed by Ant runtime Here's one - Usage of XML Entities.
<!DOCTYPE project [<!ENTITY % common.entities SYSTEM "../build/ant/common.entities"> %common.entities; ]>
Yields:
[ant2gif] [Fatal Error] :98:51: The entity "install.depends" was referenced, but not declared.
Saw no place to post this on the site, and have mailed the Autor as well.
|
|
Message #182308
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Support for multiple hibernate hbm files
The Hibernate recommendation is to have a hbm file per class mapping. The example on the site shows all classes in single hbm file. Does this support reading mutiple hbm files at one shot and generate object graph.
|
|
Message #182317
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Does it do Spring xml files?
It would be very useful if it could produce a wiring diagram for Spring. Same deal for Struts config files: who forward to what?
|
|
Message #182319
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Apache Ant
Thank you for trying things out.
I have processed several hundreds Ant builds from many different open/closed source projects and it woks fine (with tiny non-fatal issues). The usage XML Entities is not something I see very often. It never gave a problem even when I saw it.
The error you are citing is from the Sun’s XML parser. And this is where one has to start looking in order to fix it. I will add the problem to the list as “non critical” until we have more examples of this happening from you or others.
Thank you once again for trying things out.
|
|
Message #182323
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Purpose
Thank you for trying things out.
The purpose behind Linguine Maps is to automate documentation and improve communication! In a dev shop we asked a lot by business people for the pictures and the diagrams. We were tired of doing them by hand…
Another reason is even more important. Many junior/senior developers on the team did not really know in depth schemas for Hibernate of OJB or even Ant. They can’t really read XML. The UML-style drawing from Linguine Maps brings all team members to the same page. No one has to read full Hibernate spec. to be aware of our object models!
I tried to do my best for all the diagrams to resemble UML and be readable without training by both developers and smart business folks. Works great! Lots can be improved, but it is a great step forward in eliminating huge amount of tedious manual work
|
|
Message #182355
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Hibernate mapping.
The hibernate version does not create diagrams to depict inheritance. Here is the my hbm.xml file. It inheritance relationship between BillingDetails, BankAccount and CreditCard is not reflected in the generated diagrams.
<?xml version="1.0"?> <!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD//EN" "http://hibernate.sourceforge.net/hibernate-mapping-2.0.dtd"> <hibernate-mapping package="org.hibernate.auction.model"> <class name="Bid" table="BID"> <id name="id" unsaved-value="0" type="long"> <generator class="native" /> </id> <many-to-one name="item" column="ITEM_ID" class="Item" not-null="true" /> </class> <class name="BillingDetails" table="BILLING_DETAILS"> <id name="id" column="BILLING_DETAILS_ID" type="long"> <generator class="native" /> </id> <property name="owner" column="OWNER" type="string" /> <property name="number" column="NUM" type="string" /> <property name="created" column="CREATED" type="date" /> </class> <joined-subclass name="BankAccount" extends="BillingDetails" table="BANK_ACCOUNT"> <key column="BANK_ACCOUNT_ID" /> <property name="bankName" column="BANK_NAME" type="string" /> <property name="bankSwift" column="BANK_SWIFT" type="string" /> </joined-subclass> <class name="Category" table="CATEGORY"> <id name="id" column="CATEGORY_ID" type="long"> <generator class="native"/> </id> <property name="name" column="NAME" type="string" length="30"/> <many-to-one name="parentCategory" column="PARENT_CATEGORY" class="Category" /> <set name="childCategories" inverse="true" cascade="all-delete-orphan"> <key column="PARENT_CATEGORY" /> <!-- Forign key name --> <one-to-many class="Category" /> </set> <set name="items" table="CATEGORY_ITEM" lazy="true" cascade="save-update" inverse="true" > <key column="CATEGORY_ID" /> <many-to-many class="Item" column="ITEM_ID" /> </set> </class> <joined-subclass name="CreditCard" extends="BillingDetails" table="CREDIT_CARD"> <key column="CREDIT_CARD_ID" /> <property name="type" column="TYPE" type="integer" /> <property name="expMonth" column="EXP_MONTH" type="string" /> <property name="expYear" column="EXP_YEAR" type="string" /> </joined-subclass> <class name="Item" table="ITEM"> <id name="id" column="ITEM_ID" type="long"> <generator class="native" /> </id> <property name="name" column="NAME" type="string" length="25" /> <property name="description" column="DESCRIPTION" type="string" length="25" /> <set name="bids" inverse="true" cascade="all-delete-orphan" > <key column="ITEM_ID" /> <one-to-many class="Bid" /> </set> <set name="categories" table="CATEGORY_ITEM" lazy="true" cascade="save-update" > <key column="ITEM_ID" /> <many-to-many class="Category" column="CATEGORY_ID" /> </set> </class> <class name="User" table="USERS"> <id name="id" column="USER_ID" type="long"> <generator class="native"/> </id> <property name="user_name" column="USER_NAME" type="string" length="30"/> <component name="homeAddress" class="Address"> <parent name="user" /> <property name="street" type="string" column="HOME_STREET" not-null="true" length="30"/> <property name="city" type="string" column="HOME_CITY" not-null="true" length="30"/> <property name="zipCode" type="short" column="HOME_ZIPCODE" not-null="true"/> </component> <component name="billingAddress" class="Address"> <parent name="user" /> <property name="street" type="string" column="BILLING_STREET" not-null="true" length="30"/> <property name="city" type="string" column="BILLING_CITY" not-null="true" length="30"/> <property name="zipCode" type="short" column="BILLING_ZIPCODE" not-null="true"/> </component> </class> </hibernate-mapping>
|
|
Message #182356
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Hibernate mapping.
The hibernate version does not create diagrams to depict inheritance. Here is the my hbm.xml file. It inheritance relationship between BillingDetails, BankAccount and CreditCard is not reflected in the generated diagrams. Do not we have good old class diagrams for that? Why bother with inferring the information from hbm, when it is readily available on the sorce and class levels, and all decent UML tools easily pick it up?
|
|
Message #182360
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Does it do Spring xml files?
Spring BeanDoc is a great tool. It brings together lots of pieces of project documentation in a unified format. The code behind it is interesting as well.
I am not sure, however, what kind of diagrams it draws. For example, take a look at JPetStore: http://springframework.sourceforge.net/beandoc/jpetstore/ There is a diagram at the top of the page. Does it approximately follow UML? If not - what does it represent? I am very interested in understanding this better, but did not find any docs in the distribution.
Linguine maps attempts to create UML-style entity-relation diagram. ER drawings are well understood by most developers and smart business people.
|
|
Message #182361
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Purpose
Many junior/senior developers on the team did not really know in depth schemas for Hibernate of OJB or even Ant. They can’t really read XML. The UML-style drawing from Linguine Maps brings all team members to the same page. No one has to read full Hibernate spec. to be aware of our object models! Huh? From what moment someone needs to read Hibernate spec to be aware of object models? Hibernate is a glue level between Object Model and DB Schema ( rather straightforward in many cases if DB schema is good). It looks like that team cripple Object Model to whatever hbm2java generates and that is troublesome IMO.
And please do not forget that there are supposed to be ERD diagrams for the database, which might be in some cases quite different than Class Diagrams. ERD and Class diagrams are supposed to be primary resources and hibernate mapping is just that: mapping. In some cases it does not work well and then Hibernate allows escaping into native SQL.
|
|
Message #182364
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Purpose
I am quite aware that ERD diagrams are different from Class Diagrams. But what to do if Hibernate schema or Ant build file structure does not precisely fit into existing UML diagram class? We approximate... If you do not like the kinds of diagrams come out of hbm2java – change it! And draw the kind you think make sense for your team or for you!
Linguine Maps makes it simple to visualize! It provides simple object-oriented Java API for visualization of any kind of graphs. Many other tools are focused on visualization of one kind of schema. Linguine Maps was designed to be reusable for visualization of graphs in general – any graphs that come to mind.
To rephrase: it takes long time for people to go into the source code to get an overview. It takes long time to learn XML, DB Schema, Hibernate, Struts, Spring, etc. Learning with a diagram is always easier.
|
|
Message #182366
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Sun XML Parser
Thanks for the response (this is not the right forum of course).
Note: Sun XML Parser also throws bugs in other applications I use, but using the IBM 1.4 JDK, those bugs go away.
I'll switch JVM and try again.
|
|
Message #182367
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Hibernate mapping.
Thank you for trying this out!
You are correct – in your example inheritance is not properly discovered. This is a bug…
I made an assumption that <joined-subclass> can only be inside <class>, in which case it is obvious what the super class is without looking at extends attribute. If you declare BankAccount inside BillingDetails – it all works fine.
I did not notice this problem, even after testing most mappings found in Hibernate 3.0 distribution. You can see many samples with inheritance here: http://www.softwaresecretweapons.com/jspwiki/Wiki.jsp?page=LinguineMapsProgrammaticVisualizationSamplesHBM
It is definitely a bug. I will fix it in the next update.
Thank you for the feedback.
|
|
Message #182401
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Re: Purpose
Many junior/senior developers on the team did not really know in depth schemas for Hibernate of OJB or even Ant. They can’t really read XML. The UML-style drawing from Linguine Maps brings all team members to the same page. No one has to read full Hibernate spec. to be aware of our object models! Huh? From what moment someone needs to read Hibernate spec to be aware of object models?Hibernate is a glue level between Object Model and DB Schema ( rather straightforward in many cases if DB schema is good). It looks like that team cripple Object Model to whatever hbm2java generates and that is troublesome IMO.
Also IMO. But this is the way most teams use Hibernate. They map tables via hbm files and then they have an object model. Which is of not-so-great quality, of course.
And please do not forget that there are supposed to be ERD diagrams for the database, which might be in some cases quite different than Class Diagrams. ERD and Class diagrams are supposed to be primary resources and hibernate mapping is just that: mapping. Again, this is your opinion and mine. But not most Hibernate users'. Thank you for reminding it to us, though. It is always useful to restate these often-underestimated facts.
|
|
Message #182484
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Poster size printing
I ran this package on our ant build.xml file. I got a 6000x8000 png graphic.
Does anyone know of a windows utility to print that on several regular pages (tiles)?
Thanks, Thierry Thelliez
|
|
Message #182500
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Poster size printing
Yes!
This is what I do:
- Open Microsoft Excel - Open Windows Explorer - Drag/Drop imgaes file into Excel - Go to Print Preview, select X pages wide by Y pages long in options - hit print
Cool!
|
|
Message #197858
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Hibernate mapping.
I had a similar problem with <joined-subclass> being specified outside the base <class>. I used oy-lm-1.3 released in November, so it seems that the updat did not fix the problem. Is there a way to do this without changing the structure of my .hbm.xml files? (I am using hibernate 2.1.8)
|
|
Message #197866
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
SVG, the future of presentation.
Also: is there a way to customize the generated output, via templates or something ? If the output instead were a SVG (or maybe some other XUL), then a user could impose arbitrary stylesheets. Stylesheets allow the easy introduction of new graph drawing/layout algorithms, complex custom interactions and behaviors, and hyperlinking. But since Java2D was chosen, the user is stuck with whatever crap Linguine ships.
|
|
Message #197867
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
SVG, the future of presentation.
If the output instead were a SVG (or maybe some other XUL), then a user could impose arbitrary stylesheets. Since all but one of the input formats Linguine accepts are XML dialects, Linguine could itself be implemented as a set of stylesheets.
|
|
Message #197868
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
Purpose
Is this tool purely for documentation and communication purposes ? It's a small evolutionary step from Linguine as a read-only viewer to a direct-manipulation editor. This lends further credibility to MDA's approach of visual programing and model compilation.
|
|
Message #197871
Post reply
Post reply
Post reply
Go to top
Go to top
Go to top
|
 |
ERD vs UML
I am quite aware that ERD diagrams are different from Class Diagrams. The primary difference beinig that ER diagrams are intuitive enough to be useful within a business. The Shlaer-Mellor OOA/D methodology proved to me with its model compilation of ER diagrams that notational simplicity doesn't sacrifice formal rigor nor suitability for downstream automation. The immense added notational complexity of UML's class diagram buys very little in practice downstream and precludes adoption upstream during analysis (before design).
|
|
 |
New content on TheServerSide.comNew content on TheServerSide.comNew content on TheServerSide.com |
 |
 |
Reza Rahman continues to explore the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(January 21, Article)
Ted Neward is an independent consultant specializing in high-scale enterprise systems, and an authority in Java and .NET technologies. He is the author and co-author of several books, including Effective Enterprise Java. At TheServerSide Java Symposium in March, he will be presenting sessions on pragmatic architecture, ECMAScript and Scala.
(January 15, Article)
Now that Oracle is absorbing Sun Microsystems, there mixed views on what should come of the Java Community Process (JCP). While some say Oracle should become the new steward of Java and keep the JCP much as it was, others argue that it may be time to open-source this widespread language.
(November 24, Article)
Reza Rahman explores the features of the proposed JSR 299, Contexts and Dependency Injection for Java EE (CDI). When approved, it promises to be a key feature of Java EE 6.
(November 2, Article)
SAML is an XML-based standard for exchanging authentication and authorization data between security domains. The single most important problem that SAML was created to solve is the Web browser Single Sign-On problem. Many organizations are debating whether to stay with version 1.1 or move to 2.0. This article makes observations about both options.
(September 28, Article)
Joe Ottinger takes a look at how people learn, and applies it to the practice of programming. He notes that understanding how people learn is an essential part of working in a programming team.
(September 22, Article)
Stephen Maryka gave us an article about the Asynchronous Web and posed a number of questions that get examined like an approach to delivering Asynchronous Web capabilities through extensions to existing Java EE technologies.
(July 14, Article)
JavaServer Faces Flex goal is to provide users capability in creating standard Flex components, part of flexSDK which is open sourced through MPL license, as normal JSF components. This article by Ji Hoon Kim will provide an overview of creating a simple multilingual JSF page consisting of JSF Flex tags.
(June 29, Article)
In this session Jeff explores the key characteristics of successful SOA projects. He covers some of the patterns, and anti-patterns, tool sets, and strategies that he himself learned the hard way. Last, he provides a strategy and blueprint for achieving a high likelihood of success in your SOA project.
(June 23, Tech Talk)
Ari Zilka, CTO of Terracotta, Inc., talks about the new features in Terracotta 3.1, announced during JavaOne and available now.
(June 15, Tech Talk)
In this Tech Talk, Josh Long explores an integration challenge using Spring Integration and walks through the implementation, employing and expanding on the basic patterns of Enterprise Application Integration to tie together components into a function integration solution, and then demonstrates how Spring Integration helps address the integration requirements.
(June 15, Tech Talk)
In this Tech Talk, David Geary teaches you: The basics of Google Web Toolkit; How to implement Ajax-enabled applications in Java; Internationalization; Hooking into the browser history mechanism; Remote procedure calls.
(June 4, Tech Talk)
Jon Kern discusses the best architecture/technical solutions and ensure that they are repeated by all developers. By tackling the architecture up-front in a serial manner, subsequent parallel development will be much more manageable and predictable.
(May 28, Tech Talk)
This keynote describes the frustrations of modern knowledge workers in their quest to actually get some work done, and solutions for how to guard yourself against all those distractions. Neal Ford talks about environments, coding, acceleration, automation, and avoiding repetition as ways to defeat the misguided attempts to sap your ability to produce good work.
(May 26, Tech Talk)
Gil demonstrates how new, aggressive uses of already abundant compute capacity by common applications offer competitive value for application designers.
(May 21, Tech Talk)
Chris Keene introduces WaveMaker as a new way to automate the ability to generate Hibernate classes in order to more quickly bring OR mapping into an application.
(May 19, Article)
Mastering EJB was one of the original and most influential EJB books in the industry. Mastering EJB III now returns with two new expert co-authors, updated for EJB 2.1 and 30% new chapters including security, integration, best practices, open source, and more.
(Book PDF Download)
The Application Server Matrix is a detailed listing of J2EE vendors and their application server products, with information on latest version numbers, J2EE spec support and licensing, pricing, platform support, and links to product downloads and reviews.
(Application Server Comparison Matrix)
|
|