Lessons Learned: Changing the Team's Mindset Along with the Technology - Part 2
Lessons from changing a Web Forms team’s technology, development process and testing practices, including resistance, Scrum and decision-making bottlenecks.
Lessons Learned: Changing the Team’s Mindset Along with the Technology - Part 2
In the previous article, we discussed why we revamped our Web Forms marketing sites into an ASP.NET Web API back-end and an AngularJS Single Page Application (SPA), and the technical decisions we made. In this article, we are going to see the harder part of that journey, the people. We changed the technology, the architecture, the development process and the testing practices at the same time, and the team had to go through all of it together.
This is the most personal article of this series. I was the architect and the mentor driving the project, and many of the lessons here are about my own decisions.
TL;DR Summary
- Moving from Web Forms to Web API and a SPA is not just learning a new framework. It needs a new way of thinking about the web, about the server and the client, about testing, and about writing clean, maintainable and extensible code.
- We moved from waterfall to Scrum at the same time. Training and reviews helped, but without experienced Scrum practitioners in the team, we learned what is right and wrong the hard way.
- Most of the senior developers resisted the changes, and the junior developers were influenced by them.
- When I was introduced to the team as the architect of their product’s revamp, they were not happy. They wanted their own team lead to make the architecture decisions. It took multiple rounds of discussion with the management and the team before they agreed to work with me.
- I made most of the major decisions with the agreement of the management but without the team, because they were new to these scenarios. The decisions were not bought by the team.
- When I met with an accident shortly after the project started, the team was stuck. The decision maker became the bottleneck. Another tech lead picked up my role and drove the project until I returned.
- Decisions that are not shared are not owned. Bring the team along, even when it is slower.
How It Started
The revamp didn’t start with the technology, it started with a difficult introduction.
When I was introduced to the team as the architect for the revamp of their product, the team was not happy, and they raised it openly. It was their product, they had built and maintained it for years, and now someone from outside was coming to decide its new architecture. They wanted their own team lead to make all the decisions about the new architecture instead of me. Honestly, I can understand that feeling today much better than I did then.
It took multiple rounds of discussion with the management and with the team before they agreed to work with me as the architect. Even then, the agreement was more about accepting the decision of the management than about trusting me.
Most interestingly, I had already made most of the architecture decisions by myself before I was introduced to the team. The SPA, AngularJS, the services layer, the unit testing and the base frameworks were decided and agreed with the management. So, when the team raised their voice, they were not only questioning who should decide, they were also reacting to decisions that had been made without them.
To address it, I scheduled a meeting to walk through the new architecture and the tech stack with the whole team. I explained the problems we were trying to solve, the options we considered and the reasons behind each choice. Again, there was disagreement, this time on the tech stack. Some questioned whether a SPA was needed at all, some preferred to stay closer to the technologies they knew, and some were simply hesitant to start everything from scratch. I took their questions one by one, clarified the doubts and the hesitations, and eventually the team agreed to go ahead with the new architecture and the tech stack.
It felt like a win at that time. Looking back, it was the first sign of what would come later. The team had agreed to the decisions, but they had not made them.
Everything Was New
Let us first see how much changed for the team at the same time,
- From Web Forms to RESTful Web API on the back-end.
- From server-rendered pages to a Single Page Application on the front-end.
- From C# and server controls to JavaScript, AngularJS and a completely different set of front-end tools.
- From manual testing to unit tests and integration tests, on both the back-end and the front-end.
- From large code-behind files to clean code, with coding standards and code reviews.
- From waterfall to Scrum.
None of the team members had worked on a SPA or AngularJS before, and none of them had worked in Scrum. I had created the base scaffolding and the base frameworks for everything, the project structure, the common services, the build and the test setup, so the team could start building features from day one. But a scaffolding can show the way, it can’t change the way people think. Almost everything was new for the team, and every step was a challenge.
Challenge 1: The Developer Mindset
Adopting REST design
Web Forms hides the HTTP from the developers. A button click is an event, the state is in the view state, and the page lifecycle takes care of the rest. Our developers were very good at that model, and it had been their way of thinking for years.
RESTful design asks for a different way of thinking. Resources instead of pages, HTTP verbs instead of events, status codes instead of exceptions shown on the page, stateless requests instead of view state, and a contract between the API and its consumers. In the beginning, the APIs looked like the old code-behind methods exposed over HTTP, like GetFundsForPageOne and SaveButtonClick. It took a lot of reviews, discussions and examples before the team started to think in terms of resources and contracts.
Writing proper unit and integration tests
We enforced unit tests as part of the definition of done. For a team that never wrote unit tests, it was a big shift. The first tests tested nothing, or tested the database, or broke whenever someone touched the code. Writing testable code needs dependency injection, small classes and clear responsibilities, and writing good tests needs practice and patience. The integration tests for the APIs brought their own questions, which data to use, how to keep the tests independent and how to run them in the build.
Some developers saw the tests as extra work that slowed them down, not as a safety net. Without someone to show the value every day, the tests were written to satisfy the rule, not to protect the code.
Writing clean code, maintainable and extensible
Maintainability was one of the main reasons for the revamp, so writing clean code was not optional. But clean code is a habit, not a framework feature, and years of Web Forms had built different habits,
- Large code-behind files where the UI, the business logic and the data access lived together.
- Copy and paste to reuse a piece of logic, so the same bug had to be fixed in many places.
- Big static helper classes that every page depended on.
- Region specific behavior added with
ifconditions for each site, which is exactly how one site’s change started to impact another site in the old system.
The same habits moved to the new stack in a new form. On the back-end, the API controllers started to grow with business logic. On the front-end, the AngularJS controllers became fat, with the data access, the formatting and the business rules all on the $scope.
To write code that is maintainable and extensible, the team had to learn and apply a set of principles that were new for most of them, separation of concerns, the SOLID principles, small classes with a single responsibility, meaningful names, dependency injection instead of static helpers, and services in AngularJS instead of logic in the controllers. Extensibility mattered especially for us, since the platform served multiple regional sites. A new region should be supported by adding a new implementation or configuration, not by adding one more if condition to the shared code.
We introduced coding standards, code reviews for every change and static code analysis on both the C# and the JavaScript code. The code reviews helped the most, but in the beginning, they were also a source of friction. For some senior developers, having their code reviewed and questioned felt like a judgment on their experience, not a way to improve the code. It took time before the reviews became a normal part of the work and a place where the team learned from each other.
Challenge 2: Adopting Scrum
At the same time, we moved from waterfall to Scrum. The team had proper training and reviews, but there was no one in the team with real Scrum experience who could tell what is right and what is wrong from the start. So, we learned it the hard way,
- The sprints were treated as mini waterfalls, design in the first week and testing in the last days.
- The stand-ups became status reports to the lead, not a planning session for the team.
- The estimates were seen as commitments, and missing them felt like failure.
- The retrospectives were polite, and the real problems were discussed outside the room.
Most of the senior developers resisted the change. They were successful in the old way, and Scrum asked them to work in a way where their experience counted less at the start. The junior developers looked up to the seniors, so the resistance spread. The training explained the ceremonies, but it didn’t solve the real problem, which was trust and ownership.
Challenge 3: Decisions That Were Not Bought
As we saw at the start, the major decisions were made before the team was even involved, and that pattern continued during the project. As the architect, I made most of the decisions. The team was completely new to these scenarios, the SPA, AngularJS, REST, unit testing and Scrum, so they didn’t have the knowledge or the experience to take part in many of the decisions. All the major decisions were made by me, with the agreement of the management, but without the team.
At that time, it felt like the efficient way. We couldn’t wait for everyone to learn everything before deciding. The walkthrough meeting had got us an agreement, but an agreement in a meeting room is not the same as ownership. When the real difficulties started, the decisions were not bought by the team. For them, the new framework, the new process and the new rules came from outside. When something was hard, it was “the architect’s decision”, not “our decision”. The senior developers showed their resistance in all possible ways, and every difficulty became a reason to question the whole direction.
When the Decision Maker Became the Bottleneck
Unfortunately, I met with an accident shortly after the revamp project started, and I had to be away from work for a while.
The team was stuck. All the decisions were in my head and in my hands, and suddenly I was not there. The scaffolding and the base frameworks were there, but the reasons behind them, the trade-offs and the plan for the next steps were not written down anywhere. Every new question, how should this API look, how should we structure this module, how should we test this, was waiting for me. The person who was driving the project became the bottleneck of the project.
Fortunately, another tech lead picked up my role and drove the project until I returned. It was not easy for him either, he had to understand the decisions, defend them in front of a resisting team, and keep the project moving at the same time. I am very grateful for that. Without him, the project would have stopped completely.
Learnings
Here are the key learnings from the people side of this journey,
- Change one or two things at a time. A new technology, a new architecture, a new testing culture and a new process at the same time is too much for any team. Sequence the changes, so the team has something stable to stand on.
- Bring the team into the decisions, even when they are new to the topic. Do small spikes and proofs of concept together, let them see the problem and the options, and decide together. A decision the team owns is worth more than a better decision they don’t own.
- Win the senior developers first. They are the informal leaders. If they believe in the change, the juniors will follow. If they resist, the juniors will resist with them.
- Get real experience for new processes. Training is a start, but an experienced Scrum Master or coach who works with the team every day is what makes the process stick.
- Write down the decisions and the reasons. Architecture decision records, design notes and the trade-offs considered. When the decision maker is not available, the reasons should be.
- Avoid a single point of failure in people, the same way we avoid it in systems. Share the knowledge, pair on the hard decisions and grow other people to take the lead.
- Show the value, not just the rule. Unit tests, REST design and Scrum are accepted when the team sees how they help them, not when they are enforced.
Self-Reflection
I made the decisions with good intentions and I still believe most of them were technically right. But I made most of them before I even met the team, and then I spent my energy on convincing them instead of involving them. I treated the team as the people who will execute the decisions, not as the people who will own them. I was so focused on getting the direction right that I didn’t spend enough time bringing the team along. The accident showed me the cost of that very clearly. A system with one decision maker is as fragile as a system with one server.
These lessons changed the way I work as an architect. Today, I spend more time on explaining the “why”, on making decisions together with the team and on writing them down, and less time on deciding alone.
Wrap up
In this article, we have looked at the people side of our revamp, the developer mindset towards REST, testing and clean code, the move from waterfall to Scrum, the resistance from the team, the decisions that were not bought, and what happened when I became the bottleneck. I really appreciate that you took the time to read this article. In the next article, I will walk you through the SPA challenges, how the performance improved but the SEO and ads got worse, and the mistakes we made.
Related Posts
Single Page Application (SPA) architecture with AngularJS and Web API
Single Page Application architecture explained through AngularJS routes and services, ASP.NET Web API boundaries, token handling, deep links, validation, and trade-offs.
Lessons Learned: Revamping Web Forms into Web API and AngularJS - Part 1
Lessons from moving Web Forms sites to an ASP.NET Web API and AngularJS SPA, including maintainability, performance, SEO and a reversed WCF decision.
Lessons Learned: A Faster SPA with Worse SEO and Ads - Part 3
Lessons from building an AngularJS SPA that improved performance but introduced SEO and advertising problems, including the fixes and trade-offs.