You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cayenne.apache.org by bu...@apache.org on 2015/03/19 07:03:34 UTC

svn commit: r944293 - in /websites/staging/cayenne/trunk/content: ./ 2015/03/cayenne-40m2-released.html

Author: buildbot
Date: Thu Mar 19 06:03:33 2015
New Revision: 944293

Log:
Staging update by buildbot for cayenne

Modified:
    websites/staging/cayenne/trunk/content/   (props changed)
    websites/staging/cayenne/trunk/content/2015/03/cayenne-40m2-released.html

Propchange: websites/staging/cayenne/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Thu Mar 19 06:03:33 2015
@@ -1 +1 @@
-1667600
+1667659

Modified: websites/staging/cayenne/trunk/content/2015/03/cayenne-40m2-released.html
==============================================================================
--- websites/staging/cayenne/trunk/content/2015/03/cayenne-40m2-released.html (original)
+++ websites/staging/cayenne/trunk/content/2015/03/cayenne-40m2-released.html Thu Mar 19 06:03:33 2015
@@ -107,25 +107,29 @@
 <div id="content">
        <h2 id="cayenne-40-milestone-2-released">Cayenne 4.0 Milestone 2 Released</h2>
 <p><em>Mar 18, 2015</em> </p>
-<p>This is a huge new milestone release of the development branch of Apache Cayenne. Existing users may have noticed that we renamed version 3.2 to 4.0 as the scope of new features had been vastly expanded. So 4.0.M2 is a direct successor of 3.2M1. There are tons of new features and bug fixes. Here are just the main highlights. For more details, go to the upgrade-guide.pdf and check out the full release notes below.</p>
+<p>This is a big and important new milestone release of the development branch of Apache Cayenne. Existing users may have noticed that we renamed version 3.2 to 4.0 as the scope had been vastly expanded. So 4.0.M2 is a direct successor of 3.2M1. There are tons of new features and bug fixes included. Below are just the main highlights. For more details read upgrade-guide.pdf and check out the full release notes further down.</p>
+<p>Cayenne can be downloaded from <a href="/download.html">here</a>.</p>
 <h3 id="fluent-query-api">Fluent Query API</h3>
-<p>Here is a simple example:</p>
-<p>   Artist a = ObjectSelect
-        .query(Artist.class)
-     .where(Artist.NAME.eq("Picasso"))
-        .selectOne(context);</p>
-<p>Cayenne now provides a set of new fluent query classes: ObjectSelect, SQLSelect, SelectById. More will be coming in the future releases. A related addition is positional bindings in Expression, SQLTemplate and in the new query classes. Using the new API you'll avoid any boilerplate in the most-commonly written Cayenne code, all with full support for generics and type safety. The "old" style of bean-like queries is still supported.</p>
+<p>Cayenne now provides a set of new fluent query classes: ObjectSelect, SQLSelect, SelectById. More will be coming in the future releases. Here is a simple example of a query selecting a single object by a given criteria:</p>
+<div class="codehilite"><pre><span class="n">Artist</span> <span class="n">a</span> <span class="p">=</span> <span class="n">ObjectSelect</span>
+    <span class="p">.</span><span class="n">query</span><span class="p">(</span><span class="n">Artist</span><span class="p">.</span><span class="n">class</span><span class="p">)</span>
+    <span class="p">.</span><span class="n">where</span><span class="p">(</span><span class="n">Artist</span><span class="p">.</span><span class="n">NAME</span><span class="p">.</span><span class="n">eq</span><span class="p">(</span>&quot;<span class="n">Picasso</span>&quot;<span class="p">))</span>
+    <span class="p">.</span><span class="n">selectOne</span><span class="p">(</span><span class="n">context</span><span class="p">);</span>
+</pre></div>
+
+
+<p>A related addition is positional bindings in Expression, SQLTemplate and the new query classes. Using the new API you'll avoid boilerplate in the most-commonly written Cayenne code, all this with full support for generics and type safety. The "old" style of bean-like queries (SelectQuery) is still supported.</p>
 <h3 id="powerful-automated-workflow-with-cdbimport">Powerful Automated Workflow with 'cdbimport'</h3>
 <p>'cdbimport' (a Maven/Ant task that generates DataMap from DB) was always there in Cayenne, just not very usable. In this release it was reworked to become a cornerstone of an automated workflow that allows you to keep mapping and Java classes always in sync with the underlying DB, and yet provide arbitrary customizations to the object layer.</p>
 <h3 id="osgi">OSGI</h3>
-<p>All Cayenne runtime jars have proper OSGi manifests and can be used as OSGi bundles. Here is a <a href="https://github.com/andrus/cayenne-osgi-example">demo app</a> showing how to write an OSGi Cayenne app. The main trick is to add a special OSGi module to Cayenne runtime:</p>
+<p>All Cayenne runtime jars have proper OSGi manifests and can be used as OSGi bundles. Here is a <a href="https://github.com/andrus/cayenne-osgi-example">demo</a> showing how to write an OSGi Cayenne app. The main trick is to add an OSGi module to Cayenne runtime that will take care of classloading, etc.:</p>
 <div class="codehilite"><pre><span class="n">Module</span> <span class="n">osgiModule</span> <span class="p">=</span> 
    <span class="n">OsgiModuleBuilder</span><span class="p">.</span><span class="n">forProject</span><span class="p">(</span><span class="n">Activator</span><span class="p">.</span><span class="n">class</span><span class="p">).</span><span class="n">withDriver</span><span class="p">(</span><span class="n">Driver</span><span class="p">.</span><span class="n">class</span><span class="p">).</span><span class="n">module</span><span class="p">();</span>
 </pre></div>
 
 
 <h3 id="serverruntimebuilder">ServerRuntimeBuilder</h3>
-<p>We found that customizing ServerRuntime is a frequent task in different environments. Things like setting a custom DataSource, loading multiple projects into a single runtime, overriding a service here and there are all very common customizations. While of those can be done via ServerRuntime constructor and custom modules, we decided to add some syntactic sugar for such a common task. Enter ServerRuntimeBuilder:</p>
+<p>We found that customizing ServerRuntime is a frequent task in most applications. Things like setting a proper DataSource, loading multiple projects into a single runtime, overriding a service here and there are all very common customizations. While all of those can be done via ServerRuntime constructor and custom DI modules, we decided to add some syntactic sugar to streamline configuration. Enter ServerRuntimeBuilder:</p>
 <div class="codehilite"><pre><span class="n">ServerRuntime</span> <span class="n">runtime</span> <span class="p">=</span> <span class="n">new</span> <span class="n">ServerRuntimeBuilder</span><span class="p">(</span>&quot;<span class="n">myproject</span>&quot;<span class="p">)</span>
     <span class="p">.</span><span class="n">addConfigs</span><span class="p">(</span>&quot;<span class="n">cayenne</span><span class="o">-</span><span class="n">project1</span><span class="p">.</span><span class="n">xml</span>&quot;<span class="p">,</span> &quot;<span class="n">cayenne</span><span class="o">-</span><span class="n">project2</span><span class="p">.</span><span class="n">xml</span>&quot;<span class="p">)</span>
     <span class="p">.</span><span class="n">addModule</span><span class="p">(</span><span class="n">binder</span> <span class="o">-&gt;</span> <span class="n">binder</span><span class="p">.</span><span class="n">bind</span><span class="p">(</span><span class="n">JdbcEventLogger</span><span class="p">.</span><span class="n">class</span><span class="p">).</span><span class="n">toInstance</span><span class="p">(</span><span class="n">myLogger</span><span class="p">))</span>
@@ -134,9 +138,9 @@
 </pre></div>
 
 
-<p>While we are on the topic of ServerRuntime, we also provide the ability to start a mapping-free runtime, which gives a powerful SQL execution stack (e.g. for unit tests).</p>
+<p>While we are on the topic of ServerRuntime, we now also have an ability to start a mapping-free runtime, which turns Cayenne into a powerful SQL execution stack without the ORM part (e.g. useful for unit tests).</p>
 <h3 id="transparent-database-cryptography-with-cayenne-crypto">Transparent Database Cryptography with 'cayenne-crypto'</h3>
-<p>Cayenne now includes <a href="http://search.maven.org/#artifactdetails|org.apache.cayenne|cayenne-crypto|4.0.M2|jar">cayenne-crypto.jar</a>, that allows you to implement seemless data encryption. With a bit of extra configuration you get automatic encryption/decryption of data in certain columns:</p>
+<p>Cayenne now includes <a href="http://search.maven.org/#artifactdetails|org.apache.cayenne|cayenne-crypto|4.0.M2|jar">cayenne-crypto.jar</a>, that allows you to implement seamless data encryption. With a bit of extra configuration (as you may have guessed - another DI module) you get automatic encryption/decryption of data in certain columns:</p>
 <div class="codehilite"><pre><span class="n">Module</span> <span class="n">cryptoModule</span> <span class="p">=</span> <span class="n">new</span> <span class="n">CryptoModuleBuilder</span><span class="p">()</span>
    <span class="p">.</span><span class="n">keyStore</span><span class="p">(</span>&quot;<span class="n">file</span><span class="p">:</span><span class="o">///</span><span class="n">mykeystore</span>&quot;<span class="p">,</span> &quot;<span class="n">changeit</span>&quot;<span class="p">.</span><span class="n">toCharArray</span><span class="p">(),</span> &quot;<span class="n">keyalias</span>&quot;<span class="p">)</span>
    <span class="p">.</span><span class="n">compress</span><span class="p">()</span>
@@ -144,14 +148,14 @@
 </pre></div>
 
 
-<p>By default encrypted columns are designated based on naming conventions, but this is fully customizable. The rest of your application code doesn't need to worry about cryptography, and would look like a regular Cayenne application.</p>
+<p>By default columns that start with 'CRYPTO_' are designated as encrypted, but this is <a href="https://github.com/apache/cayenne/blob/master/cayenne-crypto/src/main/java/org/apache/cayenne/crypto/map/ColumnMapper.java">fully customizable</a>. The rest of your application code doesn't need to worry about cryptography, and would look like a regular Cayenne application.</p>
 <h3 id="di-container-decorators">DI Container Decorators</h3>
-<p>In addition to overriding services in DI container, now Cayenne allows to supply decorators. True to the "smallest-footprint" DI philosophy, decorator approach is very simple and does not require proxies or class enhancement. Just implement the decoarted interface and provide a constructor that takes a delegate instance being decorated:</p>
+<p>In addition to overriding services in DI container, now Cayenne would allow to supply decorators. True to the "smallest-footprint" DI philosophy, decorator approach is very simple and does not rely on proxies or class enhancement. Just implement the decorated interface and provide a constructor that takes a delegate instance being decorated:</p>
 <div class="codehilite"><pre><span class="n">public</span> <span class="n">class</span> <span class="n">MyInterfaceDecorator</span> <span class="n">implements</span> <span class="n">MyInterface</span> <span class="p">{</span>
 
     <span class="n">private</span> <span class="n">MyInterface</span> <span class="n">delegate</span><span class="p">;</span>
 
-    <span class="n">public</span> <span class="n">MockInterface1_Decorator3</span><span class="p">(@</span><span class="n">Inject</span> <span class="n">MyInterface</span> <span class="n">delegate</span><span class="p">)</span> <span class="p">{</span>
+    <span class="n">public</span> <span class="n">MyInterfaceDecorator</span><span class="p">(@</span><span class="n">Inject</span> <span class="n">MyInterface</span> <span class="n">delegate</span><span class="p">)</span> <span class="p">{</span>
         <span class="n">this</span><span class="p">.</span><span class="n">delegate</span> <span class="p">=</span> <span class="n">delegate</span><span class="p">;</span>
     <span class="p">}</span>
 
@@ -173,8 +177,7 @@
 
 <h3 id="stability-improvements">Stability Improvements</h3>
 <p>We got rid of the hated "runtime" ObjRelationships that caused random issues, and fixed more than 30 other bugs.</p>
-<p>Cayenne can be downloaded from <a href="/download.html">here</a>.</p>
-<p>A full list of changes in this release:</p>
+<h3 id="a-full-list-of-changes-in-this-release">A full list of changes in this release:</h3>
 <ul>
 <li>CAY-1267 Some changes to LogDialog</li>
 <li>CAY-1826 Merge Entity Attributes and Relationships tabs together with one toolbar.</li>
@@ -243,7 +246,7 @@
 <li>CAY-1981 Add support of JDBC 4.0 N-types (nchar, nvarchar, longnvarchar, nclob)</li>
 <li>CAY-1984 cdbimport doesn't flatten many to many relationships</li>
 </ul>
-<p>Bug Fixes:</p>
+<h3 id="bug-fixes">Bug Fixes:</h3>
 <ul>
 <li>CAY-1480 Implement cross-db functional expressions</li>
 <li>CAY-1695 Unexpected null value in bidirectional one-to-one prefetch </li>