Thursday, December 23, 2010

Enterprise Java Flex Applications – Architectural Approaches

Rich internet application is becoming the new face of web based enterprise applications and flex is coming up as unanimous choice in this category. In this article, I presented few architectural approaches to use flex in java environment to develop web based enterprise solutions. Also, I tried to capture few advantages and challenges involved in using flex technology.

Architectural Approaches for Java Flex Application:

In this section I presented few architectural approaches for developing Rich Internet Enterprise Applications using java flex technology at presentation tier.

Architectural Approach 1: Using Flex HTTP Services:










Figure 1: Java Flex with JSP/Servlet/Struts at web tier

In this architecture approach the presentation layer (which consists of flex) uses HTTP services to communicate with server (web tier). The communication point on server side could be a JSP or Servlet which outputs the information in XML format instead of HTML format. Thus even frameworks like Struts or JSF can be used, but then these frameworks will be responsible for only generating the data to be given to presentation tier and not to generate the HTML screens. The flex layer then receives the data, parse it (can be automated) and then present it to user.

Advantages:

1. With this architectural approach, we can still use the standard n-tier J2EE enterprise architecture.

2. This approach requires only web tier to be molded slightly (as to generate XML data instead of HTML), rest of the layers will work irrespective of the presentation tier.

3. This architectural approach involves true separation of presentation logic.

Disadvantages:

1. This approach requires the web tier to generate XML data instead of HTML. For this the web tier needs to be modified and hence slightly bind to flex.

2. This approach doesn’t use the core reason of web tier presence. The web tier doesn’t serve its purpose fully here. If the presentation layer is fully in flex (not a mix of JSP/Flex), web tier presence would be an overhead.

3. Generating XML data at server end and then parsing it back at client end, is always an overhead.

Architectural Approach 2: Using Web Services:











Figure 2: Java Flex with SOAP Web Services

In this approach, important business functionalities are exposed as web services which are consume by Flex presentation layer. In this case, since there is no web tier, the flex layer becomes thicker and heavier as not only it has to call web services and parse the outcome but also has to perform some application logic which could have been delicate to web tier.

Advantages:

1. This is one more step towards SOA architecture.

2. Complete loosely coupled architecture as the same web services can be consumed by other presentation technologies or applications (like desktop application) irrespective of underlying technologies or platform.

Disadvantages:

1. With absence of web tier, the complete application and presentation logic lies with flex, which also means lots of code written in flex.

2. Can’t be used if presentation tier needs JSP and Flex combination. Helpful only for pure flex presentation.

3. Overhead of web service consumption, data serialization and parsing.

Architectural Approach 3: Using Flash Remoting (BlazeDS):










Figure 3: Java Flex with BlazeDS Data Services

This is a more Flex-kind of approach. In this approach Flex BlazeDS or LiveCycle data services are used at web tier. Data services tools exposed the java (pojo) classes as services which can be called directly from flex. The java objects are converted into ActionScript objects and then serialized using AMF binary format.

Advantages:

1. A cleaner and more flex like approach.

2. It’s quite fast as well compared with other approaches.

3. The same pojo’s can be used to expose as web services for other applications.

Disadvantages:

1. Again with absence of web tier (JSP/Servlet), the complete application and presentation logic lies with flex, which also means lots of code written in flex.

2. Can’t be used if presentation tier needs JSP and Flex combination. Helpful only for pure flex presentation.

Java Flex Technology: Advantages and Disadvantages

Advantages/Strengths:

1. Flex provides excellent user interface without much efforts. The UI components are rich from look-n-feel as well as from functionality perspective. Many UI features like validation, waiting/loading icons, hover effects, resizable components, layouts etc comes inbuilt with flex which otherwise would take lot of extra efforts if coded using HTML/JS.

2. Flex unanimously is the best choice when it comes to media oriented rich user interface.

3. If developed using Flash Builder (which is a paid plugin in Eclipse IDE), rich UI can be built easily without much efforts. In other words, rich user interface developed within no time.

4. Flex handles data more efficiently and effectively as compared to browser HTML processor.

Disadvantages/Weaknesses:

1. First and the foremost disadvantage of using Flex technology is that it requires an additional environment to run. In case of RIA, to open screens in web browser, it requires additional plugins to be installed. Although this sounds very trivial but in many companies and firms this may not be possible due to various security constraints.

2. The IDE (Flash Builder) is paid software. This adds additional costs to the project. Although the browser plugin is freely downloadable which doesn’t add any cost at run time.

3. One needs to learn additional language (ActionScript) while working with Flex.

Friday, December 10, 2010

10 effective ways to become a good programmer

A good programmer is someone who always looks both ways before crossing a one-way street. ~Doug Linder

Working as a software programmer in IT industry, one thing that drives us daily to the work place; is that fun and passion lies in programming. But to make that programming a fun and to get an eternal elation out of it, one needs to learn and adhere to some basics which make you a good programmer.

I am not writing mantras which you can follow to become a good programmer, but the intention is to collate a list of helping tips which I learned and implemented in the industry to get good results. There is no definition of a good programmer, but here we are referring to the category of programmer who have developed excellent IT solutions and helped in overall growth of this industry.

1. Work on Basics

As it is true for any industry and any job, the conceptual understanding is the key for success. Unless one has strong conceptual foundation, he/she can never be a good programmer. The core conceptual understanding helps you in designing and implementing the best solutions in the best possible way. If still you feel gap in core computer science and your programming language specific concepts, it’s never too late to go back and review the basics.


2. Start putting question tags (how, what) with every set of code you write

One thing that I realized creating a clear separating line between good programmer and rest is that zeal to know what and how it is happening. There is small group of people who can never leave a code without knowing exactly what is happening when it executes. I understand that in tight deadlines, we don’t get this liberty always and hence have to leave the code just knowing that it’s doing its job. Although this is a bit different topic of how to handle such situations, but as a programmer one can always try the level best to dig into as much as one can. And believe me, this becomes a habit with time and then you do it unknowingly every time.


3. You learn more by helping others

Most of us have a common tendency of turning our heads towards forums or groups only when we need help. And again a clear separation between the good programmer and rest that the formers visit these places more often to help others. This makes them learn more then they learn getting their problem solved by someone else. Within a team as well, help others to solve their problems. Believe me, understanding others’ problem in their context, investigating on that and providing solutions; will leave you much more learned than before.


4. Write simple, understandable but logical code

As in almost every aspect of life, the formula of KISS (Keep it simple and short) works in programming as well. Write more logical code and avoid complexity. Sometimes people do write complex code just to prove their capability to write such codes. My experience says that simple but logical codes always works well, resulted in fewer issues and are more extendable. I remember an excellent quote

Good code is its own best documentation. As you're about to add a comment, ask yourself, "How can I improve the code so that this comment isn't needed?" ~Steve McConnell


5. Spend more time in analyzing the problem, you’ll need less time to fix it

Spend more time in understanding and analyzing the problem and designing solutions for it. You will find the rest of the things quite easily doable. Designing not always mean using modeling languages and tools, it can be as simple as looking at sky and thinking solution in your mind. Those who have habits of pressing keyboard (for coding) the moment get the problem, usually ended us something different than the requirement.

If you cannot grok the overall structure of a program while taking a shower, you are not ready to code it. ~Richard Pattis


6. Be the first to analyze and review your code

Although a bit difficult, but try to break your own code before others can and with the time you will learn to write close-to-bug-free code. Always do a close and unbiased review of your code. Also never hesitate to take others view on your code. Working with good programmers and taking their feedbacks will surely help you become a good programmer.


7. Don’t dismay yourself by looking at changing technology world

Over these periods in IT industry, I met with many people who are either disappointed by their work or even left it to search new job saying they want to learn and work in latest technologies. I don’t see any problem with this aspiration but the very first incorrect word is the ‘latest technologies’. What we are hearing everyday and mean here is new tools, APIs, frameworks and others means coming up everyday to make the programming easier and quicker. This anyway will continue in technology world. But what needs to be understood is that the core and basic technologies changes with much lesser pace than frameworks, tools and APIs around it. This is like the sea where the surface water moves very rapidly but the deep water is relatively calm and concentrated and most of the aqua lives survive here. So, feel yourself in that deep water and close to core technologies. For e. g. in Java enterprise world, lots of web frameworks exist and new ones coming every other week. But the core concepts of request based client-server communication, MVS pattern, filters/servlets/JSP, resource bundling, XML parsing etc remains same. So spend more time in learning these core concepts rather than worrying about ever changing frameworks and tools around it. Believe me, with the foundation of core concepts, you will always find easier to learn new frameworks, tools and APIs.


8. Work-around don’t work for longer time

Many times software programmers implement work around solutions (may be because of lack of time, lack of problem understanding or lack of technology experience). But over the period these work around solutions always resulted in corrupting the code, making it less extendible and maintainable and lot of wastage of time later on. Always prefer to implement when you know the in-out of the solution. I understand that it becomes unavoidable in some circumstances, but it’s like, one should speak truth always but you tell lie in some circumstances.


9. Read documentation

One of the essential habits of good programmer is that they read lots of documentation. May it be specifications, JSR, API documents, tutorials etc. Reading documents helps you creating that essential foundation based on which you program in best of the way.


10. You can learn from others code as well

I interacted with some excellent programmers who actually have java source project inside their IDE all the time and read/refer that in daily work. They do it not only to fulfill their appetite of knowing the basics but also to learn ways of writing good programs. Reading and referring reliable and known open source code or your senior’s code, can also help you making your programming better.


And the last, not listed above: Don’t compare yourself with others

Your comparison of yourself with others will only result in evolution of negative feelings and un-healthy competition. Everyone has got his or her strengths and weaknesses. It is more important that we understand ours and work on it. I have seen many times that so called ‘fundoo-programmers’ (fundamentally strong programmer) also make silly mistakes. So, analyze yourself, list down your areas of improvement and work on it. Programming is a real fun, enjoy it.

Any fool can write code that a computer can understand. Good programmers write code that humans can understand. ~Martin Fowler

Tuesday, September 7, 2010

Difference between instanceof operator and isAssignableFrom method - Explained once more

In this article I tried to re-explain the aged question of comparing instanceof operator with isAssignableFrom() method available in Class class. Note that the scope of this blog doesn’t include syntactical and performance related comparison but I tried to explain the core and subtle difference between these 2 options (which are typically used to verify correct type conversion).
The instanceof operator ensures that the left operand is an instance of the right operand or a subclass of it. On the other hand Class.isAssignableFrom() method, as the name suggests, indicates whether an instance of the class, passed as parameter to this method, can be assigned to the reference variable of type indicated by the class on which this method is called. Thus the statement

x instanceof Y

checks if the object referred by x variable is an instance of Y or a subclass of Y. While the statement

x.getClass().isAssignableFrom(Y.class)

checks if an instance of Y class can be assigned to the reference variable of type indicated by the actual object referred by x variable.
Don’t worry if you haven't understood it completely by the above definition as we are going to explore it more using an example.
Consider a hierarchy of 3 classes A, B and C where C extends B and B extends A. Also consider a statement:

B b = new C();

Now the statement

b instanceof A

will return true as b (which is actually an instance of Class C) is an instance of subclass of A. similarly statements

b instanceof B

b instanceof C

will also return true for the same reason. But note that if b would be an instance of Class B (i.e. the above expression would be B b = new B()), the last statement i.e. b instanceof C would have returned false as instance of B is neither C nor a subclass of C.
Now consider the statement:

b.getClass().isAssignableFrom(A.class)

This actually means: can an instance of class A be assigned to reference type of C (note that b.getClass() is C class no B)? In syntactical way, this means: can we write C c = new A()? And we know this is not true. Thus the above statement will return false. Similarly for the statement b.getClass().isAssignableFrom(B.class) will also return false because C c = new B() is incorrect. But the statement

b.getClass().isAssignableFrom(C.class)

will return true as C c = new C() is a correct statement.

I hope this concised explanation will make the difference very clear.

Thursday, September 2, 2010

Hibernate inverse attribute - Explained Again

After exploring many articles and notes on ‘inverse’ attribute used in Hibernate, I realized that, although the attribute is simple to understand, the explanation, most of the times, is more complicated and ambiguous. So, I decided to give one more try to put simple words and examples to explain it.

Hibernate supports bidirectional relationships in which the association between entities can be traversed in both directions. Consider the example of Department and Employee. It can be designed as one-to-many bidirectional relationship with a collection of employees in department entity and reference of department entity in employee. Thus one can know all employees within a particular department (by iterating through the employee collection) and the department to which an employee belongs to from employee entity. (I have assumed that one employee can belong to one department only).










To maintain such types of bidirectional relationships, Hibernate provides a flexibility to define which side will be responsible for maintaining the association. The ‘inverse’ attribute helps hibernate in deciding this. Read this attribute as “I am not responsible for maintaining this association”. By default the value of this attribute is false, which means the association is maintained from both sides. Making it true, instructs hibernate that this side (entity) is not responsible for persisting the association and hence it generates SQLs accordingly.

Let’s try to better understand this using a many-to-many bidirectional relationship. Consider the relationship between student and course. Assume that one student can opt many courses and one course can be opted by many students. Also, to make it bidirectional relationship, we designed our domain model accordingly so that the Student class has a Set of Course objects while Course Class also has set of Student objects. Thus by knowing a student, you can know all courses opted by him/her (by iterating on courses set), while knowing a course, you can know all students opted for it (by iterating on student set).










For this example our DB model will look like this:
Table student [int id, String fName, String lName]
Table course [int id, String name]
Table student_course [int student_id, int course_id]
Our Student and Course domain classes would look like this:
public class Student {
private int id;
private String fName;
private String lName;
private Set courses;

public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getFName() {
return fName;
}
public void setFName(String name) {
this.fName = name;
}
public String getLName() {
return lName;
}
public void setLName(String name) {
this.lName = name;
}
public Set getCourses() {
return courses;
}
public void setCourses(Set courses) {
this.courses = courses;
}
}

public class Course {
private int id;
private String name;
private Set students;

public int getId() {
return id;
}
public void setId(int id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public Set getStudents() {
return students;
}
public void setStudents(Set students) {
this.students = students;
}
}

And finally our mapping files will look like this:
<hibernate-mapping>
<class lazy="true" schema="example" table="student" name="com.example.hibernate.bean.Student">
<id name="id">
<generator class="sequence">
<param name="sequence">example.student_id_seq</param>
</generator>
</id>
<property name="fName" type="java.lang.String"></property>
<property name="lName" type="java.lang.String"></property>
<set schema="example" table="student_course" name="courses" inverse="false">
<key column="student_id"></key>
<many-to-many class="com.example.hibernate.bean.Course" column="course_id" unique="false"></many-to-many>
</set>
</class>
</hibernate-mapping>

<hibernate-mapping>
<class lazy="true" schema="example" table="course" name="com.example.hibernate.bean.Course">
<id name="id">
<generator class="sequence">
<param name="sequence">example.course_id_seq</param>
</generator>
</id>
<property name="name" type="java.lang.String"></property>
<set schema="example" table="student_course" name="students" inverse="true">
<key column="course_id"></key>
<many-to-many class="com.example.hibernate.bean.Student" column="student_id"></many-ti-many>
</set>
</class>
</hibernate-mapping>


If you have a closer look at the mappings, you will notice that the inverse attribute inside <set> has different values in student and course mapping. It has false value in case of student entity mapping, which instructs hibernate that Student entity is responsible for association mapping or, in other words, adding/deleting or updating courses for a student will persist the relationship information in student_course table. On the other hand, since this attribute has a true value in course mapping, it instructs that we will not add/delete or update student collection for a particular course and even if we do that hibernate won’t persist that information. In more simpler terms, if we add a student in the students set of course, this addition will not be persisted by hibernate as hibernate will not generate SQL to persist this information.
Let’s see this by running some code. Assume that we add 3 new courses using following code.

public void addCourses(){
Session session = null;
try {
session = HibertnateUtil.getSessionFactory().openSession();
Transaction tx = session.beginTransaction();
for (int i=1; i<=3; i++) {
Course course = new Course();
String name = "Course " + i;
course.setName(name);
session.persist(course);
}
tx.commit();
} catch (Exception e) {e.printStackTrace();}
finally {if (session!= null) {session.close();}
}

* Note that I have avoided the batch processing and other optimizations for simplicity.
Here HibernateUtil is a simple utility class to create SessionFactory.

public class HibertnateUtil {
private static SessionFactory factory;
public static SessionFactory getSessionFactory() {
if (factory == null) {
Configuration cfg = new Configuration().configure();
factory = cfg.buildSessionFactory();
}
return factory;
}
}


The SQL output will be:

Hibernate: select nextval ('example.course_id_seq')
Hibernate: select nextval ('example.course_id_seq')
Hibernate: select nextval ('example.course_id_seq')
Hibernate: insert into example.course (name, available, id) values (?, ?, ?)
Hibernate: insert into example.course (name, available, id) values (?, ?, ?)
Hibernate: insert into example.course (name, available, id) values (?, ?, ?)


Now let’s add 3 students using following code:

public void addStudents(){
Session session = null;
try {
session = HibertnateUtil.getSessionFactory().openSession();
Transaction tx = session.beginTransaction();
for (int i=1; i<=3; i++) {
Student student = new Student();
student.setFName("First Name " + i);
student.setLName("Last Name " + i);
session.persist(student);
}
tx.commit();
} catch (Exception e) {e.printStackTrace();}
finally {if (session!= null) {session.close();}
}

The SQL output will be:

Hibernate: select nextval ('example.student_id_seq')
Hibernate: select nextval ('example.student_id_seq')
Hibernate: select nextval ('example.student_id_seq')
Hibernate: insert into example.student (fName, lName, id) values (?, ?, ?)
Hibernate: insert into example.student (fName, lName, id) values (?, ?, ?)


Now we will add courses to students.

Student student = (Student) session.get(Student.class, 1);
student.getCourses().add((Course)session.get(Course.class, 1));
student.getCourses().add((Course)session.get(Course.class, 2));


The SQL output will be:

Hibernate: select student0_.id as id0_, student0_.fName as f2_1_0_, student0_.lName as l3_1_0_ from example.student student0_ where student0_.id=?
Hibernate: select courses0_.student_id as student1_1_, courses0_.course_id as course2_1_, course1_.id as id0_, course1_.name as name3_0_ from example.student_course courses0_ inner join example.course course1_ on courses0_.course_id=course1_.id where courses0_.student_id=?
Hibernate: select courses0_.student_id as student1_1_, courses0_.course_id as course2_1_, course1_.id as id0_, course1_.name as name3_0_ from example.student_course courses0_ inner join example.course course1_ on courses0_.course_id=course1_.id where courses0_.student_id=?
Hibernate: insert into example.student_course (student_id, course_id) values (?, ?)


The last SQL above indicates that hibernate persisted the mapping information between student and courses in student_course table as soon as course list in student is updated. Now change the value of inverse attribute to true in student maping file and try to repeat the above code (change the student or course ID). In that case the last SQL will not be executed by hibernate and hence no row will be added to student_course table.

Now let’s try to update the student set in Course entity.
Course course = (Course) session.get(Course.class, 1);
course.getStudents().add((Student)session.load(Student.class, 3));
The SQL output will be:
Hibernate: select student0_.id as id0_, student0_.fName as f2_1_0_, student0_.lName as l3_1_0_, from example.student student0_ where student0_.id=?
Hibernate: select courses0_.student_id as student1_1_, courses0_.course_id as course2_1_, course1_.id as id0_, course1_.name as name3_0_ from example.student_course courses0_ inner join example.course course1_ on courses0_.course_id=course1_.id where courses0_.student_id=?
Note that there is no SQL to update the student_course table because the inverse attribute has true value for Course mapping which means it’s not course which is responsible for maintaining the association.

Thus, the inverse attribute is used as a simple mechanism by hibernate to know which side of the association is responsible for maintaining it.

Monday, March 1, 2010

Introduction to Cloud Computing and Software as a Service (SaaS)

Introduction
Around 1960, after successfully installed the 1st packet switching based network (ARPANET), J.C. R. Licklider envisioned the concept of ‘Intergalactic Computer Network’ where the globe can be encircled by the complex net of all computers in the world. In the same era, John McCarthy, introduced the concept of utility computing in which computer can be used like other utilities for e.g. electricity, telephone etc. These two visionary concepts put the foundation of what is better known today as Cloud Computing.
This article is written with an aim to introduce the concept of cloud computing and explore in depth one of its widely accepted and useful model i.e. Software as a Service (SaaS).

Cloud Computing
Cloud Computing is a concept in which computing resources are made available on the internet and consumed by the clients as a demanded service. In-line with the other concepts in computing like grid, distributed and utility computing, cloud computing is a concept and different people have explained, defined and implemented it in different ways, but one of the best definition which could comprehensively defined cloud computing is


“Cloud Computing is the provisioning of dynamically scalable and often virtualized computing resources as demanded services over the internet”


Cloud computing has 3 major variant or models depending on the resources being exposed as service to the client. These are briefly defined below.


Platform as a Service (PaaS): In this model, the development platform is made available to the clients as demanded service over internet. The software, development and testing tools, configuration management tools, databases and all other required tools and APIs are provided by vendor in their environment. Developers can create, deploy and test the product in the provider’s platform. One of the best examples is the services provided by sales force (www.salesforce.com/platform)
Infrastructure as a Service (IaaS): In this model the complete IT infrastructure is made available in cloud as demanded services. This includes varieties of hardware, heterogeneous OS, globally distributed environments, commonly used enterprise solutions like HR, Payroll etc, data storage along with services like data security, authentication/authorization, backups, upgrade etc. Amazon’s Elastic Compute Cloud (EC2) is a good example of this category.
Software as a Service (SaaS): The most useful and wide accepted model in cloud computing is Software as a Service. In this model the software is exposed as demanded service over the cloud. Below section describe this model in depth along with its critical characteristics.

Software as a Service (SaaS)
Software as a Service model is a beautiful bouquet in which the concepts are picked up from different areas including Application Service Provider (ASP), hosted Solutions, Utility Computing, Virtualization and many more.
In SaaS model, vendor expose centrally managed software as on-demand service to the clients over Internet. This is against the orthodox in-premise or distributed model in which vendor distribute and install software in client’s environment and made it locally available.
SaaS model can further be understood by considering its top 10 characteristics†.

  1. Service Oriented Architecture (SOA): One of the important properties of any cloud computing model is ‘service’. In SaaS model the software is exposed as a service to the customer. This necessitates the adoption of service oriented architecture in the application.
  2. Hosted Environment: SaaS solutions are more often managed centrally and made available in hosted environment rather than at each client’s location.
  3. Virtualization: SaaS solutions should be deployed in virtual environment to support scalability, smooth upgrade and decoupling with underlying hardware.
  4. Multi-tenancy: SaaS solutions are believed to be deployed using multi-tenancy architecture where single application instance and data model is shared within multiple clients.
  5. Provisioning and Metering: SaaS solution should be provided with easy mechanism for tenant provisioning and metering the usage of the services.
  6. Service Elasticity: SaaS solution is said to be on-demand based services. Which means client should be able to use as little or as much as services as the business needs.
  7. Scalability: As SaaS solutions are deployed globally and provide elastic services, scalability becomes an essential characteristic of such solutions. More often, such solutions are deployed in cluster of virtualized server which can be add/remove services to meet the demand.
  8. Upgradability: SaaS solution should be provided with centralized easy upgradability. This include software and hardware upgradability.
  9. SLA Driven: SaaS solutions are driven by coherent licensing agreement based on per user per access basis.
  10. Availability and Self Healing: SaaS solutions are committed to provide complete availability and with failover mechanism. In case of failure, there will be a hot backup instance of the application ready to take over without disruption.
† Note that most of these characteristics are common for all models of cloud computing and hence can also be read as characteristics of cloud computing model.

Advantages of SaaS Model
SaaS solution uses multiple concepts and ideas to provide low cost business solutions. Some of the notable advantages associated with SaaS model are listed below.

  1. SaaS provide low cost solution. Businesses can obtain licenses to use software as per need basis.
  2. Customers can use service on pay-for-what-you-need basis depending on business needs.
  3. SaaS model avoid overhead of managing IT resources including software and hardware resources and hence facilitate organization to focus on the business.
  4. SaaS being web-native, thin clients like browsers may be used to access the software. Hence further reduces the cost at client end.
  5. SaaS solutions can easily be integrated with available business solutions at client end.
  6. SaaS solutions are scalable and virtualized. Providers can increase decrease the servers depending on service demand without changing the software architecture.
  7. Being designed in multi-tenant architecture, SaaS solution enables multiple customers and users to access the shared application and data model.

Challenges with SaaS Model:
Although SaaS model has many advantages to the business, it comes with few challenges as well which are listed below.

  1. As SaaS model is centrally managed and made available in hosted environment, it requires organizations to make valuable business data available in cloud, which could be a major threat.
  2. Security, integrity and reliability of critical business data is in vendor’s hand.
  3. Being a network-based access, the availability of a SaaS solution is subjected to network availability.
  4. Performance can be an issue as all request goes through cloud.
  5. One of the major concerns with this model is that not all software can be exposed as services.
  6. The last, but an important point is related with the fine terms and conditions mentioned in the agreement, which may be dangerous to the business sometimes. An article mentioning some of these terms is available here: http://webworkerdaily.com/2008/07/03/who-owns-your-online-documents/

Conclusion
Cloud Computing exposes computing resources (hardware and software) and services over internet as demanded services which help organizations by providing low cost IT solutions. Software as a Service model enables clients to use software as services over cloud and pay as per the usages. SaaS eliminates the need for software installation and maintenance at the client end and allows organizations for focus on core business activities.

About the Author
Ashish Arya has more than 7 years of experience in architecture and designing enterprise solutions using open source J2EE technologies. He also actively involved in designing SaaS solutions for banking and financial institutes.