The Artima Developer Community
Sponsored Link

Java Buzz Forum
VimContainer

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Brian McCallister

Posts: 1282
Nickname: frums
Registered: Sep, 2003

Brian McCallister is JustaProgrammer who thinks too much.
VimContainer Posted: Sep 8, 2004 6:31 PM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Brian McCallister.
Original Post: VimContainer
Feed Title: Waste of Time
Feed URL: http://kasparov.skife.org/blog/index.rss
Feed Description: A simple waste of time and weblog experiment
Latest Java Buzz Posts
Latest Java Buzz Posts by Brian McCallister
Latest Posts From Waste of Time

Advertisement

After playing with PicoContainer and NanoContainer for a while and finding it very useful for the basics, I started running into lots of common things which could be optimized for the knowledgeable user instead of the novice. VimContainer was born.

Using VimContainer is easy -- in fact you can use it in most places you use PicoContainer or NanoContainer simply by setting your $CONTAINER environment variable. VimContainer eschews xml based configuration and uses a powerful modal config file:

:set vb t_vb=".         # stop it from beeping
:rci Wombat.class
:rci Kangaroo.class
:groovy components.each { |comp| comp.stageOneInit() }
:rci Fruitbat.class
:groovy components.each { |comp| comp.stageTwoInit() }
:%s/\.class//g          # oops, forgot, don't need the ".class"
i                       # enter interactive mode so end user can customize
:wq

VimContainer has a straightforward plugin interface, in the example above you can see the groovy plugin. Perl, and ruby are other popular ones, but they don't integrate quite as well as Groovy with Java container building. As specific machines and users tend to have their own container preferences (some people like aspected containers, some like constructors, some setters, etc), VimContainer supports per-user options configured in ~/.vimcontainerrc.

No more arguing for hours on end about whether to use setters or constructors, just allow each developer to specific how it should work. (Note that making this work requires the perl plugin and calling the :perl make_ioc_work_like_i_want() function at the end of the config file, and will involve a compilation step...)

=)

Read: VimContainer

Topic: Prefer Active Configuration Previous Topic   Next Topic Topic: Acronym Anarchy

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use