Ding

Released 4 years ago , Last update 1 year ago

DI ( Dependency Injection ), AOP ( Aspect Oriented Programming ), JSR 250/330 annotations, lightweight, simple, and quick MVC ( Model View Controller ), syslog, tcp client and server, with non blocking sockets, and custom error, signal, and exception handling through events. Needs PHP 5.3, very similar to seasar, spring ( java ) .

  • 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.

Pricing

FREE

Apache License, 2.0

The Apache License, 2.0 is an open-source license.

About

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.

Features

  • 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.

Installation

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:

User Manual

You can find the full user manual at: http://marcelog.github.com/Ding/manual/toc.html

Examples

NOTE: You will need to have log4php installed and in your include path (the src/main/php directory of the source distribution).

An example (still work in progress) of a web application can be found at: https://github.com/marcelog/Ding/tree/master/docs/examples

An example of an asterisk manager interface monitor application can be found at: http://marcelog.github.com/articles/phpasterisklistenerexampleusingpamiand_ding.html

Please see https://github.com/marcelog/Ding/tree/master/docs/examples for all (and full) examples.

License » Apache License, 2.0 Download

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.


Or enter your name and Email
No comments have been posted yet.