Tag Archives: plugins

Client side development just got easier

For those who are contributing to the client or writing client side plugins, things just got a little easier. Today we committed to master an update that adds a feature to the client test page which shows all the client pub/sub events that occur and who is subscribed.

The client has a loosely coupled architected based on top of a pub/sub model. Pub/sub has many advantages, but one of its biggest disadvantages is visibility into what events are occurring, the data being passed and who is subscribed. This tab reveals all of this information and more. It even updates live as events are occurring and as the client lifecycle moves on.

Here is a preview of what you can expect:
PubSubTab

At the moment, this tab is currently only available in the client test page. In the future, we are looking at the possibility of shipping this within the server implementation and allow developers to toggle it on and off as required. But this will be done some time in the future based on feedback.

Blacklisting and Remove Plugins

In an effort to try and make some of the lesser known features of Glimpse some air time, we thought we would put together a few short posts on how to perform a coupe of tasks that might get you some quick wins.

First in the list is Blacklisting/Remove Plugins. Out of the box Glimpse provides several plugins. Depending on what version of Glimpse you go for (Glimpse
or Glimpse.MVC3) you will have a variety of tabs that serve different purposes.

We are still refining the list of what is useful and what people want to see, but if there is something you don’t want, removing it is quite straight forward. In this case you would simply add a “pluginBlacklist” element to your glimpse config and using the fully qualified name of the plugin, add items to the blacklist:

<glimpse>
      <pluginBlacklist>
            <add plugin="Glimpse.Mvc3.Plugin.MetaData" />
            <add plugin="Glimpse.Mvc3.Plugin.Binders" />
            <add plugin="Foo.Bar.GlimpsePlugins.CurrentUser" />
      </pluginBlacklist>
</glimpse>

*It should be noted that if you wanted to blacklist 3rd party plugins, this is more than possible using the same method, as demonstrated with the Foo.Bar.GlimpsePlugins.CurrentUser line above.

Other cases where you might want to blacklist plugins, is for different environments. Lets say, if in development you want all tabs, but in UAT, you want half of them removed and in PROD you only want tracing, Glimpse can support this. You could have several reasons to do this like reducing payload size, or for security concerns. All you would need to do is blacklist the plugins you don’t need in the config file for each environment.

If should be noted that, if you blacklist a plugin, not only do we not show that tab, but the plugin never gets wired into the life-cycle of the page. Blacklisted plugins add absolutely no overhead and are never instantiated.

Hope that helps and let us know what you think and if we can do anything more in this area.

Jigsaw_Puzzle

IGlimpsePlugin – Replacing HttpApplication with HttpContextBase

In an effort to try and give the community as much time to respond as possible, if you have noticed already IGlimpsePlugin has had some changes made to it. These changes will go out with release 0.83+.

It is not our intention to make this a pain for people who have already created plugins, but we really felt that this was a change that needed to happen sooner rather than later.

In an effort to ensure that Glimpse is rock solid and “future proof” we have been working hard at getting our test coverage up. In the process of doing this we found that having plugins (IGlimpsePlugin) depend on HttpApplication was a mistake. HttpApplication limits the ability to unit test plugins as it virtual requires us to have a real context.

Obviously this isn’t good for testing and what we should have depended on in the first place is HttpContextBase. HttpContextBase can easily be mocked and hence allows our plugins testable. In the long run this is also good for 3rd party plugin developers as it means that you can easily test as well.

A release will be coming within the next week and we would encourage any developers who have created plugins to adjust their code to cater for the coming change.

Moving forward we don’t anticipate any more changes that any more changes will occur, but this is always a possibility as we are still officially in Beta.

If you have any feedback or comments please let us know. We really do want to make Glimpse the best possible tool and really help facilitate people solving real problems.