This user account is a bot operated by Gsonnenf (talk). It is used to make repetitive automated or semi-automated edits that would be extremely tedious to do manually, in accordance with the bot policy. This bot does not yet have the approval of the community, or approval has been withdrawn or expired, and therefore shouldn't be making edits that appear to be unassisted except in the operator's or its own user and user talk space. Administrators: if this bot is making edits that appear to be unassisted to pages not in the operator's or its own userspace, please block it. |
This bot will be used to maintain a pseudo database for rendering Lists, Infoboxes and other templates.
MVC
editThis bot is a fan of model–view–controller (MVC) architecture and believes data should be separated from its control and view. For those unfamiliar with the MVC architecture the following gives a brief description as it applies to this particular implementation:
- Model - This contains some data you might want to display. This would be held in some sort of data structure or database.
- View - This displays data to an end user. This would be the HTML page given to a user in our case.
- Controller - This converts the data into a form that can be used by the view. In our case, this would be a template such as infobox or listbox.
DatabaseBot doesn't utilize strict MVC but instead follows MVC principle within the Wikipedia framework.
Visitor Pattern
editThis bot utilizes the Visitor Pattern in its databases. This model allows rendering logic to be injected into a data structure. This pattern works exceptionally well with the Wikipedia template style. Other patterns may be usable but may add unnecessary complexity and difficulty to implementations.
- Data structure (Model): A template with the following form.
{{ {{{visiting template}}} | data_name_1 = data_value_1 | ... | data_name_N = data_value_N }}
- Visitor (controller) : A Template that uses some data:
... "Template text" {{{data_name_x}}} "template text"...
- Usage (view): The following tag can be used to display the above members in a page:
{{ Datastructure | Visitor }}
Example Usage
editModel example
Page:User:DatabaseBot/Data:Example
Page Contains:
{{ {{{1}}} | data1 = somedata1 | data2 = somedata2 | randomdata = adfdsfasdf }}
Control example
Page1:User:DatabaseBot/Template:ExampleTemplate1
example1:
Your data is {{{data1}}} your randomdata is {{{randomdata}}}. I do not display data2.
Page:User:DatabaseBot/Template:ExampleTemplate2
example2: This templates does display data2. Here it is {{{data2}}}.
View example
Example1 code:
{{User:DatabaseBot/Data:Example | User:DatabaseBot/Template:ExampleTemplate1 }}
Example1 View: Your data is somedata1 your randomdata is adfdsfasdf. I do not display data2.
Example1 code:
{{User:DatabaseBot/Data:Example | User:DatabaseBot/Template:ExampleTemplate1 }}
Example1 View: This templates does display data2. Here it is somedata2.
Example #2
edit100px | |
Developer(s) | Qt Software (formerly known as Trolltech) |
---|---|
Stable release | 4.5
/ March 3, 2009 |
Written in | C++ |
Operating system | Cross-platform |
Type | Widget toolkit |
License | GNU LGPL GNU GPL with Qt special exception Q Public License Proprietary |
Website | qtsoftware.com/ |
Name | Developer | Latest release version | latest release date | programming language | operating system | genre | license | website |
---|---|---|---|---|---|---|---|---|
Qt | Qt Software (formerly known as Trolltech) | 4.5 | March 3, 2009 | C++ | Cross-platform | Widget toolkit | GNU LGPL GNU GPL with Qt special exception Q Public License Proprietary |
qtsoftware.com/ |
Qt | Qt Software (formerly known as Trolltech) | 4.5 | March 3, 2009 | C++ | Cross-platform | Widget toolkit | GNU LGPL GNU GPL with Qt special exception Q Public License Proprietary |
qtsoftware.com/ |
Qt | Qt Software (formerly known as Trolltech) | 4.5 | March 3, 2009 | C++ | Cross-platform | Widget toolkit | GNU LGPL GNU GPL with Qt special exception Q Public License Proprietary |
qtsoftware.com/ |
Qt | Qt Software (formerly known as Trolltech) | 4.5 | March 3, 2009 | C++ | Cross-platform | Widget toolkit | GNU LGPL GNU GPL with Qt special exception Q Public License Proprietary |
qtsoftware.com/ |
Qt | Qt Software (formerly known as Trolltech) | 4.5 | March 3, 2009 | C++ | Cross-platform | Widget toolkit | GNU LGPL GNU GPL with Qt special exception Q Public License Proprietary |
qtsoftware.com/ |
Qt | Qt Software (formerly known as Trolltech) | 4.5 | March 3, 2009 | C++ | Cross-platform | Widget toolkit | GNU LGPL GNU GPL with Qt special exception Q Public License Proprietary |
qtsoftware.com/ |