Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.

SmartyValidate vs. Formsess??

 
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons
View previous topic :: View next topic  

Do you use SmartyValidate or Formsess for validation?
SmartyValidate
54%
 54%  [ 6 ]
Formsess
9%
 9%  [ 1 ]
hand-coded as needed
36%
 36%  [ 4 ]
what does "validate" mean?
0%
 0%  [ 0 ]
Total Votes : 11

Author Message
mjohnston
Smarty Rookie


Joined: 08 Jul 2004
Posts: 10
Location: Düsseldorf

PostPosted: Thu Jul 08, 2004 1:57 pm    Post subject: SmartyValidate vs. Formsess?? Reply with quote

Has anyone used both? It seems SmartyValidate came second -- what was the rationale for developing it when Formsess already exists?

At our shop, we develop many small marketing sites. We are migrating our site development from WebObjects to php, and plan to use Smarty. We want to choose a form validation setup. It has to integrate with our action tracking mechanism & data association would be nice, although we could roll our own easily enough.

Speed is an issue as we sometimes have fairly high traffic sites (highest so far was over 200K pages/day). Also important is minimizing how much the HTML layout team has to learn, and vital is that it not hamper them in anyway from making all the little tweaks they make to have the pages look the way they want them to.
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7366
Location: Lincoln Nebraska, USA

PostPosted: Thu Jul 08, 2004 2:23 pm    Post subject: Reply with quote

SmartyValidate and formsess use two completely different approaches to form validation, you're probably better off trying both of them and decide what works best for you.
Back to top
View user's profile Send private message Visit poster's website
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Thu Jul 08, 2004 2:37 pm    Post subject: Reply with quote

I'm still not convinced about integrating validation at the display level. I prefer to handle that at the application, but I am experimenting with these tools (mostly SmartyValidate) anyhow, mainly because I want to make sure I haven't missed the boat on something insanely great.

IIR (and I could be wrong) one thing that Formsess does support is client-side validation via Javascript. That's actually pretty neat, in my mind. On-the-other-hand, I didn't like the way that Formsess integrates into the process (via a pre-filter) since it introduces yet another level of parsing of the template.

Another thing is that Katana is probably pretty busy these days since officially forming the waterproof group with marms et al (those are the PHPEdit guys). I'm not even certain that Formsess is still being actively developed/maintained. If anyone knows better, please update us!
Back to top
View user's profile Send private message
mjohnston
Smarty Rookie


Joined: 08 Jul 2004
Posts: 10
Location: Düsseldorf

PostPosted: Thu Jul 08, 2004 2:38 pm    Post subject: Reply with quote

I am trying both of them of course, but I'm looking for the long term experience of others in the wild.

They don't seem so different to me, actually, except that formsess automatically registers the forms, but has the parsing overhead of having custom tags.

I like formsess's ability to automatically combine js validation with server-side validation; is there a similar way to do this with SmartyValidate?
Back to top
View user's profile Send private message
mohrt
Administrator


Joined: 16 Apr 2003
Posts: 7366
Location: Lincoln Nebraska, USA

PostPosted: Thu Jul 08, 2004 2:52 pm    Post subject: Reply with quote

There is currently no client-side validation supported with SmartyValidate. It is certainly possible, but seems to have very low demand (I for one have no need for it.)
Back to top
View user's profile Send private message Visit poster's website
mjohnston
Smarty Rookie


Joined: 08 Jul 2004
Posts: 10
Location: Düsseldorf

PostPosted: Thu Jul 08, 2004 3:54 pm    Post subject: Reply with quote

boots, I think we posted at the same time Smile

In our setup, the html team is generally responsible for basic validation, and for more involved validation the approach of registering a custom function makes sense.

They tend to favour javascript validation. We (the software guys) would like to get away from using javascript validation. But since we develop for many different clients, we have to keep the flexibility to be able to do things multiple ways as needed.
Back to top
View user's profile Send private message
katana
Smarty Rookie


Joined: 17 Apr 2003
Posts: 26
Location: France

PostPosted: Wed Jul 28, 2004 6:33 pm    Post subject: Reply with quote

Surprise !

I just wanted to say that formsess is still alive. Indeed the project is not very active at the moment, but I am maintaining it and I don't intend to give up at all.

Formsess 2.0.0 final is gonna be released soon, and I'm working on the next version, which is gonna feature a complete refactoring of some parts of the process, in order to allow totally dynamic forms with JS validation support (e.g. control structures will also influence the generation of JS validation code).

So don't give up Smile
Back to top
View user's profile Send private message MSN Messenger
boots
Administrator


Joined: 16 Apr 2003
Posts: 5611
Location: Toronto, Canada

PostPosted: Wed Jul 28, 2004 7:03 pm    Post subject: Reply with quote

katana--nice to see you here again.

Thanks for the update--it is good to know that your project lives on! If it suits you, when you release 2.0 (or are betaing it again) it would be great if you started a new thread in this forum.

Greetings.
Back to top
View user's profile Send private message
katana
Smarty Rookie


Joined: 17 Apr 2003
Posts: 26
Location: France

PostPosted: Wed Jul 28, 2004 7:14 pm    Post subject: Reply with quote

Okay, I'll do that, no problem.

As you have pointed out, I'm quite busy with PHPEdit, work, and another project, but I'm working on formsess just at the moment. I'll post that new thread when it is released.
Back to top
View user's profile Send private message MSN Messenger
mjohnston
Smarty Rookie


Joined: 08 Jul 2004
Posts: 10
Location: Düsseldorf

PostPosted: Fri Jul 30, 2004 9:53 am    Post subject: update Reply with quote

We decided to go with SmartyValidate. Both seemed to work well so it was avoiding the use of custom form tags that decided us.

We built a form controller that abstracts the process of building multi-step forms. To use it you attach a business object and register your flow through a series of forms/pages as actions, organized in a hierarchy by startTemplate --> form --> button. For each action you can supply prepare, validate (for custom validation) and save callbacks (expected to live on the business object) and a result template. Conceptually, we roughly divide validation into two areas: data type validation and business logic validation. Data type validation is handled by SmartyValidate validate tags and business logic validation by the validate callback registered for the action.

Using a form controller has some of the disadvantages that the frontside controller has, but at least doesn't force using a frontside controller for the entire site. And since the individual pages of a multi-step data entry are generally meaningless out of context, it doesn't matter that they aren't accessible by "speaking url" The advantage of the the form controller is that we avoid using redirects for dispatching, important because redirects are slow for many people with high-latency connections.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Add-ons All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP