I wrote about PlantText before. It is about creating diagrams with code. mermaid is another one from the same category. Recently GitHub has given support for this.
I tried to create some class diagrams with mermaid online editor.
classDiagram
class ILog {
<<interface>>
void LogInfo(string message)
void LogWarn(string message)
void LogError(string message)
}
class ConsoleLog {
void LogInfo(string message)
void LogWarn(string message)
void LogError(string message)
}
ILog --|> ConsoleLog : Implements
class FileLog {
void LogInfo(string message)
void LogWarn(string message)
void LogError(string message)
}
ILog --|> FileLog : Implements
class AppInsightsLog {
void LogInfo(string message)
void LogWarn(string message)
void LogError(string message)
}
ILog --|> AppInsightsLog : Implements
class IGreetService {
<<interface>>
string UserName
string GetHello()
string GetBye()
}
class GreetService {
string UserName
ILog Logger
string GetHello()
string GetBye()
}
IGreetService --|> GreetService : Implements
ILog ..> GreetService : Dependency
