T2 has mainly web application framework., but it has some common features, like utility classes,
and also has IoC container, Lucy.
From now, we gonna separate these features as sub projects.
So there are three projects:
-Teeda2 : Web application framework
-Lucy : Simple IoC container
-commons : common utility classes
Basically these sub projects are only for Teeda2,
and there are not considered to use any other framework in right now.
Thursday, July 10, 2008
Wednesday, July 9, 2008
Working on Teeda2
I've been working on Teeda2 to do more with less.
We are adding some great new features like AMF messaging, or Ajax,
but we do not want to be larger, we want it keep small.
So, what we are doing is refactor codes and tests, and writes documents.
What framework needs is not features.It needs the core policy and small codes.
That's the thing we are trying to do.
Just keep in touch.
We are adding some great new features like AMF messaging, or Ajax,
but we do not want to be larger, we want it keep small.
So, what we are doing is refactor codes and tests, and writes documents.
What framework needs is not features.It needs the core policy and small codes.
That's the thing we are trying to do.
Just keep in touch.
Friday, February 15, 2008
T2 - a simple web base -
There are too many frameworks around Java development.
But none of those frameworks are simple enough to me.
So we create a new one for Lucy IoC container.
Let me introduce Teeda2(T2), a simple "web base".
Only you need to create is view(like jsp or whatever you like) and POJO(we name Page).
Here is a sample.
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" errorPage="/error/debug.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>足し算画面</title>
</head>
<body>
<form action="/t2-samples/add" method="post">
<input type="text" name="arg1" />
<br />
<input type="text" name="arg2" />
<br />
<span>${result}</span><br />
<input type="submit" name="add" value="同一ページ"/>
<input type="submit" name="addAndMove" value="結果ページ"/>
</form>
</body>
</html>
So, how to bind jsp to AddPage.java?
It's really simple.We do a way to use URL like REST.
You see @Page annotation and there is "add". This is a part of URL.
So, you access like http://localhost:8080/whatever-context-path/add
then, T2 binds to AddPage.java.
To be continued.
But none of those frameworks are simple enough to me.
So we create a new one for Lucy IoC container.
Let me introduce Teeda2(T2), a simple "web base".
Only you need to create is view(like jsp or whatever you like) and POJO(we name Page).
Here is a sample.
<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" errorPage="/error/debug.jsp"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>足し算画面</title>
</head>
<body>
<form action="/t2-samples/add" method="post">
<input type="text" name="arg1" />
<br />
<input type="text" name="arg2" />
<br />
<span>${result}</span><br />
<input type="submit" name="add" value="同一ページ"/>
<input type="submit" name="addAndMove" value="結果ページ"/>
</form>
</body>
</html>
@RequestScope
@Page("add")
public class AddPage {
@Default
public Navigation index(TeedaContext context) {
return Redirect.to("jsp/add.jsp");
}
@POST
@ActionParam
public Navigation add(TeedaContext context) {
Request request = context.getRequest();
Integer arg1 = Integer.valueOf(request.getParameter("arg1"));
Integer arg2 = Integer.valueOf(request.getParameter("arg2"));
request.setAttribute("arg1", arg1);
request.setAttribute("arg2", arg2);
request.setAttribute("result", new Integer(arg1.intValue() + arg2.intValue()));
return Forward.to("jsp/add.jsp");
}
@POST
@ActionParam
public Navigation addAndMove(TeedaContext context) {
Request request = context.getRequest();
Integer arg1 = Integer.valueOf(request.getParameter("arg1"));
Integer arg2 = Integer.valueOf(request.getParameter("arg2"));
request.setAttribute("result", new Integer(arg1.intValue() + arg2.intValue()));
return Forward.to("jsp/addResult.jsp");
}
}
So, how to bind jsp to AddPage.java?
It's really simple.We do a way to use URL like REST.
You see @Page annotation and there is "add". This is a part of URL.
So, you access like http://localhost:8080/whatever-context-path/add
then, T2 binds to AddPage.java.
To be continued.
Monday, January 28, 2008
do what you really want, minimally.
Like iPod and iPhone elegant design, we should keep in mind that
all of products, even if it is just open source product, keep very simple(we call it, it's "pure") .
Do not go the way like hey-i-want-this-feature-and-ok-we-do!!
Lucy/Teeda2 has purely simple, really-needed features, at least I hope.
So what is it?
For Teeda2, remote call and binding URL to POJO is all the thing you need.
So what about validation?
My answer : No, you do that using, not us.
Conversion like JSF converter?
My answer : Don't you know JSF converter really sucks?Anyway, again, you do that.
Teeda2 does not do conversion automatically(maybe we provide plugin, but not now),
so you do like Struts or anyhow you want.
So, do things what you really want, minimally and directly, with Teeda2/Lucy
all of products, even if it is just open source product, keep very simple(we call it, it's "pure") .
Do not go the way like hey-i-want-this-feature-and-ok-we-do!!
Lucy/Teeda2 has purely simple, really-needed features, at least I hope.
So what is it?
For Teeda2, remote call and binding URL to POJO is all the thing you need.
So what about validation?
My answer : No, you do that using, not us.
Conversion like JSF converter?
My answer : Don't you know JSF converter really sucks?Anyway, again, you do that.
Teeda2 does not do conversion automatically(maybe we provide plugin, but not now),
so you do like Struts or anyhow you want.
So, do things what you really want, minimally and directly, with Teeda2/Lucy
Wednesday, January 9, 2008
Happy new year!
Happy new year!
Hope early of this year, we gonna make a first version of Lucy.
We have almost done for injection by configuration file.
So we gonna make a new step, making a Lucy kernel.
Hope early of this year, we gonna make a first version of Lucy.
We have almost done for injection by configuration file.
So we gonna make a new step, making a Lucy kernel.
Subscribe to:
Comments (Atom)