- Scalable architecture, allowing to easily adopt new features.
- Supports XML, YAML, and annotations as bean definitions providers.
- Lightweight, easy of use, and useful.
- Loosed-couple, just use what you need and nothing more.
- Some JSR-250 and JSR-330 annotations.
- Resources through php streams.
- Setter Injection (For arrays, scalar values, php code, and references to other beans).
- Constructor Injection (For the same data types as above).
- Method Injection (So you can have dependencies in singletons that must be created on demand).
- Can define factory beans, factory classes, and factory methods to create beans.
- Managed bean lifecycle (for singletons and prototypes).
- Initialization and destruction methods called by the container.
- Aspects (as in aspect oriented programming), for xml, yaml, and annotation drivers.
- Lightweight implementation of the MVC (Model View Controller) pattern. Can be used with or without Twig, and Smarty
- Annotations used by helpers and the container (i.e: @InitMethod, @DestroyMethod, @Controller, etc).
- Can cache proxies and bean definitions with Zend_Cache, Memcached, Filesystem, and APC.
- Integration with PAMI and PAGI. So you can make asterisk (telephony) applications via agi and ami.
- Aware interfaces: IContainerAware, IMessageSourceAware, IResourceLoaderAware, IBeanNameAware, IAspectManagerAware, ILoggerAware
- Extensions in the lifecycle: AfterDefinition, BeforeCreate, AfterCreate, BeforeAssemble, AfterAssemble
- Extensions for providing your own definitions: IBeanDefinitionProvider, IAspectProvider, IPointcutProvider
- Helpers: Syslog, TCPServer, TCPClient, etc.
- Since 1.1.0: Bean inheritance through normal OOP or xml/yaml declarations.
- Since 1.1.2: Bean aliasing for xml, yaml, and annotations.
- Error Handling, Signal Handling, Shutdown Handling, all via events.
The name "Ding" comes from the action of using/doing dependency injection (DI), the result is something like "di'ing".
Also, Ding is based on (and tries to be designed as) the Spring framework from SpringSource, which offers a lot of great features not available to the php world. You now know where those great ideas came from ;) Ding also supports some of the JSR-250 and JSR-330 annotations, like @Configuration, @Bean, @Required, @Resource, etc.
Ding is intended to be used not only for web applications, but for desktop and embedded applications too. As a matter of fact, it has more features for desktop, server, and embedded applications than for web applications.
Where to find
You can find Ding:
- Home: http://marcelog.github.com/Ding
- Github: https://github.com/marcelog/Ding
- Ohloh: https://www.ohloh.net/p/Ding
- Freshmeat: http://freshmeat.net/projects/ding-2
- Binpress: http://www.binpress.com/app/ding/70
Ding is the winner of the 2011 Binpress programming contest :) Read more here.
- Scalable architecture, allowing to easily adopt new features.
- Supports XML, YAML, and annotations as bean definitions providers.
- Lightweight, easy of use, and useful.
- Loosed-couple, just use what you need and nothing more.
- Some JSR-250 and JSR-330 annotations.
- Resources through php streams.
- Setter Injection (For arrays, scalar values, php code, and references to other beans).
- Constructor Injection (For the same data types as above).
- Method Injection (So you can have dependencies in singletons that must be created on demand).
- Can define factory beans, factory classes, and factory methods to create beans.
- Managed bean lifecycle (for singletons and prototypes).
- Initialization and destruction methods called by the container.
- Aspects (as in aspect oriented programming), for xml, yaml, and annotation drivers.
- Lightweight implementation of the MVC (Model View Controller) pattern. Can be used with or without Twig, and Smarty
- Annotations used by helpers and the container (i.e: @InitMethod, @DestroyMethod, @Controller, @ErrorHandler, etc).
- Can cache proxies and bean definitions with Zend_Cache, Memcached, Filesystem, and APC.
- Integration with PAMI and PAGI. So you can make asterisk (telephony) applications via agi and ami.
- Aware interfaces: IContainerAware, IMessageSourceAware, IResourceLoaderAware, IBeanNameAware, IAspectManagerAware, ILoggerAware
- Extensions in the lifecycle: BeforeDefinition, AfterDefinition, BeforeCreate, AfterCreate, BeforeAssemble, AfterAssemble
- Helpers: SignalHandler, ErrorHandler, ShutdownHandler, Timer, Syslog, TCPServer, TCPClient, etc.
See the README file for more information.
Also, you might want to look at this article for a complete application example.
Requirements
- PHP 5.3.3+
- Extensions: posix, pcntl, simplexml, sockets, pcre, reflection, yaml, phar
- log4php (just put the src/main/php directory of the src distribution in your path).
Installing with pear
You can now easily install Ding by issuing:
pear channel-discover pear.marcelog.name
pear install marcelog/Ding
or:
pear install marcelog/Ding-1.3.0
just replace 1.3.0 by the release version you'd like to install :)
See: http://pear.marcelog.name
Manual Install
You can download Ding directly from github in the following forms:
Questions & Comments