Friday, February 24, 2012

Best Pratctices for Successfully Project

Some thoughts regarding running IT project successfully.
1. Major stakeholder involvement, and communication with development team. If the development team, especially primary designers(BA and Architect) can communicate with the major stakeholder regularly, then it will the DEv team to align the direction. In a project while ago, Dev team had been working on development for about 6 months based on the requirements BA collected and signed by users about 9 months ago, there is no communication between major stakeholder and development team during that time period, later that project was shut down as requirements are out of date. This is also a big issue for Waterfall.
2. IT project and business requirement design are professional jobs, need specific skills and technical knowledge. Many times we see in a project,

JSF Validation

1. Customize error message.




You can only have one validatorMessage. So if you have multiple validators, please use custom validators.

2. For default validator, if you want customrize message, you can do this too.





put this into resources bundle.
javax.faces.validator.LongRangeValidator.MAXIMUM={1}: Value is greater than allowable maximum of ''{0}''

3. How to specify field name in validator.







private void checkDate(Date date, UIComponent uiComponent, Locale locale) {
if(isDateInRange(date) == false) {
ResourceBundle rb = ResourceBundle.getBundle("messages", locale);
String messageText = getFieldLabel(uiComponent) +" " + rb.getString(getErrorKey());

throw new ValidatorException(new FacesMessage(FacesMessage.SEVERITY_ERROR,
messageText, messageText));
}
}

protected String getFieldLabel(UIComponent uiComponent) {
String fieldLabel = (String) uiComponent.getAttributes().get("fieldLabel");

if(fieldLabel == null) {
fieldLabel = "Date" ;
}

return fieldLabel;
}

Check this link for details.

Tuesday, February 21, 2012

Thursday, February 16, 2012

HTML5 video

http://www.dzone.com/links/r/video_series_html5_web_camp_silicon_valley.html

Thursday, February 9, 2012

What are required for Leadership

Good leader requires two things.
1. Version
2. Smart Followers

A good leader is a person who has a version and also group of skilled and smart people which follow him, and help him to achieve his versions.

A leader without a version is just a manager. A good manager does not need a version, but people skills, and can be a good follower.

A expert or specialist can help leaders to achieve something, but not necessary need either version or people skills.

In some cases, a good leader may not have people skills, and still having many followers, also still can be attractive to smart experts and specialists, like Steven Jobs. But he need a clear version.

In my opinion, Version is the most important factor to be a good leader. As clear and good version will attractive more smart people to follow.

JSF Managed Bean

Today I made some changes JSF managed beans using annotation instead of XML. Below it is the example.


@ManagedBean(name="themeSwitcherBean") -- Declare it as managed bean
@RequestScoped
public class MyThemeSwitcherBean {

@ManagedProperty(value = "#{userAccountService}") -- How to reference spring bean or other managed bean.
UserAccountService userAccountService;