Jump to content

[SOLVED] php application classes and libraries


Ayon

Recommended Posts

i wasn't sure where to put this, so if it's in the wrong place just kick it wherever you want :)

 

Well as I stated in the topic its about PHP Application ... i'm currently working on a little framework for personal use... ive been scanning trough several frameworks to get ideas on how to set up the directories etc, and i often see a folder called something simular to "classes" and one called  "lib" or something close...

 

baisicly my question is... what's the difference between a class file and a lib file? cuz from what i've seen both "file types" contains classes.. but also, some lib files only contains only functions...

 

I'm confused ???

 

Thanks in advance

- Ayon

class = classes (OOP)

lib = Library (bunch of simpler functions)

 

a lib maybe a set of common functions like a simple function to check if an email is a valid format,

think of a lib as common everyday helper functions, of course these can contain classes as well! but if it gets too complex i normally give it its own files and class

 

a class is used for OOP (handling of objects)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.