You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by stariy95 <gi...@git.apache.org> on 2017/08/10 09:24:15 UTC

[GitHub] cayenne pull request #238: CAY-2345 Own template renderer as a replacement f...

GitHub user stariy95 opened a pull request:

    https://github.com/apache/cayenne/pull/238

    CAY-2345 Own template renderer as a replacement for Velocity

    This is implementation of template renderer intended as a drop in replacement for `Velocity` in `Cayenne`. This PR also includes removal of `commons-lang` references (that was a transitive dependency of `velocity`) from all modules except `cayenne-wocompat`.
    
    **Features**:
    - compatibility with Velocity syntax and behavior
    - variables and method resolution: `$a` and `$a.someMethod($b, 'abc', 5, ['a', 'b', 'c'])`
    - conditional render:`#if($var) ... #else ... #end` 
    - directive support: `#bind`,  `#bindEqual`, `#bindNotEqual`, `#bindObjectEqual`, `#bindObjectNotEqual` and `#result`
    - plus it's **2x - 15x** (cache miss / cache hit case) faster than Velocity implementation 
    
    Only unimplemented Cayenne feature is  `#chain` directive:
    ```
    #chain('OR' 'WHERE') 
        #chunk($name) NAME LIKE #bind($name) #end
        #chunk($id) ARTIST_ID > #bind($id) #end
    #end
    ```
    It doesn't support all features of `Velocity` but it's enough to seamlessly replace Velocity in all core and test code in Cayenne.
    
    Velocity now comes as optional auto-loaded module `cayenne-velocity`.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/stariy95/cayenne own-template-parser

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cayenne/pull/238.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #238
    
----
commit 76cb6159df423a2c2ba09e91954b83ea73775a91
Author: Nikita Timofeev <st...@gmail.com>
Date:   2017-07-19T10:46:43Z

    Temp content for cayenne's own parser branch

commit ddb755310226ddeea6deca617bc7b34da954995c
Author: Nikita Timofeev <st...@gmail.com>
Date:   2017-08-07T14:49:03Z

    Own template render implementation: first draft

commit 2db55797a1f184d9b24a1ed2e249a4b4729cf379
Author: Nikita Timofeev <st...@gmail.com>
Date:   2017-08-08T15:51:47Z

    Own template render implementation: first draft

commit aa8d35cc3679d02604637ea651670d066d95a52b
Author: Nikita Timofeev <st...@gmail.com>
Date:   2017-08-08T16:08:25Z

    Own template render implementation: cleanup

commit c654f2d70a6de9ac3f256cc4485ae6b9257e65f4
Author: Nikita Timofeev <st...@gmail.com>
Date:   2017-08-09T13:41:21Z

    CAY-2345 Own template renderer as a replacement for Velocity
      - final version of render with cache and parser pool

commit 3a1340204dea2b923b61410c3564af2a404450d4
Author: Nikita Timofeev <st...@gmail.com>
Date:   2017-08-09T13:42:09Z

    CAY-2345 Own template renderer as a replacement for Velocity
      - move Velocity to separate module
      - remove dependencies on commons-lang

commit 2f92dd9c27d42683adb0f81b49d6183d6d15819c
Author: Nikita Timofeev <st...@gmail.com>
Date:   2017-08-09T15:29:40Z

    CAY-2345 Own template renderer as a replacement for Velocity
      - additional test and fixes

commit 48b57d3a5305ad960e100cff0520c0393afa3750
Author: Nikita Timofeev <st...@gmail.com>
Date:   2017-08-09T15:58:20Z

    CAY-2345 Own template renderer as a replacement for Velocity
      - fix

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] cayenne pull request #238: CAY-2345 Own template renderer as a replacement f...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/cayenne/pull/238


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---