Archive for the ‘Java’ Category

Page 2 of 3123

SCWCD – The 3 Steps to Success!

Posted on July 10th, 2007 in Featured, Java, Java EE, SCWCD, Tutorials | 12 Comments »

After my completion of SCDJWS I had written about the 3 steps to success in SCDJWS which has helped many who were new in the web services domain to help them get prepared and confident about preparing for the big exam! Following the same foot steps I am now presenting in front of you 3 steps to success in SCWCD. I scored a 90+ in the exam and so I take a a pride to provide you the guidance of how to get a 90+

Why are there always 3 Steps to success?

This probably would be the same doubt on the lines of why do we say “Ready…Steady…Go” and also the countdown of a start of a timer in “3..2..1“. Well, the 3 steps are same everywhere, only their definition changes. Similarly I always make it a point to divide my preparation routine into particularly 3 steps to make it sound quicker and much systematic. Finally, its the enthusiasm that counts that you put in each of the steps.

Stop all that blabber… How do I go about preparing for SCWCD?

Okay..okay. SCWCD (exam code – CX 310 081) is aimed particularly for the web developers and it takes into consideration that you must have developed web applications in the past and now want to try out with JSP/ Servlets. So there wont be any questions about how and what are the intricacies dealing with what a web application is, but concentrates on how would you build web applications using the web components that SUN provides.

SCWCD – The preparation

The 3 steps for success in SCWCD are: Read the rest of this entry »

The Struts Framework – Why choose it?

Posted on June 3rd, 2007 in Java, Java EE | 14 Comments »

Struts is a J2EE web application framework created and maintained by Apache Software Foundation Group (ASF). It is a controller framework based on the Front Controller pattern and used to create an MVC (Model View Controller) architecture.

What is a Front Controller Pattern?

A Front controller pattern follows the rule of having a single entity controlling the entire application. The single entity acts as a barrier between the client and the remote application. All requests targeted towards the application and first received by the single entity and then based on the controlling flow of the application, the requests are forwarded to the intended recipient module of the application.

The advantage of the Front Controller Pattern is in the simplicity of maintaining a single entity instead of multiple flows controlled by multiple entities. This results in streamlining the flow and proper filtering of the requests made to the application.

Why is Struts Framework essential in an MVC architecture? Read the rest of this entry »

Looping through Collections is fun in Java 5

Posted on May 16th, 2007 in Java | 8 Comments »

Edit: This post was earlier titled “Looping through Collections is fun in Java 6” which has now been renamed to “Looping through Collections is fun in Java 5” due to the accidental discrepancy of mentioning the feature belonging to Java 6. The mistake is rectified. Thanks for the feedback to all.

The traditional looping for construct has served well for many years in Java. Even today, for collections people still use the traditional approach for looping through them. The simple reason being familiarity. Its evident that the powers provided by the revolutionary addition of features in Java upgrades have yet to see their complete establishment.

Coming to the collections frameworks the other leagues of languages like PHP, JavaScript, VB have provided convenient looping constructs for the for syntax namely the for each block. Java programmers have craved long for the same and its time that it was implemented in the favorite language of millions worldwide.

The collections framework comes with a new for construct or the for-each block although the each term is missing from the syntax. Now you don’t need Read the rest of this entry »

Getting started with IoC – A simplified tutorial

Posted on April 26th, 2007 in Java, Tutorials | 5 Comments »

I had mentioned about Inversion of Control (IoC) in my earlier post Inversion of Control – for easy integration. In this post I will show you how you can actually make your integration easy with implementation of a mini application sample based on IoC.

The main objective of this mini tutorial is to highlight the implementation of an interface based Inversion of Control (IoC) architecture and to state how it could help in the integration and maintenance of the application.

For this mini application I will use the following set of classes

  1. Dependency – This is the interface which is implementation as per my application versions progress and which will be used by the View components in my application. In other words this is my Model component in a MVC architecture
  2. Dependent – This is my View component which uses the Model component to produce the results for displaying. As the name suggests the class is dependent on the Dependency implementation.
  3. Injector – This is most important class in the application and which introduces the aspect of Inversion Of Control into the applications. This class can also be referred as the configurator class.
  4. Finally there can a number of implementations of the Dependency interface according to the needs of the application.

Note: This mini tutorial is based on the concept of Interface based IOC. It also assumes that you import the required classed in your Classes when compiling them.

Lets start with our tutorial. Read the rest of this entry »

Inversion of Control – for easy integration

Posted on April 23rd, 2007 in Concepts, Java, Java EE | 3 Comments »

You may have witnessed some of the J2EE frameworks provide a technique to get dynamically bound plain objects by making them bind to some features of the framework outside of the plain objects. This technique is called as the IoC or Inversion of Control. If we have to know about the meaning of this term let us emphasize on what inversion depicts in aspect of implementing some features in plain objects.

Suppose I have some functionality of my J2EE application in my model which is nothing but a simple POJO. Now I want this POJO to be incorporated into a web tier which is an MVC (Model View Controller) Architecture. The last thing I would want to do is modify the source of the model, view or controller and put in some additional code which would do this integration. But suppose I choose a framework in such a way that I put what exactly is to be done by the POJO in the MVC architecture in a simple XML config file and then put the config file in the framework and the framework does the rest of the integration work. Read the rest of this entry »

The Great Ant Tutorial – a great jump start

Posted on April 16th, 2007 in Java, Java EE, Tutorials, XML | 80 Comments »

Apache Ant is a powerful way to convert your developmental structures to deployment structures. It is declarative and all the command line tasks used for deploying an application are represented by simple XML elements. Without much details, this tutorial would breeze you through the steps on how to build a web application using a single XML build file and nothing else. If you have not yet understood what is the use of Ant, read my article on Development and Deployment Structures – the perfect way to build web applications.

I would use the same analogy of my development structure as mentioned in the above linked article i.e. my development structure consists of the following directories:
Read the rest of this entry »

Annotations in POJO – a boon or a curse?

Posted on April 7th, 2007 in Java, Java EE, Web Services, XML | 4 Comments »

The purpose of annotations have been well put forward with the recent upgradation of EJB to EJB 3.0 and also in the web services field by JAX-WS. Annotations help in reducing the learning curve associated with these specifications by avoiding the need to learn the deployment descriptors which are necessary to properly deploy an EJB or a JAX-WS web service respectively.

Annotations – a boon or a curse?
Due to the above situation, the influence on the usage of annotations is steadily rising. It is but natural that programmers would try to do their work quickly without having to waste the time in learning the XML Schema’s required for deployment. Annotations are purposely aimed at this programmer’s dilemma. In fact when I was working in JAX RPC, I used to think as to when I would get a tool to code those ugly descriptors in an easier fashion. With annotation based web services creation in JAX-WS, half of my work is done when I put them in the POJO itself.

All of this can be attributed as a boon to the presence of annotations. But the point of worry is, Read the rest of this entry »

Page 2 of 3123