Skip to main content

Posts

Showing posts from 2010

BIRT reporting system for PHP web applications

BIRT is an Eclipse-based open source reporting system for web applications, especially those based on Java and J2EE. BIRT has two main components: a report designer based on Eclipse, and a runtime component (Birt Viewer) that you can add to your app server. [ref: http://www.eclipse.org/birt/phoenix/intro/]

Although BIRT is designed to be integrated into a J2EE web application, you can use it in any other development environment such as PHP. A brief description about how it works is given below.

To design the reports, BIRT designer should be installed. There are few ways to do that, and those are described in - http://www.eclipse.org/birt/phoenix/build/#introduction . Designing reports is extremely easy, and tools are there to bind data with database tables/fields, build queries etc..

The next thing is, there should be a instance of BIRT report viewer installed in a web server like tomcat. How to install BIRT viewer in tomcat is described here - http://www.eclipse.org/birt/phoenix/d…

How to split dictionary files in Symfony

Mainly, there are two ways to split the translation files in symfony.

01)You can split the translation file into several dictionary files, with a certain name. For example, you can split the messages.si.xml file into these two (or more) files in the application i18n/ directory:
main.si.xmlsub.si.xmlWhen a translation is not to be found in the default messages.si.xml file, you must declare which dictionary is to be used each time you call the __() helper, using its third argument. For example, to output a string that is translated in the sub.si.xml dictionary, write this:

02)The other way of organizing translation dictionaries is to split them by module. Instead of writing a single messages.xx.xml file for the whole application, you can write one in each "modules/[module_name]/i18n/" directory.

Ex:symfony/apps/frontend/modules/NewModule/i18n/messages.si.xmlsymfony/apps/frontend/modules/NewModule/i18n/messages.en.xmlsymfony/apps/frontend/modules/NewModule/i18n/messages.ta.xmlIf y…

Common Characteristics of Enterprise Applications

Last week, I was conducting a tech talk about “Architectural Patterns of Enterprise Applications” with our team. The discussion was mainly based on Marin Fowler's famous book “Patterns of Enterprise Application Architecture”. So, I thought, it's good to write something about that in my Blog. Given below are few common characteristics of Enterprise Applications. If any software product has the following characteristics, we can identify it as an Enterprise Application. These ware originally documented by “Martin Fowler”, in his book “Patterns of Enterprise Application Architecture”.

Persistent Data - Enterprise applications usually involve persistent data. The data is persistent because it needs to be around between multiple runs of the program—indeed, it usually needs to persist for several years. Also during this time there will be many changes in the programs that use it.
Lot of Data - There's usually a lot of data, a moderate system will have over 1 GB of data organized in…

Special characters and text fields

Yesterday I was fixing a bug in one of our customization projects. There was a web form with some input fields. The bug was, when you enter some text in a text field with double quotes (“) data is not saving properly. Actually, the problem was in updating the records. All the characters that is there after the first double quote is truncated. Actually, the fix was very simple. This is something that you may find in any HTML based user interface, and you can fix this within few seconds if you know the exact reason for the bug. The reason for the bug is explained bellow.

In a text field for example, say, we enter a value like – abc”de. Then, you save the form and send this to the data base. Now the value – abc”de – is in a row of a database table, that's okay. After that, if you go to edit the same record, you can see that value in the text field as – abc. The part after the double quote is missing. Usually, in a text box, value is kept in the “value” attribute within double quotes.…