Giter Club home page Giter Club logo

whitebox's Introduction

What is Whitebox?

Whitebox is a profiler for the Autofac IoC container.

This project is no longer under development. Check out Autofac.Analysis for an updated alternative.

Screenshot

Why should I care?

Building applications with IoC is a joy. We can focus on the immediate requirements of individual components, and the IoC container does the drudge work of assembling the complete application.

While many of us agree that these advantages vastly outweigh the disadvantages, there are very real challenges that we still need to overcome:

  • The IoC container is a black box: once the application reaches non-trivial complexity, understanding exactly what is going on in there can be a challenge.
  • Starting to work on an application that uses IoC from another developer or team can be a daunting task, as there is often no thread to follow in order to work out how the application does much of what it does.

Whitebox eliminates these obstacles to productivity.

  • It shows you exactly what is going on in the container, in real-time, as the application runs.
  • It helps identify common traps and problematic usage patterns, along with suggestions for correcting them.

Why call it a ‘Profiler’?

There are two ‘obvious’ approaches to exploratory tooling for IoC.

Static analysis is the first and most academically pleasing way to get information about a composition. This is the approach taken by MEFX.exe and Visual MEFX.

The greatest benefit of static analysis is that its results are available at build time, so information about a composition can be gained, for example, in an IDE-based browser, or a continuous integration server.

The limitation of a static analysis approach is that unless very strict rules are followed both in how the IoC container and the client application are constructed, the picture of “reality” may be different at build time vs. runtime. Modern IoC containers are very dynamic, and applications themselves are highly configurable, so static analysis turns out to be a poor choice for most users today.

Dynamic analysis or just plain old ‘Tracing’ is the second approach to understanding what is going on in an IoC container. The goal of tracing is to present an accurate picture of exactly what occurs during program execution. When compared with other development tools already in use, the group that most accurately reflects this aim are generally called profilers.

I don’t get it: tracing surely isn’t anything new!

Whitebox doesn’t show you a raw stream of trace events. Instead, it reconstructs the higher-level operations and implied dependency structure in an integrated view.

Each of the ‘resolve operation’ events is a single call to the container’s Resolve() method (or an equivalent.) The event shows where the operation occurred, but more importantly, clicking on the event will show how the resultant object graph was built.

whitebox's People

Contributors

nblumhardt avatar trydis avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.