You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Tobias Marx (JIRA)" <ji...@apache.org> on 2010/09/22 16:36:35 UTC

[jira] Created: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

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.


[jira] Updated: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Tobias Marx (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Tobias Marx (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Marx updated TAP5-1281:
------------------------------


There is not more logic inside the templates this way...just a matter of being able to leave out empty classes and simplify things...similiar to the  how you would work with RubyOnRails.

@Howard: Yes, would be a good idea . Also maybe a nicer error page when there is hibernate/database driver issues.

And yes, I will try out the mailing list first, then next time ;-) I still think the idea is pretty good though.


> 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.


[jira] Updated: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Tobias Marx (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Marx updated TAP5-1281:
------------------------------


This was just an example....of a small website with only a couple of queries. Of course there could be more services, or one per entity...some kind of injection.

nameOfServcie:method - using the old convention over configuration as a replacement for and empty class with a single @Inject NameOfService nameOfService annotation.

When looking at the way Tapestry5 has gone from Tapestry4, it could be a new direction. At the beginning we had BaseComponent and BasePage...later this was a simply Pojo...and maybe the next step is to even work without component and page specific classes....just with services.

Should I post this to the maiing list, or do you think it's useless? 

> 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.


[jira] Closed: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiago H. de Paula Figueiredo closed TAP5-1281.
-----------------------------------------------

    Resolution: Won't Fix

With regard to a global service, Davor Hrg already explained how to achieve that.
Having a class per page is one Tapestry architectural decision that was done after analyzing Tapestry 4, which had it. It only increased complexity and made learning Tapestry more complex, not simpler
Your example seems to ask for template-driven logic, something that definitely goes against Tapestry's phylosophy.
Please post your ideas in the Tapestry dev mailing list before posting here. That is the place to discuss Tapestry features, not here.

> 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.


[jira] Commented: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Davor Hrg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913761#action_12913761 ] 

Davor Hrg commented on TAP5-1281:
---------------------------------

the example you mentioned
       <t:loop source="dbService.products.categories" value="category">
                ${category.name}
        </t:loop> 

would look like this with the new prefix:
       <t:loop source="dbService:products.categories" value="category">
                ${category.name}
        </t:loop> 

dot would change between dbService.products to colon dbService:products
...there are other issues to overcome if you choose to try this path....

... all is fine if you are trying to push the envelope with tapestry ...
but this proposal smells to me just like bad application design...

Having everything in a single class is BAD (with capital letters).
You are gaining nothing with it, and will have a huge complicated class.



> 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.


[jira] Commented: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913693#action_12913693 ] 

Howard M. Lewis Ship commented on TAP5-1281:
--------------------------------------------

Over the weekend I did think about having Tapestry provide a core/Index page that would act as a "welcome" page to a new application.

I'm very much opposed to having DB queries and the like in the TML; that's turning Tapestry *into* PHP.

> 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.


[jira] Commented: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Davor Hrg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913939#action_12913939 ] 

Davor Hrg commented on TAP5-1281:
---------------------------------

As Thiago has said it, this should move to the dev list.

You coud rethink the example to give more details on reasons for having this.
Please think also if there is way to accomplish it without changing the tapestry core.

we can then continue the discussion, some other ideas might come up.

As long as I am commenting this, there is a change happening in tapestry that might make,
even more doable: loop components could finally give access to the current row without
a binding so problem with having variables removed by having something like this:

       <t:loop t:id="loop1" source="dbService.products.categories">
                ${comp:loop1.row.name}
        </t:loop> 
.... anway .. do post this on dev mailing list ...

And please try to implement the idea so you can see what can already be done,
and what must be changed in T5. If you come up with a problem there, and request 
a change regarding this concept, some people might have ideas also how to do it
without changing the core.




> 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.


[jira] Commented: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Davor Hrg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913761#action_12913761 ] 

Davor Hrg commented on TAP5-1281:
---------------------------------

the example you mentioned
       <t:loop source="dbService.products.categories" value="category">
                ${category.name}
        </t:loop> 

would look like this with the new prefix:
       <t:loop source="dbService:products.categories" value="category">
                ${category.name}
        </t:loop> 

dot would change between dbService.products to colon dbService:products
...there are other issues to overcome if you choose to try this path....

... all is fine if you are trying to push the envelope with tapestry ...
but this proposal smells to me just like bad application design...

Having everything in a single class is BAD (with capital letters).
You are gaining nothing with it, and will have a huge complicated class.



> 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.


[jira] Commented: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Davor Hrg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913681#action_12913681 ] 

Davor Hrg commented on TAP5-1281:
---------------------------------

You can create a global service to access the data with any version of T5,
just create a binding prefix to get the data, and use that prefix to pass 
parameters for loops and grids.

When you create the prefix you will know how to create the service and
what to put in it.

> 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.


[jira] Updated: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Tobias Marx (JIRA)" <ji...@apache.org>.
     [ 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.


[jira] Updated: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Tobias Marx (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Marx updated TAP5-1281:
------------------------------


This was just an example....of a small website with only a couple of queries. Of course there could be more services, or one per entity...some kind of injection.

nameOfServcie:method - using the old convention over configuration as a replacement for and empty class with a single @Inject NameOfService nameOfService annotation.

When looking at the way Tapestry5 has gone from Tapestry4, it could be a new direction. At the beginning we had BaseComponent and BasePage...later this was a simply Pojo...and maybe the next step is to even work without component and page specific classes....just with services.

Should I post this to the maiing list, or do you think it's useless? 

> 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.


[jira] Updated: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Tobias Marx (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Tobias Marx updated TAP5-1281:
------------------------------


There is not more logic inside the templates this way...just a matter of being able to leave out empty classes and simplify things...similiar to the  how you would work with RubyOnRails.

@Howard: Yes, would be a good idea . Also maybe a nicer error page when there is hibernate/database driver issues.

And yes, I will try out the mailing list first, then next time ;-) I still think the idea is pretty good though.


> 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.


[jira] Commented: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Davor Hrg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913939#action_12913939 ] 

Davor Hrg commented on TAP5-1281:
---------------------------------

As Thiago has said it, this should move to the dev list.

You coud rethink the example to give more details on reasons for having this.
Please think also if there is way to accomplish it without changing the tapestry core.

we can then continue the discussion, some other ideas might come up.

As long as I am commenting this, there is a change happening in tapestry that might make,
even more doable: loop components could finally give access to the current row without
a binding so problem with having variables removed by having something like this:

       <t:loop t:id="loop1" source="dbService.products.categories">
                ${comp:loop1.row.name}
        </t:loop> 
.... anway .. do post this on dev mailing list ...

And please try to implement the idea so you can see what can already be done,
and what must be changed in T5. If you come up with a problem there, and request 
a change regarding this concept, some people might have ideas also how to do it
without changing the core.




> 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.


[jira] Closed: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Thiago H. de Paula Figueiredo (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Thiago H. de Paula Figueiredo closed TAP5-1281.
-----------------------------------------------

    Resolution: Won't Fix

With regard to a global service, Davor Hrg already explained how to achieve that.
Having a class per page is one Tapestry architectural decision that was done after analyzing Tapestry 4, which had it. It only increased complexity and made learning Tapestry more complex, not simpler
Your example seems to ask for template-driven logic, something that definitely goes against Tapestry's phylosophy.
Please post your ideas in the Tapestry dev mailing list before posting here. That is the place to discuss Tapestry features, not here.

> 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.


[jira] Commented: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Davor Hrg (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913681#action_12913681 ] 

Davor Hrg commented on TAP5-1281:
---------------------------------

You can create a global service to access the data with any version of T5,
just create a binding prefix to get the data, and use that prefix to pass 
parameters for loops and grids.

When you create the prefix you will know how to create the service and
what to put in it.

> 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.


[jira] Commented: (TAP5-1281) Simplifications for lightweight Tapestry5 projects

Posted by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TAP5-1281?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12913693#action_12913693 ] 

Howard M. Lewis Ship commented on TAP5-1281:
--------------------------------------------

Over the weekend I did think about having Tapestry provide a core/Index page that would act as a "welcome" page to a new application.

I'm very much opposed to having DB queries and the like in the TML; that's turning Tapestry *into* PHP.

> 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.