|
From: Remco B. <rem...@ji...> - 2004-05-14 13:05:28
|
Is anyone using the springframework ApplicationContext without the use of XML (applicationContext.xml)? I know it's possible to write your own AbstractApplicationContext implementation, but has anyone tried it? I don't like XML configuration files. I really don't. First I had to learn the beautiful java language, and now I feel like a scriptkiddy again, coding bean mappings and workflow stuff (mvc) and other things in XML files. (I do see the beauty of dependency injection, but XML.) |
|
From: Dmitriy K. <dko...@ru...> - 2004-05-14 13:09:23
|
What would you like it to look like? Remco Bos wrote: > Is anyone using the springframework ApplicationContext without the use > of XML (applicationContext.xml)? I know it’s possible to write your own > AbstractApplicationContext implementation, but has anyone tried it? > > > > I don’t like XML configuration files… I really don’t. First I had to > learn the beautiful java language, and now I feel like a scriptkiddy > again, coding bean mappings and workflow stuff (mvc) and other things in > XML files. (I do see the beauty of dependency injection, but XML…) > |
|
From: Rod J. <rod...@in...> - 2004-05-14 13:28:10
|
> What would you like it to look like? :-) Implement your own BeanDefinitionReader and do your own thing. Seriously, we are looking for good ideas here from our users for more out-of-the box options. Several Spring developers are thinking about this, but user input is essential. Personally our XML works very well for me. But our architecture allows more options and we want the best in 1.1, _as well_ as our XML format (of course). Groovy is a likely candidate and we're probably going to work with James Strachan on that soon. Our architecture actually allows _multiple_ config sources (even different types) per BeanFactory... That may become more important with dynamic reconfiguration in 1.1. Rod |
|
From: Eduardo I. I. <zi...@su...> - 2004-05-14 13:59:44
|
What about SDL? Its the HiveMind format. Its very clean, and as capable as XML (it don't support mixed content, but is not used in config files anyhow). I would like to see Spring definition file in this format, I don't like to mentally parse the XML to find what is the real information. Some can say that it's laziness but it in everyday work it really makes a difference. I could use the saved "brain cycles" to something else ;) It would not be difficult to create an XSLT to transform XML to SDL. The SDL web site: http://jakarta.apache.org/hivemind/sdl.html And a good example from the site: <?xml version="1.0"?> <module id="some.module" version="1.0.0"> <configuration id="ControlPipeline"> <schema> <element name="processor"> <attribute name="name" required="true"/> <attribute name="service-id" required="true"/> <attribute name="before"/> <attribute name="after"/> <conversion class="some.module.PipelineContribution"> <map property="controlService" attribute="service-id" translator="service"/> </conversion> </element> </schema> </configuration> </module> would become the SDL file: module (id=some.module version="1.0.0") { configuration (id=ControlPipeline) { schema { element (name=processor) { attribute (name=name required=true) attribute (name=service-id required=true) attribute (name=before) attribute (name=after) conversion (class=some.module.PipelineContribution) { map (property=controlService attribute=service-id translator=service) } } } } } Dmitriy Kopylenko wrote: > What would you like it to look like? > > > Remco Bos wrote: > >> Is anyone using the springframework ApplicationContext without the use >> of XML (applicationContext.xml)? I know it’s possible to write your >> own AbstractApplicationContext implementation, but has anyone tried it? >> >> >> >> I don’t like XML configuration files… I really don’t. First I had to >> learn the beautiful java language, and now I feel like a scriptkiddy >> again, coding bean mappings and workflow stuff (mvc) and other things >> in XML files. (I do see the beauty of dependency injection, but XML…) >> > > > > ------------------------------------------------------- > This SF.Net email is sponsored by: SourceForge.net Broadband > Sign-up now for SourceForge Broadband and get the fastest > 6.0/768 connection for only $19.95/mo for the first 3 months! > http://ads.osdn.com/?ad_id=2562&alloc_id=6184&op=click > _______________________________________________ > Springframework-developer mailing list > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer > |
|
From: Aleksei G. <ne...@ka...> - 2004-05-14 16:22:52
|
On Fri, 14 May 2004 10:57:58 -0300, Eduardo Issao Ito <zi...@su...> wrote: > What about SDL? Its the HiveMind format. Its very clean, and as capable > as XML (it don't support mixed content, but is not used in config files > anyhow). > The SDL web site: > http://jakarta.apache.org/hivemind/sdl.html SDL looks really nice, but are some one have seen something more on SDL than that page? May be some specs, some working code... Author mention HiveMind beta5 but threre no such release on Apache site (last is beta 4). I've used FMPP text preprocessor (uses FreeMarker) and there are such thing as TDD - textual data definitions - which uses very similiar syntax and conventions. Altough FMMP (and FM) has very nice integration with XML I have some spare time to play with TDD - and it was much more "humane" than XML. But there are one more thing - XML has DTD'd, Schemas and editors aware of all that stuff. So one can edit context.xml in IDEA and its still that verbose - but validated and have some nice popups that suggest required tags and attributes. And I can use any XML-aware tool to transform that definition to some form of easy-readable docs and reports (or even to SDL or TDD). And I actually do this with fmpp for hibernate descriptors and spring context definitions -> creating some nice html with clickable cross-references. Of course I can use XSLT or even tricky CSS to just present raw XML in browser. That is the actual power of XML. And this can't be done with SDL or some groovy script - although I can imagine some special adapter which produce SAX events or DOM tree from SDL or TDD - i can't imagine all problems with integration of that adapter them into all tools that one uses now. Of course we can easily generate text/xml but... It's nice to use TDD in FMPP to quicky setup small data model - but all (may be just lazy ;) developers must understand that they rejectiong not only boring ugly parenthesises and quotes - they reject that power of XML. XML is not thad bad. It's matter of usage. We can make our old XML configs much less verbose and much more human-friendly with little modifications to format. I even have some propositions for spring: <...><value>some_value</value></...> change to just <...>some_value</...> <bean ...><ref ...="some_name"/></bean> change to just <bean ref="some_name"/> <bean ...><ref ...="some_name"/></bean> to <bean ref="some_name"/> or even <property ...><bean ...><ref ...="some_name"/></bean></property > to <bean ref="some_name"/> and may be we can rework some parts of config to be not so machine-oriented. (don't take me toooo seriuos, please, and forgive me my bad english 8) -- //regards, neuro |
|
From: Alef A. <al...@jt...> - 2004-05-14 13:32:18
|
Remco, You shouldn't be writing your own AbstractApplicationContext. There are BeanFactories and BeanDefinitionReaders. The BeanDefinitionReader is what you should have a look at. There's XmlBeanDefinitionReader that reads XML files and there is also a properties based reader. Time is being spent on getting a Jython Beandefinitionreader in place, but this won't be ready soon. Also, I've spent a bit of time on the GroovyBeanDefinitionReader, but since Groovy is still a moving target, I've postponed it a bit (also because of time limitations). Have a look at the thread of about almost ago a week ago about alternative methods to read bean definitions (http://article.gmane.org/gmane.comp.java.springframework.user/1987 and then click on the subject to see the thread). Groet, Alef _____ From: spr...@li... [mailto:spr...@li...] On Behalf Of Remco Bos Sent: Friday, May 14, 2004 3:04 PM To: spr...@li... Subject: [Springframework-developer] ApplicationContext without the use of XML Is anyone using the springframework ApplicationContext without the use of XML (applicationContext.xml)? I know it's possible to write your own AbstractApplicationContext implementation, but has anyone tried it? I don't like XML configuration files. I really don't. First I had to learn the beautiful java language, and now I feel like a scriptkiddy again, coding bean mappings and workflow stuff (mvc) and other things in XML files. (I do see the beauty of dependency injection, but XML.) |