Page 1 of 1

PRADO Anyone?

Posted: Fri Jul 21, 2006 11:52 am
by Ward
I'm curious if anyone here has had much experience with PRADO? I have been toying with PRADO 3 for a couple of weeks now, and so far it's awesome. I'm familiar with .NET, so PRADO comes fairly easily, since it works in a similar method. Has anyone here actually written a complete application in it? If so, how is the performance? PRADO 3.x is still very new, so it's hard to find sample code. Also, the documentation isn't complete, which makes it hard to figure out what some controls do.

My favorite thing so far has to be the form validators, which are modeled after the .NET validators. This was one of my favorite things in .NET, and now I can do it in PHP :D Also, the viewstate ability is nice, allowing you to code more like a desktop app than a web app. It is supposed to have built-in AJAX support (I think it works something like ATLAS for .NET), but I haven't played with it yet.

If you haven't seen/heard of prado yet, check it out at http://www.pradosoft.com

Posted: Fri Jul 21, 2006 1:34 pm
by Christopher
If you like or are used to the .NET style then Prado is the framework for you in PHP.

Posted: Fri Jul 21, 2006 1:36 pm
by Luke
it looks pretty cool. I'm going to have to check it out when I get home.

Posted: Fri Jul 21, 2006 1:37 pm
by RobertGonzalez
Had never heard of it, but am going to look into it.

Posted: Fri Jul 21, 2006 2:24 pm
by Ward
This is a snippet of a test form I put together. I edit in Zend Studio, and someone wrote a prado plugin for it that adds templates for all of the prado components. This literally took about 3 minutes to write, and I went from a blank page to a fully functional form, complete with required field and regular expression validation.

PRADO completely separates UI from logic. UI components are initalized by tags in the HTML, just like .NET. If you have experience in .NET, than this should look strangely similar:

HTML Code (Display)

Code: Select all

<html>
<head>
	<title>Harold's Test Form</title>
</head>
<body>
<com:TForm>
<table class="" border="}" cellpadding="" cellspacing="">
	<tr>
		<td>First Name</td>
		<td>
		<com:TTextBox
			ID="txtFirstName"
		/>
		<com:TRequiredFieldValidator
		    ControlToValidate="txtFirstName"
		    ErrorMessage="* Required"
		    Display="Dynamic"
		    />
		    <com:TRegularExpressionValidator
		        ControlToValidate="txtFirstName"
		        ErrorMessage="* Invalid"
		        Display="Dynamic"
		        RegularExpression="[A-Za-z].*"
		        />
		</td>
	</tr>
	<tr>
		<td>Last Name</td>
		<td>
		<com:TTextBox
			ID="txtLastName"
		/>
		<com:TRequiredFieldValidator
		    ControlToValidate="txtLastName"
		    ErrorMessage="* Required"
		    Display="Dynamic"
		    />
		    <com:TRegularExpressionValidator
		        ControlToValidate="txtLastName"
		        ErrorMessage="* Invalid"
		        Display="Dynamic"
		        RegularExpression="[A-Za-z].*"
		        />
		</td>
	</tr>
</table>
<com:TButton
    ID="btnSubmit"
    Text="Submit"
    OnClick="submitForm"
    />

    <com:TTextBox
    	ID="txtOutput"
    />
</com:TForm>
</body>
</html>
Back-end code:

Code: Select all

<?php

class Home extends TPage
{
	function submitForm($sender, $arguments)
	{
		$this->txtOutput->text = "Page is valid";
	}
}

?>

Posted: Fri Jul 21, 2006 2:33 pm
by Christopher
If you are looking for a framework with super-powerful templates then WACT is pretty interesting ... unfortunately there are no releases so you need to get the code from Subversion.

Posted: Fri Jul 21, 2006 7:23 pm
by RobertGonzalez
That's pretty cool. Looks just like a .NET template.