apprentice (77) [Avatar] Offline
#1
[nobr].


What's the difference between API, Components and Class files? This is what I understand so far...


Class files:
A Class file is a collection of functions (methods) and variables (properties). Used in Object-Oriented-Programming (OOP).



Components:
A Component is a collection of Class files organized into the Components folder name, that live under /library/Zend. The Zend library contains many Component folders.



APIs
An API is a collection of Components. Zend Framework is an API?

When I read this tutorial and they say this:
http://framework.zend.com/docs/quickstart/create-a-model-and-database-table

[pre]
...
...
As such, a simple guestbook model API might look something like this:
...
...
[/pre]

That makes me confused. Shouldn't a Guestbook be classified as a Component like Zend_Form except that it's not part of Zend library? What makes Guestbook an API?
Is it because Guestbook has a Data Mapper never seen this kind of programming before, with that Data Mapper file.

.
[/nobr]
akrabat (479) [Avatar] Offline
#2
Re: What's the difference between API, Components and Class files?
I would say this:

A class file is a file on disk that contains a class.
A component is a collection of classes
An API is a the collection of public methods that a class (and hence logically, a component) has.

i.e. the API is the set of methods that the programmer uses to make the class or component do some work.

Regards,

Rob...
apprentice (77) [Avatar] Offline
#3
Re: What's the difference between API, Components and Class files?
Thanks I can see clearly now.