openArchitectureWare and EMF training now available in the UK

Blogged under Architecture, Code Generation, Product Lines, Software by Mark Dalgarno on Thursday 17 July 2008 at 12:00 pm

If you have any interest in model-driven software development you should check out the 3 day openArchitectureWare Power Workshop we are now offering in Cambridge in partnership with the folks from itemis.

These workshops are designed for developers who want to move from simply modelling software to model-driven software development (MDSD).

During the workshop, the concepts and theories of model-driven software development are explained using the openArchitectureWare open-source MDSD Framework. The workshop is hands-on with a strong focus on acquiring practical experience of the various toolsets used.

The workshop covers:

  • the basics of model driven development
  • an introduction to the Eclipse Modelling Framework (EMF)
  • the openArchitectureWare workflow engine
  • textual domain-specific languages and Xtext
  • code generation from models using Xpand and Xtext
  • model validation
  • creation and use of generator cartridges
  • meta-modelling
  • model-to-model transformation
  • best practices for Model-Driven Software Development

The next course will be presented in Cambridge from September 22nd-24th by Karsten Thoms from itemis.

The fees for the 3 day course (including training materials, lunch and tea / coffee) are £1200 + VAT but if you book more than 3 weeks ahead of the workshop start date we’ll knock off 25%.

SPLC 2008 Programme now available

Blogged under Architecture, Code Generation, Product Lines, Software by Mark Dalgarno on Saturday 12 July 2008 at 8:28 pm

The programme for September’s Software Product Lines Conference in Limerick has been online for a few weeks now and registration is now open.

I’m running a panel session titled “Product Line Scoping in Practice” and a demonstration session titled “Jump-Starting Product Lines with Clone Detection” - more details to follow.

The conference runs from September 8th-12th; see the full programme.

Examples of software architectural decay

Blogged under Architecture, Software, Uncategorized by Mark Dalgarno on Thursday 5 June 2008 at 3:26 pm

I ran my workshop When Good Architecture Went Bad again at this week’s Software Architect 2008 conference. The session drew just under 40 participants which was very satisfactory from my point of view.

Regular readers will know that the session covers common patterns of architectural decay and gives some tips on how to address such decay.

I’ve previously run the session at SPA 2008, ACCU 2008 and as a straight talk at May’s Embedded Masterclass events. Each time there’s no shortage of participants willing to share their architectural horror stories and yesterday’s session was no exception…

The examples I collected included:

  • A software system where the threading architecture decayed so badly over time that the system became unmaintainable and had to be scrapped.
  • A couple of examples of business logic (with associated SQL) being captured in the software’s presentation layer – making it hard to replace this layer.
  • An example of a software package that became so big it couldn’t be understood by one person and so became really hard to maintain.
  • A software system whose architecture had to be seriously bent in order to meet performance targets.
  • Software with a large number of cyclic dependencies that ended up as brittle spaghetti code.
  • Several examples of drive-by programming – team-membership constantly changing, programmers not understanding architecture and so making mistakes when they code and then moving on.
  • One example of drive-by-architecting with similar consequences.
  • Problems with obsolete software and hardware technology, lack of skills in these obsolete technologies leading to decay.
  • A couple of examples of over-engineered (gold-plated) software modules.
  • Sales-driven evolution – where there is no clear roadmap or scope for the software system and so the implemented software architecture inevitably diverges from the intended architecture.
  • Lack of architectural direction – no one responsible for laying out an architectural vision, see related point on sales-driven evolution.
  • Software that is bloated with technologies – new technologies e.g. web communication technologies being added without obsoleting older technologies.
  • A big example where an outsourcer implemented everything in a software system rather than buying in some best-of-breed components. It was a good system but this example of not-invented here led to a huge software base that in the end couldn’t be maintained by the outsourcer or the customer due to lack of resources and skills.
  • Merged companies with different cultures and different principles having to collaborate on a software system leading to decay.
  • Uncontrolled code use – programmers grabbing code, classes and even variables from other parts of the software without any control on what could and couldn’t be used – once again led to an unmanageable code base.
  • New people coming into the team and adding untested technologies to the software in an uncontrolled manner.

You can see reports on the previous deliveries of the workshop here: When Good Architecture Went Bad at ACCU 2008 and here: Architectural Decay at the Embedded Masterclass.

Architectural Decay at the Embedded Masterclass

Blogged under Architecture, Embedded, Software by Mark Dalgarno on Wednesday 21 May 2008 at 9:27 am

I ran a variant of my talk When Good Architecture Went Bad at the Embedded Masterclass recently. This is a free, one day event with technical talks and a small exhibition aimed at embedded engineers.

This year there were actually two Masterclasses, one in London and one in Bristol and the combined attendance was around 140 - despite problems on the London railways conspiring to keep a few people away.

A couple of questions that came up during my sessions:

  • Do real-time software systems suffer from architectural decay less than other types of software? - I have a gut feel that no, they decayed just like other software systems despite more rigourous verification methods being used in many cases. This is because architectural decay comes from change - change in functionality, change in staffing, change in tools and technologies and I don’t feel that in general real-time systems are less prone to these types of changes.
  • Does UML help? - Not being a big fan of UML I passed this one onto Kevlin Henney who happened to be attending the Bristol Masterclass. His view - yes and no. Yes if you use UML to document what you have implemented (and so communicate the architecture), no if you rely on a UML document to act as a guide for implementation. (apologies to Kevlin if I misremembered this)

Being in Bristol also gave me the chance to meet up with some of the local ACCU members. We went to the Old India restaurant in the city’s former stock exchange - great food in a great setting with great company. Thanks to Tony Barrett-Powell for arranging this at short notice.

When Good Architecture Went Bad at ACCU 2008

Blogged under Architecture, Software by Mark Dalgarno on Wednesday 16 April 2008 at 6:20 pm

It’s 2 weeks to the day since I stood up in front of just over 30 people to lead my session When Good Architecture Goes Bad at the ACCU conference.

My plan was to present some examples of architectural decay, to collect some examples from the participants and to explore how things could be improved. I was particularly interested in the value and cost of work done to prevent architectural decay. It seems that developers agree that preventing such decay is a good thing but I was hoping to collect some examples that could make the financial side of things a little clearer as it seems to me that there is a disconnect between developers and managers in this area. It wasn’t too clear from the session description in the programme that this would be a workshop so first up I offered anyone who just wanted to sit and listen the chance to leave the room - there were no takers…

After a few introductory slides the first exercise asked participants to discuss examples of architectural decay from their real-life experience. I collected these on a flipchart:

Examples of architectural decay

  • A single class used as a dumping ground
  • Cancerous wart – ever increasing coupling between modules, packages etc.
  • The number of programming languages used on the project increasing over time
  • New interfaces added over time, but old interfaces still maintained (and never deprecated)
  • Lots of code clones  (copies and near-identical copies)

I then presented some examples of architectural smells (problems in package/class/subsystem/layer relationships, overgeneralization etc.) and whiffs (subtle smells) e.g. no one on the team can tell you what the intended architecture is, time to implement changes increases etc.). The second exercise asked the group to come up with their own examples:

Architectural smells associated with these (and other) examples:

  • Mismatch between documentation and software, mismatch between comments and code
  • No clear responsibility for the architecture
  • Implementation = specification
  • Use of a proprietary language compiler
  • Pile of s**t from the start of the project
  • Clone and own as the main way of doing reuse
  • Insufficient decomposition
  • Knowledge of architecture held by a decreasing number of people

The bulk of the session was taken up by two case studies. In Case Study 1 an outsourced project had run into problems over a period of years. The company detected a considerable decrease in productivity over this time and the participants were asked to decide whether architectural decay could have caused the decrease in productivity and what they thought of the company’s proposed solution. (If you’re want to try this at home first you can download it as Software Architecture Decay Case Study 1 (PDF) from the Software Acumen web site.)

Participants’ observations included:

  • Communication needed to maintain architecture
  • Management needed to maintain architecture
  • Someone required to shepherd the new team before they can get going
  • Insufficient knowledge transfer process when software first outsourced.
  • Team selection is important when assigning new roles.
  • Unclear when productivity decline happened. Why didn’t company pick it up sooner?
  • Who owned the software & the architecture – tests.

A second case study looked at a situation where a software system had been developed in 3 separate sites but the company had just closed two of the sites. Participants were asked whether moving maintenance to a single team at one site would cause the software architecture to decay. (Again, if you’re want to try this at home first you can download it as Software Architecture Decay Case Study 2 (PDF) from the Software Acumen web site.)

This time participants’ observations included:

  • Fewer people, resourcing could contribute to decay
  • Knowledge transfer / must learn new bits - again could cause problems
  • Subtle differences between architectures of the different parts could cause problems - initially it’s a comprehension task
  • Domain expertise was lost when two sites closed - could indicate significant loss of architectural knowledge
  • What were the future plans - is there an implied refactoring?
  • This situation needs management to go into the project with open eyes - non one was convinced this was the case
  • There might be an urge to change the architecture which could be risky
  • Not-invented here / cultural differences could lead to problems
  • The motivation of the new team was questioned, skills drain could occur
  • What was the background motivation for the change? This could set the tone for future work.

I then asked participants to travel back in time and come up with some ideas for maintaining architectural integrity in their previously noted problem projects:

  • Encourage people not to do clone and own – but how to do this?
  • Change the development process (again how viable is this, would management back it?)
  • Embed a culture of refactoring (again but what if management won’t allow it?)(and note - some developers may want too much refactoring, be too keen to rewrite)
  • Visualize the technical debt – detect architectural decay using tools
  • Make responsibilities clearer.
  • Add automated (architectural) checks.
  • Cancel the project (earlier).
  • Rewrite (earlier)
  • Kill the architect (as noted by SPA 2008 participants also)
  • Spread architectural knowledge.
  • Spread the architectural work.
  • Have frequent communication between whole group – up to three times a day.

The session covered some of the same ground as Tom Gilb’s keynote ‘Agile Methods Lack result management’, Steve Love’s session on ‘Snowflakes as architecture’ and (it later emerged) Dirk Haun’s session ‘Rewriting not recommended’.

Slides for the session area available at When Good Architecture Goes Bad (PDF).

Snowflakes and Architecture - Layers considered harmful - Steve Love at ACCU 2008

Blogged under Architecture, Software by Mark Dalgarno on Friday 11 April 2008 at 10:02 am

Steve Love’s session at the ACCU Conference was billed as taking a “suspicious look at the traditional layered architecture, and suggest[ing] some ways it can be improved upon, resulting in an “architecture” that resembles a snowflake more than it does a cake.” Attending his talk fitted in with my plan to focus more on the architecture sessions on Day 1 of the conference.

Steve was straight in with the boot beginning by noting that the main difficulty with layer diagrams is that the diagrams are often only what you get. (More marketechture than architecture)

Layers are created to separate concerns but often business logic leaks into different layers (more on this when I blog about my ‘When Good Architecture Goes Bad’ session) – this leads to untestable code due to unintended dependencies between layers e.g.  the business application that must be tested with a GUI. Another problem is that sometimes a layer is there only to pass data through to lower layers.

Steve’s talk described a different (granular) approach to making a more adaptable architecture by design and looked at the mutual influence of architecture and design.

Robert Martin notes that bad design is rigid, fragile (knock-on effects of local changes) and immobile (can’t move things around for reuse, can’t disentangle software). Booch (1996)  suggests that instead of layering,  we arrange applications into smaller granule components that communicate together. So good design is cohesive, decoupled & layered. But Steve questioned whether these are enough…

What a user sees as quality is different from what developer sees as quality. (MD - In fact there is often a similar disconnect between different groups within a development organisation and this can also lead to problems.) His claim is that simplicity in software architecture is key, is easy to measure, but is not straightforward to achieve.

To illustrate what he meant Steve introduced concept of Dependency Horizon that is the number of steps you need to bring in for a particular dependency (think of it as the number of steps between components, packages or modules if you will). A far dependency horizon can become hard to manage and can increase chance of circular dependencies (not good).

Decoupling (e.g. through intermediate objects or interfaces) improves maintainability. This can be done by identifying abstractions and pulling out pure interfaces. This enables the dependency horizon to be shortened and so maintainability is improved.

A key concept here is the Dependency Inversion Principle

  • High level modules should not depend upon low level modules. Both should depend upon abstractions.
  • Abstractions should not depend upon details. Details should depend upon abstractions.
  • This allows abstractions to depend on each other, but not on their implementations.

DIP is layering in the small.

The Singleton pattern came in for a lot of bashing in Steve’s talk. Singleton is the counter-example of DIP – it is the antithesis of detail depending on abstraction. The pattern has lots of problems – hard-wired dependency, dependency from within, testing is difficult, rigid/fragile/immobile (see above), unpredictable ownership, unpredictable lifetime, handling when multiple threads present. Conclusion – Singleton pretty much violates all of Martin’s design principles.

Steve’s solution is Unsingleton (MD - or perhaps antiSingleton) – code should work with what it wants, don’t let it take it for themselves. What client code doesn’t know about the implementation of a service can’t hurt it.

Steve’s solution to many of the problems was to Design to an Interface. This can be realised in different ways in different technologies:

  • Interface keyword in some languages
  • COM/CORBA - IDL
  • C++ Pure Virtual Base Class
  • Duck-Typing (ducking the whole idea of typing) - C++ Templates, Ruby, Python
  • C# and Java Generics

The key thing about interfaces is their substitutability (Liskov substitution principle).

  • Inheritance is the tightest form of coupling possible. Inheritance – polymorphism by dynamic despatch (the conventional model) – virtual functions (AKA the inclusion model of polymorphism).
  • Genericity – polymorphism by generics – (Duck typing) – Containers, Iterators and algorithms (strategy), Traits and Policy classes is better.
  • Overload – polymorphism by overloaded functions – member function overloading, global functions and operators. Can be particularly powerful in creating interfaces. (MD – this resonated with my experience in Common Lisp.)
  • Cohersion – polymorphism by conversion, implicit casting, constness. (MD – again resonated with my Common Lisp experience.)

Testability is an essential property. (MD - A quick aside - When I first started programming I didn’t think about this very much - we weren’t taught it and nobody around me considered it as a property that could be designed in. As I read more about software development I began to take more notice of this and began to look for testability in design documents. Debuggability is a related concept that supports testability e.g. I built a logging add-on for some quite complex database code I inherited and this really let me get to the bottom of some quite complex client-server interaction problems.)

Testability principles:

  • You must be able to Test independent parts independently
  • Interfaces = Substitutability – if software under test depends on database etc. then change it so that it must depend on interfaces (to the database), this lets you mock (or replace) the DB
  • Substitutability underpins Mockability (Mock objects). Gives you ability to mock out services that are only available on target device (pda, phone) and do debugging on PC (for example).
  • Design to an interfaces

Parallel Development

  • Working to interfaces enables parallel development, continuous integration, testing (again)
  • Also supports outsourced development
  • Adaptability – when using interfaces plugging in a new component just like an existing one is trivial. (MD – I did have a question in my mind about how much effort and knowledge is required in order to develop these interfaces. Does one need to have written the interfaces a few times in order to get them right?)

Flexibility, Generality and Reuse

  • The false idols of OO?
  • Usually done with inheritance but these led to big class hierarchies which were unusable rather than reusable. (I touched on this in my session too).
  • Interfaces provide the means of reuse. - Component architecture provides the means of flexibility – make stuff talk to a wire feed rather than the UI (say)
  • And Generality - Can be reused in different context

Fat interfaces are less useful than small interfaces since they bring in unwanted dependencies. Must design them according to what client code wants, not what it can use. Small, specific interfaces allow better reuse.

Dependency Injection – promises the idea of true decoupling. Spring etc. sometimes a good idea – but sometimes a sledgehammer to crack a nut. Picked up by people wanting to decouple things but they often miss lighter-weight solutions. SOA does give decoupled design but needs thought in Steve’s experience.

Parameterize-from-above is the solution. (Don’t call us, we’ll call you). All about separation of concerns. But it still requires programmer skill to put it all together (MD - what software doesn’t?).

Alistair Cockburn propose Hexagonal architectures – these promote the idea of the application as a service. (With ports and adapters). Port defines contract for adapters – this leads to pluggability. (MD – are interface technologies well-enough defined to support this in the general form? How much effort is required to create these entities?)

Making adapters have their own ports leads to software as a collaborating set of components. Steve notes it’s an attractive design but that it requires discipline and can lead to circular dependencies. At the back of his mind he did seem to be worried about the danger of replacing spaghetti code with spaghetti interfaces. One suggestion was to try and organise interfaces into layers to help. The key here he suggested is to break layering down into its constituent interfaces. So that we still layer components but we don’t make them depend on being in a layer. This allows decoupling within layers.

So - what about the snowflakes? Well, these are pretty hard to describe without a picture, which I don’t yet have. Look out for Steve’s slides on the conference web site adn you’l get the picture (pun intended).

Looking forward to SPA2008

Blogged under Architecture, Code Generation, Software by Mark Dalgarno on Wednesday 12 March 2008 at 1:55 pm

SPA2008 runs next week and it is one of the highlights in my conference calendar.

I’ll be heading over to the event on Saturday to help with the setting up and to have dinner with the early arrivals.

Sunday I’ll also be helping out with the initial registrations - there’s a couple of tutorials and workshops running that day including an in-depth Introduction to Smalltalk with James Robertson.

Keynotes this year are John Daniels, L Peter Deutsch and Michael Feathers. Mike’s talk Big Ball of Money, Big Ball of Mud: Economics and Legacy Code looks as if it could be closely related to some of the themes of my own session When Good Architecture Goeas Bad (described below).

On Monday I plan to attend two sessions on Domain-Specific Languages. Juha-Pekka Tolvanen of MetaCase will be leading a session on Domain-Specific Modelling for Full Code Generation which I shepherded and Peter Bell will be leading a shorter session on Domain Specific Languages: Design and Evolution. I know both Juha-Pekka and Peter and think they will be presenting some good stuff. (If you miss them at SPA they will also be presenting at our Code Generation 2008 conference in June.)

I’m also planning to run a Birds-of-a-feather session with them on Domain-Specific Development (probably on Monday) and if you are interested in DSLs you should definitely come along and get the benefit of their experience.

On Tuesday I’m planning to attend Ivan Moore’s session on project management (or How to lose friends and alienate people - on becoming a project manager as he puts it.) Ivan went over the the dark-side a few years ago and is loving it so I’ll be interested to hear what he has to say.

My workshop When good architecture goes bad runs on Tuesday afternoon. We’ll be looking at a small number of case studies of good architecture gone bad and will be considering what could have been done about it and the broader question of the value of preventative work to maintain architectural integrity.

Wednesday I’ll probably go along to Keith Braithwaite’s session Automatic for the People — process implications of automated testing before helping in the clean-up process and heading home…

At the time of writing there are still a few places left. If you want to take part in a high-energy learning experience covering the software life cycle then SPA is the place to be. The conference is residential - hence the price tag - but the facilities are excellent and part of the value of attendance comes in the after hours interaction…

Software Architects - who needs ‘em (and are they overpaid)? - SPA Cambridge session

Blogged under Architecture, Software by Mark Dalgarno on Tuesday 8 January 2008 at 11:01 am

We’re trying a little experiment for SPA Cambridge’s January session at Anglia Ruskin University on 16th January (7:00pm (light buffet) 7:30pm (talk) )

This time around we’ve invited a panel of experts to consider the question: “Software Architects - who needs ‘em (and are they overpaid)?”

The panellists, with suitable audience contributions (questions, comments, heckling  etc.), will investigate the role of software architects and the value software architects bring to software development. Are architects needed or will good architectures ‘emerge’ without their intervention? Could your projects use a good architect or would you have been better off without one? Does software even need an architecture?

Panellists have been confirmed as Matt Deacon, Allan Kelly and Nick Rozanski:

Matt Deacon (Microsoft)

Matt Deacon is the Chief Architectural Advisor for the Developer and Platform Group at Microsoft Ltd, in the UK. His primary role is to serve as an advisor to Microsoft’s customers, and the public, on all matters relating to the field and profession of IT Architecture.

Allan Kelly (Independent)

After more than 10 years at the code face Allan Kelly came to believe that many of the problems faced by development teams are not in the code but in the management of projects. He has spent the last five years trying to understand and fix problems on the management and organizational side.

Nick Rozanski (Marks and Spencer)

Nick Rozanski is a Lead Technical Architect with Marks and Spencer. He manages a team of Technical Architects who are accountable for Application Services, which includes Application Hosting (.NET and latterly J2EE), Relational Database platforms, Data Warehouse and Business Information, Application Integration, and Non-Production Environments.

I’ll be introducing the panel and feeding them questions should the audience be shy - which has never happened at any previous SPA Cambridge meeting… If there’s anything you’d like me to ask them then let me know.

Hopefully we’ll get someone organised to make a sound recording of this for posterity.

The event is free and open to all but please preregister at http://www.bcs-spa.org/cgi-bin/view/SPA/SoftwareArchitects

SPA 2008 programme online

Blogged under Architecture, Software by Mark Dalgarno on Wednesday 21 November 2007 at 9:57 am

The programme for next year’s BCS Software Practice Advancement conference is now online at http://www.spaconference.org/spa2008/index.php?page=programme

I’ll be running my workshop When Good Architecture Goes Bad on Tuesday 18th March.

SPA Cambridge panel session - “Software architects - who needs ‘em (and are they overpaid)?”

Blogged under Architecture, Software by Mark Dalgarno on Tuesday 6 November 2007 at 3:05 pm

The first SPA Cambridge session of 2008 will investigate the role of software architects and the value they bring to software development. 

Are architects needed or will good architectures ‘emerge’ without their intervention? Could your projects use an architect or would you have been better off without one? Does software even need a defined architecture?

In the style of the BBC’s ‘Question Time’ we’re collecting questions in advance of the session. Please contact me via Software Acumen if you have a question or would like to participate in the session.

The panel will take place from 19:30 (buffet from 19:00) on January 16th at Anglia Ruskin University, Cambridge, UK.

Next Page »

Proudly powered by Wordpress - Theme Triplets Identification Band, the girlish style by neuro