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. ...

A Word About the Analysis Sequence

I mentioned it earlier at some point, but I'm not following the traditional method of system analysis and design as taught in my class. I'm skipping quite a few steps, and really what I'm planning to end up with is a little disjointed. However, I have some reasons for that--namely that in a situation like this, I feel going whole hog on the discovery phase is redundant. For instance, domain model and entity relationship model. If a student had come to me and described the problem and asked for a solution? Yes. Absolutely. I would need to sketch this out--what things am I working with? Which things are going to live in the database? Does a course have a grade like a planet has a moon, or is a course and a grade more like Mars and Uranus? These are important questions that need answered before you can get into the meat and potatoes. But...I already did that. Months ago. Before I knew what a domain class model even was, but I have the relationships and the entities all l...

Use Cases: Pertaining to the Project

So last time we covered the really high level theory behind use cases and why planning them is kind of important when writing a program. This is the part where I tell you I've changed my mind, I'm just going to totally wing this project since I landed an internship and I don't actually need this program to be professional looking. PSYCH--did you even read how I closed the last post? That was hilarious. But anyway. I didn't actually go through the full CSCI-1275 "discovering your use cases through '20 Questions,' rune reading, and chasing clients for interviews" approach. We spent close to a month on use cases in that class--how to identify them, how to define them, how to model them, and a little on how to prioritize them. The bulk of the class was use cases, and like I said...I get it now. But that doesn't mean I'm doing to sit and actually write out a full CRUD technique analysis of all the ways a single user will interact with a ...