|
Project Information
Featured
Downloads
|
DynaSpringSpring without XML DynaSpring is a dynamic, extensible DSL (Domain Specific Language) tailored at building a Spring Application Context. Like Spring/XML, it is a declarative, tree-structured language; but, unlike XML, it supports all the kinds of abstractions found in common programming languages: conditional evaluation, iteration, definition of functions and variables, etc. On top of the core DSL, DynaSpring also offers a lightweight, Spring-based module system for Java, and a set of utilities that make working with Spring easier and build upon Spring to give you even more options in structuring your enterprise application. DynaSpring can be freely mixed with Spring/XML: you can import XML resources from DynaSpring resources and vice-versa. Why DynaSpring?Spring is a very powerful framework, but its XML-based configuration language can be a limit in certain circumstances. With real-world enterprise applications in mind, DynaSpring offers:
(define-document-handler name class dao foo ...other properties...) and specifically check that 'class' is a subclass of com.myapp.DocumentHandler, issuing an application-specific error message if it's not the case, rather than writing<bean id="name" class="class"> <property name="dao" ref="dao" /> <property name="foo" ref="foo" /> ...other properties... </bean>and having it fail with a generic exception if you mistakenly used the wrong class;
See the Documentation for in-depth information on all the features sported by DynaSpring. StatusThe 1.0 feature set is almost complete; the most commonly used features of core Spring/XML are covered, as well as most of the util: namespace. The project is to be considered beta-quality: it's fairly stable, but has never been used in production, and it probably contains bugs. Test coverage should be improved, and the documentation should be completed - in particular the DSL is poorly documented. What do I need to use it?Besides Spring itself (3.x) and commons-logging, you only need the latest version of ABCL, the Common Lisp implementation used as a basis for the DSL. The minimum supported Java version is 1.6. It is theoretically possible to run DynaSpring on 1.5, but it requires a more complicated setup. From version 0.6 onwards, DynaSpring can be easily used in Maven projects (although there's no plan for having it built by Maven), as it is distributed through the free (and great) Sonatype OSS Maven Repository (https://oss.sonatype.org/index.html). So in order to use it, you just need to add to your POM: <dependency> <groupId>com.googlecode.dynaspring</groupId> <artifactId>dynaspring</artifactId> <version>0.6.0</version> </dependency> DocumentationMore in-depth documentation can be found in the wiki: Documentation.
|