Jump to content

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)

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.