Here I'll use the example of the IRC bot I write: Goomba
+ Goomba (Goomba namespace)
|+ Configuration (Goomba.Configuration namespace)
| |- Config.boo
| |# class Config
|+ Data (Goomba.Data namespace)
| |- Column.boo
| | |# class Column
| |- Database.boo
| | |# enum DatabaseType
| | |# class Database
| |- DatabasePreferences.boo
| | |# class DatabasePreferences
| |- Result.boo
| |# class Result
|+ Plugins (Goomba.Plugins namespace)
| |- DefineCommand.boo
| | |# class DefineCommand
| | |# class Definition
| |- Hail.boo
| | |# class Hail
| | |# class HailMessage
| |- HelpCommand.boo
| | |# class HelpCommand
| |- Logger.boo
| | |# class Logger
| | |# class Message
| | |# class Action
| |- Quoter.boo
| | |# class Quoter
| | |# class Quote
| |- RawLogger.boo
| | |# class RawLogger
| |- UrlGenerator.boo
| | |# class UrlGenerator
| | |# class Engine
| |- UserTracker.boo
| | |# class UserTracker
| | |# class User
| |- VersionCommand.boo
| | |# class VersionCommand
| |- UrlTracker.boo
| |# class UrlTracker
| |# class Url
|- ActionEventArgs.boo
| |# enum ActionType
| |# class ActionEventArgs
|- DebugLogger.boo
| |# enum LogImportance
| |# class DebugLogger
|- Goomba.boo
| |# class Goomba
| |! Main Body (This will be executed when Goomba.exe is run)
|- GoombaPreferences.boo
| |# class GoombaPreferences
|- IPlugin.boo
| |# interface IPlugin
|- MessageEventArgs.boo
| |# enum MessageType
| |# class MessageEventArgs
|- Sender.boo
|# enum SenderType
|# class Sender
|
Which I have set up to create the assemblies Goomba.exe, Goomba.Data.dll, Goomba.Configuration.dll, as well as one assembly per plugin.
You may have noticed a few important things:
.boo file has at most one class in it. That class will have the same exact name as the .boo file.class Goomba definition. Any inline executable code must be at the bottom of a file in the assembly.Enums come before classes. This is merely a coding practice that is not required, but recommended. If an enum is larger than 15 values, place it in its own file.Files must be defined in this order:
Enums/Classes/Structs/Interfaces|
One class per file. If you have more than one class per file, split it up. |
Go on to Part 21 - Documentation