Worked on an application used for points-based rewards system for agents in a company.
Also involved in a team working on a Customer Relationship Management app for an online store. The CRM generates reports, allows searching for nearby clients, viewing quotes of clients, viewing products and number of stocks available, etc.
The first app I worked on has two ways for data access: one uses a database-first model of Entity Framework and the other one uses a code-first model of Entity Framework. It sometimes get's in the way when I'm searching for the model to use. So I refactored the app so that it will only use the code-first model. Then I was able to remove all of the the database-first models when the refactorings was finished.
But it was just a small app and not very complex, so it was doable within a short period of time.
I was the only one working on my first project in the company so it seemed to me that I am free to do whatever I want.
I noticed that there was a test module in the project, but it was empty. So I decided to find a way where that I can create tests for the tasks assigned to me. I needed to re-structure things...
... to make the code testable.
I was able to setup the tests, and then managed to create some unit tests and some acceptance tests, but I later abandoned them for some reasons...
The major reason why the tests were abandoned was because I started working on the project with the kind of mindset which says something like "I have all the time in the world to work on this project, and so I will be able to write all the tests needed". Well, I later learned that the client does not always have all the time in the world to give to me. Worse, I needed to resign from the job.
Now, because of the restructuring that I did, the project now has two different structures: the original one, and the other one which makes the code easier to test.
More than a year later, when I am already working in another company, I came across this text in "The Mythical Man-Month":
"... I will certainly not contend that only the architects will have good architectural ideas. Often the fresh concept does come from an implementer or from a user. However, all my own experience convinces me, and I have tried to show, that the conceptual integrity of a system determines its ease of use. Good features and ideas that do not integrate with a system's basic concepts are best left out. If there appear many such important but incompatible ideas, one scraps the whole system and starts again on an integrated system with different basic concepts." — Frederick P. Brooks
I think the lesson to be learned in that is that if I decided to restructure software, I must choose a structure that is not too different from the old one but still solves the problem I am having with the current structure.
I think that changing it to a completely different structure is okay only if the original restructur-er will be involved in the project for a long time.
(* the images in this section are from Mark Seeman's post, "Layers, Onions, Ports, Adapters: it's all the same")