What is NQ?

NQ is a small microkernel-based framework, that delivers the basis for a modular application design. This microkernel is a central part of the application, which coordinates its components and the way how they work together, actually acting as classical service locator. Further it specifies an architecture in order to integrate the components. An NQ application is a collection of such components on top of the microkernel, which together form a complete software. NQ is not specific to any domain, so it can be used to build a modular server as well as a GUI application. Although the current NQ Core is .NET-based, it could be implemented in any other object-oriented environment (Java, for example) using the same concepts.

A single component adds new functionality to the application or replaces existing functionality. So it mostly works like an usual plug-in. The most important point is that the whole application is build up using such plug-ins, only a small managing kernel (the microkernel) is needed to load the components and to control their communication. But of course components on themselves are not exciting enough. They are intended to share their functionality between each other. Therefore, they offer certain services that can be used by other components.

Services are actually the main organization unit of the NQ architecture. Shown from the object-oriented aspect a service is an object offering data and methods to be used by other services, from the same or from other components. The object is always abstracted by an interface (the service interface), so the implementation of the service can't be referenced directly by other components.

The central part of NQ is the Service Manager that plays the role of the microkernel. It holds all the information about loaded components and their available services and creates new instances of service objects. The Service Manager is the only way for a service to access any functions from other services.

What are the main advantages of NQ?
  • Strictly following the NQ principles will automatically lead to a clean software architecture with clearly separated architecture layers.
  • Extensibility model: As every NQ application is simply a plug-in collection, NQ allows to create very modular and extensible software.
  • In most cases no external configuration is needed to install a new plug-in. Copying the appropriate files into a specific directory and restarting the application is all you need to do.
  • It's size. Some other microkernel frameworks try to offer many features beyond the pure module management and are often too overblown for simple tasks. The NQ Core is compact and contains only module management and some simple utility functions like a centralized logging mechanism or thread synchronization. There are no sub-frameworks that increase the size of the software unnecessarily.

How does NQ differ from other component-oriented frameworks?
  • NQ does not offer full lifecycle management for objects/services, that is often typical for dependency injection containers. At the moment the microkernel only manages the life cycle of singleton services and the creation (but not destruction or life stages) of multi-instance services.
  • The purpose of NQ is to form a light-weight plug-in architecture for applications. At the moment, there is no built-in support for distributed applications and remote service access across separated systems. Here you have to use some additional framework, e.g. WCF

Further Information

More information about NQ and details on working with it can be found in the official documentation, that can can be downloaded with the current binary package of the NQ Core Library. Most of the information above is copied from there. It's not complete at the moment, but shows many basic aspects of NQ programming.

Current Stage

The NQ Core is stable, but still lacks documentation at some places.

Last edited Nov 11, 2012 at 11:06 AM by Rpinski, version 20