WireBox : Dependency Injection & AOP
5.x
5.x
  • Introduction
  • Intro
    • Introduction
      • What's New With 5.5.0
      • What's New With 5.4.0
      • What's New With 5.3.0
      • What's New With 5.0.0
      • What's New With 2.1.0
      • What's New With 2.0.0
      • About This Book
      • Author
  • Getting Started
    • Overview
    • Installing WireBox
    • Getting Jiggy Wit It!
      • Instance Creations
      • Binder Introduction
      • Scoping
      • Eager Init
      • How WireBox Resolves Dependencies
  • Configuration
    • Configuring WireBox
      • Binder Configuration Properties
      • Binder Environment Properties
      • ColdBox Enhanced Binder
      • Types & Scopes
      • Data Configuration Settings
      • Programmatic Configuration
    • Mapping DSL
      • Mapping Initiators
      • Mapping Destinations
      • MapDirectory() Influence & Filters
      • Persistence DSL
      • Dependencies DSL
        • Mapping Extra Attributes
      • Mapping DSL Examples
      • Influence Instances at Runtime
      • Processing Mappings
    • Component Annotations
      • Persistence Annotations
      • CacheBox Annotations
    • Parent Object Definitions
  • Usage
    • WireBox Injector
      • Injector Constructor Arguments
      • Injection Idioms
      • Common Methods
    • Injection DSL
      • ID-Model-Empty Namespace
      • Provider Namespace
      • WireBox Namespace
      • CacheBox Namespace
      • EntityService Namespace
      • LogBox Namespace
      • Java Namespace
      • ColdBox Namespace
    • WireBox Event Model
      • WireBox Events
      • WireBox Listeners
        • ColdBox Mode Listener
        • Standalone Mode Listener
  • Advanced Topics
    • Providers
      • Custom Providers
      • toProvider() closures
      • Virtual Provider Injection DSL
      • Virtual Provider Mapping
      • Virtual Provider Lookup Methods
      • Provider onMissingMethod Proxy
      • Scope Widening Injection
    • Virtual Inheritance
    • Runtime Mixins()
    • Object Persistence & Thread Safety
    • ORM Entity Injection
    • WireBox Object Populator
      • populateFromXML
      • populateFromQuery
      • populateFromStruct
      • populateFromQueryWithPrefix
      • populateFromJSON
  • Extending WireBox
    • Custom DSL
      • The DSL Builder Interface
      • Registering a Custom DSL
    • Custom Scopes
      • The Scope Interface
      • Scoping Process
      • Registering a Custom Scope
    • WireBox Injector Interface
  • Aspect Oriented Programming
    • AOP Intro
      • Overview
        • AOP Vocabulary
      • Activate The AOP Listener
      • Create Your Aspect
        • MethodInvocation Useful Methods
        • MethodLogger Aspect
      • Aspect Registration
      • Aspect Binding
      • Auto Aspect Binding
        • ClassMatcher Annotation DSL
        • MethodMatcher Annotation DSL
      • Included Aspects
        • CFTransaction
        • HibernateTransaction
        • MethodLogger
      • Summary
Powered by GitBook
On this page
  • Error Reporting
  • AOP Performance
  • DI Performance
  • Virtual Inheritance
  • Listener Registration
  • New onLoad(), onShutdown() Binder Callbacks
  • Binder Is An Interceptor
  • Release Notes
  • Bugs
  • New Features
  • Improvements

Was this helpful?

Edit on Git
Export as PDF
  1. Intro
  2. Introduction

What's New With 5.0.0

This release is part of the ColdBox 5.0.0 upgrade and it is a major release. Below you will find the major areas of improvement for WireBox and the full release notes.

Error Reporting

We have done greats strides in consistency of error reporting during the creation of objects and their wiring. We have also added countermeasures for rogue mappings that could bring entire applications down. You will now get more consistency and better error reporting overall.

AOP Performance

AOP now performs in over 70% faster than previous implementations. In previous versions, we would create intermediate class files that would then be loaded and injected as part of the AOP proxies. This took time and not only that, it would create 1 stub per call to a method implementation. Our strategy worked but lacked performance. In 5.0.0 we completely re-architected the way we did method injection and stub creation. We now take md5 hashes of the source code to be injected and only created the stubs 1 per-lifetime. The improvements are drastic and amazing. Enjoy AOP and don't hold back!

DI Performance

We have moved from an instance scope approach to a variables scope approach with accessors and mutators in 5.0.0 and yet again we benefit from CFML engine speed improvements. Again, thanks to the community for many pull requests.

Virtual Inheritance

We have completely re-engineered virtual inheritance in 5.0.0 and it behaves eerily similar to traditional inheritance at the dynamic level. Not only do we cover public methods like we used to, but also private methods and object state. You can also leverage AOP with virtual inheritance now which was a limitation in the previous version.

We have also added the capability to inherit implicit getters and setters from parent classes.

Listener Registration

You now can register listeners on-demand with WireBox via the registerListener( listener ) method in the Injector.

New onLoad(), onShutdown() Binder Callbacks

Any WireBox binder can now have two new callback methods onLoad(), onShutdown(). The onLoad() is called once WireBox has loaded with logging, caching, and the configure() on the binder has been called. You can use this for leveraging mapDirectory() calls which require the entire event system to be online or any other type of execution that leverages the entire machinery to be online.

The onShutdown() callback is a nice way to shutdown services as you see fit.

function onLoad(){
    mapDirectory( "commandbox.commands" );
}

Binder Is An Interceptor

Release Notes

Bugs

New Features

Improvements

PreviousWhat's New With 5.3.0NextWhat's New With 2.1.0

Last updated 7 years ago

Was this helpful?

The new WireBox Binder object is also an interceptor now. So you can create functions that listen to the entire DI/AOP process. Please see the .

[] - Virtual inheritance breaks AOP on on base class methods.

[] - Virtual Inheritance doesn't inherit variables-scoped properties

[] - CFC's with same name don't get aliases picked up with mapDirectory()

[] - Illusive double id exception when race conditions

[] - Allow new listeners added to the Binder to also be registered right away, especially from modules

[] - New request context dsl injection -> coldbox:requestContext

[] - New coldbox dsl element => coldbox:router to retrieve the application's router object.

[] - Virtual Inheritance now copies over properties and private functions with generic accessors

[] - Module Injection Shortcut when the inject annotation is @moduleAdress

[] - Add a new onLoad() method interceptor for WireBox configuration binder

[] - Make the Binder also an interceptor

[] - Add a new onShutdown() method interceptor for WireBox configuration binder

[] - Improve errors while building depenencies

[] - Improve AOP binding by caching temp files

[] - Throw error on non-existent coldbox DSL

[] - Increase Wirebox performance by scoping variables

[] - Complete refactoring of wirebox scopes/DSL to script and direct scope usage

[] - Ability to cache metadata in CacheBox

events sections
WIREBOX-29
WIREBOX-52
WIREBOX-63
WIREBOX-64
WIREBOX-58
WIREBOX-62
WIREBOX-67
WIREBOX-68
WIREBOX-69
WIREBOX-70
WIREBOX-72
WIREBOX-73
WIREBOX-28
WIREBOX-34
WIREBOX-59
WIREBOX-65
WIREBOX-66
WIREBOX-71