This is exactly what we do. We have an APP-CODE database, and the CI build process is basically:

  • pull the latest source from source control.
  • load the build script (which is an ObjectScript class that does the rest of the steps).
  • the build script then deletes the APP-CODE database and creates a fresh one.
  • populate the fresh APP-CODE database the source code checkout from the first step.
  • Run tests, collect results, etc
This way we can be sure that what is being tested in CI always matches what is in source control.

Unfortunately, you're probably going to have to convert the patterns by hand, and the regex syntax is slightly different from the traditional pattern match syntax, starting with the fact that repetition count comes after the item being matched. For example the pattern 1.6N becomes the regex \d{1,6}.

Fortunately, once you've got your patterns converted to regexes, you can use the regexes from Caché code thanks to the $Locate and $Match functions, as well as the %Regex.Matcher class which provides a richer interface to regex functionality.

The other answers point to some good resources that you should definitely look at. That said, the answer to your question is to build a REST API. You will need to create a new class that is a subclass of the %CSP.REST class. You can then add a UrlMap block that maps URLs to ClassMethods. Here's a simple example of such a dispatch class: 

Class REST.Handler Extends %CSP.REST
{

Parameter UseSession As Integer = 1;

/// The UrlMap determines how a Url should map to a HTTP Method and a Target ClassMethod
/// indicated by the 'call' attribute. The call attribute is either the name of a method
/// or the name of a class and method seperated by a ':'.
/// parameters within the URL preceeded by a ':' will be extracted from the supplied URL
/// and passed as arguments to the named method.
XData UrlMap
{
<Routes>
<Route Url="/HelloWorld" Method="GET" Call="HelloWorld" />
</Routes>
}


/// A simple test method to ensure that the REST infrastructure is working
ClassMethod HelloWorld()
{
Set obj = "message""Hello from REST" }
Write obj.%ToJSON()
Quit $$$OK
}

}

Finally, you need to create a new web application in the System Management portal and set your class as the Dispatch Class.  Once you have the dispatch class and web application set up, you can point your Angular app to the corresponding URL and use it like you would any other REST API.

Unfortunately, this doesn't really seem possible. Angular and Zen, being frameworks, both pretty much expect to have total control of what goes on in the page and will only get in each other's way. In particular, Angular tags don't play nicely with Zen's XML model. The good news is that you don't have to rewrite the whole application at once, and can start by writing new pages using Angular and creating REST APIs as needed, while still being able to keep the old Zen pages that you don't want to rewrite. You can even try to switch the Zen-based parts of the site to using css-based layouts rather than Zen's default table-based layouts with hgroups and vgroups to make the old and new pages look more similar.