my new project

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
this is very much work in progress at the moment...


my latest site rebuild, i stated this last night, i deceded was to be crazy modular affair

so far I have a basic script that scans a dir for modules, creates the menu and then outputs the contence of the currnet module

i'm quite prowd of it :D

the trouble is, it's all getting a little complicated, and i was wondering if anyone had any tips?

it's also my first attempts with any OO in PHP :D



you can find it here and here
 

KevinUK

Can't get enough of FH
Joined
Dec 22, 2003
Messages
649
My current project was for me to use CSS for the design of the website, my next project will be the same as you, OO PHP! I only have 1 or 2 functions at the minute.
 

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
does anyone know if static functions are supported by PHP?

as the current method of instansiation is a little poo
 

TheJkWhoSaysNi

One of Freddy's beloved
Joined
Dec 23, 2003
Messages
187
It's quite nice but you're not seperating markup from code.

Oh, and php isn't java. You don't need getters and setters. (Though i'm unsure whether it's considered good practice or not to put them in).

Your code isn't completley OO. The start of the program could just be. new main(); or whatever you want to call your root class.

I began writing a CMS in OO php a few months ago, never finished it, but i got most of the back end done. Strangely, I had a module loading system that was almost identical to how you're doing it. Unfortunatly i found that it wasn't feasable it use it because modules could be so pontentially different (I wrote a PM system and a php syntax hilighting module to test) . I decided that because modules would need to be polymorphic, they would not be able to interact enough with the original system to be worth using. Perhaps you can overcome this.

It's a good start in OO php though. :)
 

wyrd_fish

Fledgling Freddie
Joined
Dec 27, 2003
Messages
537
yeah, i've been thinking about it alot today

and it's either going to be modular, with a lot of setting up, or pretty un-modular


i also started re writeing it today, but ran out of steam


i use getters and setters as that's how i was tought, in java, it's just habbit

oh, and PHP can support static methods
 

Maljonic

Can't get enough of FH
Joined
Dec 22, 2003
Messages
1,297
I wish I understood what you were doing so I could comment. :)
 

Users who are viewing this thread

Top Bottom