Saitoh_TD
Joined: 19 Apr 2002 Posts: 110 Location: Cornfield, MO
|
Posted: Fri Apr 26, 2002 12:45 pm Post subject: Howto #6: Decal Plugin LifeCycle, Embryo to Corpse |
|
|
Howto: Decal Plugin LifeCycle, Embryo to Corpse
Definitions:
LifeCycle - The beginning to the End of a project
IDE - Integrated Developement Environtment, the place you program. Anything from the VB application to Notepad.
Concepts:
In this document is the birds and the bees of program development. I'll try to make this less unconfortable than the "Talk" that your parents gave you about lifecycles.
Knowing about software lifecycles is majorly important for software and the skills you learn here are easilly transferable to corporate programming. I'm just going to do this in relation to a Plugin.
In this Howto, we will make a project from start to finish. Not just code, we will look at the theory, process, and mindset that surrounds it. I will be using major pseudocode for examples because this isn't a howto on programming code directly.
Preface:
A project lifecycle has 3 major steps:
Code:
Create->Maintain->Terminate
Each of these steps can be broken down into smaller chunks:
Code:
Create: Plan->Design->Implement->Execute->Evaluate
Maintain: Evaluate->Fix & Change->Evaluate
Terminate: Evaluate->Terminate
Initialize:
*twinkle in your father's eye*
Ok, I could have called this Create.Plan, but I'm so used to having the first section be Initialize. It's really the same thing. This stage begins when you suddenly snap and say "I want a plugin that takes off my pants and dances when I click a button!" Seriously, that is what we are going to make here, so live with it!
What's the first thing we need to do?
*smack* NO! CLOSE YOUR PROGRAMMING LANGUAGE IDE RIGHT NOW!
Unless it's notepad, that is. Our first step is Create.Plan. This is when we record our goals. Simple enough.
Code:
Goal: Make a plugin that takes off your characters pants and dances like a drudge.
Good, our first step is almost done. We also need to start thinking about how to fufill our goals. Let's see, we really only have two steps to do, right?
Code:
Steps
1. Click Button
a. Take off pants that we are wearing
b. Dance!
Lookie, we already made a requirement, also! The pants that we need to take off are our own. Lets write that down.
Code:
Requirements:
The pants we take off must be our pants.
It'd be rather silly if we tried to remove someone else's pant. But that is what requirements are for. They help us to define what we need to do. I believe that is all the planning we need, lets move on.
Create.Design:
Now that we know what we want to do, we need to start thinking about how to do it. When programming a plugin, we need to think down to the nitty-gritty of everything around us. What do we need to know?
Code:
1. Who am I?
2. What pants am I wearing?
3. How do I take off my pants?
4. Where do I put my pants that I take off?
5. How do I dance?
No problem, right? I know who my character because I clicked on his/her name and hit login. I know what pants I am wearing because I see them on my character. I remove them by clicking and dragging them into my pack. Then, I dance by hitting *Dance* in the chat bar.
Woah! Slow down there, spliffy. That's how *you* do it, not how a program can/does. Let's take a look how a plugin could do it.
Code:
1. Who am I?
- I am CharacterStats.Name and CharacterStats.GUID
2. What pants am I wearing?
- ImpInventory?
3. How do I take off my pants?
- Pluginsite.MoveItem <*>
4. Where do I put my pants?
- ImpInventory?
5. How do I dance?
- Type *dance* in the chat bar
Now, you can think a little more about processes.
Code:
How do I type *dance* into the chat bar?
1. Press Enter.
2. Type *dance*
3. Press Enter.
Things are looking good. Let's start coding!
Create.Implement
This is probably the part you can't wait to do. So get to it.
During this phase you take your requirements and processes and convert them into code. Since we really aren't talking code in this Howto that's all that really needs to be said about this part.
Create.Execute
You have a program, it works, now what? Simple, deploy! Bundle that sucker up into an installer and pass it on. Execute just means to deliver you "solution" (Icky trendy word) to the people.
Create.Evaluate
I really like to think of this as the listen step. Listen to feedback, listen for change requests, listen for bug reports... Record them all. From this point, you have two optional paths, Maintain and Terminate.
Maintain.Fix & Change
This step is really the same as the development process, just compressed into one. You are going to take reports from the boards, design, plan, implement, and execute a solution.
Lets see here, after digging through the boards, you found a defect for this program!
Code:
Hey programmer! You program sucks, it takes off pants, but doesn't take off armor on legs!
Doh, lets add that to our requirements.
Code:
6. Am I wearing leg armor?
Add it to the main process.
Code:
Steps
1. Click Button
a. Take off pants that we are wearing
b. Take off leg armor that we are wearing
c. Dance!
And then code it into the program.
Code:
If WearingArmor= true then Chippendale(LegArmor)
Sweet. Only one thing left to discuss.
Terminate.Terminate
This step can happen by choice or by abandonment.
After programming your brain out, you really never want to look at this program again. Or perhaps you want to start working on a new project that takes off all your clothes and streaks through town saying "Look at my little goblins, matey!"
You can do one of a dozen things:
- Release your source GPL style
- Delete your code
- Pass of the project to someone that wants to maintain it
- Retire the program to a better and brighter type of application
- Write a webpage condemning people who didn't like your program as the reason you are no longer willing to support it.
It's a free world, and no one is forcing you to code.
At this point, you really want to let users know about this end. Otherwise, you leave behind a legacy of people spamming boards about where to find your no non-existent plugin.
Summary:
That's about it. While you really don't have to follow any process, it's always a good idea to know where you are and where you are going. Sitting down and coding may work for small applications, but if you have something larger, you really want to start planning ahead early. That way, you won't reach a point and say something like "Crap! All my code was based on thinking that pants only have one leg, I'm going to have to rewrite everything!"
Good luck out there. _________________ - Navi - Navi II - Navi III -
http://www.saigumi.net
http://navi3.sourceforge.net |
|