User:OliverCharles/ServerManual/Models: Difference between revisions

From MusicBrainz Wiki
Jump to navigationJump to search
(Adding feedback section (Imported from MoinMoin))
(Breadcrumbs (Imported from MoinMoin))
Line 1: Line 1:
<small>[[User:OliverCharles/ServerManual|Server Manual]] > Models </small>

Within the Catalyst framework, models are the primary way to interact with data. This allows us to keep controllers abstract and also provides code reuse. Firstly, a bit about the models that we currently have - and how you can use them.
Within the Catalyst framework, models are the primary way to interact with data. This allows us to keep controllers abstract and also provides code reuse. Firstly, a bit about the models that we currently have - and how you can use them.


Line 64: Line 66:


This documentation is very alpha, and I'd really appreciate your feedback! Any comments, add it below, please sign it :)
This documentation is very alpha, and I'd really appreciate your feedback! Any comments, add it below, please sign it :)
* '''Separate pages?''' I can see this page getting very large with all the models crapped together, should I split them into separate pages? -- [[User:OliverCharles|OliverCharles]] 23:32, 26 July 2008 (UTC)
* '''Separate pages?''' I can see this page getting very large with all the models crapped together, should I split them into separate pages? -- [[User:OliverCharles|OliverCharles]] 23:32, 26 July 2008 (UTC)

[[Category:Documentation]]

Revision as of 23:36, 26 July 2008

Server Manual > Models

Within the Catalyst framework, models are the primary way to interact with data. This allows us to keep controllers abstract and also provides code reuse. Firstly, a bit about the models that we currently have - and how you can use them.

Current Models

MusicBrainz::Server::Model::Alias

load_for_entity $entity

MusicBrainz::Server::Model::Annotation

load_latest_annotation $entity

MusicBrainz::Server::Model::Artist

load $id

find_similar_artists $artist

MusicBrainz::Server::Model::CdToc

load_for_release $cdtoc

MusicBrainz::Server::Model::Documentation

fetch_page $page_id

MusicBrainz::Server::Model::Label

load $id

MusicBrainz::Server::Model::Relation

MusicBrainz::Server::Model::Release

find_linked_albums $entity

load $id

load_events $release

load_for_artist $artist, $all?

load_for_label $label

MusicBrainz::Server::Model::Tag

tog_tags $entity, $amount?

generate_tag_cloud $entity, $min_size?, $max_size, $bold_threshold?

MusicBrainz::Server::Model::Track

load $id

load_from_release $release

MusicBrainz::Server::Model::Url

load $id

Writing your own models

Feedback

This documentation is very alpha, and I'd really appreciate your feedback! Any comments, add it below, please sign it :)

  • Separate pages? I can see this page getting very large with all the models crapped together, should I split them into separate pages? -- OliverCharles 23:32, 26 July 2008 (UTC)