It's all about the answers!

Ask a question

Is there a wiki site for RTC API examples?


Andy Jewell (24236174) | asked Oct 13 '15, 11:22 a.m.
Whenever I embark on a new customization, it takes three or four times longer than I anticipate.  Doing simple things turns into a week long journey of google searching, experimentation, and trial and error.

The forum is a huge help as well as Ralph's blog and an occasional hit on another blog here or there.  However, it's still extremely time consuming to sort through all the "close matches", partial answers, and/or wrong and non-answers in order to find out how to do something like, oh, I don't know, load a workspace into a sandbox.

The developer wiki is sort of nice but sadly out dated.

Does it exist or would it be possible to get a wiki on the Jazz site that users could use where we could create an almanac of RTC plain Java API sample snippets?  I think with the right skeleton (something flat and easily navigated) it could become a nice resource for learning and working with the API.  It would be nice to have a standard format such as:

Title:               Creating a workspace
Description:  Creating a new workspace seeded from a stream configuration
Links:
  •  Other useful links
  •  To forum posts
  •  Blogs
  •  Etc

Snippet:
    public IWorkspaceConnection createWorkspace(String srcstream, String wspacename)
            throws RtcException {
        IWorkspaceConnection workspace = null;
        String description = String.format("%s created from stream %s as of %tr",wspacename,srcstream,new Date());
        try {
            // try to see if this ws exists
            workspace = getWorkspace(wspacename);
            if(workspace!=null){
                log.warn("Workspace seems to have already existed!");
            } else {
                log.debug("Trying to create {} from stream {}",wspacename,srcstream);
                // get stream configuration
                IWorkspaceConnection streamspace = WorkspaceUtility.getWorkspace(session, RtcSelector.stream, srcstream);
                workspace = SCMPlatform.getWorkspaceManager(session.getRepo()).createWorkspace(session.getRepo().loggedInContributor(), wspacename, description, streamspace, streamspace, session.getMonitor());
            }
        } catch (TeamRepositoryException e) {
            throw new RtcException("Could not create workspace",e);
        }
        return workspace;
    }
This is not a great example because it has some of my own local wrappers built-in, but there might be guidelines that suggest to minimize logging, un-referenced method calls, etc.

Thoughts?

Andy

Accepted answer


permanent link
Ralph Schoon (63.1k33645) | answered Oct 13 '15, 1:40 p.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
There is nothing right now. Therefore I created my blog.
Andy Jewell selected this answer as the correct answer

Comments
1
Tiago Moura commented Oct 14 '15, 9:27 a.m.

 My blog is far from the ralph's blog, but I share some usefull code and tips.


Ralph Schoon commented Oct 14 '15, 9:36 a.m. | edited Oct 14 '15, 9:41 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

The concern is that IBM can be sued by copyright trolls big time and a process to review and clean everything is just impractical.

What you can do is to post it to a private blog and maybe leave the sources in a public Dev Ops services project/Bluemix project or provide the link e.g. using Dropbox or some other download site (that is what I do).

If you do, let me know, I try to collect links and repost etc. on my blog to make them easier to search.


Ralph Schoon commented Oct 14 '15, 9:40 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Tiago, I added your blog me to my "More Jazz Blogs". If you disagree, please let me know


Andy Jewell commented Oct 14 '15, 11:20 a.m.

Yes, I'm a big consumer of your blog, Ralph, thank you very much, it's an awesome resource!

Tiago, now that you give me the link I realize I've used that source many times I just never realized it was a blog;)  It integrates nicely into DW.  Ha, good stuff for sure!

Ok, I am saying this question is answered but the answer is essentially "no", there is not a snippet reference wiki site.  The blogs I consider more in-depth which are obviously extremely valuable but I am still looking for more of a simple almanac, i.e., snippet index.  I'll investigate some kind of private approach.  Thanks for your help!


Ralph Schoon commented Oct 14 '15, 11:46 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

I have given up on it. we have asked for something like that but could never get an agreement. Either it is IBM only or it is not on IBM sites.

Your answer


Register or to post your answer.


Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.