views:

42

answers:

3

i wonder what the difference between a library and a plugin is?

if a component creates a database (maybe comes with a .sql file or creates through a method) could it still be a library or is it called a plugin or module?

cause i am creating a address book component and it provides methods to insert and read records in database. i don't know if i should put it in library folder or plugin folder.

please shed a light on this.

thanks

+1  A: 

I guess that would be more of a plugin. A library generally provides some pragmatic function or something. Like a way to access a service, or provide a function set, but it generally does not create a database of its own.

webdestroya
I agree with u but then i think about Doctrine that is a library that handles the database? and i wonder.
never_had_a_name
Doctrine is an ORM **framework** and not a library. Zend Library is a 'library' and it does not create any databases or write anything (unless it is a specific function of the library)
webdestroya
+1  A: 

This is a matter of opinion and of taste. Libraries tend to not do that much on their own but enable you ("the programmer") to do things. Though that could be said of many plugins as well...

Jakub Hampl
+1  A: 

I vote for plugin.

A plugin extends the capabilities of a larger application. That sounds exactly like what your address book is doing.

A library is a collection of subroutines or classes used to develop software. I think any component that instantiates its own database falls outside the scope of a library.

dbyrne