views:

156

answers:

5

The company I work for is building a managed force.com application as an integration with the service we provide.

We are having issues working concurrently on the same set of files due to the shoddy tooling that is provided with the force.com Eclipse plugin. If 2 developers are working on the same file, one is given a message that he can't save -- once he merges he has to manually force the plugin to push his changes to the server along with clicking 2 'Are you really sure' messages.

Basically, the tooling does a shoddy job of merging in changes and forces minutes of work every time the developer wants to save if another person has modified the file he's working on.

We're currently working around this by basically 'locking' individual files by letting co-workers know who is editing a file.

It feels like there has got to be a better way in this day and age. Does anyone know of a different toolset we could use, process we could change, or anything we can do to make this easier?

A: 

I'm not familiar with force.com, but couldn't you use source control and pull all the files down from force.com into your repository. Then you could all do your work, and merge your changes back into the mainline. Then whenever it's necessary push the mainline up to force.com?

taylonr
The problem with that approach is that you need to push the changes into some environment to unit test your code. You can't save and test force.com code locally. This development environment is typically shared, but as eyescream mentions above, it's possible to do some jiggery-pokery using developer accounts.
Paddyslacker
+4  A: 

Each developer could work in separate development sandbox (if you have enterprise edition, I think 10 sandboxes with full config & limited amount of data are included in the fee?). From time to time you would merge your changes (diff tool from any version control system should be enough) and test them in integration environment. The chain development->integration->system test->Q&A-> production can be useful for other reasons too.

Separate trick to consider can be used if for example 2 guys work on the same trigger. I've learned it on the "DEV 401" course for Developers.

  1. Move all your logic to classes. Seriously. They will be simpler to unit test too.
  2. Add custom field (multi-select picklist) to User object. Values should be equal to each separate feature people are working on. It can hold up to 500 values so you should be safe.
  3. For User account of developer 1 set "feature1" in the picklist. Set "feature2" for the other guy.
  4. In the trigger write an if that tests presence of each picklist value and enters or leaves the call to relevant class. This wastes 1 query but you are sure that only the code you want will be called.
  5. Each developer keeps on working in his own class file.
  6. For integration test of both features simply set the multiselect to contain both features.

I found this trick especially useful when other guy's code turned out to be non-optimal and ate too many resources. I've just disabled his feature on my user account and kept on working.

This trick can be to some extend applied to Visualforce pages too (if you can divide them into components).

If you don't want to waste query - use some logic like "user's first name contains X" ;)

eyescream
I like that solution, but that sounds like alot of setup would be involved. I'm going to leave the question open for a few days at least, but this does sound like a viable way to go to scale.
Akrikos
This is basically the answer the Salesforce gives, but with a few tricks added. http://wiki.developerforce.com/index.php/Documentation :-)
Akrikos
If _anyone_ has a better solution, I would be happy to change the answer to another one. However, this looks like the best workable solution for now.
Akrikos
A: 

Take a look at the "Development Lifecycle Guide: Enterprise Development on the Force.com Platform". You can find it on developer.force.com's documentation page.

Good luck

Jeff Douglas

blog.jeffdouglas.com

jeffdonthemic
The manual basically says the same thing that eyescream says above.
Akrikos
+3  A: 

We had/have the exact same problem, we have a team of 10 Devs working on a force.com application that has loads of apex classes (>300) and VF pages (>300).

We started using Eclipse plugin but found it:

  1. too slow working outside of the USA each time a save is called takes > 5 sections
  2. to many merge issues with a team of 10 developers

Next we tried developing in our own individual sandboxes and then merging code. This is ok for a small project but when you have lots of files and need changes to be pushed between sandboxes it becomes impossible to manage as the only thing worse then force.com development tooling, is force.coms deployment/build tools. No automation its all manual. No easy way to move data between sandboxes either.

Our third approach was to just edit all our VF pages and Apex code in the browser. (not using their embedded editor that shows up in the bottom half of the page because that is buggy and slow) but just using the regular Editor under setup > develop > Apex classes. This worked ok. To supplement this we also had a scheduled job that would download all our code and save it into our SVN repository. We also built a tool that allow us to click a folder on our desktop and zip its contents and deploy it as static resources for us.

However this approach still has its short comings, i.e. it is slow and painful to develop in the cloud, their (salesforce) idea of Development As a Service is crazy. Also we have no real SCM we only have it acting as backups.

Bottom line is force.com is a CRM and not a Development platform, if you can? run, flee, get away from it as fast as you can. Using it for anything apart from a CRM is more trouble then it is worth. Even their Slogan "No Software" makes me laugh everytime

Daveo
Thanks for sharing how your group solved this. I did notice that their web page saving was much faster than their Eclipse plugin. Also, the tool to build/upload the static resources sounds like a great idea!
Akrikos
+1  A: 

When working with the Force.com platform my current organisation has found a number of different approaches can work depending on the situation. We all use the Eclipse Force.com plugin without issues and have found the following set ups to work well.

We have a centralised version control system that we deploy from using a series of ant commands to a developer org instance. We then depending on the scope of the work either separate it off into chunks with each developer having their own development org and merging the changes and testing them regularly, or working in a single development org together (which if you have 2 developers should be no major problem) allowing you to have almost instant integration.

If you are both trying to work on the same file you should be pair programming anyway, but if working on two components of a similar system together, sharing the same org can allow you to develop in a fast and flexible manner by creating the skeleton of the system you wish to use and then individually fleshing out the detail.

I have used both methods extensively and a I say, work really well depending on the situation.

pbattisson
That's a really well worded answer. Very clear. Also, this is exactly what we ended up doing.
Akrikos
I changed the answer to this because it is such a well worded and helpful answer. While Eyescream's has a nifty trick, this answer would be more helpful to those that come to look at this later.
Akrikos