Skip to main content

Sequence Diagrams: Register Account Use Case

As mentioned in the previous post, I kinda adore the sequence diagram. For me, it's the single piece that really allows one to translate the idea of a program into code. It's not exactly where the rubber meets the road, but more like the rim the tire is mounted on. Let's segue away from that odd analogy to the diagram in question.


Sequence Diagram for Registering an Account
Lookit that. The simplicity. The beauty.

Setting aside the fact I'm still not 100% on entity framework and have serious questions about how to implement it, I know what's going on here. I can see what gets input by the user, how it gets passed to the controller, where it goes from there, and at what point the entity gets converted to a domain model (is that a service function, or an interactor function? Hm...) and then a view model. I could sit down and write out almost everything based just on this png file right here.

The trick is keeping the sequence, or unit, simple. Otherwise, you can't really break it apart and see it so clearly. Which ties in nicely with the unit testing piece. Which, shockingly enough, is where I'm heading with this next.

Comments

Popular posts from this blog

Use Cases: The Theory

They told me in my CSCI-1275 Systems Analysis and Design course there's a tendency for programmers to just start coding stuff without thinking, and this was nigh on tantamount to total catastrophe. I didn't fully understand this until a little later in the semester. We had just learned about arrays and collections in my CSCI-1630 C# Programming I course, and I found this to be a perfect excuse to write a little application that would synthetically divide polynomials . (That's a really great way to master synthetic division, actually, if you're interested in brushing up on that skill. Although my wife still insists the time would have been better spent putting more time into my algebra homework. Two types of people...). At any rate, long story short: I made the program work perfectly, for 3rd degree polynomials that divided evenly. Then I realized it broke when I tried a polynomial of the 4th degree. And then again when the 3rd degree polynomial had a remainder. ...

Activity Diagram: Theory

So I've got use cases figured out. Not all of them--only a fool or a genius thinks he can sit at a desk away from the end user and think he's got all the use cases figured out (and a genius would never truly believe it). But you can't sit around trying to anticipate every possible use case before you start, so once we have enough to cobble together a complete program or part of one we can move on for a bit. Side note, this is the beauty of the agile approach: "Yeah, we know we gotta go to the moon. But we have to do it in 10 years, so we can't spend 5 years thinking up every problem we might need to solve before we start solving them. How about we start with 'design a rocket that reaches orbit without killing anyone' and build on that when we finish?" That's called an iteration, but more on that later. Fleshing out what that use case needs is the next step, and there are a couple tools I remember being taught. One of them is the activity diagra...

Activity Diagrams: Pertaining to the Project

I don't think I'll be posting about every diagram I do--they're not great works of art the world must see, and if you really wanna see them they'll be in the Github repo. But I did want to post something project specific for each piece of theory here. Thus, please see below. I think this is pretty self explanatory, even to the uninitiated. Black dot with no ring is the start point, black dot with a ring is the end of the use case. In this case, we can end the use case by just...stopping, or by going on to the "create course" use case. Which will be a diagram I can link to, hence that weird symbol after the Create Course block. As an aside, I'm using a program called Violet to do my diagrams, and have been for about a year now. It may not be as fancy as Visio or several online subscription options, but I'm honestly more interested in being able to get something on paper (so to speak) quickly, so I can start messing with it. I need to understand...