Win a copy of Cross-Platform Desktop Applications: Using Node, Electron, and NW.js this week in the JavaScript forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Is API different from Spec?(Newbie question)  RSS feed

 
Shodhak Pari
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I am a JSF newbie.
Is api different from Spec?
Let me elaborate my question:
Following is the Sun's Jee 5.0 API and it has 13 packages related to JSF(faces):
http://java.sun.com/javaee/5/docs/api/
Following is the apache's API of its implementation which has the same number of packages.
http://myfaces.apache.org/core12/myfaces-api/apidocs/index.html

So, can I deduce that API is the same as RI? Or is API different from Spec?
If they want, can the apache group add any more classes/packages to the above API? in other words, can they add more classes or packages?
What is Spec? What is API? What is RI?
Are there any more implementors of JSF Spec other than Apache?
 
Andres Quinones
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
JSF is an specification created by SUN. The RI is the implementation developed directly by SUN and MyFaces is the one developed by Apache.
 
Shodhak Pari
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your quick and useful reply. However, I have some more questions unanswered.

For example, when I say class diagram I know that it is just a specification of the public interface (with variables and methods). When I write implementation code, then it is code implementation of that class diagram.

Similarly:
1. What is Spec and what is implementation?
2. Does SPEC mean the public interfaces of all the classes/packages defined in the above Sun's url that I mentioned in the original post? IF that is so, then why did Apache publish the same API on their site?
3. Does it mean that, Apache, if they want to, can add more packages/classes to the SUN's API/SPEC, in addition to what SUN already specified in their API?
4. Are there any other implementors of JSF Spec other than Apache? Where can I find more info about the all the third party implementors of the JSF spec both open source and commercial?
 
Andres Quinones
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Shodhak Pari:
Thanks for your quick and useful reply. However, I have some more questions unanswered.

For example, when I say class diagram I know that it is just a specification of the public interface (with variables and methods). When I write implementation code, then it is code implementation of that class diagram.

Similarly:
1. What is Spec and what is implementation?

Answer 1 >>> Ok the SPEC is a document in which SUN defined what is JSF and all its characteristics. The implementation is "A set of APIs for: representing UI components and managing their state, handling events and input validation, defining page navigation, and supporting internationalization and accessibility.
* A JavaServer Pages (JSP) custom tag library for expressing a JavaServer Faces interface within a JSP page. " as stated here.

2. Does SPEC mean the public interfaces of all the classes/packages defined in the above Sun's url that I mentioned in the original post? IF that is so, then why did Apache publish the same API on their site?

Answer 2>>> No SPEC is just a document, the implementation is the set of classes defined in an API. Apache created their own implementation based in the SPEC created by SUN.

What SUn did was to define the steps that must follow each JSF implemementation and APACHE followed it, created it and made some improvements they jus thought that were missed in the SPEC.

3. Does it mean that, Apache, if they want to, can add more packages/classes to the SUN's API/SPEC, in addition to what SUN already specified in their API?

Answer 3>>> Apache can reuse the Sun Implementation because is Open Source. And as you know in open source software you can do any improvement you want and reuse it the way you want. But Apache decided to create their own implementation but they have to follow the SPEC. just remind always that.

4. Are there any other implementors of JSF Spec other than Apache? Where can I find more info about the all the third party implementors of the JSF spec both open source and commercial?

Answer 4>> As far as I know the existing implementations are: Apache Myfaces and Sun RI. You will find component frameworks and libraries like JBoss Richfaces, Icesoft IceFaces, Apache Tomahawk, and others.

I hope know everything is clearer for you.
[ July 10, 2008: Message edited by: Andres Quinones ]
 
Shodhak Pari
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks a lot for your quick reply and useful answers.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!