Apache, Celtix, CXF, jax-ws, Spring, Spring Framework, web, Web Applications, webservices, Xfire

Apache CXF- An ultimate web service open source framework : Lets start learning…

Apache CXF is an open source services framework which is a result of the merge between the XFire and Celtix projects. CXF helps us build and develop services using JAX-WS. These services can speak a variety of protocols such as SOAP, XML/HTTP, RESTful HTTP, or CORBA and work over a variety of transports such as HTTP, JMS or JBI.

In this series we will go through two common approaches to create a web service.

  1. Code first approach
  2. Contract First approach
Advertisements
Apache, Bamboo, CI, Continous Integration Servers, Java, web

What is Continous Integration and Continous Integration Servers?

The words of Mr.Martin Fowler

Continuous Integration(CI) is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily – leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly. This article is a quick overview of Continuous Integration summarizing the technique and its current usage.

By Going through his this great article and example about CI will defenitly help you to get the clean idea about this.

Advantages of Continuous integration

  • When unit tests fail, or a bug is discovered, developers might revert the codebase back to a bug-free state, without wasting time debugging.
  • Integration problems are detected and fixed continuously – no last minute hiatus before release dates;
  • Early warning of broken/incompatible code;
  • Early warning of conflicting changes;
  • Immediate unit testing of all changes;
  • Constant availability of a “current” build for testing, demo, or release purposes;
  • The immediate impact of checking in incomplete or broken code acts as an incentive to developers to learn to work more incrementally with shorter feedback cycles.

Continous Integration (CI) Servers

A server process or daemon which monitors the version control system for changes, then automatically runs the build process (e.g. a make script or Ant-style build script or Maven type) and then runs test scripts (e.g. JUnit or NUnit) can call as Contious Integration Server. In many cases the build script not only compiles binaries but also generates documentation, website pages, statistics and distribution media (such as Windows MSI files or RPM files).

Two Examples…

  • Continuum is the open source CI server from the house of Apache.
  • Bamboo: The CI and Build server from Atlassian. (Commercial)

How to Choose a Continous Integration Server?

Going through this article in IBM Developer works by Mr.Paul Duvall (paul.duvall@stelligent.com), CTO, Stelligent Incorporated; will defently help you to make a decision in this matter.

Technorati Tags: ,
Apache, GWT, JSF, Spring MVC, Stripes, Struts, struts2, web, Web Applications, wicket

‘Six’ best web frameworks in Java

A web application framework is a software framework that is designed to support the development of dynamic websites, Web applications and Web services. The framework aims to alleviate the overhead associated with common activities used in Web development. Here is the list of SIX best web frameworks which we are using in Java. Each one has its own advantages.

1. Java Server Faces – JSF

  • From Sun Microsystems
  • Based on Component Centric approach
  • Best Feature : The most using web framework. Because of its component architecture, the developer doesn’t need to mess with writing HTML, JavaScript etc to get rich “AJAX” type of functionality. It also takes care of state and event management. It has very less configuration too.

JavaServer Faces (JSF) is a new standard Java framework for building Web applications. It simplifies development by providing a component-centric approach to developing Java Web user interfaces. JavaServer Faces also appeals to a diverse audience of Java/Web developers. “Corporate developers” and Web designers will find that JSF development can be as simple as dragging and dropping user interface (UI) components onto a page, while “systems developers” will find that the rich and robust JSF API offers them unsurpassed power and programming flexibility. JSF also ensures that applications are well designed with greater maintainability by integrating the well established Model-View-Controller (MVC) design pattern into it’s architecture. Finally, since JSF is a Java standard developed through Java Community Process (JCP), development tools vendors are fully empowered to provide easy to use, visual, and productive develop environments for JavaServer Faces.

2. GWT

  • From Google
  • Based on Widgets
  • Best Feature : Speed development. Easy to develop good, neat and “Browser independent” Ajax applications. Give more stress to pure browser independent ;).

Google Web Toolkit (GWT) is an open source Java software development framework that makes writing AJAX applications like Google Maps and Gmail easy for developers who don’t speak browser quirks as a second language. Writing dynamic web applications today is a tedious and error-prone process; you spend 90% of your time working around subtle incompatibilities between web browsers and platforms, and JavaScript’s lack of modularity makes sharing, testing, and reusing AJAX components difficult and fragile.GWT lets you avoid many of these headaches while offering your users the same dynamic, standards-compliant experience. You write your front end in the Java programming language, and the GWT compiler converts your Java classes to browser-compliant JavaScript and HTML.Project Home and More features

3. Stripes

  • From Mc4j
  • Based on MVC architecture
  • Best Feature: No Configurations ) . Annotation based programming makes coding more interesting and easy.

Stripes is a presentation framework for building web applications using the latest Java technologies. The main driver behind Stripes is that web application development in Java is just too much work! It seems like every existing framework requires gobs of configuration.Project Home and more features

4. Spring MVC

  • From SpringSource
  • Based on MVC architecture
  • Best Feature : Speed development. Now so many Annotations are also included (v2.5). Its from SpringSource and have a good support too. Being a person who likes and works with Spring framework.. I really encouraged by their good and really fast support.

Spring Web MVC is the own web framework of Spring Framework.The Spring MVC Framework’s architecture and design are in such a way that every piece of logic and functionality is highly configurable. Also Spring can integrate effortlessly with other popular Web Frameworks like Struts, WebWork, Java Server Faces and Tapestry. It means that you can even instruct Spring to use any one of the Web Frameworks. More than that Spring is not tightly coupled with Servlets or Jsp to render the View to the Clients. Integration with other View technologies like Velocity, Freemarker, Excel or Pdf is also possible

5. Struts2

  • From Apache
  • Based on MVC architecture
  • Best Feature : No more ActionForms! Use any JavaBean to capture form input or put properties directly on an Action class. Use both binary and String properties! and its enhanced and rich tags

Apache Struts 2 is an elegant, extensible framework for creating enterprise-ready Java web applications. The framework is designed to streamline the full development cycle, from building, to deploying, to maintaining applications over time.Project Home and More Features

6. Wicket

  • From Apache
  • Based on Component Centric approach
  • Best Feature : Swing-like OO Component Model. This feature separates Wicket from all other frameworks

With proper mark-up/logic separation, a POJO data model, and a refreshing lack of XML, Apache Wicket makes developing web-apps simple and enjoyable again. Swap the boilerplate, complex debugging and brittle code for powerful, reusable components written with plain Java and HTML.Project Home and More Features here…

Please put your Suggestions and Ratings here and the frameworks which you are used and known as great ones. That will be more helpful to all of us to get the real idea. As we all know the selection is entirely related with the requirement, learning time and the using situation, this post is gives you an idea about the frameworks using nowadays. Its not at all easy to “rate” the Java frameworks and here I am putting this as per my knowledge and the current trends only. I expect your positive and negative suggestions through valuable comments. All the SIX frameworks noted here are excellent ones and do NOT consider the order as a RANK given to them.

Technorati Tags: , , , , , , , ,

Apache, LAMP, MySQL, php

Building a LAMP server in Linux

In the previous week I had configured LAMP in our server. Being a person who had worked in php for some months, actually I was not much aware of setting this in Linux. On my php days I was only using the easy windows bundle “phptriad” for coding… Being a man who is not much familiar with Linux, this installation was not much easy for me. The one main problem occurred is with the compatibility issue of the latest PHP and MySQL downloads.

1. Remove previous RPM Versions of the Applications

rpm -qa | grep -i apache
rpm -qa | grep -i httpd
rpm -qa | grep -i php
rpm -qa | grep -i mysql

2. Get the Source Code for all Applications from their respective sites

3. Unpack the Source Code

tar zxf php-x.x.x.tar.gz
tar zxf apache_x.x.xx.tar.gz
tar zxf mysql-x.x.xx.tar.gz

This should leave you with the following directories:

/usr/local/src/php-4.4.2
/usr/local/src/apache_1.3.34
/usr/local/src/mysql-4.0.26

4. Build and Install MySQL

cd /usr/local/src/mysql-x.x.xx

chown -R root.root *

make clean

./configure \
–prefix=/usr/local/mysql \
–localstatedir=/usr/local/mysql/data \
–disable-maintainer-mode \
–with-mysqld-user=mysql \
–with-unix-socket-path=/tmp/mysql.sock \
–without-comment \
–without-debug \
–without-bench

then make && make install

5. Build and Install Apache (with DSO support)

cd /usr/local/src/apache_1.3.34

make clean

./configure \
–prefix=/usr/local/apache \
–enable-shared=max \
–enable-module=rewrite \
–enable-module=so

make && make install

6. Build and Install PHP

cd /usr/local/src/php-x.x.x

./configure \
–with-apxs=/usr/local/apache/bin/apxs \
–disable-debug \
–enable-ftp \
–enable-inline-optimization \
–enable-magic-quotes \
–enable-mbstring \
–enable-mm=shared \
–enable-safe-mode \
–enable-track-vars \
–enable-trans-sid \
–enable-wddx=shared \
–enable-xml \
–with-dom \
–with-gd \
–with-gettext \
–with-mysql=/usr/local/mysql \
–with-regex=system \
–with-xml \
–with-zlib-dir=/usr/lib

make && make install

cp php.ini-dist /usr/local/lib/php.ini
ln -s /usr/local/lib/php.ini /etc/php.ini

7. Edit the Apache Configuration File (httpd.conf)

To ensure your PHP files are properly interpreted, and not just downloaded as text files , add these lines to the respective location in the httpd.conf file. We can find the location by searching “AddType”.

AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
AddType application/x-tar .tgz
AddType application/x-httpd-php .php .foo
AddType application/x-httpd-php-source .phps .phtmls
AddType application/x-httpd-php .php .htm .html

8. Commands to start, stop or restart apache

To start apache : /usr/local/apache/bin/apachectl start
To stop apache : /usr/local/apache/bin/apachectl stop
To restart apache : /usr/local/apache/bin/apachectl restart

Source: here
Technorati tags: Linux, LAMP, PHP, Apache, MySQL