<p>You may already be aware of this, but the Class Reference is a <strong>complete breakdown of the Craft core</strong>. Everything that exists within the <code>craft/app</code> folder is documented here.</p>

<p>Craft is built upon the <a href="http://www.yiiframework.com/" rel="nofollow">Yii framework</a>. If you dig deep enough, many roads lead back to Yii queries. Fortunately, you'll rarely have to dig that deep! Craft has abstracted away much of the raw Yii commands into all of its <strong>Base</strong> classes.</p>

<p>Continuing from there, pretty much everything else that happens in Craft is layered upon the Base classes. You'll notice that most of the common components (Services, Controllers, Records, etc) contain a Base class, and all other classes are extended from there. In general, you can think of the Craft core as being "one big plugin"... In fact, when Craft 3 is released, this will be even more true.</p>

<p>It's important to note that <strong>your plugin won't need all of these components</strong>. Many plugins require only a few of these components to meet their needs. In your case, you may only need a Service, a Controller, a Record, a Model, and a Variable.</p>

<hr>

<p>Beyond that, I'll skip any recommendations for your specific plugin project. My intention was only to respond to the general purpose of your question... I'd highly recommend <strong>opening a separate question</strong> with specific points about what you are setting out to accomplish.</p>

CC BY-SA 3.0
2015-04-13T06:13:34.723Z
2015-04-13T06:13:34.723Z
Lindsey D
<p>I am attempting to lean how to write a plugin but am having trouble knowing how to work with the <a href="http://buildwithcraft.com/classreference">Class Reference documentation</a>. I understand all of the theory and how object oriented programs work. But I have never actually worked on a real world problem. I have only worked on small programs to learn the concepts.</p>

<p>I am overwhelmed by the Class Reference and don't know best practices for attacking a new project and using the Class Reference documentation. I feel overwhelmed and stuck, and so my question is can an experienced developer or two share some guidance as to their methodology for working with a framework in the real world?</p>

<p>The plugin itself is conceptually simple. I'm working on developing a application similar to tinyurl.com.  I need to store data in a database table and then read it back. I also then need to then figure out how to do a redirect. </p>

<p>My main goal is to get the general guidance on how to approach any new project with regard to how to start. Any guidance on the specific problem is also appreciated.</p>

<plugin-development><documentation>
How to use Class Reference Classes within the Craft framework for plugin development
# How to use Class Reference Classes within the Craft framework for plugin development

(Asked by: username_0 on 2015-04-13)

I am attempting to lean how to write a plugin but am having trouble knowing how to work with the [Class Reference documentation](http://buildwithcraft.com/classreference). I understand all of the theory and how object oriented programs work. But I have never actually worked on a real world problem. I have only worked on small programs to learn the concepts.

I am overwhelmed by the Class Reference and don't know best practices for attacking a new project and using the Class Reference documentation. I feel overwhelmed and stuck, and so my question is can an experienced developer or two share some guidance as to their methodology for working with a framework in the real world?

The plugin itself is conceptually simple. I'm working on developing a application similar to tinyurl.com. I need to store data in a database table and then read it back. I also then need to then figure out how to do a redirect.

My main goal is to get the general guidance on how to approach any new project with regard to how to start. Any guidance on the specific problem is also appreciated.

**Tags:** plugin-development, documentation


---

## 1 answers

### Answer by username_1 on 2015-04-13. Score: 3

You may already be aware of this, but the Class Reference is a **complete breakdown of the Craft core**. Everything that exists within the `craft/app` folder is documented here.

Craft is built upon the [Yii framework](http://www.yiiframework.com/). If you dig deep enough, many roads lead back to Yii queries. Fortunately, you'll rarely have to dig that deep! Craft has abstracted away much of the raw Yii commands into all of its **Base** classes.

Continuing from there, pretty much everything else that happens in Craft is layered upon the Base classes. You'll notice that most of the common components (Services, Controllers, Records, etc) contain a Base class, and all other classes are extended from there. In general, you can think of the Craft core as being "one big plugin"... In fact, when Craft 3 is released, this will be even more true.

It's important to note that **your plugin won't need all of these components**. Many plugins require only a few of these components to meet their needs. In your case, you may only need a Service, a Controller, a Record, a Model, and a Variable.

---

Beyond that, I'll skip any recommendations for your specific plugin project. My intention was only to respond to the general purpose of your question... I'd highly recommend **opening a separate question** with specific points about what you are setting out to accomplish.


---

