Jump to content

Team Development


Luke Solar
 Share

Recommended Posts

Hello All!

I would like to ask you how you manage to work in a team on a processwire project. This also applies to the case when you develop on different machines (e.g. laptop on the train and desktop office pc).

For example: two different developers create 2 templates with various fields, then they push/commit their changes to a repository. both can update and merge the changes. but: to make the fields and templates available in the backend you still would have to add the database entries to the "fields" and "template" tables, right?

What are solutions and best practices for team development?

Thank you and keep on wiring!

  • Like 1
Link to comment
Share on other sites

Planning!

Hi Luke

I am a great believer that what ever system you are working on you should only be creating the fields and so on once you have already decided exactly what is needed.

With ProcessWire, since you create the templates and fields directly in the back end (as opposed to the template file which you will use for all your presentation work), this is particularly important, since you will want to make sure that you are not duplicating fields unnecessarily.

For instance, if you create a particular textarea/tinymce field, you may want to re-use that on several templates across your site. 

Once that work is done, then the people involved have a much better idea what template files they will be creating and what they will need them to do, and that work can then be delegated to team members.

Joss

Link to comment
Share on other sites

I think that traditional version control with Git or the equivalent is great for template files, front-end development files and your own custom modules. When it comes to defining the templates and fields on the admin side, it's better to do this from the admin rather than migrating SQL queries or the like. So someone in your team should be the gatekeeper for these administration resources.

  • Like 3
Link to comment
Share on other sites

"So someone in your team should be the gatekeeper for these administration resources."

Yep, always keep someone around who can take all the blame. 

My dog has a very rough time in that regard.

  • Like 3
Link to comment
Share on other sites

I'd agree with the above.

You would almost want to give your template developers naming conventions for fields and a list of fields currently available, then whoever is managing the backend receives the new templates with a list of any new fields they need to create.

Once the fields are there you can drop the templates in and they'll just work :)

It is possible to work this way even without a local database when people are proficient with the API, but the problem is when you get a larger team and how someone has set up a field locally isn't necessarily the same way the person managing the backend does it. I suppose if you had a site that big some sort of field settings exporter would be nice.

Link to comment
Share on other sites

Hello Wirecommunity!

Thanks for your answers. 

I only partly agree with "someone in your team should be the gatekeeper for these administration resources". While thats definitly true that someone (or a part of the team) should plan the database and architecture, change is unavoidable and even welcome nowadays in agile dev. When you change the name of a Field in the Object Model (when using a ORM) or Database (when using direct db access or xml) this change should easily be propageted to all teammembers/servers. Don't you think so?

Second point: If I make a fieldtype "location" locally including lat/lng then I have to go (manually) to all installations and add the field via the backoffice? atm I'm just synching the whole db every time I switch from laptop to PC but that would be impossible when a teammember joins me. I mean the whole thing is planned but the implementation should be done simultaneously in the end. 

I will - for now - sync the db. For the team there will be a documentation how the different field names for each template are. BTW ryan, regarding the creation of fields (and structure data) what tables should be synched? I just wanted to open a discussion for best practices here - Thanks for your feedback and any further comments.

good processing, have a nice day!

Link to comment
Share on other sites

Since each field is its own table, I would sync any beginning with "field_" as well as fieldgroups, fieldgroups_fields, fields and templates as a minimum (which is actually the vast majority of them).

If you're developing a site where permissions will change a lot then you'll probably want page_access too.

Link to comment
Share on other sites

There has been a lot of discussion about this. On mobile so cannot search. Mindplay was even starting about building a a module to solve this issue.

Template export/import will definitely help this.

Link to comment
Share on other sites

 Share

×
×
  • Create New...