Sid Ferreira schrieb:
Hi all!Few days ago I've met Tapestry in wikipedia... After it, Ive joined
the #tapestry @ freenode trying to know more about the technology.
I've been talking with Fanf about how tapestry works and got really
interested on it, but once Im coming from PHP/Symfony, I obviously found
some things that I would love to have.
I can't agree that a powerfull tool must abandon ease of use, so, Im
wandering:
Symfony and Ruby have some easy generators... Based in symfony, we can
really easilly create the basics of a full application in 5 minutes
(really).
Using propel, we can (based in a xml/yml file) generate models and database
with one command in the shell. With another, we can generate the basic CRUD
module of this model, with basic database connections and queries.
So, im wandering if is there a way to have it in java?
Here, a small sample of a blog in symfony
mkdir demo
cd projeto
symfony generate:project Demo
symfony generate:app frontend
symfony configure:database dsn="dbname=test host=localhost" root null
in config/schema.yml:
===============
propel:
posts:
id: ~
text: { type: longvarchar }
created_at: ~
comments:
id: ~
post_id: { type: integer, foreignTable: posts, foreignColumn: id,
required: true }
email: { type: varchar(64) }
comment: { type: varchar(256) }
created_at: ~
===============
symfony propel:build-all
symfony propel:generate-module frontend posts Posts
symfony propel:generate-module frontend comments Comments
in apps/frontend/config/routing.yml: the module in homepage change from
default to posts
symfony cc
localhost/demo/web
It's not tested, but create database connections, crud, models and stuff.
Pretty easy... Do Tapestry offer something like that?
Thanks.
Not from the command line, no. But it's not that hard to do either. To
start a project, you can use the maven archetype which creates a
complete project, ready to use and expand (command line one-liner).
Than you would write the two entity classes for post and comment which
isn't much more than what you'd do in your schema.yml. Writing the
corresponding pages for these entities is merely putting a beaneditform
component on each of them (see the tutorial for an example).
It's a little bit more manual work but not too much.
Cheers,
Uli
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org