In Java we have a wonderful tool named CheckStyle that reinforce all our corporate naming conventions. Wonderful tool. I would like to do the same with our XSD and WSDL.
Is there a tools that I could use to reinforce and make sure all coders and analysts will respect conventions like:
<wsdl:operation name="XX> All operations must start with getXX of setXX or deleteXX.
Is the solution to my problem to create an XSD to validate my WSDL?
Look at this tool for the defining rules and running them on WSDL, mainly for naming conventions:
Rule Engine Based Wsdl Auditor
The development of Wsdl Auditor as mentioned by Saikiran Daripelli seems to have stopped. Last commit in the Subversion repository is from Januar 2011.
After doing some research, installing and testing several tools I decided to use Oracle Code Compliance Inspector (CCI) which is available as an extension for JDeveloper IDE and as a command line utility (which allows integration with e.g. Ant as well).
Testing for naming conventions seems not to be the primary goal of Oracle CCI but it works quite good by using XPath + regular expression. As mentioned on their website the primary objective is to enforce design consistency and good coding and documentation practices.
Related
I have WSDL files and would like to compare and match WSDL elements in these files syntactically. Do you have any suggestions for Java libraries that can be used finding syntactical similarities between two terms in Web (for me, wsdl elements)?
Thanks.
There's also WSDL Analyzer which builds upon the most recent version of the Membrane SOA Model. It's a web application which not only allows you to validate and check your
WSDL against best practices but also lets you compare different versions of your WSDL.
Disclaimer: I'm one of it's developers.
Well, you can use SOAPUI to load the wsdl definitions and compare them.
Including link with some documentation relating to your question. Hope is of some help.
http://www.soapui.org/SOAP-and-WSDL/working-with-wsdls.html
edit:
Also, check out http://www.membrane-soa.org, which as some libraries for comparing wsdl files.
Some specific examples are here: http://www.membrane-soa.org/compare-wsdl-java-api.htm
I've been using spring.net with xml configuration for some times, and I just saw that spring team released CodeConfig a month ago.
What I like about the xml config is that if I have a problem on the live server I can easily change the xml configuration to enable some specific debugging settings, or disable a specific component simply changing the xml configuration.
What is the advantage of using a code configuration instead of an xml configuration other than compile time check?
With code config, possible benefits you could get are:
Better refactoring support; e.g. renaming an injected property
More compact configuration, compared to xml
Developers can use code, in which they are often more at home than in xml
Benefit of the last point is also that developers new to the framework will have a significantly less steep learning curve than with the xml config.
From the docs:
While there are several positive
aspects to expressing configuration
metadata in XML files, there are also
many problems with this approach
including the verbosity of XML and its
heavy dependence on string-literals
which are both prone to typing errors
and unusually resistant to most modern
refactoring tools in use today. The
CodeConfig approach removes these
problems by providing a type safe,
code-based, approach to dependency
injection. It keeps the configuration
metadatda external to your class so
your class can be a POCO, free of any
DI related annotations.
Just to highlight one thing, you can mix and match configuration styles. From within a CodeConfig class you can refere to XML config files using the [ImportResource] attribute (see here), and in the XML you can use the namespace (see here).
Cheers,
Mark
I've done a bit of searching around for a good RDF editor. But I'm not sure what one is the most utilised. Can anyone recommend one? I'm looking to write some simple RDF and maybe parse one or two RDF documents.
Many thanks
Are you looking to work at the raw Triples level and in a human readable/editable syntax such as Turtle? If so you can get by just with Notepad or maybe try out my rdfEditor which is an early Alpha release but gives you nice syntax highlighting, checking and auto-completion. This is designed only for editing raw RDF data and does not give you any IDE tools for creating your data.
If you want to work at the class/individual (i.e. more abstract level) and have the editor care about the underlying RDF then you probably want to try either TopBraid Composer or Protege
There's a new TextMate bundle for the Turtle RDF language which offers a bunch of cool features. https://github.com/peta/turtle.tmbundle
Judging from the screenshots, Rhodonite http://rhodonite.angelite.nl/ makes a good impression.
Unfortunately it seems to be abandonded and I could not get it to run on Windows7 (x64). But maybe it runs on your system (download is Windows only)
If you're looking for a web-based RDF / Ontology editor, have a look at Web Protege, an open source web-based project by the Protege team mentioned in the accepted answer.
If you need a more advanced RDF editor, look at RDF and SPARQL plugin for JetBrains IDEs. It supports all RDF 1.1 formats as well as SPARQL 1.1. Including the RDF-star and SPARQL-star extensions.
It features syntax highlighting and validation, prefixed name completion, SPARQL 1.1 Protocol support and much more.
You don't have to buy a JetBrains IDE, since the plugin works with the free versions too.
I want to enforce coding standards for our Delphi codebase.
A few colleagues have suggested Code Healer and Pascal Analyzer. I've had a look at these tools and they aren't suitable.
I was hoping to be able to do the same thing that CheckStyle for Java or StyleCop for C# can do
Some newer editions of Delphi offer Audits and Metrics in the Model view, which can also be configured to set allowed limits. They do not run from command line for build integration afaik so I found them not very helpful.
I know the highly customizable Java (and .Net tools) like PMD, FindBugs and CheckStyle which generate XML or HTML statistic reports, and also integrate very well with build tools (Ant, Maven, Hudosn) - but for Delphi nothing comparable has crossed my road so far.
It seems those 2 are the most used. You can also try:
http://jedicodeformat.sourceforge.net/
The best one is Pascal Analyzer (PAL) by Peganza, which you said you tried and found unsuitable, but did not say why. I will say a bit in its favor: It's Commercial, inexpensive, and so worth it. They recently released version 5, and if version 5 doesn't do what you want, you should tell them what you want, because they have always answered my requests whenever I have mentioned a feature I wish the product would add.
We use it instead of the high-end SKUs of Delphi's metrics because it costs less and does more than the built-in $3000 stuff. I think it costs about $160 us.
I am a happy customer. Here is a sample of some of the metric areas that I like:
convention compliance - class names that don't start with T, exception types don't start with E, class fields not in private, identifiers with goofy names, class visibility confusion or bad order, local identifier/unit outer scope identifier clashes. Inconsistent case, Many many many more!
The weakness is that the output is plain text in a "TMemo" control. Of course, I have found a lot of ways to take that output and write my own small sort/filter utilities to mine even more useful stuff from the reports. A powerful tool that you won't be able to live without once you try it.
I realize you said in your answer that you tried that already, but if it's not what you want, it's already the best LINT like tool for Pascal that currently exists.
If you're into writing your own style checking, you can write a .exe in Delphi to look for bad things being committed. Call that in a pre-commit hook into your repository.
You can examine the differences of a checkin by using SVNLOOK.
ex:
excerpt from pre-commit.bat
SVNLOOK diff -t "%2" "%1" | MyCustomFilter.exe
IF %ERRORLEVEL% == 0 GOTO EOJ
EXIT 1
:EOJ
EXIT 0
How come it is good practice within Grails to place classes in packages (e.g. mycompany.Book)?
I know it is a prerequisite in order to deploy Grails solution to the Google App Engine (using the plugin), but other than that and a well structured code library for large projects, what other benefits are there in describing packages for classes within Grails?
Another good reason, as mentioned by Marcel Overdijk in this blog post, is if domain classes has the same name as classes within Groovy, it is not possible to distinguish the two.
Grails runs on Groovy, which has a strong heritage with Java. Java encourages packages for well-documented reasons and Groovy/Grails follows suit. I think the main benefit stems from your description: a well-structured code library for large projects.
The most valuable reason that I've seen, is that you cannot "import" classes without a package into a class that DOES have a package. that means that you can't access any domain/service/controller/etc classes that don't have packages from your utility code that you might put a package on.