Saturday, December 18, 2010

Interface

 The concept of "realization" is what is implied by the Java implements keyword: class Dell implements Laptop; which is not the same as than Dell extends Laptop.  A realization is an implementation (read: actual code) for a given interface.

public interface Laptop {
  public String getOpSystem();
}
public class Dell implements Laptop {
  // implementation of the Laptop inteface
  public String getOpSystem() {
    return "Windows XP";
  }
}

The "inheritance" relationship is between a class and a subclass; for example, class Inspiron extends Dell is an example where the class Inspiron is a subclass of Dell.  The Java extends keyword is saying: "the Inspiron class inherits the implementation (attributes and methods) of the Dell class."

public class Dell implements Laptop {
  // implementation of the Laptop inteface
  public String getOpSystem() {
    return "Windows XP";
  }
}
public class Inspiron extends Dell {
  // override behavior to make this class unique to the Inspiron line of Dell laptops
  public String getOpSystem() {
    return "Windows 7";
  }
}

You could also model laptops from other vendors; let's say Apple: class MacBook implements Laptop.  And we could even have a class hierarchy of Apple laptops like we did with Dell:  class MacBookPro extends MacBook.

public class MacBook implements Laptop {
  // implementation of the Laptop inteface
  public String getOpSystem() {
    return "Mac OS X";
  }
}
public class MacBookPro extends MacBook {
  // override behavior to make this class unique to the Pro line of Apple laptops
}

Now we have two distinct class hierarchies that share the same "contract" of what it means to be a Laptop.  These two hierarchies of laptop classes could have fairly different behaviors (one runs Windows and the other runs Mac OS X, for example) but they both satisfy the laptop contract.  So if we look at my original Client class with your example; we could write code like this:

public class Client {
  public void doSomething(Laptop laptop) {
    System.out.println(laptop.getOpSystem());
  }
}

public class Main {
  public static void main(String[] args) {
    Client client = new Client();
    // We can create a variable of type: Laptop
    Laptop laptop = new Inspiron();
    client.doSomething(laptop);
    // We can create a variable of a more specific type: MacBook
    MacBook macintosh = new MacBook();
    client.doSomething(macintosh);
  }
}

The type of the object is not important to the Client class; all it needs to know is that the object implements the Laptop contract.

Thursday, October 7, 2010

How to get session in any servlet?

How to get session in any servlet?
Ans:Here is two way to get the session in servlet
1-This common and most used technique in servlet.
  using request object
  HttpSession=request.getSession();
2-second is get from the session event object.
  HttpSessionEvent has getSession
  Suppose if you create any Listener class which is implement the HttpSessionListener Interface then you could get the session object

ServletConfig:

ServletConfig:
Package -javax.servlet
Interface/Class-interface
Total Method :4
1-java.lang.String getServletName() { }
  This method is return the name of the servlet.
2-javax.servlet.ServletContext getServletContext() { }
  This is return the Object of ServletContext
3-java.lang.String getInitParameter(java.lang.String p1) { }
  if you but any parameter in web.xml then using this method you retrive the value
4-java.util.Enumeration getInitParameterNames() { }

ServletConfig :it is one par servlet.When the container intitalize a servlet .it create a unique servletConfig for the servlet .

Example:How to put any value in the web.xml
Because the servletConfig is one par servlet so  the param value and param name tag should be with in servlet tag.

<init-param>
<init-name>
</init-name>
<init-value>
</init-value>

Monday, September 13, 2010

A classic recursive algorithm

Here is a classic recursive algorithm.  The mathematical formula for factorial:
  * 1!=1
  * 2!=2 (2*1)
  * 3!=6 (3*2*1)
  * 4!=24 (4*3*2*1)
  * 5!=120 (5*4*3*2*1)
  * and so on

This can be described in pseudo-code as:
fact(x) ::= if ( x == 1 ) then 1 else x + fact(x-1)

In Java code it would look like this:

1    public int fact(int x) {
2        if ( x== 1 )
3            return 1;
4        else
5            return x * fact(x-1);
6    }

It is recursive because the function has a call to itself (see line 5).  The most important part of creating a recursive algorithm is to determine the halt condition.  In the case of the fact function the halt condition is when x==1.  If you fail to code a halt condition (or if the condition has a bug) then you will likely run into a infinite loop which in Java would result in a StackOverflowError.

Saturday, September 11, 2010

Difference Between JSF and Servlet/Jsp

1) JSF is a framework
A framework is just a set of components that allows a developer to build applications more quickly.  A framework provides APIs and classes that the developer uses to build application code.  Any package that fits this description can be called a framework.  As such, the Servlet and JSP packages are frameworks just as JSF is a framework that is built on top of Servlet/JSP frameworks.


2) JSF supports RAD but Servlet/JSP does not
RAD is a buzzword ,butany managers think that any RAD framework will be the next silver bullet that will solve all of there development problems.  This is never true.  Every framework can improve developer productivity after that developer has become fluent in that framework.  If a developer does not get trained in the framework (or technology) then that person will not see any productivity gains by adopted the framework.  This is true of any new technology or framework.

Servlets were the first Java web technology but it was difficult to build HTML views in Java code so Sun created JSPs to make the development of views faster.  After that several independent organizations developed frameworks on top of Servlet/JSP, such as Struts, to make webapp development easier and faster.  Sun took the best ideas and created JSF.  Like these other frameworks JSF is great for some types of applications but not so great for others.
JSF is very good at handling simple forms, tables and even dynamic tree structures. 
JSF also has aspects that hinder rapid development.  In particular there is a lot of configuration (XML files) that need to be generated and maintained.

3) JSF is event-driven but Servlet/JSP does not
This is true.  In practice, JSF event model turns into the standard request/response model.
Servlet/JSP architecture can support fine-grained screen events by using Ajax calls to the server.


4) JSF supports MVC but Servlet/JSP does not
JSF is no better at supporting MVC than a simpler Servlet/JSP architecture.  The MVC pattern takes discipline with any GUI framework. 
JSF is only different in that the controller code is implemented in a regular Java class and not in a Servlet Java class.  That is the only difference.


6) JSF provides a well-defined life cycle model but Servlet/JSP does not
This is true and it is one of the greatest benefits of an architecture based upon JSF.
A Servlet/JSP architecture must build its own life cycle.  This is usually quite easy but it does take effort and discipline.

7) JSF life cycle model supports validation but Servlet/JSP does not
This is true, but there is nothing about a Servlet/JSP architecture that prevents validation;

8) JSF has built-in support for I18N but Servlet/JSP does not
While it is true that JSF has built-in support for internationalization (abbreviated as I18N), it is not exactly true to say that Servlet/JSP does not.  JSTL libraries includes I18N support.

Wednesday, September 8, 2010

The Template Method

Reference Site : http://en.wikipedia.org/wiki/Template_method_pattern
Reference Book:Gang of Four - Design Patterns, Elements of Reusable Object Oriented Software

Topic Name:Template Method (Design Pattern )
Introduction :
1-The template method pattern is a design pattern.

2-Template Method is part of the Behavioral Patterns(prescribe the way objects interact with each other).

 3-Template Method is used to represent Parent and child relation ship,it force to subclass to implement the abstract method and also it's provided the blue Print or out line to the subclass.

Description of the problem:
I have a AbstractGame.This class is represent the Game Play between Two team .it have getWinner() method .which is give the winner between  two team on the basic of the score of individual .Let me give the proto type of getWinner()

Proto Type:public Team getWinner();
We have two  other type of the  class and they are  extends the AbstractGame class.Classes are following
1-StratingGame  it represent the starting game(Direct show the relation ship between two team )
2-IntermediateGame it represent the intermediate game or winner of previously game
On the basic of individual Characterised both class implement the getWinner() algorithm differently way .
getWinner() algorithm is the same for both types of games but the algorithm for determining team1 and team2 is different: static for starting games and the winner's of the previous games for intermediate games.
Solution Of this Problem: Using Template we are solve this problem

                                                  TM-pattern-problem

TM-pattern-solution
Example:
Supper Class is AbstractGame
-------------------------------------------------------------------
public abstract AbstractGame {
protected Integer team1Score;
protected Integer team2Score;
//abstract method
public abstract String getTeam1();
public abstract String getTeam2();
//"blueprint"
//Template Method
public String getWinner(){
if(team1Score>team2Score){
return getTeam1();
}
else {
return getTeam2();
}
}
---------------------------------------------------------------------
 StratingGame
---------------------------------------------------------------------
public StratingGame extends AbstractGame {
private String team1;
private String team2;
public String getTeam1(){
return team1;
}
public String getTeam2(){
return team2;
}
}
---------------------------------------------------------------------
Intermediate Game
--------------------------------------------------------------------
public class IntermediateGame extends AbstractGame {
private AbstractGame game1;

private AbstractGame game2;
//
// Accessor methods
//
public AbstractGame getGame1() {
return game1;
}
public void setGame1(AbstractGame game1) {
this.game1 = game1;
}
public AbstractGame getGame2() {
return game2;
}
public void setGame2(AbstractGame game2) {
this.game2 = game2;
}
@Override
public Team getTeam1(){
return getGame1().getWinner();
}
@Override
public Team getTeam2() {
return getGame2().getWinner();
}
}
-----------------------------------------------------------------------------------------------------------

Thursday, September 2, 2010

How to Reverse String

package com.example;

import java.util.Scanner;

public class Backward {
   public static void main (String[] Args)
   {
       Scanner in=new Scanner(System.in);
       System.out.print("Enter a Name to Reverse:");
       String name = in.nextLine();
       char and;
       String out="";
       int l=name.length();
       int i;
       for (i=l-1; i>=0; i--)
       {
           and=name.charAt(i);
           System.out.println(and);
           out=out+and;
       }
       System.out.println("The Output is:" + out);
   }
}

Thursday, August 19, 2010

Method and Attribute Signature

1-never create a variable name with starting of set verb .because the accessors are looking confusing .
2-if any attributes content the list of recods then it should be plural.
3-if any attributes content the single recods then it should be singular.
4-attributs  always should be  nouns
5-methods always should be verbs.

Monday, August 16, 2010

Map And It's Iteration

  In this class i am going to show you how to iterate a map . Map is interface
  which is part of the java collection framework. 
  1-Map is maps keys to values
  2-Map cannot content duplicate keys 
  3-each key can map to at most one value. 
  4-Map is interface 
  5-Package is java.util
  6-Map is collection of Object 
  7-you could access Maps following three way -
     1-using set of keys
      2-using set of value 
      3-using set of keys and values
  


package map;

import java.util.Collection;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
import java.util.Set;

/**
 * @author Prateek Shaw
 * @version 0.1
 */

public class MapIteration {

public static void main(String[] args) {
Map mapFirst = new HashMap();
for (int i = 1; i <= 5; i++) {
mapFirst.put("key" + i,  i);
}
mapIterationThroughKeys(mapFirst);
mapIterationThroughEntitySet(mapFirst);
mapIterationThroughValues(mapFirst);
}

/**
* 1-Access key and value of map using keySet keySet is method which return
* the {@link Set} of key using this key we get the value.
*/
public static void mapIterationThroughKeys(Map mapSecond) {
Set setMap = mapSecond.keySet();
for (String key : setMap) {
System.out.println("Key------->" + key + " Value------>"
+ mapSecond.get(key));
}
}

/**
* 2-Access key and value of map using entitySet entityset method return the
* set{@link Set} type mappings contained in this map. this return the set
* which content the pair of key and value
*/
public static void mapIterationThroughEntitySet(Map mapThird) {
Set> setMap = mapThird.entrySet();
for (Map.Entry key : setMap) {
System.out.println("Key------->" + key.getKey() + " Value------>"
+ key.getValue());
}
}

/**
* 1-Access value of map using values
*/
public static void mapIterationThroughValues(Map mapFour) {
Collection setMap = mapFour.values();
for (Integer value : setMap) {
System.out.println(" Value------>" + value);
}
}

}

Friday, July 30, 2010

"verification and validation" (V&V) check on domain model

1) Verify each attribute in the model.  Does this attribute belong in the class you have put it in?  In other words (IOW), can you answer the question: What purpose does this attribute serve in this class?  And: Does it match the requirements?  If the attribute does *not* serve a purpose then remove it from the model.  If the attribute belongs to a different class, then move the attriubte to that class. If there is an attribute mentioned in the requirements that does *not* yet exist in the model, the find the appropriate class and add it.

  2) Verify each relationship in the model.  What purpose does this relationship serve in the model?  Does that purpose match a requirement?  If the relationship does *not* serve a purpose then remove that relationship.  If the requirements define a relationship that does not exist in the model, then add that relationship to the model.

  3) Verify each relationship multiplicity in the model.  What purpose does this multiplicity serve in the model?  Does that purpose match a requirement?  If the multiplicity does *not* serve a purpose, then remove it.  Is the multiplicity the correct value as defined in the requirements?  Does the multiplicity value use the simplest form?  (for example, "N..N" should be just "N" and use standard notation so instead of "1..n" use "1..*")  If the requirements define a multiplicity that does not exist in the model, the add that multiplicity.

Thursday, July 29, 2010

Factory Method Patterns (Implementation )

1-Factory Method is base on the Creations Pattern .
2-This Pattern is used to monitoring the type of instance of the class at the run time .
3-Calender Class is based on the factory Method
4-getInstance() static method is create different Class  Object at run Time.
Example :
In this example i try to explain  the Factory pattern .
Report  class  is responsible  to create type of reportObject  on the runtime .
Type Of Report
1-PDFReport
2-HTMLReport
3-ExcelReport
4-TEXTReport
5-XMLReport

//Report Class
-------------------------------------------------------------------------------------------------------------

package model;

import static  model.FactoryPattern.whichObjectCreate;

public class Report {
  
    public static void main(String[] args) {
      int pdfReport=1;
      int htmlReport=2;
      int excelReport=3;
      int xmlReport=4;
      int textReport=5;
      whichObjectCreate(pdfReport).reportType();
      whichObjectCreate(htmlReport).reportType();
      whichObjectCreate(excelReport).reportType();
      whichObjectCreate(xmlReport).reportType();
      whichObjectCreate(textReport).reportType();
    
    }
  
}
-------------------------------------------------------------------------------------------------------------
//FactoryPattern  Class
-------------------------------------------------------------------------------------------------------------
package model;

public abstract  class FactoryPattern {
   
   public static FactoryPattern whichObjectCreate(int reportType){
     switch(reportType){
      /*Case One  for HTML Report*/
       case 1: return new HTMLReport();
      /*Case Two  for PDF Report*/
       case 2: return new PDFReport();
      /*Case Three  for Excle Report*/
       case 3: return new ExcelRepot();
      /*Case Four  for XML Report*/
       case 4: return new XMLReport();
     }
     /*Default   for Text Report*/
     return new TextReport();
   }
   /*abstract method impelement by extends class */
   public abstract void  reportType();
 }
------------------------------------------------------------------------------------------------------------
//TextReport class
------------------------------------------------------------------------------------------------------------
package model;

public class TextReport extends FactoryPattern{
    public void reportType(){
      System.out.println("This Method is Generator TextReport");
    }
}
------------------------------------------------------------------------------------------------------------
//ExcelRepot class
------------------------------------------------------------------------------------------------------------
package model;

public class ExcelRepot extends FactoryPattern{
  public void  reportType(){
    System.out.println("This Method is Generator ExcleRepot");
  }
}

------------------------------------------------------------------------------------------------------------
//HTMLReport class
------------------------------------------------------------------------------------------------------------
package model;

public class HTMLReport extends FactoryPattern {
    
  public void  reportType(){
    System.out.println("This Method is Generator HTMLReport");
  }
    
}
------------------------------------------------------------------------------------------------------------
//PDFReport class
------------------------------------------------------------------------------------------------------------
package model;

public class PDFReport extends FactoryPattern{
  public void  reportType(){
    System.out.println("This Method is Generator PDFReport");
  }
    
}
------------------------------------------------------------------------------------------------------------
//XMLReport class
------------------------------------------------------------------------------------------------------------
package model;

public class XMLReport extends FactoryPattern {
    
  public void  reportType(){
    System.out.println("This Method is Generator XMLReport");
  }
}

Thursday, July 22, 2010

classNotFoundException vs NoClassDefFoundError

classNotFoundException
1-Thrown when an application tries to load in a class through its string name using -
1-The forName method in class Class
2-The findSystemclass method in class ClassLoader
3-The loadClass method in class ClassLoader
2-ClassNotFoundException indicates that a class needed for compilation cannot be found on the classpath
3-This is Compiler Time Exception.
4-ClassNotFoundException Extending the Exception Class
5-ClassNotFoundException is a checked exception.
6-Thrown if the Java Virtual Machine or a ClassLoader instance tries to load in the definition of a class (as part of a normal method call or as part of creating a new instance using the new expression) and no definition of the class could be found.

NoClassDefFoundError

1-NoClassDefFoundError indicates that the matching class that was found at compile time cannot be found at runtime.
2-NoClassDefFoundError is error not the exception.
3-This run time Error .
4-The searched-for class definition existed when the currently executing class was compiled, but the definition can no longer be found.

Tuesday, June 29, 2010

Comparable versus Comparator

Comparable and Comparator are nearly identical in purpose: They both determine if one object is greater-than, less-than, or equal to another object. This behavior creates what is known in mathematics as a "partial ordering" and these interfaces can be used to sort lists of objects. The Comparable interface is implemented by the object type itself; whereas the Comparator is an independent class that compares two objects.

Integer Objects

Java SE 5 introduced the concept of autoboxing.
Integer i1 = 1000;
Integer i2 = 1000;
assert (i1 != i2); // i1 and i2 are *not* the same object ---true
assert (i1.equals(i2)); true
Is equivalent to
Integer i1 = new Integer(1000);
Integer i2 = new Integer(1000);
assert (i1 != i2); true
assert (i1.equals(i2));true
So i1 holds an object of type Integer (as opposed to a primitive int value). When you create two *new* objects then they will always be non-identical (!=) even though the data within the objects *is* the same (equals). This is the major difference between the == operator and the equals() method; the == operator determines object identity (same object reference).

However, for numbers under a certain value (I think under 128) this equivalency is *not* true. For example...
Integer i1 = 10;
Integer i2 = 10;
assert (i1 == i2); // i1 and i2 are the same object true
assert (i1.equals(i2)); true
So, the object referred to by i1 is identical to the object referred to by i2. Why does this happen? It turns out that the Java compiler performs an optimization for "creating" Integer objects (using autoboxing) for small numeric values. The compiler has an object cache of the first 128 integer values and it will always reuse the same Integer object when autoboxing the same int value.

List size versus List Capacity

The capacity is the "potential size" and size is the "actual number of elements".
Note that most List implementations will grow past the initial capacity.

Monday, June 28, 2010

The Comparable Interface

1-The Comparable Interface Is Used by the Collections.sort()method and java.utils.Arrays.sort() method to sort Lists and arrays of objects.
2-int x=thisObject.compareTo(anotherObject)
3-The sort() method used compareTo() method to determine which the List or Object Array should be sorted.
4-All element in the list must be implement the Comparable interface .
5-All element are must mutually comparable
6-It means i1.compareTo(i2) must be throw a ClassCastException for any element of i1 and i2.
7-compareTo() method return negative integer,zero or positive integer as this object is less than,equal to, or greater than the specifies object .
8-ClassCastException if the specified object's type prevents it from being compared to this object.
9-it is paramount that when you going to override equals() you must tske an argument of type Object but that when you override compareTo() you should take an argument of the type you are shorting .

Example:
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;


public class ArrayListSorting implements Comparable < ArrayListSorting > {

String firstName;
String middeleName;
String lastName;
String collegeName;
Long mobileNumber;
public String getFirstName() {
return firstName;
}
public void setFirstName(String firstName) {
this.firstName = firstName;
}
public String getMiddeleName() {
return middeleName;
}
public void setMiddeleName(String middeleName) {
this.middeleName = middeleName;
}
public String getLastName() {
return lastName;
}
public void setLastName(String lastName) {
this.lastName = lastName;
}
public String getCollegeName() {
return collegeName;
}


public void setCollegeName(String collegeName) {
this.collegeName = collegeName;
}


public Long getMobileNumber() {
return mobileNumber;
}


public void setMobileNumber(Long mobileNumber) {
this.mobileNumber = mobileNumber;
}


public ArrayListSorting(String firstName1,String middelName1,String lastName1,String collegeName1,Long mobileNumber1) {
firstName=firstName1;
middeleName=middelName1;
lastName=lastName1;
collegeName=collegeName1;
mobileNumber=mobileNumber1;
}

public String toString(){
return firstName +" "+middeleName+" "+lastName+" "+collegeName+" "+mobileNumber;
}

public static void main(String[] args) {
List< ArrayListSorting > example=new ArrayList< ArrayListSorting >();
ArrayListSorting prateekc=new ArrayListSorting("prateek", "kumar", "shaw", "ABES", 9891445027L);
ArrayListSorting anoopc=new ArrayListSorting("anoop", "chandra", "verma", "ABES", 9891445026L);
ArrayListSorting loljeetc=new ArrayListSorting("laljeet", "", "yadav", "ABES", 9891445029L);
ArrayListSorting jamalc=new ArrayListSorting("jamal", "ur", "rahman", "ABES", 9891445030L);
ArrayListSorting hariomc=new ArrayListSorting("hari", "om", "patel", "ABES", 9891445031L);
example.add(prateekc);
example.add(anoopc);
example.add(loljeetc);
example.add(jamalc);
example.add(hariomc);
System.out.println("unsorted name "+example);
Collections.sort(example);
System.out.println("sorted name "+example);
ArrayListSorting1 example1=new ArrayListSorting1();
Collections.sort(example,example1 );
System.out.println("sorte name is "+example1);
}
public int compareTo(ArrayListSorting listsorting){
return firstName.compareTo(listsorting.getFirstName());
}
}

Saturday, June 12, 2010

Domain Class

A Domain Class is Class which presents aspects either
1-The Problem Domain Class
2-The Solution Domain Class
The Problem Domain Model: The Problem Domain Model is the set of classes attributes and relationships that describes the conceptual space of the System Under Development.
The PDM is used During Requirements Analysis to understand the types of information that the users of the sud must records or manipulate.

The solution Domain Model(SDM) :Is the set of classes ,attributes and relationship that must be coded to solve the requirements of the sud.
Typically one uses the Problem Domain Model as the starting point for the solution Domain model.

-->Domain classes Content "things I know"
-->Service classes Content "things I do"


Domain class are conceptual entities. They often related directly to things we talk about or use in the real world.
Service classes are strictly a component that exists only in the "solution" space; classes that you create in order to accomplish the goals of the SuD

Friday, May 28, 2010

What is System.out.println() ?And How It Is work ?

System is class of Lang Package.
System class is final .you can not able to extends to this Class .
The Constructor of system class is private .So you can not initialize this class .
PrintSteam is class in io package for responsible for give out and take input to console .
println() method is define in PrintSteam Class not System class .
and one of the limitation for PrintStream class is that you can not direct used PrintStream method with out help of System class .
We call all PrintStream method using System class .
out is reference variable of Print stream class and out is belonging to class not object .it means out is static .out is static,final reference variable of printstream .
Declaration of out In system is following
public final static PrintStream out;

Demonstration Of System.out.println()

1-We need a class which Proto type same as System class .
Class Name is WorkAsSystem ;
and constructor is private WorkAsSystem() ;

-------------------------------------------------------------------------------
package lang.example;//package like java.lang

public final class WorkAsSystem {//Similar To System Class

public static final WorkAsPrintStreamoutexample=forCreateNewWorkAsPRintStreamObject();//similar to out variable
private WorkAsSystem() { }
private static WorkAsPrintStream forCreateNewWorkAPRintStreamObject()
{
return new WorkAsPrintStream();
}

}
-------------------------------------------------------------------------------
2-We need as class which Proto type is PrintStream class
Class name is :WorkAsPrintStream

3-We also define a method same as println() in this class
method name is printlnexample();

-------------------------------------------------------------------------------

package io.example;//package like java.io ;

public class WorkAsPrintStream {//similar to PrintStream
public WorkAsPrintStream() {

}
public void printlnexample()
{
System.out.println("This is example of System.out.println();");
}
}

--------------------------------------------------------------------------------
4-Create a class which used this method as System.out.println();

--------------------------------------------------------------------------------
package example.example;

import lang.example;

public class Example
{

public Example()
{}
public static void main(String[] args)
{
WorkAsSystem.outexample.printlnexample();
}
}
--------------------------------------------------------------------------------
5-out is
--------------------------------------------------------------------------------

This is example of System.out.println();

--------------------------------------------------------------------------------

* if you can define a variable as a final then you need to initialization as define time . so out is final then we need to initialization by a private static method which is just create a new Object for PrintStream Class . to help to call method of printstream class .

Wednesday, April 7, 2010

software development life cycle

software development process is used to produced a software product .it is combination of five phase .

1-Requirements Analysis
2-Design
3-Implementation
4-Verification
5-Maintinrences

1-Requirement and Analysis –In this step we collect all the requirement about the product. Requirement is many divided many type-
i-Software requirement
ii-hardware requirement
iii-user requirement

in this step collect all type of basic information about to product which client need this product . it is very time taking process .it take ¼ time of hole project . a very good requirement is open the door of success product .user is play more importance .

2-Design : it is come after the analysis phase . in this step we collect importance information from the first phase. In this phase we are go more deeply and transfer the real requirement into software requirement .in this phase also develop class diagram and use case diagram .

3-Impemention :it is also called coding .in this phase software developer are take design information and convert in programming form using any high level programming language . coding is done on this phase .

4-verification :it is also called testing .The product is ready to test . if the product is pass the testing phase then product is ready to final release .testing is many type.

5-Maintinrences : it is last phase of SDLC . to solved real bug and error .

Software requirement is depend upon product .If security is constrain then develop prefer java technology . it take much more time .but it is provide high level security ,portability ,platform independent .if security is not much constrain then used php or .net for essay and fast development .

User requirement is client requirement .client does not know which technology are used to implement this product .its totally dependence upon development team .
User does not aware about technical part .but its only think about its out put or real life implementation of product .

Design phase involves converting information ,functional and network requirement defined during in requirement and analysis phase into unified design specification that develop used in coding and other phase .model is not every thing but is importance part of design phase .design is phase to closed down all requirement and starting to implement in real life .

Design and Implementation steps user is not play any role to construct it .user is not part of this phase .

In verification and Maintenance are implemented by joint help of user and develop .user is verified product on behalf of his requirement and need .if found any bug or error then inform to testing development team to correct .




WaterFall model is sequential approach to develop any software .
Agile model is incremental and iterative approach to develop any software .

Similarities :
1-Both are used to develop software .
2-Both are base on SDLC .
3- agile is similar to waterfall .


Differences:
1-the main problem of waterfall model is the inflexible division of separated step .iteration are more expensive compare than agile model .if requirement are not well understood then waterfall model is not suitable .
2- in agile model ,work is focus on small part of product . The emphasis is on obtaining the smallest workable piece of functionality to deliver business value early, and continually improving it/adding further functionality throughout the life of the project. In waterfall mode work is focus on whole model .
3-agile model are iterative and incremental which help to cut cost and time .but waterfall is more time taken and costly .
4-final product is more optimized and bug free in agile model .

Tuesday, March 16, 2010

http://jsfwithjdeveloper.blogspot.com

Busy To Reading New And Emerging Technology JSF and Posting on http://jsfwithjdeveloper.blogspot.com

Friday, January 22, 2010

The Programmer

The good programmer have technique to write a good, easy to understandable ,less line of code ,not much complex and the best solution of the problem. Complexity is not represent a good programmer ,but it represent a programmer which have not ability to solved any program with good solution

The Expert

Making Expert is easier the making Master. Believe something rather quickly . but mastering something took far longer. Represent as Expert is not make you a expert.
The way of solving any problem is automatic explain the you Expertness .If you have any problem or question , you do not make this problem to complicated problem .but you solved the problem very good and easy way. Which easy understandable and also easy to maintenances .Expert is people which very good to solved any very complex and hard problem very easy and good solution .

The Master

In the master articles write takes example of learning Aikido (A Japanese martial art employing principles similar to judo) to explain the master. And he read “The Book of Five Rings” by Miyamoto Musashi about 20 times. Musashi was master of Aikidi. Musashi was able to defeat his enemies by using unusual and revolutionary tactics.
He said that no body in Japanese history to used swords at the same time. Until Musashi
started doing it.
Musashi is person who started swords at the same time. Musashi was the first known man to break out both swords and defeat a very large number of people with them. This not develop by Musashi but a situation automatic develop this quality .
He was apparently being attacked by a large near army of men, and in order to keep alive he took out his wakizashi to defend himself (that’s the small sword). He later developed it into a complete system, but originally it was self preservation. But he was go through very hard practice and create and implement new technique. It you want to make master of any thing it is only way hard work.
Musashi was also written a book “The Book of Five Rings” . Almost all people considered masters of their art finally come to such a deep knowledge that they can do more with less. Rather than a flurry of complicated leaping and jumping
For Master knowledge and abilities were so deep and clear that their simplest motions had the greatest power. For a master, the pompous and flowery motions were just wastes of energy.
And writer explain another story of Mestre Bimba—the originator of modern Capoeira from Brazil. He was 80 year old when he was challenge to fought to younger people.
“A master wastes no energy. Every motion is precious.”
]he master’s actions are pure and elegant.