Separation of logics

From LordMattWiki

Jump to: navigation, search

This is a draft expressing ideas of Extend Aware specifications to logic

After creating this draft Lord Matt found this which said it all again but in technical language. This indicated to Lord Matt that he was thinking in the correct dirrection.

Contents

[edit] The seperation of logic into n-tier application.

  • Presentation
  • Business
  • Data

In this the classic 3-Tier model the business layer decides what the data means and what should be in what field etc

But with the blog and other publication we have a sideways model:

Input UI <--> Logics <--> Presentation

It's the logics at the center that this article addresses.

Within Nucleus the seperation of these logics is poor in places and great in others.

An Extend Aware plugin must therefore act to seperate as it can easily muddy the differences

[edit] Data-Logic

Logic that relates to data and it's storeage.

Nucleus provides two areas for post data BODY and Extended. The later is redundant and should be depreciated soon. As such a new standard is propsed.

To seperate storage and logic that relates to what is stored a simple text marker should be used <!--[MORE]--> which can be used as a split point to split the post into as many points as required. if the plugin is not there nothing breaks as the tag outputs as a HTML comment. After all this seperation is metadata and not a true seperation (it's all the same post).

Plugins that use "options" also connect to this layer to add the options.

[edit] Control-Logic

This level of logic deals with the control of events. It sits between Admin-UI and Data-Logic to store data that it will use on disisions etc. Think of this level as settings/control panel and you about have it.

This section looks at the data and desides what you can look at (access control, logging in etc).

Plugins that extend functionality often use this logic layer along with one other.

[edit] Pre-Admin Presentation Logic (Admin-UI)

Very few plugins diliberatly operate here apart from the very good plugin abstraction that they naturally connect to.


[edit] Pre-Display Presentation Logic (Guest-UI)

Evey skin and template plugin operates into the abstraction for this section but this is the least well defined logic area operating deep down into data-layer and trespassing on Admin-UI layer.

What makes matters worse is that they shatter the simple OO that a blog can be. A blog has three objects:

  • Containing Page
  • Post
  • Suplimental / Meta

Almost all skin var give suplimental post data which is not quite right.

Example: tags: ideally they should be set within the post content but the tendancy is to add them at the end. The tags are stored as meta data and should be presented as metadata in feed but also as body content in posts.

Most other post related plugins process metadata and should be given in feed.

Personal tools