読者です 読者をやめる 読者になる 読者になる

give IT a try


When Database Source Control Goes Bad 翻訳 Part5

Developing Application code Locally


These days, most every application programmer develops their code locally. That’s just what you do. Many developers have learned the hard way that this is important, and won’t tolerate any divergence. And for the less experienced developers who are doing it just because they are told to, eventually they will make the same mistakes and learn from them too. This is such an easy lesson to learn that you don’t see too many people violate it intentionally.


Even if you are obliged to develop on a server environment, you’ll probably at least find a way to isolate yourself. For example, SharePoint developers tend to avoid installing the SharePoint platform on their local machines, mostly because it requires a server OS, but also because SharePoint is pure, unadulterated evil that will steal the very soul of any machine it comes into contact with. Nonetheless, in those cases where a local machine is not practical, the developer will install the SharePoint software onto a virtual machine so that they can still work in isolation.


This local development approach is critically important to any form of version-control or change management. For all practical purposes, developers must have a workable environment that they can fully control and work in peace. From there, developers check their code into source-control, and hopefully it gets built from source-control before being deployed to another server. This gives each developer a degree of control over how much the other developers can screw them up, and more importantly it ensures that every change is traceable back to a date and time and person responsible.


This approach is so ingrained in so many developers, that often we take it for granted. Just try to remind yourself regularly how awful it was that time that everyone was working directly on the same developer server, and nobody can keep track of who changed what when. Or better yet, how fired up everyone got the last time somebody sneaked directly into the production server and started mucking around.


Surprisingly, developers go to such trouble to isolate their local application development environment, and then point their local application code to a shared development database server that the whole team is working on.


If you never need to make database changes, and nobody on your team needs to make database changes, this can certainly work. In that case, the database behaves like a third party service, rather than an actively developed part of the system.


However, if you are ever making database changes, you need to isolate your database for the exact same reasons that you need to isolate your application code.