.com Solutions Inc. - Logo  
services header buttons
.
FmPro Migration bullet item 7b FmPro Upgrade bullet item 7b FmPro Development
.
.
.
. .

Email a Friend

Bookmark This Page


..

. .


 


 

 

...
.

PHP to revTalk Conversion Service - Header graphic

The PHP to revTalk Conversion Feature has been introduced in FmPro Migrator Platinum Edition 5.46.

Top 10 Features

black bulletQuickly process PHP and HTML files within all subdirectories of a selected source directory.
black bulletConverted files are saved as .irev files or individual cards within a new Rev stack file.
black bulletSave many hours of manual retyping, performing an initial code conversion within seconds.
black bulletPHP variables are renamed, <?php tags are updated to <?rev tags, trailing semicolons and {} are removed.
black bulletSupported statements include: IF, ELSE, TRY/CATCH, PRINT, REQUIRE, SPRINT, WHILE, and FUNCTION definitions.
black bulletCommon operators and functions including: ==,===,++,--,&&,||,trim(),strlen(),printf(),strtolower(),strtoupper() are remapped into revTalk code.
black bulletPHP functions with passed in parameters are converted into revTalk functions closed by the "end <function name>" statement.
black bulletMulti-line block HERE document code is converted into a single line revTalk put statement.
black bulletCode indenting and comments are maintained within the generated revTalk code.
black bulletConvert and reuse PHP code in multi-platform Rev projects having rich graphical interfaces deployable on desktop, server and web platforms.

 

BASIC to revTalk Window screenshot

Description

The PHP to revTalk Conversion Service included with FmPro Migrator Platinum Edition saves Rev developers many hours of tedious and error-prone work converting PHP files into revTalk code. FmPro Migrator Platinum Edition efficiently traverses all subdirectories of any specified source directory, locating and converting all of the files it has found with the specified file extension (.php, .htm, .or html). The converted files are either saved as folders and .irev files or as individual cards within a new Rev stack file.

PHP to revTalk Conversion Service Pricing

FmPro Migrator Platinum Edition includes a PHP to revTalk License Key (Unlimited Script Quantity - 1 Year Duration)

Also...

 

The PHP to revTalk Conversion Service is available as a separate service for a fixed price of $250 (Unlimited Quantity).


hline image

The features and benefits of using the PHP to revTalk Conversion Service include:

black bulletConvert and Use Existing PHP Code - The millions of dynamic PHP web applications already available for free download can provide a starting point for developing rich internet revTalk apps using revMedia (FREE), revStudio, revEnterprise or On-Rev. Efficiently converting existing PHP code into the revTalk language can provide a way to quick-start your development process. A wealth of free PHP apps are available for managing photo galleries, guest books, email handling, forum management, mapping and much more.

black bulletHigh Performance Processing - Performing manual processing of even the most common PHP keywords for a large project could take days or even weeks of work. FmPro Migrator reduces this initial conversion phase for most projects to just a few seconds of processing time. All conversion projects will require manual work in order to reconcile differences between development environments. But using an automated process for the initial conversion phase of the project means that Rev developers can immediately start work on the remaining project development tasks. FmPro Migrator also provides a quick overview of the size of the conversion effort. Within a few seconds you will know how many files and lines of code are included in your entire project.

black bulletBuild Rich Internet Apps with Rev - Use converted PHP scripts as a starting point for creating interactive internet apps with the Rev development platform. Build high performance, no-compromise interactive web apps matching the look and feel of the user's own operating system. Try out the PHP to revTalk demo app on this web page for a sample of what you can implement. This revLet contains exactly the same PHP to revTalk conversion code implemented in the the FmPro Migrator desktop application. And it runs fast too, generally processing pasted in sample code within milliseconds. Gone are the days of compromised graphical interfaces which don't look good on any operating system. And Rev developers can re-use the same revTalk code for multi-platform desktop, web and server apps.

black bulletAn Economical Learning Tool - Are you new to the Rev platform? Do you have thousands of lines of PHP code scattered in dozens of different project directories? The PHP to revTalk Conversion feature is an indispensable tool which can help you quickly get up to speed converting your existing code to the Rev platform.

Rev developed revLets provide unique marketing opportunities to showcase product functionality implemented as Web 2.0 feature rich web applications. You can paste in your own PHP code into the revLet displayed above and instantly see the results. Notice that fields are scrollable vertically and horizontally, and summary results are displayed in a normally invisible label at the lower part of the revLet window, just as you might implement within a desktop app. Images, fields, buttons and text labels are precisely positioned within the revLet, without requiring nested HTML tables or complex browser-specific CSS style sheets.

black bulletFunction Conversion - PHP Functions are converted into functions within the converted revTalk code. The opening curly bracket is removed and the closing curly bracket is converted into an End <Function Name> keyword to complete the Function. The parenthesis surrounding the function parameters are removed and the leading $ symbol is removed from each PHP variable, along with semicolons ending each statement.

function page_header($color) {
     print '<html><head><title>Welcome to my site</title></head>';
}

function page_header($color,$title) {
     print '<html><head><title>Welcome to my site</title></head>';
}

function restaurant_check($meal, $tax, $tip) {
     $tax_amount = $meal * ($tax / 100); 
     $tip_amount = $meal * ($tip / 100);
     $total_amount = $meal + $tax_amount + $tip_amount;
     return $total_amount;
}

function page_header
 put "<html><head><title>Welcome to my site</title></head>"
end page_header

function page_header color
     put "<html><head><title>Welcome to my site</title></head>"
end page_header

function page_header color,title_
     put "<html><head><title>Welcome to my site</title></head>"
end page_header

function restaurant_check meal, tax, tip
     put meal * (tax / 100) into tax_amount
     put meal * (tip / 100) into tip_amount
     put meal + tax_amount + tip_amount into total_amount
     return total_amount
end restaurant_check

PHP Code
revTalk Code

black bulletCode Comments and <?php Tags - Sinle-line and multi-line comments are converted into commented revTalk code to serve as documentation. Single line and multi-line <?php tags are converted into <?rev tags. HTML code outside of the <?php tags is passed thru unchanged for use in generated .irev files. When PHP code is placed into a Rev stack file, the HTML code is commented out and the <?rev ?> tags are omitted, because these tags are not meaningful within the context of a Rev stack script.

<?php
/* We're going to add a few things to the menu:
     - Smoked Fish Soup
     - Duck with Pea Shoots
     - Shark Fin Soup
*/
print 'Smoked Fish Soup, Duck with Pea Shoots, Shark Fin Soup ';
print 'Cost: 3.25 + 9.50 + 25.00';
?>

Five plus five is:
<?php print 5 + 5; ?>
<p>
Four plus four is:
<?php
print 4 + 4;
?>
<p>
<img src="vacation.jpg" alt="My Vacation">

<?php
/* We're going to add a few things to the menu:
     - Smoked Fish Soup
     - Duck with Pea Shoots
     - Shark Fin Soup
*/
put "Smoked Fish Soup, Duck with Pea Shoots, Shark Fin Soup "
put "Cost: 3.25 + 9.50 + 25.00"
?>

Five plus five is:
<?rev put 5 + 5 ?>
<p>
Four plus four is:
put 4 + 4
?>
<p>
<img src="vacation.jpg" alt="My Vacation">

PHP Code
revTalk Code

black bulletHere Document Conversion - PHP code Here document code sections are converted into revTalk "put" statements. PHP variable names are checked with the Rev keywords list and if a conflict is found, the variable is renamed by adding an underscore suffix, as shown in the 2nd Here document using the $put variable. The PHP "." concatenation operator is replaced with the revTalk "&" concatenation operator, unless it is located within double or single quotes.

<?php
print <<<HTMLBLOCK
<html>
<head><title>Menu</title></head>
<body bgcolor="#fffed9">
<h1>Dinner</h1>
<ul>
<li> Beef Chow-Fun
<li> Sauteed Pea Shoots
<li> Soy Sauce Noodles
</ul>
</body>
</html>
HTMLBLOCK

$put = <<<HERE
multiple line items here
in this block.
HERE

print "Test Info $variable1 and More info.";

print 'Test Info $variable2 and More info.';

print 'Test1 $var3 .' . "test $text2.";
?>

<?php
put "<html>" & return & "<head><title>Menu</title></head>" & return & "<body bgcolor=" & quote & "#fffed9" & quote & ">" & return & "<h1>Dinner</h1>" & return & "<ul>" & return & " <li> Beef Chow-Fun" & return & " <li> Sauteed Pea Shoots" & return & " <li> Soy Sauce Noodles" & return & " </ul>" & return & "</body>" & return & "</html>" & return

put "multiple line items here" & return & "in this block." & return into put_

put "Test Info " & variable1 & " and More info."

put "Test Info $variable2 and More info."

put "Test1 $var3 ." & "test " & text2 & "." 
?>

PHP Code
revTalk Code
black bulletLoop Conversion - WHILE loops are converted into the repeat/end repeat keywords used in revTalk, while removing the opening/closing curly brackets. IF statements are converted into revTalk if statements by replacing the opening/closing curly brackets with "then/end if" keywords. This code example also shows the replacement of the &&, ||, ++ and == operators with the equivalent revTalk "and", "or" "add" and "=" operators.

<?php
$i = 1;
print '<select name ="people">';
while ($i <= 10) {
     print "<option>$i</option>/n";
     $i++;
     }

if (($age >= 13) && ($age < 65)
     {
     print "You are too old for a kid's discount and too young for the senior's discount.";
     }

if (($meal == 'breakfast') || ($dessert == 'souffle')) {
     print "Time to eat some eggs.";
     }
?>

<?rev
put 1 into i
put "<select name ="people">"

repeat while (i <= 10)
     
put "<option>" & i & "</option>/n"
     
add 1 to i
end repeat

if ((age >= 13) and (age < 65) then
     
put "You are too old for a kid's discount and too young for the senior's discount."end if

if ((meal = "breakfast") or (dessert = "souffle")) then
     
put "Time to eat some eggs."
end if
?>
 

PHP Code
revTalk Code

black bulletTRY/CATCH Conversion - PHP Try/Catch keywords are directly converted into revTalk Try/Catch code blocks.

<?php
try {
print $result[5] . "Processing Info";
print $result[0];
} catch (Exception $e) {
print 'Caught exception: ';
}

?>

<?rev
try
      put result_[5] & "Processing Info"
      put result_[0]
catch e
      put "Caught exception: "
end try
?> 

PHP Code
revTalk Code


 

PHP to revTalk Function & Keyword Conversions

Some functions and keywords match so closely in functionality that a simple search & replace can be done on the code to perform the conversion. Some of these conversions are listed in this table.

PHP Operator or Function revTalk Operator or Function
-- subtract 1 from variable
-= put variable into variable
!= <>
.= put (code) after variable
*= put variable into variable * (code)
/= put variable into variable / (code)
&& and
%= put variable into variable mod (code)
++ put add 1 to variable
+= put variable into variable + (code)
|| or
=== =
== =
count()

the number of lines in the keys of () [count of array keys]
intval() trunc()
printf() put format()
strlen() length()
strtolower() toLower()
strtoupper() toUpper()
time() seconds()
trim() char 1 to -1 of ()

Demo Mode

Due to the complexity associated with any code conversion project, it is recommended that a small test project be completed prior to starting the full conversion project. By default, FmPro Migrator Platinum Edition will process 5 scripts in demo mode without requiring a license key. And the revLet located on this web page can also provide a quick test of the code conversion process. There is also additional information in the FmPro Migrator PHP Conversion Manual (PDF).

Requirements

Requirements:
FmPro Migrator Platinum Edition - FmPro Migrator Platinum Edition includes the PHP to revTalk Service licence key providing unlimited usage of this feature throughout the duration of the license key.

revMedia (Free), revStudio, revEnterprise or On-Rev

 

hline image

.

 

. .

.

. .

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

email link

Home | Products | Services | Downloads | Order | Support | Contact

Legal Notices

.
.   .
.
Home Products Services Downloads Order Support Contact