Last Updated:

Source Code Library and EMS PostgreSQL Manager 

Source Code Library

It has long been noticed that the source code of software products has such a remarkable feature as a modular structure. And this feature has found remarkable application in many programming languages. However, if you look at modularity more broadly, you can see that structuring the code, breaking it down into separate methods and functions is also a manifestation of this property. And this feature allows you to reuse some code. I think that rarely anyone objects to the reuse of code, because it really significantly increases the efficiency of the programmer.

Why am I talking about all this here? And to the fact that the first review program just makes it easier to reuse the code. It is called, as you may have already noticed, Source Code Library, and you can find it in the vast expanses of the World Wide Web at www.highdots.com/source-code-library [2].

This program is a tool for organizing a library of source code, which, if used correctly, can greatly facilitate the work of a programmer. At the same time, the program is good because it is not focused on any particular programming language or on one single development environment - no, and there can be several of them, in principle - as much as you want.

The logic of working with the Source Code Library is extremely simple. The database with pieces of program code is structured into main categories (programming languages) and subcategories, which are thematic groups of tasks solved by the code (working with strings, system functions, etc. etc.). In principle, the structure can be changed, but it will be difficult to do this due to the fact that the program already comes with a significant database (more than 10,000 lines, about 700 examples) of code pieces for languages such as Visual Basic, VB.NET, C#, Delphi, ASP.NET, JavaScript, PHP (interestingly, C++ is missing). Most of all, the authors of the program like, apparently, VB.NET, judging by the number of various thematic categories for this programming language.

Several databases with code can be created, for example, each of the programmers working behind the same machine in different shifts can create his own database. But it seems to me that there is little sense in this, because it will be much more effective to use the same database for everyone, because in this way everyone will be able to use the achievements of the other.

A very useful feature of the Source Code Library is that the program can collapse into a tray, and when you click on the "~" button, it gives a menu with which you can insert any of the frequently used code fragments into any text editor. Using the same menu, you can call one of the frequently used programs (Outlook Express, Firefox) or go to any of the sites used in the work (Google, SourceForge.net and others). In the program window itself, you can also quickly search both the database itself and the Internet, and the latter both with the help of ordinary search engines (the same Google or Yahoo), and with specialized ones designed to search for program code.

Additional tools that allow you to work with the database include a tool for its backup, a tool for compression, as well as a tool for password protection and encryption. In some cases, they can also be helpful.

In general, such a program. Quite useful, but if you develop the idea, make it client-server (that is, the server would collect pieces of code from all team members, and they could all use them), then everything would be just gorgeous. But even in this version it is very useful, especially for novice programmers, for whom it can serve as a source of knowledge and an example of a good coding style. However, about the Source Code Library, let's move on.


EMS PostgreSQL Manager

Two issues ago, I talked about two useful and versatile tools for working with databases, which have a wide range of applications in the process of developing relevant applications. However, often, if there is no need to migrate from one DBMS to another, versatility can play a cruel joke, not allowing you to take advantage of all the opportunities, all the advantages and positive aspects of a single, that is, chosen by the developers of the DBMS. For such cases, it is better to use a specialized program "sharpened" for a specific database server.

PostgeSQL has long migrated from Linux to the Windows world and has become often used in the development of a wide variety of applications. This DBMS is often used both in the Web and in desktop systems, and, especially often, in various cross-platform client-server and multi-link applications. It has won the love of users with its power, flexibility, reliability and free of charge. After all, this is one of the very few DBMSs of this level that can be used for free even in commercial applications. But we will probably talk about it later in a separate article devoted to this DBMS, and now I want to present to your attention a program with which the task of developing and administering databases for the PostgreSQL DBMS becomes, if not elementary, then at least not requiring excessive attention to the question "how to do this".

It is called the EMS PostgreSQL Manger program, and on the Internet it is located at sqlmanager.net/products/postgresql/manager [3]. The download size is 17 MB. A lot, but why so much, I, frankly speaking, did not manage to understand (similar products for other DBMSs, but, however, from other manufacturers, "weigh", on average, two times less).

The first thing that I would like to note is that the manufacturers of this software product keep up with the times and provide support for the latest versions of the DBMS in a fairly timely manner. Due to this, for PostgreSQL 8.2, the program has support for the FILLFACTOR parameter for tables and indexes, creating indexes without locking the table, creating domains based on other domains, supporting CONNECT permissions for databases and USAGE permissions for sequences, the ability to change the type of columns, support for argument names in functions, support for dollar-bounded rows, support for UTF8 data.

Work in the program is organized quite conveniently and pleasantly for the end user, that is, for the database developer. The appearance of the program is made in the style of Office XP, although now, of course, the style of Windows Vista is more fashionable. There is a flexible and effective system of wizards (in some ways the work in the program resembles the notorious wizards that abound in Visual Studio). The database explorer, traditional for such a class of tools, helps to navigate database objects (tables, roles, triggers, procedures, operators, types, etc. etc.). The tabbed panel is designed as in the browser (although the authors of EMS PostgreSQL Manager themselves compare it with the Windows taskbar). In any case, switching between different windows thanks to it becomes much more convenient than with a standard MDI interface. Customizable toolbars for all application windows will give you the opportunity to choose the most frequently used functions, and the fact that the program remembers all the settings, deprives the user of the need to configure everything in a new way each time. Theoretically, the interface is localizable, but it is not included in the standard delivery of the program for translations into languages other than English.

EMS PostgreSQL Manager supports connection to multiple servers/databases at the same time, and there is support for SSL connections. The PostgreSQL server can be accessed via the HTTP protocol, as well as by forwarding local ports through an SSH tunnel. The program supports the creation of user quick access bookmarks for any node of the database tree, which speeds up the work, and also provides the ability to group registered databases by belonging to the server, which can also be quite convenient at times.

Naturally, all the main functions work at the highest level, and it is very convenient to use them. Creating/deleting databases and schemas, managing tables, views, functions and sequences, managing types, aggregates, operators and languages - all this is implemented very conveniently, and the developer will not feel discomfort when switching to EMS PostgreSQL Manager from any other similar tool. You can also set and configure rules for tables and views, copy any database objects, and rename any database objects. Given the specifics of the structured query language for postgreSQL, the PL/pgSQL function debugger can be very useful. I think many of the programmers who use other DBMSs and less high-quality tools sleep and see such a debugger.

Developers are not lazy to build into their tool an editor of BLOB-fields, powerful and convenient, like all other tools. The SITUATION with user rights is also very good in EMS PostgreSQL Manager. The program has a manager for managing users, their groups and their privileges, as well as a manager for user rights settings, displaying all rights for database objects in the form of a table. According to the developers, it is especially convenient to be able to manage rights to an object directly in the object editor. Working with queries is also just fine: for those who are lazy, there is a visual constructor for building complex SQL queries even without knowledge of syntax. For those who like to code each comma with their own hands, there is a multi-window SQL editor with code completion, syntax highlighting and folding. Of particular interest is the view of the query plan in the form of a chart. For large and complex queries (which, given the specifics of the DBMS, will certainly be many in practice), this is especially true.

Where there are databases, there are reports. The report creation wizard (and I have already mentioned the convenience of wizards in the program, but still let me repeat myself) allows you to create reports in just a couple of steps. In addition, managing reports is similar to managing database objects, which means that reports are accessed directly from the tree on the left side of the window. It also supports exporting data to Excel, Word, Access, HTML, PDF, TXT, CSV, DBF, XML, ODF and importing from Excel, Access, DBF, XML, ODF, TXT and CSV formats. There are wizards for copying data to / from a file on the server (it is possible to partially or completely copy metadata - the structure of the database - and, in fact, data from one database to another).

The program is able to work with diagrams, indispensable at the development stage. At the stage of maintenance and administration of the database, such features as table compression, clustering and reindexing of tables, viewing the server event log will be useful. Developers and administrators can use database statistics, can extract metadata into text files or into a SQL script editor, and can print them. There is also a file download wizard to upload files to a PostgreSQL server and download them from there, and SQL Monitor. And, of course, the mandatory To-Do List.

In general, for working with PostgreSQL databases, this tool is considered one of the best, and if you read carefully, you probably understood why. Well, after reading, you can try it in action. Because the program is really worthwhile.