0

right now, i have to create a framework. and need to understand more about the concept behind it. so, is there any documentation about how to build core of a framework ?

or at least, what is your approach when you have to create one ?

btw, what i mean with core, is, the skeleton. the part of framework that works as controller who control the controllers.

for example, my personal question : 1. How we create easy to maintain and customize configs ? 2. How we load a class that have dependency with another class ? 3. How we treat our models ? 4. etc ?

@edited : the framework is would be a framework for wordpress theme.

i'm sorry if the question is too broad. but any reference will be great.

justjoe
  • 5,454
  • 9
  • 44
  • 64
  • the part of framework that controls and coordinate initialization of models and views and controllers – justjoe Aug 12 '10 at 14:43
  • 1
    For any kind of meaningful response, you will need to explain in a lot more detail what you are trying to do. Also explain what specific parts you have questions on. How do I architect and design a framework ? is not going to work. In it's current form I vote to close. – Romain Hippeau Aug 12 '10 at 14:49
  • @Romain Hippeau - agreed, except to vote to close; this is still a valid question who's answer has more to do with inception and scoping than it does with writing frameworks. – Richard JP Le Guen Aug 12 '10 at 14:52
  • Read through the CodeIgniter source code. It's about as good a PHP framework as you're going to find. – user229044 Aug 12 '10 at 14:52
  • @meager i have read codeigniter. frankly, my job is about porting previous codeigniter code and move it into wordpress. i have destroy it skeleton (configs) and build it again to work on wordpress as theme....may be it too broad question – justjoe Aug 12 '10 at 14:54

1 Answers1

5

K, I usually tend to champion the Not Invented Here mentality, encouraging people to re-invent the wheel as a learning exercise... but the way you've asked this question suggests to me that you've decided to build a framework before deciding why you want or need that framework.

What do you want this framework to do? Equally, what do you not want it to do?

Once you've made that decision, read up on some WebEA design patterns and decide what combination of patterns best suits your goals.

Asking "How do you write the core of a framework?" is like asking "How do you structure literature?" in that there's no real answer without knowing if you're talking about a novel or a play or a poem.

Community
  • 1
  • 1
Richard JP Le Guen
  • 28,364
  • 7
  • 89
  • 119