Friday, September 3, 2010

Daily Technical Explorations

Date 2010/09/03 Open Source


I just was wondering how would an open source software project life cycle be, and I found very intresting information while browsing the net that explained,
1. What is open source software

2. What are benefits of open source software

3. Life cycle management of open source software.

Some very good open source products I have used are Linux, Apache and Firefox. Offical web sites for these products explains more details.

Date 2010/09/05 JSF Discussion -- some points



JSF Implementations Overview

- All the JSF implementations implement the SUN JSF API Specification.

- JSF Implementations have standard components for displaying the Plain Vanilla HTML

elements available with the tag libraries namely,

JSF 2.0 TLD -- Tag Library

JSF 1.2 TLD -- Tag Library


- JSF component libraries created by various vendors add to the basic implementations, often
these additions are related to namely,

a. Look and Feel of the components.

b. Ajax operations.

c. Enhanced behavior and functions in the component(s).


- The term Facelets refers to the view declaration language for JavaServer Faces technology.
Facelets is a part of the Java Server Faces specification and also the preferred presentation
technology for building JavaServer Faces technology-based applications.


Major Implementations

An implementation is something which implements the JSF specification.

- Two Major implementations of JSF are namely,

a. Sun Mojarra
b. Apache MyFaces

- Technically there is very less difference since they adhere to SUN JSF API Specification.

- Both of them have good features like robustness, documentation availability, support and
speed of bug fixes.


JSF Component Libraries

A component library is something which adds extra functionality (normally extra UI widgets)
to the base specification.The main difference between the libraries standards compliance.

As far as I know Glassfish is the only application server to fully support the new JSF standard released as part of Java EE 6.

- Lot of JSF Libraries some of the well known are

a. Rich Faces -- Good Skinning Capabilities along with Ajax.
--Information can be found out through the official Rich Faces web site.
--Demonstration of how to use Rich Faces can also be found out through the Rich Faces web site.

b. Ice Faces -- Good Skinning Capabilities along with Ajax.
-- Information about icefaces can be found out through the official ice web faces site.

c. Trinidad -- Good Skinning Capabilities along with Ajax.
-- Official site for Trinidad will explain various good concepts and demonstrations for use.

d. Prime Faces -- Good Skinning Capabilities along with Ajax.
-- Information and some Good demonstrations are available on official web site of prime faces.

e. Tomahawk -- Specialized enhanced components.
-- Information and demonstration is available on official web site.

Date 2010/09/09 JSF Life Cycle

Life cycle of a JSF web application starts when user makes a request.

On submission of a page various further tasks are performed like

- validation of data provided in components in the view (JSP Page),

- data conversion according to types specified on server side and much more.

Series of steps that an application follows is called life cycle.

A JSF Application is initiated by calling the Faces Servlet (configured in the web.xml file of a web application),

these activities taking place will come under the category of JSF Request Processing Life-cycle Phases namely,

Restore View

- The restore view phase starts upon user requests to a JSF page by clicking a link, button etc.

- In this phase following things are done namely,

a. view generation of the page

b. binding of components to its event handlers and validators are performed

c. view is saved in the FacesContext object.

Apply Request Values

- The purpose of this phase is for each component to retrieve its current state.

- After restoring of component tree in restore view phase each component in the

tree retrieves its new value and store it locally.

- Component values are typically retrieved from the request parameters.

- If immediate attribute of a component is set to true, then the validation, conversion,

and events associated with the component is processed in this phase.

Process Validations

- Here local values stored for the component in the tree are compared to the validation rules registered for the

components.

- If local value is invalid, an error message is added to FacesContext, and the component is

treated invalid and then JSF proceeds to the render response phase and display the current view showing the

validation error messages.

- If there were conversion errors from the apply request values phase, the messages for these

errors are also displayed.

- If there are no validation errors, JSF proceeds ahead to the update model values phase.

Update Model Values

- After confirming that data is valid in the previous phase local values of components can be set

to corresponding server side object properties i.e. backing beans.

- The bean properties will be updated .

If the local data cannot be converted to the types specified by the bean properties, the life cycle proceeds

directly to the render response phase and errors are displayed if any during applying to the bean.

Invoke Application

- Before this phase the component values have been converted, validated, and applied to the bean objects.

- These can now be used to execute the application's business logic.

- Application-level code is executed such as submitting a form or linking to another page.

- For example user moves to the next page you will have to create a mapping in the faces config.xml file.

- Once this navigation occurs, you move to the final phase of the lifecycle.

Render Response

- In this phase JSP container renders the page back to the user,if jsp is used by application

i.e. view is displayed with all of its components in their current state.

- If this is an initial request, the components will be added to the component tree.

- If this is not an initial request, the components are not added because they are already added to the tree.

- The state of the response is saved after rendering of the content of the view.

- The subsequent requests can access it and it is available to the restore view phase.

Date 2010/09/14 Software Marketplace

A marketplace is a very good concept where in you could actually allow various vendors and customers to interact.

This concept can be implemented in a community system managed via enterprise software where in you allow various vendors for services and customers to buy these services.

The enterprise system hosting this facility would ideally gain out of each transaction at the end.



No comments:

Post a Comment