Sub-views in the LightSpeed designer

We’ve been continuing to add navigational aids to the LightSpeed designer and one recent feature can be used to implement a simple form of sub-views. By a sub-view I mean that you can filter down to just a limited set of entities — for example, a Sales sub-view, a Logistics sub-view, etc.

In recent builds of the designer we’ve added a tagging facility where you can associate tags with each entity. Once you’ve done this, you can filter to show just the entities with a given tag.

Here’s a simple example based on an order processing model. (In reality you’d only use this feature when your model is too complex to fit on one screen, but I wanted to keep the screenshots simple!) Here the entities fall into two sub-domains, Sales and Logistics, with one or two entities appearing on both sub-domains. We can represent this by tagging each entity with the sub-domain it falls into (multiple tags can be separated by commas):

LightSpeed designer tagging

Now when we want to focus on a particular sub-domain, we can go to the LightSpeed Model window and use the Filter box to show only the tags we’re interested in. To tell the Filter box that you’re filtering on tags rather than names, prefix the filter with a # sign (you can use the Filter By menu to do this for you). Here’s how the model looks after entering #sales to filter on the “sales” tag:

LightSpeed designer filtering by tag

You can include multiple tags in the filter, again by comma-separating them. And of course you can still also filter by entity name as previously discussed; and we’re adding eager load graph visualisation.

We hope this navigational feature will help you to tame your larger models. If you’ve got big complex models and you want to give it a go, you can download the latest nightly from the store (and of course the free Express edition here if you’re getting lost even in an 8-table model!).

kick it on DotNetKicks.com

Tagged as LightSpeed

11 Responses to “Sub-views in the LightSpeed designer”

  • Good times.

  • Working visually with large domain models just got easier!…

    Thank you for submitting this cool story – Trackback from DotNetShoutout…

  • adding multiple tags (if I understand it using DDD it is one specific repository one tag or one aggregate in one tag (and highlighting aggregate root would be nice)?) is indeed a very nice idea!

    but are we able to filter by multiple tags (when e.g. 4 are present)?
    #sales & #order for example

    looking forward to eager graph visualisation, just proves that Lightspeed Domain Designer is currently the top designer to work with!

    Great Job Ivan, and (do)you(like) my brackets? (they come frome excitement;-)

  • Hello cowgaR,

    At present, filtering by multiple tags is a union. For example, you can type #sales,#logistics in the Filter box, and it will show you anything tagged sales *or* logistics. Does this meet your need — or are you looking for a way to filter down to the intersection (only things that are tagged both sales *and* logistics)? If so let us know.

  • yep, my fault, you’re completely right.

    I shouldn’t use an ampersand but I meant _or_ with an _and_ :) Union is right and this is sufficient enough, thank you.

    just an idea follows, what if it would be posible to define that an enity is aggregate root (of its tagged category it belongs to)?

    Maybe it is a stupid thing but as I see it if I would just “name” one entity to be aggregate root (some color highlighting possible) then it would logically be the root of all say “logistic” entities (of course in a sense where you would be tagging entities in DDD aggregate chunks, so only 1 tag on entity is possible) and would therefore either filter them (showing just #logistic entities when clicked on aggregate root) or do a little bit of highlighting (flash for 3 secs the whole group).

    just an idea, maybe someone can finish it, still thinking why it would be useful hehe, so far only for visualisation purposes for DDD purists.

    I got this idea when eager loading graphs were mentioned;p

  • Nice idea, but you don’t even need to restrict it to the aggregate root, do you? We should allow you to click any entity and say “filter to this guy’s tags” (essentially, “show me the domain that this entity is in”). So if you clicked on an entity tagged “logistics” it would apply a #logistics filter. That would also avoid the ugly “everything disappears” effect that happens while you’re in the middle of typing a tag *grin*.

    One nice feature of highlighting aggregate roots would however allow users to rapidly identify good places to click when trying to locate a particular sub-domain.

    On a related note, we should also allow you to quickly tag new entities with the current filter — if I am looking at the logistics tag, and add a new entity, there’s a good chance I want to mark this as part of the logistics sub-domain too.

  • agreed, adding entity to a group is a nice idea (so you don’t need to tagg another 4 when already working with some group!).

    imo highlighting should be subtle, a very little tone change and/or another (bolder?) border. Or in some places, just keep entities in the same color as they are now and “grey out” the one in no-use, something like transparency effect…

    I haven’t tried the latest nightly yet but are value types in different color now? (again, only slight change here)

  • what am I thinking rith now, I don’t know the possibilities of designer API (Visual Studio plugins tends to be limited) but is it possible instead of hiding the entities to just minimize them to absolute minimum and grey them out?

    You get the same effect with the ctrl+mouse wheel but now you would get it only on entities not in filter…

  • We experimented with fading back the entities but the toolkit we’re using makes it frustratingly difficult (and doesn’t support the translucency effect at all), and the partial solution we did manage just made it look like the filtered entities were disabled. So we backed that out and went for plain ol’ hiding. Not ideal, I admit, but we felt it was the best we could achieve in a practical timeframe. Thanks for the feedback, though — we will definitely keep it in mind!

  • […] 3.0 provided some relief from this in the forum of a filtering feature. You could tag entities to identify the sub-domains they belonged to, and then you could […]

  • […] from within Visual Studio, model checking (validation and ‘lint’-type advice), and filtered views a la LightSpeed. If you like the sound of any of these then do let us know — your feedback helps us to […]

  • Leave a Reply

Archives

Join our mailer

You should join our newsletter! Sent monthly:

Back to Top