Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Visual Studio.NET / IDE / October 2007

Tip: Looking for answers? Try searching our database.

Multiple developers using the designer

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
naromi - 04 Oct 2007 20:20 GMT
Hi,
I'm asking how two developers can work at the same time on a Windows
Form project, both of them working with the designer of the same form.
The problem arise when you need to synchronize the
[FormName].Designer.cs file, that even with little changes, seems to
be in conflict in most of the lines of code.

Any suggestion?

Thanks!
Justin Rich - 05 Oct 2007 17:17 GMT
i dont really think you can do that, basically what your saying is, have two
people edit a single file at the same time... just like anything else,
databases, file systems, etc etc you can only have one process (person,
thread, how ever you want to look at it) edit the file at once... typically
how things are done for group development is one guy builds the interface
and another guy builds a class... or something like that.. basically each
guy is working on a different file..

but bottom line is, two people cant edit the same file at once, someone will
always lose data...

Justin
> Hi,
> I'm asking how two developers can work at the same time on a Windows
[quoted text clipped - 6 lines]
>
> Thanks!
naromi - 06 Oct 2007 12:08 GMT
Hi Justin,
thanks for your reply.

Using a version control system (as CVS, SVN, ...) you can actually
edit the same file at the same time, the system will check for update
and if possible it will merge the 2 different versions. The problem
here is that the designer auto-generated code is most of the time
rewritten after any change, and any component is put there in a random
order, making the merge not so easy.

Could there be a way to split the auto-generated code in more than one
file? Or just to move some initializations away from the Designer.cs
file?

Thanks!

Davide
James Crosswell - 08 Oct 2007 19:18 GMT
> Hi Justin,
> thanks for your reply.
[quoted text clipped - 9 lines]
> file? Or just to move some initializations away from the Designer.cs
> file?

The Designer.cs file is just a partial class and you could split this
into multiple files using the same principle... but your designer is
only ever going to be putting it's changes into one of these. So the
answer, in short, is no you can't do what you want to.

The only solution available to you is to merge the changes when designer
number 2 checks his changes into the VCS. In a few situations these
changes might be incompatible (if both designers were modifying
properties/events of the same components) but generally speaking a
descent file compare tool should let you merge changes without any
problem (although not without a considerable amount of effort in the
case of the Designer.cs file). If the compare tool you're using at the
moment sux I could recommend CompareIt! (which I've been using for years
- very slick).

I would have to say that what you're trying to do is basically not a
good idea though. If you have multiple developers working on different
aspects of the same interface, you should try to split the interface
into components and have each developer build only the component(s) that
he/she is responsible for. If that's still not enough flexibility for
you then you could go for a plugin based approach/framework - which
gives you the advantage of a formal contract that you can define to
specify the interaction between one developer's components/plugins and
another's.

Best Regards,

James Crosswell
Microforge.net LLC
http://www.microforge.net

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.