SimpleModeler 0.1.9を先日公開しました。
Google App Engine Javaコード生成の精度を上げています。
SimpleModelerの開発を綴る日記。
# curl http://localhost:8080/yorozu/atom/
<service xmlns="http://www.w3.org/2007/app" xmlns:atom="http://www.w3.org/2005/Atom">
<workspace>
<atom:title>Entity Repository</atom:title>
<collection href="customer/">
<atom:title>Customer</atom:title>
<accept>application/atom+xml;type=entry</accept>
<categories fixed="yes"></categories>
</collection><collection href="goods/">
<atom:title>Goods</atom:title>
<accept>application/atom+xml;type=entry</accept>
<categories fixed="yes"></categories>
</collection><collection href="buy/">
<atom:title>Buy</atom:title>
<accept>application/atom+xml;type=entry</accept>
<categories fixed="yes"></categories>
</collection>
</workspace>
</service>
# curl http://localhost:8080/yorozu/atom/customer/
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Entity Repository</title>
<updated>2009-05-30T22:02:48.010Z</updated>
<id>uuid</id>
<link href="http://localhost:8080/yorozu/atom/customer/" type="application/atom+xml" rel="self"></link>
<link href="http://localhost:8080/" type="text/html" rel="alternate"></link>
<generator uri="http://code.google.com/p/simplemodeler" version="0.1">SimpleModeler</generator>
<entry xmlns="http://www.w3.org/2005/Atom">
<title>ABC(c001)</title>
<id>c001</id>
<updated>2009-05-30T22:02:48.030Z</updated>
<published>2009-05-30T22:02:48.010Z</published>
<link href="c001/" rel="edit"></link>
<content type="application/xml">
<customer xmlns="http://yorozu.com/"><customerId>c001</customerId><customerName>ABC</customerName><phone>045</phone></customer>
</content>
</entry>
<entry xmlns="http://www.w3.org/2005/Atom">
<title>XYZ(c002)</title>
<id>c002</id>
<updated>2009-05-30T22:02:48.030Z</updated>
<published>2009-05-30T22:02:48.010Z</published>
<link href="c002/" rel="edit"></link>
<content type="application/xml">
<customer xmlns="http://yorozu.com/"><customerId>c002</customerId><customerName>XYZ</customerName><phone>06</phone></customer>
</content>
</entry>
<entry xmlns="http://www.w3.org/2005/Atom">
<title>MNO(c003)</title>
<id>c003</id>
<updated>2009-05-30T22:02:48.030Z</updated>
<published>2009-05-30T22:02:48.010Z</published>
<link href="c003/" rel="edit"></link>
<content type="application/xml">
<customer xmlns="http://yorozu.com/"><customerId>c003</customerId><customerName>MNO</customerName><phone>06</phone></customer>
</content>
</entry>
</feed>
# curl http://localhost:8080/yorozu/atom/customer/c001
<entry xmlns="http://www.w3.org/2005/Atom">
<title>ABC(c001)</title>
<id>c001</id>
<updated>2009-05-30T22:02:34.350Z</updated>
<published>2009-05-30T22:02:34.340Z</published>
<link href="." rel="edit"></link>
<content type="application/xml">
<customer xmlns="http://yorozu.com/"><customerId>c001</customerId><customerName>ABC</customerName><phone>045</phone></customer>
</content>
</entry>
val html =
<html>
<head>
<title>Show {capitalizedTerm}</title>
</head>
<body>
<h1>Show {capitalizedTerm}</h1>
<table class="datasheet">
<tbody>
{
for (attr <- entity.attributes.toList) yield {
<tr>
<td>{attr.name}</td><td>{{{{doc.{attr.name} }}}}</td>
</tr>
}
}
</tbody>
</table>
<table class="action">
<tr>
<td><form action={getActionPath("edit")} method="get"><input type="hidden" name="key" value={getIdCode} /><input type="submit" value="Edit" /></form></td>
<td><form action={getActionPath("destroy")} method="post"><input type="hidden" name="key" value={getIdCode} /><input type="submit" value="Delete" /></form></td>
</tr>
</table>
<table class="menu">
<tr><td><a href={getActionPath("index")}>Index</a></td><td><a href={getActionPath("new")}>New</a></td></tr>
</table>
</body>
</html>
XML.write(out, html, entityContext.textEncoding, false, null)
http://code.google.com/p/simplemodeler/downloads/list
使用方法や技術的な考察などは、以下の日記に書いていく予定。
http://d.hatena.ne.jp/goldenport/
この日記では、日々の開発ログを書いていく予定にしている。