This presentation: http://nii.ac/CW15
<span data-im="person@name"></span>
//The SPAN tag element shows the data of the "name" field in the "person" table.
<input type="text" data-im="person@name" />
//The text field shows the data of the "name" field in the "person" table, and can be modified by user.
require_once('INTER-Mediator.php'); // Importing the framework.
IM_Entry( // Always IMEntry function.
array(
array( // This array is referred as "Context."
'name' => 'person',
'view' => 'person_layout', // Layout name for reading from DB
'table' => 'person_layout', // Layout name for writing to DB
'records' => 1,
'paging' => true,
'repeat-control' => 'confirm-delete confirm-insert',
),
:
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<link rel="stylesheet" href="INTER-Mediator/Samples/sample.css" />
<script type="text/javascript" src="def25.php"></script> // Including Framework
</head>
<body onload="INTERMediator.construct()"> // Generating Page
<div>Search: <input type="text" data-im="_@condition:person:name,mail:*match*" /></div>
// For 6. Search UI
<div id="IM_NAVIGATOR"></div> // For 2 Pagenation
<table style="float:left;margin-right:20px;"> // 5. This is Master Component
<tbody> // 1. This is "Enclosure"
<tr> // 2. This is "Repeater"
<td></td>
<td><div data-im="person@name"></div><div data-im="person@mail"></div></td>
<td></td> // 1. data-im attribute binds a element to the database
</tr>
</tbody>
</table> // continued...
<table> // 5. This is Detail Component
<tbody>
<tr><th>Name</th><td><input type="text" data-im="detail@name"/></td></tr>
<tr><th>Address</th><td><input type="text" data-im="detail@address"/></td></tr>
<tr><th>Mail</th><td><input type="text" data-im="detail@mail"/></td></tr>
<tr><th>Memo</th><td><textarea data-im="detail@memo"></textarea></td></tr>
<tr><td colspan="2">
<table> // 4. The Table in Table Binds to the Associated Records with Relationship
<thead>
<tr><th>DateTime</th><th>Summary</th></tr>
</thead>
<tbody>
<tr><td data-im="contact@datetime"></td><td data-im="contact@summary"></td></tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>
<br clear="all"/>
</body>
</html>
<?php
require_once('INTER-Mediator/INTER-Mediator.php');
IM_Entry(
array (
array (
'name' => 'person',
'table' => 'person_layout',
'view' => 'person_layout',
'key' => '-recid',
'maxrecords' => 100,
'paging' => true,
'records' => 5,
'repeat-control' => 'confirm-delete confirm-insert',
'navi-control' => 'master',
),
array (
'name' => 'detail',
'table' => 'person_layout',
'view' => 'person_layout',
'key' => '-recid',
'navi-control' => 'detail',
'records' => 1,
'maxrecords' => 1,
),
array (
'name' => 'contact',
'table' => 'contact_to',
'view' => 'contact_to',
'key' => '-recid',
'relation' => array ( array (
'foreign-key' => 'person_id',
'join-field' => 'id',
'operator' => '=',
), ),
),
),
array ( ),
array (
'db-class' => 'FileMaker_FX',
'database' => 'TestDB',
'user' => 'web',
'password' => 'password',
'server' => 'homeserver.msyk.net',
'port' => '80',
'protocol' => 'http',
'datatype' => 'FMPro12',
),
false
);
INTER-Mediator: http://inter-mediator.com/
This presentation: http://nii.ac/CW15
Community: Facebook Group (English)
Academic Paper: Framework Enabling End-Users to Maintain Web Applications (ICICWS 2015 in IMECS 2015)