LabVIEW Development Best Practices Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Requesting feedback for how you organize/use projects

I am one of the developers working on the LabVIEW project, and I have heard a lot of feedback regarding large application development pains, primarily in the source code control domain. While the project stores most of its data in the .lvproj file and the file is XML-based to make it human readable(mostly), the current design of how LabVIEW persists the data makes it difficult to diff and merge the file.

The primary cause of this problem is that currently, the project writes out its source files along with its project layout in the same XML hierarchy. In addition to this, selecting an arrange-by option actually changes the persisted project file layout. I'm looking at changing that so that the arrange-by options merely affect the display of the project, but will leave the source in the XML untouched. This way, everything should remain a lot more consistent and easier to diff/merge.

Currently, the project allows 4 main types of sorting: arrange by name, arrange by path, arrange by type, and a custom arrange (drag items wherever you want). The first three options are fairly easy to alter such that they don't change the source, however the last one is very difficult. No matter how you look at it, the project layout if very much a part of the project file. If we were to allow users to drag things wherever they wanted, it would most definitely make things harder to diff/merge and I'm not sure that can really be helped.

Edit: As requested, here are some picutes to show the different sorting mechanisms we have. Keep in mind that sorting can be as granular as on a per folder basis. You can also sort the entire project, or some subset of containers.

Custom Sort, I can drag any items anywhere I want, even in a folder

Project_CustomSort.jpg

Sort by Name, everything is listed in alphabetical order

     Project_SortByName.jpg

     Sort by path, everything is sorted by their path on disk

Project_SortByPath.jpg      

Sort by type, things are sorted alphabetically by type

Project_SortByType.jpg

So here's my question to all of you who develop projects, especially those who use some form of source code control and share the project among developers. How do you handle your source that is in your project? Do you use one of the three defined arrange-by options? Do you drag things around within a folder such that one of the three arrange-by options aren't sufficient? Would you care if you weren't able to drag things in a custom order within a given container? Is this an option that you'd like to have at the expense of potentially making project files more difficult to merge and diff?

I haven't touched upon another large problem (build specs), but I will be handling that somewhat differently. I already have a few ideas on how to approach that one, so rest assured that these issues are being looked at.

It'd be great to hear feedback from anyone who is interested in sharing!

Jayson

0 Kudos
Message 1 of 12
(8,788 Views)

"Do you drag things around within a folder such that one of the three arrange-by options aren't sufficient? Would you care if you weren't able to drag things in a custom order within a given container? Is this an option that you'd like to have at the expense of potentially making project files more difficult to merge and diff?"

Could you provided some images to go with this text?

I like the freedom of being able to arrange VIs as I choose. I'll watch for the image to support your query but what I think I heard you propose will complicate VLOOP.

Here is an image from this thread in the NI Discusion forum that illustrates how I use the Project in a LVOOP app.

http://forums.ni.com/ni/attachments/ni/170/379784/1/File_vs_Items.PNG

I hope that helps!

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 12
(4,198 Views)

I have updated my original post to include screenshots of the different types of arrangements that are possible in the project.

I suspect that some people will definitely want the ability to arrange things in their project however they want. If LabVIEW continues to let users do that, then those cases will remain difficult to work well with source code control. I suppose that is a tradeoff that we can let the user make.

0 Kudos
Message 3 of 12
(4,198 Views)

I personally like and use the custom sort and I also use the alphabetical sort and the sort by type.

However, I didn't have the need to merge a project. If I had, I would probably prefer that to the custom sort. I don't think you'll be able to reconcile this, as you'll always have users who don't need to merge.


___________________
Try to take over the world!
0 Kudos
Message 4 of 12
(4,198 Views)

Yair wrote "I don't think you'll be able to reconcile this, as you'll always have users who don't need to merge."

I agree.

I suggest you give the user the option to choose their own poison. If they turn on SC support, they loose the option that complicates it.

Just makes sure it is clear and easy how to switch back and forth since in the morning I may be working under SC and in the afternoon doing a solo routine.

Ben

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 12
(4,198 Views)

I was pretty sure that I wouldn't be able to get away with removing the custom sort functionality. I have a few ideas on ways to still make projects play nicer with SCC, although the minute someone does a custom sort, then it will no longer be a clean diff/merge. That might just be something users have to get used to, and if they want to have clean diffs/merges, then custom sorting shouldn't be used.

0 Kudos
Message 6 of 12
(4,198 Views)

the minute someone does a custom sort, then it will no longer be a clean diff/merge.

If (Custom_Sort == True AND SCC_Enabled == True)

Then

       Warn them once but do it anyway

Else

But make sure there is a big write-up in the release and upgrade notes.

Ben

PS It is the un-announced changes that really bug us. Make sure it gets documented.

RE: Documentation

I was reading the safety instruction for a pager some years ago and was entertained by the warning "Do not eat battery door!" So if the pager company can document something like that, I would expect NI do do similarly with the type of change we have been talking about.

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 7 of 12
(4,198 Views)

I agree with you. However, I believe that if they perform a custom sort, the behavior is as it is today. So in this case, it's just that if they don't perform custom sorting, they get added benefit for free

I will make sure that something goes into upgrade notes at some point, should I be successful in maintaining all existing functionality in addition to making it play nicer with SCC in some cases.

0 Kudos
Message 8 of 12
(4,198 Views)

Warning - do not eat the project window.


___________________
Try to take over the world!
0 Kudos
Message 9 of 12
(4,198 Views)

I never have to merge the project file but I often customize the order of appearance.

I'm a little confused why this presents a problem for scc.  I mean, I understand why the differences in the project file show up, but why is that a problem?  Is it just the inconvenience of having to diff the project file when someone changes the order?  Is it because each developer on the project wants to have the files in an order they decide on?  If the order of the files in each of the folders needs to be computer specific couldn't you save that info in the .aliases file.  That typically isn't saved to scc.

0 Kudos
Message 10 of 12
(4,198 Views)