You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Tobias Marx (JIRA)" <ji...@apache.org> on 2010/09/22 20:56:34 UTC
[jira] Updated: (TAP5-1281) Simplifications for lightweight
Tapestry5 projects
[ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tobias Marx updated TAP5-1281:
------------------------------
Queries inside of templates are not intended by this.
Just to make it clearer, a sample project structure - maybe it is easier to see what I mean then:
java:
-com
--demo
---app
----services
AppModule.java
DBService.java
resources:
-com
--demo
---app
----components
MenuBox.tml
NavigationBox.tml
RecommendationsBox.tml
SomeOtherInfoBox.tml
webapp:
Start.tml
Search.tml
Catalogue.tml
News.tml
Products.tml
There might be many websites that would not even need page or component classes - just templates and a single java class with all db queries as well as the AppModule configurations.
A template could look like this:
<html t:type="layout" title="Demo APp"
xmlns:t="http://tapestry.apache.org/schema/tapestry_5_1_0.xsd"
xmlns:p="tapestry:parameter">
<!-- Most of the page content, including <head>, <body>, etc. tags, comes from Layout.tml -->
<t:MenuBox./>
<t:NavigationBox/>
<t:loop source="dbService.products.categories" value="category">
${category.name}
</t:loop>
</html>
> Simplifications for lightweight Tapestry5 projects
> --------------------------------------------------
>
> Key: TAP5-1281
> URL: https://issues.apache.org/jira/browse/TAP5-1281
> Project: Tapestry 5
> Issue Type: New Feature
> Components: tapestry-core
> Affects Versions: 5.0.15
> Reporter: Tobias Marx
> Priority: Minor
>
> In order to simplify Tapestry5 even further i would like to suggest the following:
> - auto-creation of "empty" page and component classes if they don't exist at runtime (to reduce number of lines of code, especially for small projects & demos)
> - being able to reference a "global" service by default from within the templates where all database queries / persistence queries can be placed
> This way, you could create quite complex web applications with only a few files:
> - a layout templates
> - x template files for all pages (instead of 2*x)
> - y template files for all components (instead of 2*y)
> - one "global" service as an additional file that contains all hibernate/persistance queries
> This would cater of all users that want to create lightweight websites with only as many lines of code/files as really needed.
> A lot of website can be implemented just by querying data and displaying them in a template (loop)
> The idea:
> - reduce the lines of code for small / medium projects
> - create even more convincing Tapestry demos (vs. RoR/PHP)
> - increase acceptance by more users checking Tapestry out for the first time
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.