How do I manage the development and deployment of my website as a team?

I read this site here and there and it looks like you guys have a wonderful community.

As for my experience, I am in my second year at a university who is familiar with SQL, C ++, Visual Basic and some PHP. One of my summer school projects includes creating a web application that allows users to register and schedule certain time intervals over the Internet. As a rule, I was the only person working on the project, but in this case I will be part of the group. Since we are all relatively new to working in a team, I would like to set up a source for my group so that we do not work somewhere with a shared drive. In addition, I would like to make sure that we can all test our changes on some development server that hosts a copy of our site.

My actual question is about the toolkit we need to use to achieve this. As a group, we are most familiar with PHP and MySQL, so we will end up using this code and database. I have used SVN in the past for my personal use, but my group members are not very familiar with source control. We will probably stick with something simple, such as Excel, for project management and bug tracking. Ideally, we would like the tools to be free and open.

How should a group manage the construction of the actual application? Are there methods that I can use that will allow any of us to transfer files to our development machine and keep track of who did this so that we donโ€™t rewrite each other? If this is not possible, one of us will write some scripts to deal with this, but I would like to avoid creating a mostly separate software application that will be used only to manage our project. Another problem that I foresee will be updating the database running on the development machine. Are there any standard methods we can use to manage our SQL scripts among the four of us?

I do not expect that there will be a very long answer (after all, this is our project!), But useful tips will be useful. As soon as I return from the holiday, I look forward to the start! Thanks!

+6
source share
4 answers

I recommend that your group use a control source to synchronize code. You can either set up your own server, or just use a free provider like github , Google code or bitbucket .

If you decide to use one of these sites, the good feature is that they also provide free problem tracking, so you can use this instead of Excel.

The best way to manage SQL scripts is to split them into separate files and put them under source control. You can create .sql files or use a tool to manage these changes - for example, see Ruby on Rails Migrations . This may take some effort to set up, but you will thank yourself later if you are working on a project of any size ...

+3
source
  • Make a plan how you would do it if it were you.
  • Divide the plan into tasks that take about 3-4 hours. Make sure that every task has a measurable goal.
  • Separate tasks. Try to sort them, if possible, to improve development efficiency.
  • Learn to use a control source. Explain to them that they will use this (maybe not svn, but SOMETHING) in a few years, so that they can also find out how now. In addition, it will help in every group project that they carry out in the future.
  • Create a script to create and run your tests. Also the script is your deployment. This ensures that you have the same mechanism that will live up to how you are going to test, which increases the number of defects found during testing. (This is in contrast to allowing them to exist, but not show up during testing.)
  • You mentioned updating the development database. It would be wise to flush the development database often with a live update. You might want to create 3 environments. Design, production and production. The development database will contain fabricated test data. The staging database will have a copy live (possibly within a few days). And, of course, live live.
  • Excel works great as an "error database." Consider using it to control the source that you manipulate and commit. This will give you an idea of โ€‹โ€‹what happened over time, and you can fix errors faster.
+2
source

Regarding version / version control, I would recommend subversion. There are some GUI tools that they can use, or even webDAV to access SVN. This will allow users to edit files together, as well as provide detailed information about who edited, when and why ... SVN will also do a pretty good job of combining files that can be saved at the same time.

This is not the easiest concept to wrap your head around, but it is not very complicated once you get started.

I invite everyone to read the first chapter: http://svnbook.red-bean.com/en/1.5/

and they should have a good idea of โ€‹โ€‹what is going on.

I'm also interested in what people can say about the database.

+2
source

How should a group manage the construction of the actual application? Are there methods that I can use that will allow any of us to transfer files to our development machine and keep track of who did this so that we donโ€™t rewrite each other?

It looks like you are looking for construction management . In the case of PHP, true โ€œbuildโ€ is as simple as compiling source files because the language is interpreted; no compilation.

It so happened that I am one of the developers of BuildMaster , a tool that basically solves every problem that you indicated in your question ... and it sounds like it will be free in your case under a Community Edition license. I will try to consider some of your individual pain points and how BuildMaster can be used as a solution.

Source control

As suggested by others, you should use it. The deployment trick is to set up some form of continuous integration so that every time someone checks, a new โ€œbuildโ€ is created. In BuildMaster, you can set this for any source control provider you want.

Error / Error Tracking

Excel will work, but this is not an optimal solution. There are many free bug tracking tools that you can use to manage your bugs and features. Using BuildMaster, you can associate your errors and the list of functions with the application by their release number so that you can view them in the tool at any time. It can also change the status of a problem and automatically add descriptions.

deployment

Using BuildMaster, you can create automated deployment plans for your development environment, for example:

  • Get the latest source code
  • Create artifact
  • Copy files to the development machine
  • Deploy configuration files
  • Update database

The best part, once you install them for other environments (glowcoder point # 6), clicking all your codes and database updates is as simple as clicking a button.

Another problem that I foresee will be updating the database running on the development machine. Are there any standard methods we can use to manage our SQL scripts among the four of us?

Database Updates

Not surprisingly, BuildMaster processes them as well, using the change script module. When a member of your team creates a script (for example, ALTER TABLE ADD [Blah] INT NOT NULL ), he can load it into BuildMaster and then run it in any environment that you created.

The best part is that you can add a step to automatic deployment and no longer have to worry about it. As Justin mentions, you can use .sql files for your object code (stored procedures, views, triggers, etc.) and use them for each assembly, since they are code anyway. You can save them in the original management.

Configuration files

One aspect of all of this that you may have neglected (but inevitably come across) is dealing with configuration files. With PHP, you can have a .htaccess file, a php.ini file, prepend.php, or collapse your own custom configuration file. Since, by definition, configuration files must change between your personal machine and the development machine, capturing them from a control source will not work without any a la hacking:

 if (DEV) { // do one thing } else if (PROD) { // do another } 

With BuildMaster, you can templatize your configuration files and associate them with your environment so that they can be deployed automatically. It will also keep a change history for you.

Automated Testing

If you want to get the full ALM effect, you can automatically unit test your code during automatic assembly and notify you if something fails, so you will find out that something is broken as soon as possible.


I apologize for the answer "long wind", but I feel that you are already ahead of the game, watching the problems that you might encounter in the future, and really believe that BuildMaster will make all this for easy deployment easy for your team so you can focus on the fun part, coding!

0
source

Source: https://habr.com/ru/post/886007/


All Articles