gnuherds-app-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: New proposed webapp Architecture


From: Klaus Weiss
Subject: Re: New proposed webapp Architecture
Date: Sat, 21 Apr 2007 18:14:31 +0200

Hi,

I have many things for our MVC branch done, however, there are still
some important things to get done.

Among other things I finished localization and simple data validation
(only POST will be validated by the Model, both GET and POST vars will
be safe to use it within controllers - security checks are done
backdrop).

The next big task will be the view class. It is now possible to use the
power of PHP itself within each view files. In addition there exist
helper classes for certain HTML tasks (in future there will be helper
classes for session handling and other things too).

Here is an example view file:

...
<body>
<form action="/index" method="post">
<?php echo $this->password('Model/field', array('size' => 10)); ?>
<?php echo $this->tagFieldError('Model/field', 'text'); ?>
<?php echo $this->submit(_('Submit')); ?>
</form>
</body>
...

In the model file there should be an entry in the validate array that
the password field shouldn't be empty. If the user doesn't type anything
the message 'text' appears on his screen. How it is displayed can be
configured with additional parameters in tagFieldError. Right now it can
be attuned to display the message within the field or on a special error
site which can be itself designed with simple HTML/CSS. 








 







reply via email to

[Prev in Thread] Current Thread [Next in Thread]