In the continuation of the
article about installing Caché on Linux, I will describe what IDEs are in the developer’s arsenal on InterSystems technologies that chose Linux as their home system. Currently, there is no wide variety of possibilities, possibly because the official Caché Studio development environment is supplied only for the Windows operating system family. But the options are still there. Under the cut that is already available now, and that it is possible to wait in the future.
Caché studio
Let's start with the official IDE InterSystems. Caché Studio is a Windows application, so Wine will be required to run it under Linux. The distribution kit can be downloaded
here , the Client Components package, a 32 or 64 bit distribution kit. I will not give a description of the installation of Wine here - it is easy to find it on the network. After installing Wine, install Studio just as if we did it under Windows. Frankly, on CentOS 6.5, my installer didn't start for some reason, but on Ubuntu it has been working quite successfully for a long time. Subjective impressions - there are performance problems, as well as studio web-wizards are not quite adequately working to create new classes and work with code templates. So Studio for Wine is a very convenient tool for developing for Linux in Caché, I would not call it.
NBStudio
Working in such popular Java IDEs as NetBeans, Eclipse, Intelliji IDEA, there is a seductive idea to use some of their functionality when developing code in Caché. Therefore, I decided to try to create an alternative to the studio, which includes the most popular features of modern IDEs, which are not available in Caché Studio. So I started the NBStudio project - IDE for Caché based on the NetBeans platform. An open source project laid out on a
githaba . Unfortunately, commits are not frequent, but I continue to work on the project. There is not so much free time that I can spend on the project, so I will be very happy with any help in the form of pull requests and any proposals for development and design, of course, I will not give up on material support.
The first goal of the project is to repeat the functionality of the original studio.
Today implemented:
- View and edit code classes and mac-rutin
- Highlighting code and some errors. The grammar is described on ANTLR4 , not fully implemented. When highlighting code and errors, it still does not work perfectly.
- Dialog box for opening a file, similar to what we have in the studio. File filters, filter buttons, connection options.
- Ability to work with multiple servers, areas (in the original studio only one simultaneous connection is possible).
In the plans:
- Work with projects: open, create, manage project content. (Currently in development).
- Creating new classes, routines, etc. (Currently in development).
- Inspector code in the classroom.
- Support for other MUMPS systems.
- Support for different versions. Currently supported version is Caché 2013.1.
Steps for installing NBStudio on Linux CentOS 6.5.
Download the latest release of NBStudio
here . For Linux we take nbstudio-linux.sh. Before installing NBStudio, you need to install Oracle JavaJDK 7, you can get it
here . After installing Java, run the installation of NBStudio, the graphical installer, like in NetBeans, is quite simple - it shouldn't cause any difficulties.
We start - if you click on Connections, you can call the window for creating a new connection.
')
After connecting, a list of classes and routines appears.
More screenshots
The file open dialog, filters are available, the ability to display system classes / routines, and generated.
Dialogue of the project opening.
View open project.
Creating a new file (while in operation).
Sublimecache
This is a Brandon Horst project, posted on a githaba
here . As the name implies, this is a SublimeText plugin for development with Caché. It requires an installed server part in Caché 2014.1 or higher, which can be found
here . The server part is a REST application that accesses the necessary functions.
Currently available features:
- Connection to several areas on different instances.
- Loading and unloading code classes and routines.
- The ability to open a class in the browser, for (CSP / ZEN / SOAP).
- Import / Export in XML format.
- Run a SQL query and see the result directly in Sublime.
Installation
We assume that SublimeText 3 is already installed; if not, you can take it
here . It is also necessary that the PackageControl plugin be installed - about its installation, and where to get the distribution kit described
here .
Install PackageControlThere are two ways to install this plugin:
Manually
- Download the plugin file by reference .
- Preferences> Browse Packages ...
- A folder will open, go up one level and enter the Installed Packages folder, transfer the downloaded plug-in file to this folder.
- Restart Sublime Text
Easy way
Open the console Ctrl + `or menu View> Show Console
In the console, enter the text:
import urllib.request,os,hashlib; h = '7183a2d3e96f11eeadd761d777e62404' + 'e330c659d4bb41d3bdf022e94cab3cd0'; pf = 'Package Control.sublime-package'; ipp = sublime.installed_packages_path(); urllib.request.install_opener( urllib.request.build_opener( urllib.request.ProxyHandler()) ); by = urllib.request.urlopen( 'http://sublime.wbond.net/' + pf.replace(' ', '%20')).read(); dh = hashlib.sha256(by).hexdigest(); print('Error validating download (got %s instead of %s), please try manual install' % (dh, h)) if dh != h else open(os.path.join( ipp, pf), 'wb' ).write(by)
Everything after this Package Control plugin is ready for work.
Installing the SublimeCache plugin
Before you start, you need to install the server part. The author writes in the limitations of the server part that will work only under Windows. This is probably due to the fact that% Compiler.UDL.TextServices.cls is not fully working under Linux. Namely, from what I noticed, the work with XData blocks is not entirely correct. And the installation process, which is proposed by the author himself, does not go through completely, since he uses this method to install the code.
I downloaded all the code, exported it to XML and posted it
here .
Install it now can be a single line.
zn "% SYS" sb = ## class (SYS.Database).% OpenId ($ zu (12, "cachelib")), bk = b.ReadOnly, b.ReadOnly = 0 d b.% Save () ss = "Github_CDEV", sn = "% CDEV.Server", u = "/ csp / sys / dev" d ## class (Security.SSLConfigs) .Create (s), ## class (Security.Applications) .Copy (" / csp / sys ", u," CDev REST Application "), ## class (Security.Applications) .Get (u, .p) sp (" DispatchClass ") = sn d ## class (Security.Applications) .Modify (u, .p) sr = ## class (% Net.HttpRequest).% New (), r.Server = "gist.githubusercontent.com", r.Https = 1, r.SSLConfiguration = sd r.Get ( "/daimor/11107056/raw/8b505a0b3172d1c0c9c9ad84cc4ab80e9714f9a8/%25CDEV.XML") d $ system.OBJ.LoadStream (r.HttpResponse.Data, "cd") s b.ReadOnly = b ackle v bhk response.
After executing the code, you can check it in operation by opening the API at
http: // localhost: 57772 / csp / sys / dev / , check that the Caché server port is correct in your case.
The server should give this answer:
{"namespaces":"/csp/sys/dev/namespaces","version":"v0.0.3"}
Now you can configure the plugin: Ctrl + Shift + P> Cache: Server Configuration Server. This should be something like this:
{ "current-server": "cache", "servers": { "cache": { "host": "127.0.0.1", "password": "SYS", "username": "_SYSTEM", "web_server_port": "57772" } } }
After saving the settings, you can select the connection (Ctrl + Shift + P> Cache: Change Server) and the workspace (Ctrl + Shif + P> Cache: Change Namespace).
Download file: Ctrl + Shift + P> Cache: Download File. It may take a while for Sublime to load the entire list.
I first had problems with syntax highlighting.
DecisionCreate a folder
/.config/sublime-text-3/Packages/InterSystems Cache / CacheColors
it download the contents of the
github.com/seanklingensmith repository
restart Sublime Text
Ctrl + Shift + P> Cache: Export File To XML. Shows the open file in XML format.
You can change the text of the file and upload it back to the server: Ctrl + Shift + P> Cache Upload and Compile File.
You can also view the generated code (another code): Ctrl + Shift + P> Cache: Open Generated Files
In general, quite a good alternative. It is clear that the solution still needs some work, but it is already a workable tool.
That's all the IDE Caché Linux projects that I know about. If you know any more, it will be curious to see in the comments.