Opened 11 years ago

Closed 10 years ago

#436 closed new feature (fixed)

new architecture for View classes

Reported by: lemon-head Owned by: lemon-head
Priority: major Milestone: Rox Framework
Component: FrameWork Keywords:
Cc:

Description

We can make it a lot easier to code view classes, by using inheritance and polymorphism.

Have a look at the new application 'about' - it uses the new mechanism.

Change History (8)

comment:1 Changed 11 years ago by lemon-head

  • Owner set to lemon-head
  • Status changed from new to assigned

[4224] - all View classes can now inherit from RoxPageView, and redefine the protected methods.

comment:2 Changed 11 years ago by lemon-head

  • follow_up changed from none to review code

[4225] - a new 'about' application, to prove that it works.

comment:3 Changed 11 years ago by lemon-head

[4240] - first steps towards a template switcher.

A new way to include template files, to constrain the power of template files.

A later step will be to use an exchangeable $template_factory, that will allow template switching.

Advantages:

  1. Template files included with the new mechanism can't use methods or private fields of the $view object. All dependencies have to be injected explicitly into the template, using the $args argument.
  2. Some dependencies (currently only $words) are injected by RoxPageView, so the application writer doesn't need to care about it.
  3. In the future we can use an exchangeable $template_factory object. Instead of the usual templates, it could return
    • mock templates for testing (which don't include a file, but only echo the template name.
    • templates in a different directory - this would have the effect of skinning.

comment:4 Changed 11 years ago by lemon-head

comment:5 Changed 11 years ago by lemon-head

In the meantime everything needed for RoxPageView is in /tools/ folder, and depends on other things in /roxlauncher/ (especially, to parse the "autoload.ini").

comment:6 Changed 11 years ago by micha

  • follow_up changed from review code to move to alpha
  • Milestone changed from unassigned to 0.2 - community

Will try to move it to alpha

comment:7 Changed 11 years ago by lemon-head

  • Milestone changed from 0.2 - community to Rox Framework

comment:8 Changed 10 years ago by lemon-head

  • follow_up changed from move to alpha to none
  • Resolution set to fixed
  • Status changed from assigned to closed

This is released some time ago.

Note: See TracTickets for help on using tickets.