Bindings, Platforms, and Innovation
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
Tracking change and innovation in the enterprise software development community
Posted by Werner Schuster on Jul 29, 2008 07:50 PM
In his talk at RubyFringe, Merb contributor and EngineYard employee Yehuda Katz mentioned a few tools to watch in the future. One of the tools is the documentation generation tool YARD, which allows to add metadata to Ruby documentation, among other features. YARD is designed to play well with RDoc formatted doc strings, but allows to use different markup notations. YARD is extensible, allowing to plug in custom handlers for code constructs and different output backends.# Reverses the contents of a String or IO object.
#
# @param [String, #read] contents the contents to reverse
# @return [String] the contents reversed lexically
def reverse(contents)
contents = contents.read if respond_to? :read
contents.reverse
end
contents parameter shows how to add type hints to the method argument. The argument can either be a String, or any class with a #read method (InfoQ previously discussed different approaches to type annotations in relation to protocols and duck typing). ##
# Does stuff.
add_method :foo
##
# :method invisible_method
YARD::Handlers::Base class, and overriding the process class, which allows to write handlers for custom constructs, such as internal DSLs or behavior similar to RDoc's solutions..yardoc database which caches the gathered code structure and data. YARD's yri tool, which works like ri and uses this database to allow for interactive documentation lookup. YARD can also use the cached information in the database to generate output in multiple formats, without having to analyze the repeatedly. YARD's cache is similar to code indexes created by IDEs to allow for advanced code search (i.e. searching for language constructs, not just fulltext search), code browsing, or for refactoring tools that need to be aware of all code in a project. All methods (public and private) are required to provide a clear method signature, including the types for any parameters, and the possible values for any options hashes, as well as return types and other information.Merb currently uses a different notation to specify the method signature.
@tag of Javadoc or YARD, but it's indexed and used for documentation and to help IntelliSense (Screencast describing how to help IntelliSense with Type Assertions).
The Role of Open Source in Data Integration
The Agile Business Analyst: Skills and Techniques needed for Agile
Download the Free Adobe® Flex® Builder 3 Trial
One of things that I talked with Charles Nutter about on #jruby is that, if you allowed optional typing and method annotations in the language itself, document generators could use that information instead of forcing authors to adopt a particular documentation style.
For example, let's say we implement some form of Duby, with annotations to boot. You'll end up with something like this:
def reverse(String contents) => String
...
end
Meaning contents is a String, and the method returns a String. In addition to making it easier for document generators, it provides additional, inspectible metadata for that method.
Note that I'm not even suggesting that the argument type be enforced. It could be strictly for document generation, or it could merely emit a warning or whatever we want it to do.
This presentation focuses on the Internet and separating myth from fact, history from the future, and the mundane from the imaginative. Bob Frankston presents a vision of what could and should be.
This article explores the use of JBoss and jBPM to implement design solutions that effectively address the issue of orchestrating long running activities.
This presentation covers the use of graph databases as an optimal solution for data that is difficult to fit in static tables, rapidly evolving data or data that has a lot of optional attributes.
This session introduces Real Options and shows how it can help in running your project. Real Options is a decision-making process that can be used to manage risk.
This article discusses the use of bindings on services and references (including the instance of non-configured bindings) as the means to implement SCA communications in a Web and SOA environment.
After a short introduction to DSLs, Scott Davis plays with the keyboard showing how to approach the creation of a DSL by typing working snippets of Groovy code that get executed.
IBM Rational and InfoQ present, Scaling Agile with C/ALM, an eBook showing organizations how to become “finely tuned software delivery machines” by enabling team integration and scaling.
Amanda Laucher presents a real life enterprise application written in F#. She shows actual code snippets, explaining design decisions and suggesting how to use some of the F# constructs.
1 comment
Watch Thread Reply