Data Management Made Easy Using Nennius: Introducing Nennius

PHP allows for the simple creation of many useful tools, such as creating a contact form. However, creating a data management system in PHP is not so simple. Since many end users are familiar with the Internet, Web developers often find themselves needing to create a Web-based interface to allow for meaningful interaction with data.  Nennius is a data management tool that can make this task easier. This article, the first of three parts, provides an overview of this tool.

Introduction

PHP has grown in popularity over the years, in part due to its rapid speed of development. Through the use of PHP, simple dynamic elements may be added to existing websites without extensive modifications. A common example of this is a contact form. Many websites make use of this simple, yet effective, tool –- and Web developers will find that creating these forms is a fairly common request. Fortunately, developing contact forms is a relatively quick and easy process.

However, there are other common development tasks that are not as easy. One such task is creating a data management system. An increasing number of organizations are collecting and employing data via the Web. However, most end users lack the training and experience to properly manage their data. Because of this, it is fairly common for a developer to be asked to create a Web-based interface to interact with the data in a simple, yet meaningful way.

This brings us to the focus of this article: the Nennius data management tool. Part one of the series will provide an overview of Nennius, discussing several of the features offered by the system. Part two will look at developing a basic application using the Nennius engine. Part three will then take an in-depth look at some of the more advanced options available to Nennius developers.

{mospagebreak title=About Nennius}

As a Web programmer myself, I have noticed a pattern in many of the data management systems I’ve developed. Although the types of data vary widely, the basic methods of manipulating that data remain the same. Most data management tools must allow for the creation, modification, and deletion of records. In addition most must also allow for an easy mechanism with which to search and sort the existing records. And so on.

As with many other fields, there is no reason to re-invent the wheel when it comes to programming. So several months ago I began development on an open source data management engine, written in PHP, geared towards automating the development of data management applications. This engine, dubbed “Nennius,” uses a set of library classes to handle everything from creation and manipulation of SQL records, to searching and sorting records, to user authentication and restricted record access, and so forth.

The tool itself, along with example applications written for it, has been released on Source Forge (http://nennius.sourceforge.net) under the Apache 2 open source license and is available for free download and customization. By using Nennius, Web developers are able to create comprehensive data management applications in a very short time, simply by configuring the applications to work with their pre-existing data structures.

Nennius also allows for more than one application to be run simultaneously off of a single instance of the engine. (This is similar in some respects to Jakarta Tomcat.) Because of this, Nennius applications generally take up a small amount of disk space.

We will now take a look at the basic Nennius layout.

{mospagebreak title=User Interface Overview}

Below is a screenshot of a simple Nennius application. For the purposes of this article, all screenshots presented will be of the sample application we will develop in parts two and three. Let’s take a look at the basic layout of Nennius.

Figure 1: Sample Nennius screenshot

There are several main areas to a typical Nennius application. Beginning in the top left hand corner of the screen [1], you will see the branding logo area. This area may be easily filled with a branding logo of your choice. If none is provided, the default Nennius logo will be used instead.

Figure 2: Branding logo area

Below that you have a basic menu [2], with the options “Manage Releases,” “Corporate Website,” and “Logout.” Except for “Logout,” these options are completely arbitrary and will vary from application to application.

Figure 3: Sample application menu


Next is the “Action Status” panel [3]. Unlike a branding logo or a menu, this component may be unfamiliar to some developers. In Nennius, there are four basic status states (shown below): ready, info, warning, and error.

  

  

Figure 4: Action status panel states

As you can see, each of these icons deals with a different type of event –- but together, they provide users with a quick and easy way to determine what’s going on. The action status panel is generally set prior to loading a page, but may also be updated via Javascript on a rollover event.

Another user-friendly feature of Nennius is the Help & Support panel [4], shown below. This panel acts as a mechanism for developers to plug in helpful tips or hints for the user through the use of small HTML files. If no help content is provided, a default Nennius welcome message is displayed, as shown below.

Figure 5: Help & Support panel

The Help & Support panel also provides a link to the online Nennius user’s guide, which may be opened at any time in a small pop-up window. We will take a closer look at customizing this panel in part three of this article.

Next we will move to the upper right-hand area of the screen, to the filter tool [5]. The filter is only presented in the main view mode, but is one of the more powerful tools available to the user in a Nennius application. As you may be able to see by the example shown below, the filter allows users to restrict the records they are viewing by entering search criteria. The criteria itself will vary depending on the type of data being managed, but the filter’s basic interface will stay the same.

Figure 6: Nennius filter menu

The rest of the application’s screen real estate belongs to the main content area [6]. Now that we’ve discussed the basic elements of a Nennius application, let’s move on to discuss how Nennius automates data management tasks.

{mospagebreak title=User Authentication)

Most Nennius applications will require users to authenticate themselves prior to accessing any data. This authentication is managed through an internal login API by default, but may be customized (or disabled) on a per-application basis. The standard API allows for authentication to be based on a single sign-on environment, LDAP server, or an internal Nennius user database. An example login form is shown below.

Figure 7: Basic application login form

In addition to managing a basic authentication state, Nennius also allows developers to set a threshold level for each user. This threshold level is then used to decide which areas of the data management system and which records within those areas a user may access. (We will take a closer look at this later.)


Creating and Editing Records

Nennius will automatically generate forms for creating and editing records, based on the attributes provided in the configuration file. The figure below shows a simple form:

Figure 8: Sample component update form

This form contains a date picker field, a text input field, and a textarea input box. Other available input types include select menus (often used for foreign key components), email and number fields (validated by Javascript), and file upload boxes (used for attachments). Also present are buttons for submitting the record, and returning to the main view without creating a record. As with each step in a Nennius application, instructions are provided to the user in either the Action Status panel or, in this case, directly above the update form.

{mospagebreak title=Deleting Records}

Nennius also automates the process of deleting records by first prompting the user to verify the deletion before finalizing the delete. During this step, the record is shown in read only mode as you can see below.

 

Figure 9: Deletion verification screenshot

Nennius may also be configured to check for any record dependencies prior to deleting a record (in the case of foreign key fields). We’ll take a closer look at this feature in part three of this series.

Searching and Sorting Records

One of the most powerful out-of-the-box features Nennius offers is the ability for users to easily search and sort records. Searching is done through the filter bar (previously discussed) and sorting is done by clicking on a column header (once for ascending, twice for descending).

Figure 10: Searching & Sorting screenshot

The simple search shown above filters all news records created between June 1st and June 2nd, and sorts them by their time of creation. If more than one page of results would have been returned, a pagination menu would also be present above the main record area.

Conclusion

We have taken a look at a few of the basic features offered by the Nennius engine. There are also many advanced features that we will be looking at in parts two and three of this series. Before continuing to those parts however, I would encourage any developer interested in using Nennius to try one of the online demo applications available on the Source Forge website, such as the Time Tracker tool (http://nennius.sourceforge.net/online_demo.php).

Once you have logged into a Nennius application, you will see that using it is quite simple and intuitive. Despite the type or amount of data being managed, the same intuitive interface is presented from application to application. Because of this, a single “User Guide”  (http://nennius.sourceforge.net/user_manual.php) may be used to help answer questions for any Nennius application. This offers yet another benefit to developers using Nennius, as it reduces the amount of time required to explain a new tool to the user.

Developers may also encourage their application’s users to communicate with other Nennius users if questions arise to further reduce the amount of technical support required. This may be done through the Nennius Users forum (http://nennius.sourceforge.net/phpbb/).

Now that we’ve taken a look at what Nennius is, we are now ready to learn how easy it is to use. Part two of this series will discuss creating a basic Nennius application.

Google+ Comments

Google+ Comments