Toad World® Forums

Team Coding - Initial Thoughts

We are really late in the game for using Team Coding. I am in the process of getting things set up for using Team Coding with Git (which are are just now switching over to) and have some thoughts and comments.

To help you understand our perspective on how we want to use Team Coding, for the most part, my co-worker works on certain objects and I work on different ones, but occasionally we’ll overlap, especially if one of us is out of the office when something breaks. We have always used the database as the source of code when we fix each other’s code because we are not always great at getting the code checked into source control in a timely manner.

  1. We made the decision to basically start over in Git with our code and if we want history, we can go back to Subversion. So I have used the schema export and selected the schemas we are putting into TeamCoding. Looking at the directory structure created there, versus the directory structure created by the Team Coding when I set up my project, there are different names used for the different object types. How do I get the names to be consistent between these without having to rename them for every schema I put in Team Coding?

  2. When I have the Team Coding Manager open, I can check in and check out from there, but if I drag an object, it simply drags the reference, not the code for that object. I’m looking now at a View I have in Team Coding. So instead I went to Load Database Object, but I can’t load a view from there. Our new standard is that we will always use the code for the object from the DB and use Git only for the history of the code if needed, so this is rather a pain if I want to edit the code for a view.

It feels like Team Coding Projects and the Source Control side of things are two separate things in Toad despite the fact that they have to be set up together. I would expect them to work a little more in tandem with each other. If not, it might make sense to not even use the Git side of things in Toad and instead just export the DB code every night and then pull it into Gif using an action.

Does this make any sense? Am I missing the point of how this should be done?

Blessings,

Phyllis


Phyllis Helton

Data Magician
Digital Products & Strategies, Cru | Data Sciences & Analytics
Office :phone: 407-515-4452

phyllis.helton@cru.org

Hey Phyllis,

My first question is: what is prompting the switch from Subversion to Git? If Toad is the main reasoning in this decision, it doesn't need to be as Toad will work with Subversion in a Team Coding or file-based source control fashion. They're also two very different version control providers: Git being distributed and Subversion being centralized. They will work very differently when trying to use them outside of Toad.

To answer your first question: you shouldn't need to use the generate schema script, or any other export utility, inside of Toad to place that DDL into Team Coding. By simply defining your Team Coding project, Toad will automatically handle the DDL export of any object you create (or alter) and pass that DDL to your VCS provider. If all you're trying to do is create a revision in the VCS for your schema, you can accomplish this by right-clicking on the schema node in the Team Coding Manager tree and selecting "Create new revision in the VCS" from the context menu . Team Coding will automatically handle the rest.

If you want to change your VCS directory structure, you can customize that in the Team Coding configuration window. The first option would be to define how you want the folders structured. This can be selected via the "Subfolder Structure" box here:

Once you have the subfolder structure selected, you can customize the folder names by clicking on the "Customize File Options" button in the toolbar (TC_Customize.jpeg). This will open a dialog which allows you to customize the name for each object type folder as well as the file extension for each object type.

TC_Config2.jpeg

For your second question: this is actually the default behavior for certain object types in the editor. Whenever you drag and drop an object to the editor, you're only passing the object reference. This is the same if you dragged and dropped an object from the Schema Browser or Object Palette to the editor. It's up to the editor to load the object based on its type. Certain objects (primarily non-PL/SQL objects) only add the reference to the object. If memory serves, the assumption is that you would want to add a reference to that object as part of writing a custom script., rather than loading the DDL for that object. For PL/SQL objects, it loads the DDL into the editor. This is also the reason why those object types are the ones included in the "Load object from Database" button.

When working with Tables, Constraints, Indexes, and Views, you can "Check Out" the object, alter it, and "Check in" the object from the Schema Browser and it will maintain the DDL and version history automatically. You can then view that history either by right-clicking on the object and selecting "Show Properties" and clicking on the "Show Revision History" button, or by selecting "Show Team Coding Objects" from the "Team Coding" main menu.

Note: If you're using Git, you'll only see your own revision history when you select "Show Properties" and "Show Revision History" unless you routinely perform manual pushes and pulls to your centralized Git repository to make sure your local repository is synced up.

Lemme know if this helps with getting you started with Team Coding.

-John

Hi John,

Thanks for the reply.

First, our reason for switching to Git is related to trying to standardize the source control provider. Our team didn’t have a lot of input in that, but it works for us. :slight_smile:

Let me explain what I’m trying to do, and that might help.

I have a project set up with all the Views and PL/SQL type objects owned by 2 different users. In the future, we’ll have more users. Right now, none of these objects are in Git - we have a clean slate.

The first thing I tried to do was make changes to a view. I opened the Team Coding Manager and saw that all the views there have a green check box next to them. I selected one of the views and right-clicked - selected Check Out. (Incidentally, it doesn’t appear that the check-out worked, but that might be something I’ve done wrong) Now I want to edit the view. Dragging it just puts the name in the editor - that’s not what I want. So I do an F4 on the name of the view in the Team Project window - nothing happens. There are no options on the right-click menu to add the code to the editor either. Sigh.

Now I go to the Open Object dialog box. I drop down the Object Type combo box, but don’t see View there, so I select All. Still no views. Cancel out of that and pull the name of the view into the editor and F4, Select All Copy and then paste into the Editor. Finally I can start working on my view.

Once I make the changes to the view, I need to get the changes into my file for Git, so now I have to do a Save As and navigate to the appropriate folder (or have lots of folders in my favorites) and then save and overwrite the existing file - because I selected from the DB and there is no association with a file on the disk.

Does it make sense what I’m trying to do and why this feels very cumbersome to me? Even if we decide that we don’t care about the history aspect of the Team Coding and only use the Team Projects to make sure we are checking objects in and out to not step on each other’s toes, this still seems very cumbersome to edit a view.

Here is what I would expect or just want to happen with Team Coding. :slight_smile:

  1. I set up my Project and tell it the folder location and structure on my hard drive so it can associate the objects with files on disk.

  2. When I want to check out an object, it gives me the choice (or I set an option for it to remember) of opening the object from a file or the DB

  3. I open the object in the editor directly from the Team Project window, edit and then when I compile it automatically saves it to the local file as well (or gives me an option)

Blessings,

Phyllis

On Fri, Apr 1, 2016 at 11:23 AM, John Bowman bounce-jbowman@toadworld.com wrote:

RE: Team Coding - Initial Thoughts

Reply by John Bowman
Hey Phyllis,

My first question is: what is prompting the switch from Subversion to Git? If Toad is the main reasoning in this decision, it doesn’t need to be as Toad will work with Subversion in a Team Coding or file-based source control fashion. They’re also two very different version control providers: Git being distributed and Subversion being centralized. They will work very differently when trying to use them outside of Toad.

To answer your first question: you shouldn’t need to use the generate schema script, or any other export utility, inside of Toad to place that DDL into Team Coding. By simply defining your Team Coding project, Toad will automatically handle the DDL export of any object you create (or alter) and pass that DDL to your VCS provider. If all you’re trying to do is create a revision in the VCS for your schema, you can accomplish this by right-clicking on the schema node in the Team Coding Manager tree and selecting “Create new revision in the VCS” from the context menu . Team Coding will automatically handle the rest.

If you want to change your VCS directory structure, you can customize that in the Team Coding configuration window. The first option would be to define how you want the folders structured. This can be selected via the “Subfolder Structure” box here:

Once you have the subfolder structure selected, you can customize the folder names by clicking on the “Customize File Options” button in the toolbar (). This will open a dialog which allows you to customize the name for each object type folder as well as the file extension for each object type.

For your second question: this is actually the default behavior for certain object types in the editor. Whenever you drag and drop an object to the editor, you’re only passing the object reference. This is the same if you dragged and dropped an object from the Schema Browser or Object Palette to the editor. It’s up to the editor to load the object based on its type. Certain objects (primarily non-PL/SQL objects) only add the reference to the object. If memory serves, the assumption is that you would want to add a reference to that object as part of writing a custom script., rather than loading the DDL for that object. For PL/SQL objects, it loads the DDL into the editor. This is also the reason why those object types are the ones included in the “Load object from Database” button.

When working with Tables, Constraints, Indexes, and Views, you can “Check Out” the object, alter it, and “Check in” the object from the Schema Browser and it will maintain the DDL and version history automatically. You can then view that history either by right-clicking on the object and selecting “Show Properties” and clicking on the “Show Revision History” button, or by selecting “Show Team Coding Objects” from the “Team Coding” main menu.

Note: If you’re using Git, you’ll only see your own revision history when you select “Show Properties” and “Show Revision History” unless you routinely perform manual pushes and pulls to your centralized Git repository to make sure your local repository is synced up.

Lemme know if this helps with getting you started with Team Coding.

-John

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - Beta notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag this post as spam/abuse.


Phyllis Helton

Data Magician
Digital Products & Strategies, Cru | Data Sciences & Analytics
Office :phone: 407-515-4452

phyllis.helton@cru.org

Hey Phyllis,

Your thought process makes sense, but I think you’re overthinking it a bit. :slight_smile:

You’re correct in that the green circle means the object is available. From here, you can “check out” the object or open it (using the right-click menu and selecting “Open”, or simply double-clicking on the object). Using Git, you’ll be working in a local copy (or clone) of your master repository – you won’t be working directly in GitHub (or an equivalent).

When you check out the object, you should see a message in your output window that the object has been successfully checked out. When you open the object (either by selecting “Open” or double-clicking the object): if the object is a PL/SQL object, its DDL will automatically open in the editor; otherwise, the object will open in the Schema Browser.

To work with DDL for a non-PL/SQL object, you’d need to do what you stated: view the source in the Schema Browser or Describe window, select all, and copy it to the editor. We can look at adding F4 functionality to the Team Coding Manager window.

However, once you’ve compiled the DDL in the editor (or finished making changes in the Alter window of the Schema Browser), all you need to do is press the “Check-in” button. You don’t need to manually save anything. Team Coding will handle all the file manipulation with the VCS provider internally.

In Team Coding, unless you’re specifically working with a custom script, all you need to worry about is working directly with your objects in the database. You don’t need to worry about loading or saving files at all – Team Coding will handle all of that behind the scenes.

Does that help to make a bit further sense?

-John


From: phyllis.helton_1150 [bounce-phyllishelton_1150@toadworld.com]

Sent: Friday, April 01, 2016 2:03 PM

To: toadoraclebeta@toadworld.com

Subject: RE: [Toad for Oracle - Beta Discussion Forum] Team Coding - Initial Thoughts

** RE: Team Coding - Initial Thoughts**

Reply by phyllis.helton_1150
Hi John,

Thanks for the reply.

First, our reason for switching to Git is related to trying to standardize the source control provider. Our team didn’t have a lot of input in that, but it works for us. :slight_smile:

Let me explain what I’m trying to do, and that might help.

I have a project set up with all the Views and PL/SQL type objects owned by 2 different users. In the future, we’ll have more users. Right now, none of these objects are in Git - we have a clean slate.

The first thing I tried to do was make changes to a view. I opened the Team Coding Manager and saw that all the views there have a green check box next to them. I selected one of the views and right-clicked - selected Check Out. (Incidentally, it doesn’t appear that the check-out worked, but that might be something I’ve done wrong) Now I want to edit the view. Dragging it just puts the name in the editor - that’s not what I want. So I do an F4 on the name of the view in the Team Project window - nothing happens. There are no options on the right-click menu to add the code to the editor either. Sigh.

Now I go to the Open Object dialog box. I drop down the Object Type combo box, but don’t see View there, so I select All. Still no views. Cancel out of that and pull the name of the view into the editor and F4, Select All Copy and then paste into the Editor. Finally I can start working on my view.

Once I make the changes to the view, I need to get the changes into my file for Git, so now I have to do a Save As and navigate to the appropriate folder (or have lots of folders in my favorites) and then save and overwrite the existing file - because I selected from the DB and there is no association with a file on the disk.

Does it make sense what I’m trying to do and why this feels very cumbersome to me? Even if we decide that we don’t care about the history aspect of the Team Coding and only use the Team Projects to make sure we are checking objects in and out to not step on each other’s toes, this still seems very cumbersome to edit a view.

Here is what I would expect or just want to happen with Team Coding. :slight_smile:

  1. I set up my Project and tell it the folder location and structure on my hard drive so it can associate the objects with files on disk.

  2. When I want to check out an object, it gives me the choice (or I set an option for it to remember) of opening the object from a file or the DB

  3. I open the object in the editor directly from the Team Project window, edit and then when I compile it automatically saves it to the local file as well (or gives me an option)

Blessings,

Phyllis

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or
Unsubscribe from Toad for Oracle - Beta notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag
this post as spam/abuse.

Hey Phyllis,

Oops… I forgot we don’t have an “Open” menu item in the right-click context menu. To open an item, you simply double-click it in the Team Projects tree.

Also, you don’t have to manually check out an object before opening it. When you double-click an object to open it, Toad will prompt you to automatically check the object out before it opens. That way, you can simply work with your objects rather than worrying about manually checking them out first.

-John


From: John Bowman

Sent: Friday, April 01, 2016 4:46 PM

To: toadoraclebeta@toadworld.com

Subject: RE: [Toad for Oracle - Beta Discussion Forum] Team Coding - Initial Thoughts

Hey Phyllis,

Your thought process makes sense, but I think you’re overthinking it a bit. :slight_smile:

You’re correct in that the green circle means the object is available. From here, you can “check out” the object or open it (using the right-click menu and selecting “Open”, or simply double-clicking on the object). Using Git, you’ll be working in a local copy (or clone) of your master repository – you won’t be working directly in GitHub (or an equivalent).

When you check out the object, you should see a message in your output window that the object has been successfully checked out. When you open the object (either by selecting “Open” or double-clicking the object): if the object is a PL/SQL object, its DDL will automatically open in the editor; otherwise, the object will open in the Schema Browser.

To work with DDL for a non-PL/SQL object, you’d need to do what you stated: view the source in the Schema Browser or Describe window, select all, and copy it to the editor. We can look at adding F4 functionality to the Team Coding Manager window.

However, once you’ve compiled the DDL in the editor (or finished making changes in the Alter window of the Schema Browser), all you need to do is press the “Check-in” button. You don’t need to manually save anything. Team Coding will handle all the file manipulation with the VCS provider internally.

In Team Coding, unless you’re specifically working with a custom script, all you need to worry about is working directly with your objects in the database. You don’t need to worry about loading or saving files at all – Team Coding will handle all of that behind the scenes.

Does that help to make a bit further sense?

-John


From: phyllis.helton_1150 [bounce-phyllishelton_1150@toadworld.com]

Sent: Friday, April 01, 2016 2:03 PM

To: toadoraclebeta@toadworld.com

Subject: RE: [Toad for Oracle - Beta Discussion Forum] Team Coding - Initial Thoughts

RE: Team Coding - Initial Thoughts

Reply by phyllis.helton_1150
Hi John,

Thanks for the reply.

First, our reason for switching to Git is related to trying to standardize the source control provider. Our team didn’t have a lot of input in that, but it works for us. :slight_smile:

Let me explain what I’m trying to do, and that might help.

I have a project set up with all the Views and PL/SQL type objects owned by 2 different users. In the future, we’ll have more users. Right now, none of these objects are in Git - we have a clean slate.

The first thing I tried to do was make changes to a view. I opened the Team Coding Manager and saw that all the views there have a green check box next to them. I selected one of the views and right-clicked - selected Check Out. (Incidentally, it doesn’t appear that the check-out worked, but that might be something I’ve done wrong) Now I want to edit the view. Dragging it just puts the name in the editor - that’s not what I want. So I do an F4 on the name of the view in the Team Project window - nothing happens. There are no options on the right-click menu to add the code to the editor either. Sigh.

Now I go to the Open Object dialog box. I drop down the Object Type combo box, but don’t see View there, so I select All. Still no views. Cancel out of that and pull the name of the view into the editor and F4, Select All Copy and then paste into the Editor. Finally I can start working on my view.

Once I make the changes to the view, I need to get the changes into my file for Git, so now I have to do a Save As and navigate to the appropriate folder (or have lots of folders in my favorites) and then save and overwrite the existing file - because I selected from the DB and there is no association with a file on the disk.

Does it make sense what I’m trying to do and why this feels very cumbersome to me? Even if we decide that we don’t care about the history aspect of the Team Coding and only use the Team Projects to make sure we are checking objects in and out to not step on each other’s toes, this still seems very cumbersome to edit a view.

Here is what I would expect or just want to happen with Team Coding. :slight_smile:

  1. I set up my Project and tell it the folder location and structure on my hard drive so it can associate the objects with files on disk.

  2. When I want to check out an object, it gives me the choice (or I set an option for it to remember) of opening the object from a file or the DB

  3. I open the object in the editor directly from the Team Project window, edit and then when I compile it automatically saves it to the local file as well (or gives me an option)

Blessings,

Phyllis

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - Beta notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag this post as spam/abuse.

Hey Phyllis,

F4 functionality has been added to the Team Coding Manager window for today’s beta.

-John

Thank you, John! That will help.

I noticed that I can double-click on the Packages and Procedures and have the code load in the Editor. Double-clicking on Views doesn’t do anything. I also noticed that for Views in the Schema Browser there is no option to Load in Editor. That would be handy, especially now that I am going to be loading objects from the DB. :slight_smile:

This isn’t the first time I’ve been guilty of overthinking things. :slight_smile:

On Mon, Apr 4, 2016 at 11:48 AM, John Bowman bounce-jbowman@toadworld.com wrote:

RE: Team Coding - Initial Thoughts

Reply by John Bowman
Hey Phyllis,

F4 functionality has been added to the Team Coding Manager window for today’s beta.

-John

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - Beta notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag this post as spam/abuse.


Phyllis Helton

Data Magician
Digital Products & Strategies, Cru | Data Sciences & Analytics
Office :phone: 407-515-4452

phyllis.helton@cru.org

Hey Phyllis - for views, you can go to script tab and click “send to editor”. Not sure if that will do anything regarding TC or not…

Thanks John. I was actually hoping that if it was an action on the right-click menu there, I could just use the Action Console on the view name to load the view in the Editor and save a couple clicks. Especially now that I will be having the Team Coding Manager open most of the time.

I did notice that double-clicking on a function in the Team Coding Manager loads the object into the editor - that would be my preferred solution to this whole thing - for that to work for all objects from the Team Coding Manager. (We don’t have tables, sequences or indexes in Team Coding, so you don’t have to make it possible to do it for those if you don’t want) :slight_smile:

On Mon, Apr 4, 2016 at 1:27 PM, John Dorlon bounce-jdorlon@toadworld.com wrote:

RE: Team Coding - Initial Thoughts

Reply by John Dorlon
Hey Phyllis - for views, you can go to script tab and click “send to editor”. Not sure if that will do anything regarding TC or not…

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - Beta notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag this post as spam/abuse.


Phyllis Helton

Data Magician
Digital Products & Strategies, Cru | Data Sciences & Analytics
Office :phone: 407-515-4452

phyllis.helton@cru.org

Double-click is reserved in the SB to launch the “alter” dialog, which for pl/sql objects, is the Editor. But I added a rt-click -> Send to Editor for views.

Thanks John!

On Mon, Apr 4, 2016 at 4:26 PM, John Dorlon bounce-jdorlon@toadworld.com wrote:

RE: Team Coding - Initial Thoughts

Reply by John Dorlon
Double-click is reserved in the SB to launch the “alter” dialog, which for pl/sql objects, is the Editor. But I added a rt-click -> Send to Editor for views.

To reply, please reply-all to this email.

Stop receiving emails on this subject.

Or Unsubscribe from Toad for Oracle - Beta notifications altogether.

Toad for Oracle - Beta Discussion Forum

Flag this post as spam/abuse.


Phyllis Helton

Data Magician
Digital Products & Strategies, Cru | Data Sciences & Analytics
Office :phone: 407-515-4452

phyllis.helton@cru.org