Pages: Prev 1 2 3 4 5 6 7 Next
– page 3

Agile & Lean Software Development Management

deep thoughts on doing real work

Remember my factory method design pattern example to compute the first name and last name from a full name?

generated GUI

No? It’s really easy. You only have to provide a full name, like “John Doe” or “Doe, John” and the business logic computes the correct first name and last name.

This time we are not interested in the business logic and data binding, but we are going to generate the graphical user interface!

First, we have to model the form. image We can do that with UML. Use your favorite UML tool (StarUML), export to XMI. Finally, feed the XMI to a code generator (MyGeneration) using the right templates.

That’s all there is!

Recently, I was following a discussion on extracting business knowledge from UML models. UML models, UML models, and more UML models.

Slowly a thought was emerging from my soaky brain:

hey dude, data models are models too.

code generationIn fact, a data model doesn’t always have to be represented by an ERD diagram.

It is also very feasible to diagram a data model using UML class diagrams. It even gets better when you stereotype your classes <<table>>. This enables code generation software to automagically recognize the stereotypes and – for example – generate SQL script for you.

Why on earth that could be remotely interesting?

Because your model is independent from its physical representation.

This way, you can “extract” a model from the physical database, introduce some enhancements, and re-apply the enhancements to the original physical database.

It enables you to enforce an uniform use of naming conventions.

The model-driven code generation process is really simple.

You create a model, for example using UML. Next, you feed a hungry generator with your model in a format it can digest. That could be XMI.

model-driven code generation process

The model-driven generator (MDG) transforms your model into code using a template of some kind. Here it outputs C# code that can be compiled into an assembly using a c#-compiler. You also will need some framework or platform to run your code.

The hard part is creating a good model.

architecture .net ria services Yes, I like Microsoft Silverlight 3.0+. Why?

Not because of its flashy look. Not because of the abundance of (custom) controls, for example as showcased by the Blacklight Showcase or  Microsoft Silverlight Toolkit.

Even not because of Moonlight, for bringing Silverlight to our nerdy linux friends

Nope, it is because of the introduction of .NET RIA Services which enables you to expose your business logic and data through WCF technology.

I like this client-side polish for its solid data-driven architecture.

image

To be honest with you: I am a Visionist.

I really like Microsoft Visio. I do. I use it a lot, but from a functional perspective I use a very narrow portion in respect to different diagrams available.

I almost always start with a Flowchart and extend it into something I like. Before I discovered StarUML, I modeled UML diagrams using Visio Stencil and Template for UML 2.2

Thus it was time to do some research i.e. query “alternative to visio”. Of course, there is Dia. To be honest with you, I find it a little bit… premature. I looks even premature on Ubuntu.

Other candidates are Dynamic Draw and SmartDraw. Dynamic Draw is open source, and for SmartDraw you need an open wallet.

First look at Dynamic Draw.

Although I find the user interface a little bit harsh, I do like Dynamic Draw. It has a rich functionality. It even has the ability to “Borrow Shapes from Visio”. No kidding.

A harsh, but perfect drawing suite.

The reverse is true with SmartDraw.

It has a really appealing user interface and a very large amount of shapes you can draw with. It also has a WPF-look. Nice, nice, nice. And you can import Visio, but you must have Visio installed.

I almost bought it, so slick it is….

But – unfortunately – it sucks. I hate to pay for buggy programs…

Just an example:

image

The most common model is the data model. Deep in the application architecture a physical model can be found, which is a straight representation of the database (ERD diagram).DataSource ExplorerMore superficially, in the core of the application architecture, a conceptual representation of the same data model can be found (UML diagram). However, it should be kept in mind that both are derived from the same underlying data model, thus are essentially the same. As a result mapping from one to another is relatively straight forward (Data Source Explorer).

Did you ever used Eclipse? Never? Then, now is the time!

image

Lets generate some crap…

  1. So, first we need Eclipse. Next, install the open-source modeling tool Topcased and code generator Acceleo into Eclipse.
  2. Next, spend a couple of hours in finding out how it all should work together.(To be honest, it didn’t take hours but – that’s why I don’t like using Eclipse – it took me too long to configure and make it work)
  3. Model something (*.umldi), for example a silly 101 school model. You see them often, especially here.
  4. Create a stunning generator-template (*.mt)
  5. Generate some code (*.cs), and finally
  6. Compile the generated code in your – and mine, of course – ***favorite*** integrated development environment. Wow, man. I created real compilable C# code.

Thus, nice work.

With software architecture my rule of thumb is: less is more. I like lean.

Developers – your primary audience – should get a good hunch of the path they must walk, but it should not be written down in such detail that it freezes their thinking organ.

Therefore there is no room for micro-managers or control-freaks when it comes to modeling software architecture.

Some diagrams should be enough. Additional text is in place to explain the diagrams in a concise matter. In this I like the “4+1” Architectural approach.

image

I am not sure about you, but personally I don’t like those bloated documents with many pages, but low information density.

A software architecture document should also bring in ***technique***. It should be more than just rephrasing user requirements.

imageThis is my favorite model pattern for designing an application architecture, probably that will be no surprise to you.

In my view Entity represents the data model.

It doesn’t matter if you are talking about business entities or database tables. Both are representations of the data model.

There is some debate on the nature of Entities, should they be active or passive. An active Entity has its own operations, an passive Entity lacks them. This is where the Controller comes in. A Controller is fully equipped with operations necessary for handling of Entities.

An Interface can be an user interface, service interface or a view.

image

In contrast to one might believe, the important part of an use-case is text, text, text and even more text.

The core of use-casing (nice word) is story-telling. The story of an actor (mostly a Silly User) using the proposed system.

But if that is really the case, why is it useful to draw an use-case diagram?

First, it structures your use-cases as an overview for the reader. Second, by drawing the diagram it structures your thoughts and forces you to focus on the user using the system.

That is probably the most important part of use-cases.

Pages: Prev 1 2 3 4 5 6 7 Next