Jump to content


Photo

Ultra mega super huge function files


  • Please log in to reply
5 replies to this topic

#1 eric1235711

eric1235711
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts
  • LocationSão Paulo - Brazil

Posted 15 September 2006 - 01:57 PM

Here where I´m working there are is a single functions file called 'general.php' with more than 9000 lines. It also includes other function files...  :-X

There are almost all the functions (not general functions are there too)...

won´t it overcharge the server or will it not do a lot of useless processing? And won´t it put a lot of trash in the server´s memory?
Programming is like building your own universe...
But let me ask you something:
Your world... It´s cool? Or it sucks?

#2 eric1235711

eric1235711
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts
  • LocationSão Paulo - Brazil

Posted 15 September 2006 - 03:56 PM

help
Programming is like building your own universe...
But let me ask you something:
Your world... It´s cool? Or it sucks?

#3 bholbrook

bholbrook
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 15 September 2006 - 06:25 PM

sounds like you need to read up on classes.

we write classes in excess of 100,000 lines without performance degrading

#4 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 15 September 2006 - 06:27 PM

those functions shouldn't really hurt anything.  Classes are very good, very helpful, if yuo want to learn how to do them, there not that hard.  Having that many functions just says you have a lot of reusable code, you could probably cut that in half if you converted everything over to OOP. it would probably help server some, but other than that you should be fine.  Just call them when you need them.  Well only include them if you need them.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#5 eric1235711

eric1235711
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts
  • LocationSão Paulo - Brazil

Posted 15 September 2006 - 08:37 PM

sounds like you need to read up on classes.

we write classes in excess of 100,000 lines without performance degrading


sorry... I didn´t know, ok... :'(
Programming is like building your own universe...
But let me ask you something:
Your world... It´s cool? Or it sucks?

#6 eric1235711

eric1235711
  • Members
  • PipPipPip
  • Advanced Member
  • 107 posts
  • LocationSão Paulo - Brazil

Posted 15 September 2006 - 08:41 PM

those functions shouldn't really hurt anything.  Classes are very good, very helpful, if yuo want to learn how to do them, there not that hard.  Having that many functions just says you have a lot of reusable code, you could probably cut that in half if you converted everything over to OOP. it would probably help server some, but other than that you should be fine.  Just call them when you need them.  Well only include them if you need them.


You're saying about things like this?
<?php

class myclass{
  myfunct1(){
  }
  myfunct2(){
  }
  // (...)
  myfuncN(){
  }
}

myclass::myfunct1();
//etc

?>
[code]

I use it in my own codes...[/code]

Programming is like building your own universe...
But let me ask you something:
Your world... It´s cool? Or it sucks?




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users