About Gökhan Ozar

Gökhan Ozar is an IT professional fluent in English, French and Turkish, with more than 9 years of IT experience including both hands-on and outsourcing expertise in the areas of application development, database design, data analysis, project management, systems implementation, training, support and delegation of support. Gökhan Ozar can easily translate business needs into technology requirements that support the company’s objectives and manage projects from needs analysis and requirements definition to platform and vendor selection, implementation, and training.

Best 5 Java open-source web application frameworks

JSF

Some programmers think JSF has a steep learning curve

When it comes to developing web applications using Java, writing all the code from scratch has its advantages if you’re trying to master a new technology, but for real life web applications, you have to go for a framework as many expert developers would agree. Otherwise you risk a great deal of failure because of having allocated too much time and too many resources by re-inventing the wheels.

There are some hardliners who still argue why there’s ever a need for a framework, since everything can be accomplished by Servlets, JSP and Filters. One of them is Bear Bibeault author of JQuery in Action.

-Adeel Ansari

The cost is an important factor—although “free” in most cases also means widespread usage, community support, and no dependence on a single vendor. It takes some time for developers to get used to a framework and be good at it. Therefore choosing a framework as a long-term strategy. You cannot be switching frameworks for every project. Sticking with one framework also helps as once the expertise in that framework builds up; customizing the framework also becomes a possibility.

A tempting option is for organizations to build their own framework to address needs specific to the kind of work the organization undertakes. Although it does seam seem to make sense on paper, for my money, this is a suicidal strategy. Thoroughly testing and maintaining a framework is a huge task that will need dedicated human resources. These few people would become critical and the only source of support for others using that framework. Also, with so many quality frameworks available for free, I seriously doubt it really is necessary.

As with many web frameworks emerging nowadays, the ever-increasing number of Java web application frameworks out there today is intimidating for many developers even to look into because of being presented with too many choices. However, matching the criteria of popularity, widespread usage and tooling support, I can list a few of the best Java web application frameworks here and in a descending order of my personal choice. Sorry if I haven’t listed your favorite Java web framework here, feel free to agree or disagree in the comments section. Continue reading

Matrix of compatible platforms and runtimes with JBoss Tools

JBoss Tools Icon
Use Eclipse with the JBoss Tools plugin instead of  JBoss Developer Studio? It can get somewhat tricky to get the right version of the tools plugin to work with the compatible version of Eclipse and the correct version of JSF components, etc.

JBoss Dev Studio is a branded version of a Eclipse packed with the right version of JBoss Tools. The dev studio is usually bundled with a developer subscription from RedHat for $99. (I’ve been told, however, by Max Rydahl Andersen a JBoss employee who is also one of the developers of JBoss tools and the developer studio that the JBoss Developer Studio IDE itself is actually free without the JBoss commercial runtimes – i.e. JBoss EAP).

If you stick with Eclipse IDE with the JBoss tools plugin, I came up with the following matrix of the set of tools showing the coupling of compatible versions.

JBoss Tools Compatibility Matrix

EclipseJBoss ToolsJBDSJBoss EAPJBoss AS (Community)SeamJSFRichFaces
3.6 / Helios3.23.0.04.3,5.0,5.15.1, 5.0, 4.2, 4.0, 3.22.2, 2.1, 2.0, 1.22.0 (in VPE), 1.2, 1.13.3.x
3.5/Galileo3.1.03.0.04.3, 5.05.1, 5.0, 4.2, 4.0, 3.22.2, 2.1, 2.0, 1.22.0 (in VPE), 1.2, 1.13.3.x
3.4.2/Ganymede3.0.x2.1.04.3, 5.05.0, 4.2, 4.0, 3.22.2, 2.1, 2.0, 1.21.2, 1.13.3.1
3.3.2/Europa2.1.21.1.04.35.0, 4.2, 4.0, 3.22.0, 1.21.2, 1.13.3.0
3.3.1.1/Europa2.0.11.0.04.24.2, 4.0, 3.22.0, 1.21.2, 1.13.1.0
Continue reading

Hibernate Derived Properties – @Formula Annotation

HibernateIn Hibernate a derived property (also called a calculated property) is a read-only property whose value is calculated at fetch time using SQL expressions.

Example: For an employee entity with properties such as an id and the employee name also a monthlySalary property, you might also want to have a yearlySalary which is not necessarily stored in the database.

package net.ozar.exp.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Entity
@Table(name="EMPLOYEE")
public class Employee implements java.io.Serializable {

	private static final long serialVersionUID = -7311873726885796936L;

	@Id
	@Column(name="ID")
	private Integer id;

	@Column(name="FIRST_NAME", length=31)
	private String firstName;

	@Column(name="LAST_NAME", length=31)
	private String lastName;

	@Column(name="MONTHLY_SALARY")
	private float monthlySalary;

	public Employee() {
	}

	// getters and setters
     // ...

	public float getMonthlySalary() {
		return monthlySalary;
	}

	public void setMonthlySalary(float monthlySalary) {
		this.monthlySalary = monthlySalary;
	}

     /* This artificial property - as I call it - is a kind of a calculated property, but not with Hibernate derived property support - not just yet */
	public float getYearlySalary() {
		return this.monthlySalary * 12;
	}

}

The above example gives us a simple calculation in memory for just screen output without Hibernate’s derived property or the @Formula support.  Now take a moment to reflect that we need all the employees whose yearly salary average is above $5000. Then what? In this case, you might wanna make use of Hibernate’s derived property feature.
Continue reading

Oracle Database 10g XE Installation and Configuration

Oracle logoIn this article I will write about installing the Oracle Database 10g XE on Windows and changing the default port number for HTTP and optionally for FTP. The installer does not provide any customization option and you end up with the DB server instantly up and running reserving the port 1521 (a default for Oracle database servers), including an embedded HTTP listener set to a default port of 8080 which might conflict with some existing Java application servers or servlet containers such as Tomcat, JBoss Application Server and Glassfish which use the same port by default. Although it’s easy to start and stop the Oracle database with the shortcuts pre-installed in the Start menu, its http listener remains “on” at all times with no shortcut to be turned on and off easily.

In my case I already have Tomcat and Glassfish which are set to use the 8080 port as well, so I will show you how to modify the port number of Oracle 10g XE as I go along.

About APEX or what I would normally call Oracle (Application Express) 10g XE

Oracle Database 10g Express Edition (Oracle Database XE also goes by an abbreviated code name APEX) is an entry-level, small-footprint database based on the Oracle Database 10g Release 2 code base that’s free to develop, deploy, and distribute; fast to download; and simple to administer. Oracle Database XE is a great starter database for:

  • Developers working on PHP, Java, .NET, XML, and Open Source applications
  • DBAs who need a free, starter database for training and deployment
  • Independent Software Vendors (ISVs) and hardware vendors who want a starter database to distribute free of charge
  • Educational institutions and students who need a free database for their curriculum.

With Oracle Database XE, you can now develop and deploy applications with a powerful, proven, industry-leading infrastructure, and then upgrade when necessary without costly and complex migrations.

Continue reading