Projects tagged ‘container’ and ‘ioc’


[10 total ]

16 Users
   

PicoContainer is a lightweight and highly embeddable container for components that honour Dependency Injection. Despite it being very compact in size (the core is ~100K and it has no mandatory ... [More] dependencies outside the JDK), PicoContainer supports different dependency injection types (both CDI and SDI) and offers totally customisable lifecycles. PicoContainer has originally been implemented in Java but is also available for other platforms and languages. [Less]
Created over 3 years ago.

2 Users
   

NanoContainer is a container for components honouring dependency injection. NanoContainer builds on top of PicoContainer the support for several scripting meta-languages (XML, Groovy, Bsh, Jython ... [More] and Rhyno), AOP, Web frameworks (Struts and WebWork), Persistence (Hibernate) SOAP, JMX, and much more. [Less]
Created over 2 years ago.

0 Users

jEmbedded- SOC Container (Service Oriented Container) focused on managing and composing Services and other elements (as pojos, components etc...). - Create and test faster your Integration/SOA/RIA ... [More] prototypes or applications composing work flows of services in a graphical way (using the native jBPM support) or just using annotations and the dynamic creation/injection of services (+ any of the supplied services). - Integrated with GWT/Spring MVC to create SOC-RIA applications. - Introducing the Gwlets/Widglets components, similar in concept to portlets/applets but using GWT widgets and embedded services. Have a look at the integration/esb case study using jEmbedded, GWT/Gwlets, jBPM, Emmbeded Database, Mule, JMS, Spring/Spring MVC to have an idea of what you can do: http://code.google.com/p/jembedded/wiki/jECaseStudy FeaturesDynamic injection: create/compose services just with an interface + annotations (no impl needed). Compose your service workflows graphically using the jBPM native support. Implement services using Java or Ruby. 100% Annotation based configuration (plus .properties files for externalization). Can be used as a standalone container, in a web environment or integrated with other containers. Integration testing: http://code.google.com/p/jembedded/wiki/UserGuide. Monitor and manage the services through JMX (status, start, stop...). Spring native support (Spring/Spring MVC). Maven plugin. Several embedded services are provided out of the box and ready to use: - Embedded-database (HSQLDB/ Derby). - Mule-Service and client (native support + validation-service). - jBPM-Service (native support). - JMSBroker-Service and client (ActiveMQ). - CXFServer-Service (Apache CXF webservices). - GWT-Service (Google Web Toolkit integration + SpringMVC). - GWlet-Service (introducing the gwlets and widglets components). - Spring-Service (native support + supporting services: i18n, validation, hibernate/jpa orm and mvc). - Jetty-Service and Http-Client. - Jdbc-Service (HSQLDB / Derby). - Tomcat-Service and Http-Client. - Jasper-Service (compiler). - jRuby-Service. - Validation-Service (annotation based, oval). - Dao-Service (ORM). - Hibernate-Service. - Agent-Service. - JMX-Service. - Rules-Service (Drools). - Properties Service. [Less]
Created 11 months ago.

0 Users

Simple template based Dependecy Injection framework for C++.
Created 2 months ago.

0 Users

If you're looking for a very simple IoC library in PHP to wire up simple dependencies and you can live with constructor dependency injection this is the project for you! Features (currently): ... [More] Constructor dependency injection Ability to inject static values as constructor parameters Can traverse dependency chain and initialize a dependency structure Very simple INI style configuration Can detect circular dependency at runtime [Less]
Created 12 months ago.

0 Users

Community-created extensions and examples related to the Hiro project.
Created 7 months ago.

0 Users

Usage Manual Using The Container As a Factory, And No More "new" Statements! In this first example we learn how to obtain class instances from a Gamba Container, and how it decouples your component ... [More] implementation from each others. Everybody knows that hardcoding is a bad practice... but whenever you place a new statement in your code, you are really taking a concrete class implementation in a hardcoded way! For example, supposing that you wants for a java.util.List implementation instance, and you choose a java.util.ArrayList: List list = (List) new ArrayList();Well, but if you want to choose another implementation for a List, you will have to change all your classes that news it. Lechuga solves this problem, since the concrete implementation class is uniquely declared in a context file as is: After declaring the class implementation, you can obtain an instance of this, calling the Gamba Container: GambaContext gc = GambaContainer.getContext("tips-context.xml"); List myList = (List) gc.getBean("myList"); Assert.assertTrue(myList instanceof List); Now, if you want to choose another implementation for a List (i.e. LinkedList), you only must have to change the class specified in a context file, and all your classes that instantiates it will obtain the new implementation: Dependency Injection Dependency Injection means to inject recursively into your requested bean instance his declared dependencies. This feature allows you to obtain a desired bean instance (obtained by a Factory, in fact), fully configured and ready to use, altought his object-dependencies are being injected. Setter Injection For example, suppose that you have in hands: In the above example, a "b" instance are being injected to an "a" instance using setter injection. When you asks the container for an "a" instance, the container works for you and performs reflect operations to do the same as the following piece of code: A a = new A(); B b = new B(); a.setB(b); return a; Constructor Injection A constructor injection is another kind of injection. For example the definition: will cause that when a "b" instance is requested, container performs: A a = new A(); B b = new B(a); return b;Gamba Container Don't Works Lazily, just Eagerly In order to prevent unexpected exception throwing at run-time, all bean definitions are parsed and loaded in context loading-time (that is, when you calls GambaContainer.getContext(...)), performing a check of all defined beans, thinking about her future life-cycle. --> [Less]
Created 2 months ago.

0 Users

What it doesThe Java Simple Plugin Framework was built to reduce development time while increasing code maintainability of small to medium sized projects. Completely hides implementation details of ... [More] components. Only use their interfaces. Components may be loaded with only two(!) lines of code Heavily annotation based: @PluginImplementation, @InjectPlugin, @PluginLoaded, @Timer and @Thread, ... Through usage of generics it is usually type safe. Additional plugins to export other plugins by JavaScript, JSON, LipeRMI, XMLRPC, XMLRPC Delight or ERMI. Plugins may be discovered on the local net using ZeroConf. Initial support for RDF. Only 120k core size. (See the Usage Guide, FAQ or Introduction-Video for more information). What is new in this version (0.7.0, August 2009)Removed requiredPlugins() inside @PluginImplementation, these are automatically inferred by looking at the @InjectPlugin options. Removed TrueZip. We now handle JARs on our own. This results in A greatly reduced core size, now only 120k Revised caching. Plugins should load faster now. Introduced weak hashing. Should improve startup even more ("cache.mode"="weak" must be enabled) Improved startup speed of discovery plugin. A short exampleThe following lines demonstrate how easy it is to load existing plugins. All .JAR files inside the given directory will be examined for contained plugins which will be loaded afterwards and are automatically started. No configuration files are required, nothing else has to be done. PluginManager pm = PluginManagerFactory.createPluginManager(); // and then one or more of these ... pm.addPluginsFrom(new File("myPluginDir/").toURI()); pm.addPluginsFrom(new File("myPluginDir/myPlugin.jar").toURI()); pm.addPluginsFrom(new URI("classpath://*")); pm.addPluginsFrom(new URI("http://server.com/plugin.jar"));Creating a new plugin is equally straightforward. After an interface has been designed the rest can be done by a simple annotation. The next example shows a plugin implementation that could be loaded by JSPF, and also here: no XML- or whatsoever-files have to be created to make this work. /** * CoolPlugin may be an (almost) arbitrary interface, in only has to extend Plugin. */ @PluginImplementation public class CoolPluginImpl implements CoolPlugin { public String provideData() { return "Hello World"; } }Our last two snippes indicates how plugins can be obtained from outside, and the inside of plugins. Notice the type-safety: CoolPlugin cool = pm.getPlugin(CoolPlugin.class);Or, from inside of plugins: @InjectPlugin public CoolPlugin cool; When to use itIf you are, for example, a researcher and want to develop a prototype quickly intend to change implementations frequently but want to keep your code clean are coding some software where you expect plugins to be loaded using some kind of easy IoC think about reusing components in other prototypes then you might want to give it a try. Functionality Checklist(aka the unbiased JSPF-is-great feature matrix) Below you find a brief overview of the most important features JSPF has to offer. This list is not complete, and the framework offers various other goodies here and there, like flexible options, easy configuration support and some more. Feature JSPF Can load ... plugins from JAR files Yes ... multiple plugins from path Yes ... automatically all plugins in classpath Yes ... plugins over HTTP Yes (1) Threadsafe Yes Typesafe Yes Dependency Injection Yes XML free Yes Heavily annotation based Yes Supports caching Yes Plugins can be isolated using a separate ClassLoader Yes (2) Official support to export plugins over ... ERMI Yes ... LipeRMI Yes (3) ... JSON (easily export Plugins to web pages!) Yes ... XMLRPC Yes Transparent and easy network callbacks Yes (w. LipeRMI) Remote plugins may be discovered automatically Yes Requires Java version >5.0 Supported Platforms Windows, Mac, Linux Works in applets Yes (4) Core size 120k (5) Time to get started 5 minutes (6) License Free (beer and speech) Proper end user documentation :-( (1) Works, but unsafe and not recommended. (2) Only if the plugins are packed into a self contained JAR. (3) We even use a greatly enhanced version of LipeRMI with fewer bugs and more featues. (4) Applets have to be signed, does not work with classpath autodetection (5) Likely to increase with every new version, remote plugins add extra size (6) If you watch the introduction video and have profound Java experience. Known UsersGerman Research Center for Artificial Intelligence (various projects) Help & FeedbackWe know the documentation is in a bad shape. However, in case you have any questions, comments or requests, don't hesitate to visit my web page and drop me a mail. I will add the items to the wiki afterwards. HistoryThis project was created by Ralf Biedert. Nicolas Delsaux started the hosting on code.google.com and added some features. Thomas Lottermann contributed to various plugins. [Less]
Created 12 months ago.

0 Users

First of all let's talk about what is an IoC framework. It's a framework that implement the Inversion of Control pattern, most of the time to perform dependency injection to decouple an object from ... [More] its dependencies. Instead of hardcoding the dependencies of the objects, using the new operator or the factory pattern, you let the framework do it for you. To perform it, you just have to register your classes in the container, and then tell the framework to create an instance of that class. This kind of framework allows to develop solution easier and to reduce the cost of the change in the software. It allows to move configuration closer to the place it is used. To summarize, an IoC framework allows you to produce a more flexible and more configurable application. This framework is very similar to the Windsor Container framework, because that's the one I use and because it's configuration seams much more flexible to me that the Spring way of doing. Of course my framework doesn't perform as much things as Windsor, Spring or others, but my goal wasn't to develop a competitive framework but to do an interesting project. The particularity of this IoC framework is that it doesn't use Reflection to create objects dynamically. It only uses it to obtain the constructor definition (once for each component). To instanciate the component, it uses lambda expression from the LinQ framework, that's much faster than using Activator (the Reflection way). It manages different lifestyles for the components: Transient (the default lifestyle): creates a new instance of the component as requested. Singleton: creates only one thread safe instance of the component for all the application Thread: creates only one instance of the component per thread. Registering components can be made both by code and configuration file. Component name, type, service, lifestyle and specific parameters can be defined. This IoC framework don't implement setters injection to prevent from using Reflection and still having an efficient framework in any case. The framework is fully tested using MbUnit and NCover [Less]
Created 4 months ago.

0 Users

A Lightweight Java IOC Container.
Created 11 months ago.