Release Notes 1.4.3

From bemoko developer wiki

Jump to: navigation, search

Released on 29 July 2010

Summary

1.4.3 is an update to bemokoLive that builds on top of 1.4.2. It is recommended that all users upgrade to 1.4.3. Headline features are improved support for virtual hosting and vanity URLs, and improved context rule support.

Virutal Hosting

You can now create a UriEngine plugin which can be used to control how all URIs and cookie paths are rendered by a site. This is useful for virutal hosting, vanity URLs & custom session maintainance.

e.g.

import com.bemoko.live.platform.Bemoko
import com.bemoko.live.platform.mwc.plugins.annotations.UriEngine;
 
@UriEngine
class DemoUriEngine {
  def rewriteLink(linkUri) {
    if (linkUri.intentUri.endsWith('.html')) {
      linkUri.intentUri += "?myparam=1"
    }
    if (Bemoko.intent.host.equals("myhost.com")) {
      return linkUri.intentUriWithContextRulePath
    }		
    return linkUri
  }
 
  def getCookiePath() {
    return "/"
  }
}

Context Rule Selection

You can now trigger custom rules by expressions (as well as by path elements in the URI). Further more context rule can now explicitly set UIs to be enabled or disabled. This is great to support custom delivery of content to a native app that you may have created.

    <!-- Context rule for an navtive app -->
   <rule name="app" expr="intent.get('user-agent') == 'MyApp'">
     <param action="replace" name="user-agent">Mozilla/5.0 (iPhone; U; CPU iPhone OS 3_0 like Mac OS X; en-us) 
        AppleWebKit/528.18 (KHTML, like Gecko) Version/4.0 Mobile/7A341 Safari/528.16</param>     
     <param action="ui">app</param>      
   </rule>
   <!--  Context rule to enable ajax -->
   <rule name="ajax">
     <param action="ui">ajax</param>      
   </rule>
   <!--  Context rule to disable ajax -->
   <rule name="noajax">
    <param action="uiDisable">ajax</param>      
  </rule>

Enhancements

  • Setting active profile to "prod" now triggers caches to be enabled, going forward from now all recommended production configuration will be applied when you use this "prod" active profile (#2277)
  • Provide a configuration to control config caching (#2326)
  • Site object is now available in config expressions (#2327)
  • Some platform configuration elements, e.g. addons and sites, now are created as a merge of all platform configuration points, e.g. live-config.xml, system.properties and default configuration (#2262) ↓
  • More debug info is provided for the x-bemoko-query headers (#2329)
  • Allow site developer to provide URI Engine plugin to rewrite links and cookie path (#2343)
  • Allow UI to be explicitly selected in context rule and allow context rules to be triggered by expr (#2338)

Fixes

  • Custom config objects were not being cached [performance improvement] (#2328)
  • Ui group inheritance not correctly applied in subsites and from addons (#2318)
  • Server relative site end point built from site name not site URI (#2325)
  • Cookie path cannot be configured for both virtual host URL route and direct to node (#2332)
  • Controller with page parameter conflicts with view page parameter (#2333)
  • serverRelativeSiteEndPoint is not correct for linked sites (#2341)
  • Default URI looses context path element (#2342)