框架核心的基本原理是什么? [英] What is the basic principle of a core on framework?

查看:85
本文介绍了框架核心的基本原理是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

现在,我必须创建一个框架.并且需要更多地了解其背后的概念.那么,是否有任何有关如何构建框架核心的文档?

或者至少,当您必须创建一个时,您的处理方式是什么?

顺便说一句,我对核心的意思是骨架.框架的一部分,作为控制器来控制控制器.

例如,我的个人问题: 1.我们如何创建易于维护和自定义的配置? 2.我们如何加载与另一个类具有依赖关系的类? 3.我们如何对待我们的模型? 4.等等?

@edited:该框架将是Wordpress主题的框架.

对不起,如果这个问题太笼统了.但是任何参考都会很棒.

解决方案

K,我通常倾向于拥护此处未发明心态, WebEA设计模式,然后进行决定哪种模式最适合您的目标.

问如何编写框架的核心?"就像问您如何组织文学作品?"因为如果不知道您是在谈论小说,戏剧还是诗歌,就没有真正的答案.

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.

解决方案

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.

这篇关于框架核心的基本原理是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆