August 31, 2011

New Perforce APIs Power Platform Play, Part I

Version Control

Since CEO Christopher Seiwald’s June 2011 keynote describing Perforce’s plans for “version everything” and Perforce as a platform, there’s been a flurry of activity to align development efforts with the vision. I spoke with Alan Teague, technical director and architect for Perforce as a platform, about the cornucopia of APIs his team built and supports.

Q: Has there been any internal reorganization since the User Conference?

A: Yes, my group name and focus on architecture is new. I was in integrations and plug-ins, but we now have a broader focus and more developer resources trained on the goal of Perforce as a platform. APIs offer a way to integrate and build on our platform.

Q: What APIs are on the horizon?

A: We have quite a few. There are scripting APIs for Perl, Python, Ruby, PHP, Javascript and Objective C (which is a compiled language, not really scripting). But we’re mainly working on P4Java, which is fully written in Java and doesn’t use C++. P4Java lets you tap into Perforce resources and files as first-class Java interfaces, classes, methods and objects, which makes it easy to integrate the API into Java applications and tools. We’ve built integrations with Ant, Maven and relational database systems for p4java as well.

Another exciting one is P4API.NET for .Net developers on Windows. This is key to building a new integration with Visual Studio. It brings Perforce a more modern Visual Studio integration, in place of the older P4SCC-based integration.

Finally, the P4WSP, Perforce Web Services Platform, gives developers a means of integrating with Perforce using industry standard protocols and formats such as HTTP, JSON and XML.

Q: So some of these are new and some are old?

A: Yes, people sometimes forget we have two other platforms. There’s P4Eclipse, which was built on top on P4Java a few years ago, and built in a way that people can extend it. And there’s also P4DTG, our defect tracking gateway. It has integrations with several defect trackers, like Bugzilla, Quality Center, Redmine, Fogbugz, MKS and Jira.

Q: To reiterate, the new or updated ones are--

A: The important ones in late 2011 and in 2012 are P4Java, P4API.NET, P4JsApi and P4WSP.

Q: What’s an example of what can be done with Perforce as a platform?

A: We’re building a new tool called The Commons as part of version everything. It’s a way for non-code developers and content creators to collaborate, version and share documents and artifacts. That’s being built on top of P4Java, using normal Java inheritance instead of a light cover of C++. Also, our own Chronicle product is built on top of the PHP interface, which is a very popular API. We’re hoping to see tool developers use these APIs to provide versioning technology for their applications. Anyone can use our APIs to create plug-ins that automate workflow, semantics, code review or build activities for their users.

Q: When can we expect these APIs?

A: Well, P4Java has beeen out for years. The P4API.NET will be going beta soon with the 11.1 products. Early versions of the javascript API are already in P4V. We’re working on enhancing and abstracting it so it can also be used with P4WSP. The web services API is slated for next year.