<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Granite Data Services</title>
	
	<link>http://granitedataservices.com</link>
	<description />
	<lastBuildDate>Tue, 06 Dec 2011 16:00:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1.3</generator>
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/GraniteDataServices" /><feedburner:info uri="granitedataservices" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Flex, GraniteDS and the Future of RIA</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/tDlUXKC8EVI/</link>
		<comments>http://granitedataservices.com/blog/2011/12/06/flex-graniteds-and-the-future-of-ria/#comments</comments>
		<pubDate>Tue, 06 Dec 2011 16:00:23 +0000</pubDate>
		<dc:creator>Franck</dc:creator>
				<category><![CDATA[GraniteDS]]></category>

		<guid isPermaLink="false">http://granitedataservices.com/?p=1235</guid>
		<description><![CDATA[After the recent announcements from Adobe regarding the future of the Flex framework (see, for example, this blog post)&#8230;]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;">After the recent announcements from Adobe regarding the future of the Flex framework (see, for example, this <a title="Your questions about Flex" href="http://blogs.adobe.com/flex/2011/11/your-questions-about-flex.html" target="_blank">blog post</a>) and, <em>unofficially</em>, from Microsoft about Silverlight (see <a title="Will there be a Silverlight 6" href="http://www.zdnet.com/blog/microsoft/will-there-be-a-silverlight-6-and-does-it-matter/11180" target="_blank">this one</a>), the RIA world have been deeply shaken up and it is now time to look at the viable solutions left to the developers.</p>
<p style="text-align: justify;">Before digging into what we, at GraniteDS, think about the Flex and RIA future and how it is influencing our platform roadmap, let&#8217;s see who are the different players in this area:</p>
<ul style="text-align: justify;">
<li>Flex (Adobe / Apache Foundation): one of best RIA solution right now, based on the Flash plugin.</li>
<li>Silverlight (Microsoft): another very good RIA solution, based on the plugin of the same name.</li>
<li>JavaFX (Sun / Oracle): emerging, based on the Java plugin, could be a good alternative if it comes on time.</li>
<li>GWT (Google), ExtJS (Sencha) and a plethora of others: good or emerging RIA solutions, no plugin required, targeted at HTML / JavaScript and the pending HTML5 specification.</li>
</ul>
<p style="text-align: justify;">Now let&#8217;s see what Flex brings to the table that makes it such a  compelling solution for enterprise applications: a very good IDE and  tooling, a strong language (ActionScript3), very good performance and  cross-browser compatibility thanks to the Flash Player runtime, a great  UI framework with plenty of advanced features (sophisticated component  lifecycle, data binding, modularity, skinning, media capabilities, etc.), a  good set of built-in, open source and for-pay components, and recently  the ability to build cross-platform iOS / Android mobile  applications from the same source code with the AIR runtime. All things  that made possible for us to build our GraniteDS platform on a strong  foundation.</p>
<p style="text-align: justify;">All  those capabilities are at worst inexistent, at best very partially  matched by the existing alternatives. Without Flex and Silverlight,  enterprise RIA developers are left with good but (while at different  extents) emerging or less featured frameworks. There is not any doubt  that it is possible to build enterprise applications with them, but the  development will be much slower than with Flex or Silverlight, less  maintainable, missing many advanced features and will require long and  extensive testing on the various target browsers. Moreover the landscape  of client technologies is evolving at an extremely fast pace with new  frameworks, JavaScript evolutions or replacements such as Google Dart or  ECMAScript 6 (Harmony), announced almost every day, and it&#8217;s very difficult to  make a perennial choice right now.</p>
<p style="text-align: justify;">You might have noticed that we only marginally mention HTML5 as an  alternative. Indeed we think that HTML5 as it currently exists really is  more an alternative to the Flash Player than to the Flex framework. You  will always need complementary frameworks and component libraries to  get a really usable development platform, and a big issue is that there  is no common standard component model that ensures that all this stuff  will work happily together. And while some of these HTML5-based  frameworks will certainly become strong RIA platforms in the future,  they are right now simply not as feature rich and stable as Flex and  Silverlight can be, and most likely won&#8217;t be in the coming years. There  is simply nothing that can replace Flex today.</p>
<h2 style="text-align: justify;">What Future for the Flex Framework?</h2>
<p style="text-align: justify;">According to Adobe, the entire Flex framework will be soon given to the Apache Foundation. This is great news, from an openness and licensing point of vue, but it could also lead to a slow death of this great solution if nobody is truly committed into its development and maintenance. While Adobe seems to be willing to bind some of its own resources on the framework future, we think that a large part of the Flex community should be involved and we are very exited with the idea of participating to the Flex framework evolution.</p>
<p style="text-align: justify;">While a participation as simple contributors is very likely, we wish to  take a bigger part in the governance of the project. Of course this is  subject to the choices of Adobe and the Apache Foundation concerning the  people involved in this governance but, as a significant player in the  Flex area, the GraniteDS team should be one of the natural choices in  this community selection process.</p>
<p style="text-align: justify;">If  Flex as an Apache Foundation project is widely open to community  contributors, we believe that it will remain the most powerful RIA  platform in the future and may lead the industry for years to come until  HTML5 or one of its next iterations can finally provide a credible  solution. Flex is not going to disappear in the foreseeable future and is  still the better choice for developing rich enterprise applications.</p>
<h2 style="text-align: justify;">LCDS, BlazeDS and GraniteDS</h2>
<p style="text-align: justify;">GraniteDS has been the main alternative to LCDS (<em>Livecycle Data Services</em>) from the beginning and, after more than 5 years of polishing and improvements, it is a widely used, stable, production-ready, open-source and feature-rich solution for enterprise Flex / Java EE developments. It is also known as offering many strong advantages over BlazeDS and you will find a detailed comparison between GraniteDS and BlazeDS <a title="Migrating from Blazeds to Graniteds" href="http://granitedataservices.com/migrating-from-blazeds-to-graniteds/" target="_blank">here</a>, as well as a step-by-step migration guide.</p>
<p style="text-align: justify;">According to another recent <a title="Recent updates" href="http://www.adobe.com/devnet/flashplatform/articles/recent-updates.html" target="_blank">announcement</a>, Adobe is unlikely going to publish any new major release of LCDS, speaking only about supporting existing customers and applications. LCDS isn&#8217;t anymore bundled as a standalone product but is now sold as a module of a much larger platform, the <a title="Digital Enterprise Platform" href="http://www.adobe.com/solutions/customer-experience/enterprise-platform.html" target="_blank">Digital Enterprise Platform</a>. From its part, BlazeDS hasn&#8217;t really evolved during the last 1 or 2 years, and its maturation as an Apache Foundation project is at least questionable.</p>
<p style="text-align: justify;">From an architectural point of vue, GraniteDS has always promoted a strong server-side approach, based on remote services that implement the most significant part of the business logic and a client application that is mostly a presentation layer. The main advantages of this approach are the independence of the server application from the client-side technology (Flex or any other) and the ability to leverage the full power of existing Java EE frameworks such as Spring, JBoss Seam, EJB3 and now CDI. This clearly differs from the classical <em>client-server</em> architecture promoted by LCDS, where almost all the business logic goes to the client-side, the server being not much more than a database frontend.</p>
<p style="text-align: justify;">Another obvious advantage of this approach is the ability to migrate an existing Flex application to another RIA technology without having to change anything on the server application. The same applies when there is a need to create <em>multi-headed</em> client applications, targeted at different platforms (Flex, Android,  iOS, HTML5, etc.). Using GraniteDS makes your application as  future-proof as possible in this quickly evolving technology environment,  while still benefiting from all its advanced enterprise features  (lazy-loading, paging, real-time data push, etc.)</p>
<h2 style="text-align: justify;">GraniteDS Roadmap</h2>
<p style="text-align: justify;">After the recent release of the 2.3.0.GA version of our platform (see details <a title="Details on 2.3.0.GA" href="http://granitedataservices.com/blog/2011/10/12/more-details-on-the-new-features-in-graniteds-2-3/">here</a>) and a new Eclipse wizard plugin that dramatically simplifies GraniteDS&#8217; projects creation (see <a title="Quick Start With GraniteDS" href="http://granitedataservices.com/blog/2011/12/02/quick-start-with-graniteds/">here</a>), we are moving to a major evolution of the framework. Among several other new features and improvements, the next 3.0 version will focus on the following areas:</p>
<ul style="text-align: justify;">
<li>Client libraries for iOS (Objective-C), Android (Java) and HTML5 (JavaScript): the purpose of these libraries is to implement the most salient features of the Flex / GraniteDS client framework in other technological contexts. Remoting, real-time messaging and data management will be available for each of these targeted platforms, without changing anything to the server-side implementation of current GraniteDS / Flex applications.</li>
<li>Code generation improvements (Gas3): generated code won&#8217;t be only targeted at ActionScript3, but also at Objective-C, Java and JavaScript.</li>
<li>Clean separation between data management and dependency injection features (Tide): this will allow an easier integration of Flex client framework (Spring ActionScript, Cairngorm, Parsley, Swiz, etc.) with GraniteDS&#8217; data management module, and greatly simplify the implementation of data management for other client technologies.</li>
<li>An improved implementation of the real-time messaging system (Gravity): support of clustered and durable JMS subscriptions, reduced data transfers and WebSocket support.</li>
<li>Full OSGi / Java EE 6 compliance: GraniteDS conforms to standard and popular specifications, in order to be compatible with all application servers.</li>
<li>New distribution model (Community Platform): packaged as a ready-to-run test drive, it will greatly improve the getting started experience of the framework.</li>
</ul>
<p style="text-align: justify;">Overall, these new features are aiming to improve GraniteDS ease of use, enlarge its features and target platforms perimeter and help users in leveraging today&#8217;s and tomorrow&#8217;s best technical solutions.</p>
<h2 style="text-align: justify;">Moving Forward</h2>
<p style="text-align: justify;">From all of the above, we believe that the GraniteDS platform, with its enterprise-grade features, uncompromised Java EE integration, professional support and openness to a wide range of client technologies can be considered as one of the best available platform for perennial RIA developments.</p>
<p style="text-align: justify;">Through its continuous move toward new client technologies, GraniteDS will stay open to strong partnerships with IDE and graphical components providers, and committed to offer an open-source, comprehensive and powerful solution for Java EE developers willing to leverage the best of this renewed RIA world.</p>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/tDlUXKC8EVI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/12/06/flex-graniteds-and-the-future-of-ria/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/12/06/flex-graniteds-and-the-future-of-ria/</feedburner:origLink></item>
		<item>
		<title>GraniteDS Data Management Tutorial</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/KYwDmEEc15k/</link>
		<comments>http://granitedataservices.com/blog/2011/12/05/graniteds-data-management-tutorial/#comments</comments>
		<pubDate>Mon, 05 Dec 2011 11:24:05 +0000</pubDate>
		<dc:creator>William</dc:creator>
				<category><![CDATA[GraniteDS]]></category>

		<guid isPermaLink="false">http://granitedataservices.com/?p=1293</guid>
		<description><![CDATA[We have setup a simple example project that demonstrates most features of GraniteDS when used in a Spring/Hibernate&#8230;]]></description>
			<content:encoded><![CDATA[<p>We have setup a simple example project that demonstrates most features of GraniteDS when used in a Spring/Hibernate technology stack.</p>
<p>The project is available on GitHub at <a href="http://github.com/wdrai/wineshop-admin">http://github.com/wdrai/wineshop-admin</a> and requires Maven 3.x for building.</p>
<p>Just issue the following commands to try it :</p>
<pre class="brush: bash; title: ; notranslate">git clone git://github.com/wdrai/wineshop-admin.git&lt;br /&gt;
cd wineshop-admin&lt;br /&gt;
mvn clean package&lt;br /&gt;
cd webapp&lt;br /&gt;
mvn jetty:run-war&lt;br /&gt;
</pre>
<p>Now you can browse <a href="http://localhost:8080/wineshop-admin/wineshop-admin.swf">http://localhost:8080/wineshop-admin/wineshop-admin.swf</a>. You can log in with admin/admin or user/user.</p>
<p>It&#8217;s a simple CRUD example which allows searching, creating and modifying vineyards and the vines they produce. The application is definitely ugly but its goal is simply to demonstrate the following features :</p>
<ul>
<li>Basic CRUD with a Spring service</li>
<li>Support for lazy-loading of JPA x-to-many associations</li>
<li>Dirty-checking</li>
<li>Client validation</li>
<li>Real-time push</li>
<li>Reverse lazy-loading</li>
</ul>
<p>Each step corresponds to a tag on the GitHub project so you can see what has been changed at each step.</p>
<p>Let&#8217;s rebuild this project from scratch.</p>
<h3>Step 1 : Create the project with the Maven archetype</h3>
<p>This is the easiest one :</p>
<pre class="brush: bash; title: ; notranslate">mvn archetype:generate&lt;br /&gt;
    -DarchetypeGroupId=org.graniteds.archetypes&lt;br /&gt;
    -DarchetypeArtifactId=org.graniteds-tide-spring-jpa&lt;br /&gt;
    -DarchetypeVersion=1.1.0.GA&lt;br /&gt;
    -DgroupId=com.wineshop&lt;br /&gt;
    -DartifactId=wineshop-admin&lt;br /&gt;
    -Dversion=1.0-SNAPSHOT&lt;br /&gt;
</pre>
<p>Then check that the initial project is working :</p>
<pre class="brush: bash; title: ; notranslate">cd wineshop-admin&lt;br /&gt;
mvn package&lt;br /&gt;
cd webapp&lt;br /&gt;
mvn jetty:run-war&lt;br /&gt;
</pre>
<p>And browse <a href="http://localhost:8080/wineshop-admin/wineshop-admin.swf">http://localhost:8080/wineshop-admin/wineshop-admin.swf</a>. You will get the default hello world application.</p>
<h3>Step 2 : Implement basic CRUD functionality</h3>
<p>This is the longer step as we are going to build most of the application : the JPA entity model, the Spring service and a basic Flex client.
Here is the entity model, there is nothing special here.</p>
<pre class="brush: java; title: ; notranslate">
@Entity
public class Vineyard extends AbstractEntity {
    private static final long serialVersionUID = 1L;
    @Basic
    private String name;
    @OneToMany(cascade=CascadeType.ALL, mappedBy=&quot;vineyard&quot;,
        orphanRemoval=true)
    private Set&lt;Wine&gt; wines;
    public String getName() {
        return name;
    }
    public void setName(String name) {
        this.name = name;&lt;br /&gt;
    }
    public Set&lt;Wine&gt; getWines() {
        return wines;&lt;br /&gt;
    }
    public void setWines(Set&lt;Wine&gt; wines) {
        this.wines = wines;
    }
}
</pre>
<pre class="brush: java; title: ; notranslate">
@Entity
public class Wine extends AbstractEntity {

    private static final long serialVersionUID = 1L;

    public static enum Type {
        RED,
        WHITE,
        ROSE
    }

    @ManyToOne
    private Vineyard vineyard;

    @Basic
    private String name;

    @Basic
    private Integer year;

    @Enumerated(EnumType.STRING)
    private Type type;

    public Vineyard getVineyard() {
        return vineyard;
    }
    public void setVineyard(Vineyard vineyard) {
        this.vineyard = vineyard;&lt;br /&gt;
    }
    public Integer getYear() {
        return year;&lt;br /&gt;
    }
    public void setYear(Integer annee) {
        this.year = annee;&lt;br /&gt;
    }
    public String getName() {
        return name;&lt;br /&gt;
    }
    public void setName(String nom) {
        this.name = nom;
    }
    public Type getType() {
        return type;
    }
    public void setType(Type type) {
        this.type = type;
    }
}
</pre>
<p>The Spring service interface to handle this model :</p>
<pre class="brush: java; highlight: [1,2]; title: ; notranslate">
@RemoteDestination
@DataEnabled(topic=&quot;&quot;)
public interface WineshopService {
    public void save(Vineyard vineyard);
    public void remove(Long vineyardId);
    public Map&lt;String, Object&gt; list(Vineyard filter,
        int first, int max, String[] sort, boolean[] asc);
}
</pre>
<p>As you can see, there are two specific annotations on the service. <em>@RemoteDestination</em> indicates that the service is exposed to the Flex application, and that an ActionScript3 proxy will be generated for the service. <em>@DataEnabled</em> indicates that GraniteDS will track the JPA updates on the entities and report them automatically to the relevant clients.</p>
<p>Then the implementation :</p>
<pre class="brush: java; title: ; notranslate">
@Service
public class WineshopServiceImpl implements WineshopService {

    @PersistenceContext
    private EntityManager entityManager;

    @Transactional
    public void save(Vineyard vineyard) {
        entityManager.merge(vineyard);
        entityManager.flush();
    }

    @Transactional
    public void remove(Long vineyardId) {
    	Vineyard vineyard = entityManager.find(Vineyard.class, vineyardId);
    	entityManager.remove(vineyard);
        entityManager.flush();
    }

    @Transactional(readOnly=true)
    public Map&lt;String, Object&gt; list(Vineyard filter,
            int first, int max, String[] sort, boolean[] asc) {

    	StringBuilder sb = new StringBuilder(&quot;from Vineyard vy &quot;);
    	if (filter.getName() != null)
    		sb.append(&quot;where vy.name like '%' || :name || '%'&quot;);
    	if (sort.length &gt; 0)
    		sb.append(&quot;order by &quot;);
    	for (int i = 0; i &lt; sort.length; i++)
    		sb.append(sort[i]).append(&quot; &quot;).append(asc[i] ? &quot; asc&quot; : &quot; desc&quot;);
    	Query qcount = entityManager.createQuery(&quot;select count(vy) &quot;
             + sb.toString());
    	Query qlist = entityManager.createQuery(&quot;select vy &quot;
             + sb.toString()).setFirstResult(first).setMaxResults(max);
    	if (filter.getName() != null) {
    		qcount.setParameter(&quot;name&quot;, filter.getName());
    		qlist.setParameter(&quot;name&quot;, filter.getName());
    	}
    	Map&lt;String, Object&gt; result = new HashMap&lt;String, Object&gt;(4);
    	result.put(&quot;resultCount&quot;, (Long)qcount.getSingleResult());
    	result.put(&quot;resultList&quot;, qlist.getResultList());
    	result.put(&quot;firstResult&quot;, first);
    	result.put(&quot;maxResults&quot;, max);
    	return result;
    }
}
</pre>
<p>This is a classic Spring JPA service. There are two particularities however :</p>
<ul>
<li>It uses <em>merge </em>to update the entities. This is important as objects that are transferred between Flex and Java are considered as detached objects.</li>
<li>The method <em>list </em>has the specific signature <em>(filter, first, max, sort[], asc[])</em> so it can be easily used from the GraniteDS paged collection implementation.</li>
</ul>
<p>Note however that there is no particular dependency on GraniteDS, this service can be used by any other client.</p>
<p>Finally the Flex client application in <em>Home.mxml</em> :</p>
<pre class="brush: xml; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;

&lt;s:VGroup
    xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
    xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
    xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;
    xmlns:e=&quot;com.wineshop.entities.*&quot;
    xmlns=&quot;*&quot;
    width=&quot;100%&quot; height=&quot;100%&quot;&gt;

    &lt;fx:Metadata&gt;[Name]&lt;/fx:Metadata&gt;

    &lt;fx:Script&gt;
        &lt;![CDATA[
            import mx.collections.ArrayCollection;

            import org.granite.tide.spring.Spring;
            import org.granite.tide.collections.PagedQuery;
            import org.granite.tide.events.TideResultEvent;
            import org.granite.tide.events.TideFaultEvent;

            import com.wineshop.entities.Vineyard;
            import com.wineshop.entities.Wine;
            import com.wineshop.entities.Wine$Type;
            import com.wineshop.services.WineshopService;

            Spring.getInstance().addComponentWithFactory(&quot;vineyards&quot;, PagedQuery,
                { filterClass: Vineyard, elementClass: Vineyard, remoteComponentClass: WineshopService, methodName: &quot;list&quot;, maxResults: 12 }
            );

            [In] [Bindable]
            public var vineyards:PagedQuery;

            [Inject]
            public var wineshopService:WineshopService;

            private function save():void {
                 wineshopService.save(vineyard);
            }

            private function remove():void {
                wineshopService.remove(vineyard.id, function(event:TideResultEvent):void {
                    selectVineyard(null);
                });
            }

            private function selectVineyard(vineyard:Vineyard):void {
                this.vineyard = vineyard;
                vineyardsList.selectedItem = vineyard;
            }
        ]]&gt;
    &lt;/fx:Script&gt;

	&lt;fx:Declarations&gt;
		&lt;e:Vineyard id=&quot;vineyard&quot;/&gt;
	&lt;/fx:Declarations&gt;

	&lt;s:VGroup paddingLeft=&quot;10&quot; paddingRight=&quot;10&quot; paddingTop=&quot;10&quot; paddingBottom=&quot;10&quot; width=&quot;800&quot;&gt;
		&lt;s:HGroup id=&quot;filter&quot;&gt;
			&lt;s:TextInput id=&quot;filterName&quot; text=&quot;@{vineyards.filter.name}&quot;/&gt;
			&lt;s:Button id=&quot;search&quot; label=&quot;Search&quot; click=&quot;vineyards.refresh()&quot;/&gt;
		&lt;/s:HGroup&gt;

		&lt;s:List id=&quot;vineyardsList&quot; labelField=&quot;name&quot; width=&quot;100%&quot; height=&quot;200&quot;
				change=&quot;selectVineyard(vineyardsList.selectedItem)&quot;&gt;
			&lt;s:dataProvider&gt;&lt;s:AsyncListView list=&quot;{vineyards}&quot;/&gt;&lt;/s:dataProvider&gt;
		&lt;/s:List&gt;

		&lt;s:Button id=&quot;newVineyard&quot; label=&quot;New&quot; click=&quot;selectVineyard(new Vineyard())&quot;/&gt;
	&lt;/s:VGroup&gt;

	&lt;s:VGroup paddingLeft=&quot;10&quot; paddingRight=&quot;10&quot; paddingTop=&quot;10&quot; paddingBottom=&quot;10&quot; width=&quot;800&quot;&gt;
		&lt;mx:Form id=&quot;formVineyard&quot;&gt;
			&lt;mx:FormHeading label=&quot;{isNaN(vineyard.id) ? 'Create vineyard' : 'Edit vineyard'}&quot;/&gt;
			&lt;mx:FormItem label=&quot;Name&quot;&gt;
				&lt;s:Label text=&quot;{vineyard.id}&quot;/&gt;
				&lt;s:TextInput id=&quot;formName&quot; text=&quot;@{vineyard.name}&quot;/&gt;
			&lt;/mx:FormItem&gt;
			&lt;mx:FormItem&gt;
				&lt;s:HGroup&gt;
					&lt;s:Button id=&quot;saveVineyard&quot; label=&quot;Save&quot;
							  click=&quot;save()&quot;/&gt;
					&lt;s:Button id=&quot;removeVineyard&quot; label=&quot;Remove&quot;
							  enabled=&quot;{!isNaN(vineyard.id)}&quot; click=&quot;remove()&quot;/&gt;
				&lt;/s:HGroup&gt;
			&lt;/mx:FormItem&gt;
		&lt;/mx:Form&gt;
	&lt;/s:VGroup&gt;

&lt;/s:VGroup&gt;
</pre>
<p>This is no major complexity here, but there are some things that can be noted :</p>
<ul>
<li>It uses the <em>PagedQuery</em> component to display the list of existing vineyards. The configuration section at the beginning (<em>addComponentWithFactory</em>&#8230;) links the client component to the service method we have define in our Spring service, so each time the component needs to fetch data, it will call the remote service transparently. This component also handles paging, so it will fetch next elements on demand when there are lots of data on the server and the user scrolls the list. This is also why it is wrapped in an <em>AsyncListView</em> collection view.</li>
<li>The <em>PagedQuery</em> also handles transparently filtering and sorting. Here we simply bind a <em>TextInput</em> to the filter object that is passed to the server method. When the user clicks on <em>&#8216;Search&#8217;</em>, we simply have to refresh the collection, as we would have done for a client filter. Sorting is even easier and is handled completely transparently when the collection is bound to a UI component that allows sorting, for example <em>DataGrid</em>.</li>
<li>The remote service invocation is completely typesafe thanks to the ActionScript 3 generator and the <em>[Inject]</em> annotation. If you refactor the service, you will instantly detect the inconsistency between the client and the server at build time. You can also benefit from code completion in the IDE.</li>
<li>The CRUD operations are completely &#8216;fire and forget&#8217;. You just call the server method, and GraniteDS will automatically handle the updates, you don&#8217;t have to do anything yourself. There is not even a result handler and the server method do not return anything. In fact GraniteDS listens to all JPA events though the <em>DataPublishListener</em> in <em>AbstractEntity</em> and dispatches them transparently to the Flex clients, including the client from which the call originates. The local caching does everything else and GraniteDS is able to match and merge the result with the initial object on the client. The <em>remove</em> operation also works transparently because the PagedQuery is able to handle the <em>remove</em> events and update itself. It we were using simple collections, we would have to handle manually the <em>persist</em> and <em>remove</em> events.</li>
</ul>
<p>Now you can build the application with <em>mvn package</em>, restart jetty and check your changes.</p>
<h3>Step 3 : Support for JPA lazy associations</h3>
<p>There is nothing much to do, simply add a form item allowing to edit the list of wines for the selected vineyard. We can for example use a list with an item renderer containing editors for the properties of the <em>Wine</em> entity :</p>
<pre class="brush: xml; title: ; notranslate">
&lt;s:FormItem label=&quot;Wines&quot;&gt;
    &lt;s:HGroup gap=&quot;10&quot;&gt;
        &lt;s:List id=&quot;formWines&quot; dataProvider=&quot;{vineyard.wines}&quot;&gt;
            &lt;s:itemRenderer&gt;
                &lt;fx:Component&gt;
                    &lt;s:ItemRenderer&gt;
                        &lt;s:states&gt;&lt;s:State name=&quot;normal&quot;/&gt;&lt;/s:states&gt;
                        &lt;s:HGroup id=&quot;wineEdit&quot;&gt;
                            &lt;s:TextInput text=&quot;@{data.name}&quot;/&gt;
                            &lt;s:TextInput text=&quot;@{data.year}&quot;/&gt;
                            &lt;s:DropDownList
                                selectedItem=&quot;@{data.type}&quot;
                                requireSelection=&quot;true&quot;
                                dataProvider=&quot;{outerDocument.wineTypes}&quot;
                                labelField=&quot;name&quot;/&gt;
                        &lt;/s:HGroup&gt;
                    &lt;/s:ItemRenderer&gt;
                &lt;/fx:Component&gt;
            &lt;/s:itemRenderer&gt;
        &lt;/s:List&gt;				

        &lt;s:VGroup gap=&quot;10&quot;&gt;
            &lt;s:Button label=&quot;+&quot;
                click=&quot;vineyard.wines.addItem(new Wine(vineyard))&quot;/&gt;
            &lt;s:Button label=&quot;-&quot;
                 enabled=&quot;{Boolean(formWines.selectedItem)}&quot;
                 click=&quot;vineyard.wines.removeItemAt(formWines.selectedIndex)&quot;/&gt;
        &lt;/s:VGroup&gt;
    &lt;/s:HGroup&gt;
&lt;/s:FormItem&gt;
</pre>
<p>We just miss two minor things : add an argument to the constructor of <em>Wine</em> to be able to associate it to a <em>Vineyard</em> (here used for the add operation) :</p>
<pre class="brush: as3; title: ; notranslate">
public function Wine(vineyard:Vineyard = null):void {
    this.vineyard = vineyard;
}
</pre>
<p>And initialize the collection of wines for a new vineyard :</p>
<pre class="brush: as3; title: ; notranslate">
public function Vineyard():void {
    this.wines = new ArrayCollection();
}
</pre>
<p>Again, build the application with <em>mvn package</em>, restart jetty and check your changes.</p>
<p>As you can see, this is purely client code. We rely on cascading to persist the changes in the database, and GraniteDS is able to cleanly transfer lazy associations without much hassle.</p>
<p>More, when entities are fetched in the list of vineyards, their collections of wines are still not loaded. When the user selects a vineyard, the binding <em>{vineyard.wines}</em> on the list automatically triggers the loading of the collection from the server. This is completely transparent so you don&#8217;t even have to think about it !!</p>
<h3>Step 4 : Dirty checking / Undo</h3>
<p>If you have played with the application you may have noticed that using bidirectional bindings leads to strange behaviour. Even without saving your changes, the local objects are still modified. GraniteDS tracks all updates made on the managed entities and is able to easily restore the last known stable state of the objects (usually the last fetch from the server).</p>
<p>It&#8217;s also easily possible to enable or disable the <em>&#8216;Save&#8217;</em> button depending on the fact that the user has modified something or not.</p>
<p>To achieve this, we have to ensure that the entity bound to the form is managed by GraniteDS (in particular for newly created entities because entities retrieved from the server are always managed). We have just to add a few lines when the user selects another element in the main list to restore the state of the previously edited element :</p>
<pre class="brush: as3; highlight: [3,4,7,8]; title: ; notranslate">
import org.granite.tide.spring.Context;

[Inject] [Bindable]
public var tideContext:Context;

private function selectVineyard(vineyard:Vineyard):void {
    Managed.resetEntity(this.vineyard);
    tideContext.vineyard = this.vineyard = vineyard;
    vineyardsList.selectedItem = vineyard;
}
</pre>
<p>Then we can use the <em>meta_dirty</em> property of the Tide context to enable/disable the <em>&#8216;Save&#8217;</em> button :</p>
<pre class="brush: xml; highlight: [2]; title: ; notranslate">
&lt;s:Button id=&quot;saveVineyard&quot; label=&quot;Save&quot;
     enabled=&quot;{tideContext.meta_dirty}&quot; click=&quot;save()&quot;/&gt;
</pre>
<p><em>mvn package</em>, jetty, &#8230;</p>
<h3>Step 5 : Validation</h3>
<p>Great, we can now create, edit and search in our database. Now we would like to ensure that the data is consistent. Instead of manually defining Flex validators on each field, we are going to use the Bean Validation API on the server and its GraniteDS implementation on the client.</p>
<p>First let&#8217;s add a few Bean Validation annotations on the model :</p>
<pre class="brush: java; highlight: [2,3,7,8,9,10,14]; title: ; notranslate">
@Basic
@Size(min=5, max=100,
    message=&quot;The name must be between {min} and {max} characters&quot;)
private String name;

@Basic
@Min(value=1900,
    message=&quot;The year must be greater than {value}&quot;)
@Max(value=2050,
    message=&quot;The year must be less than {value}&quot;)
private Integer year;

@Enumerated(EnumType.STRING)
@NotNull
private Type type;
</pre>
<pre class="brush: java; highlight: [2,3,8]; title: ; notranslate">
@Basic
@Size(min=5, max=100,
    message=&quot;The name must be between {min} and {max} characters&quot;)
private String name;

@OneToMany(cascade=CascadeType.ALL,
    mappedBy=&quot;vineyard&quot;, orphanRemoval=true)
@Valid
private Set&lt;Wine&gt; wines;
</pre>
<p>This will at least ensure that we cannot save invalid entities. However we would like that our user is informed that the operation has failed. One ugly way would be to add a fault handler on the <em>save</em> operation call with an alert. Instead we are simply going to use the <em>FormValidator</em> component that will validate the entity locally and interpret server exceptions to propagate the error messages to the correct input field.</p>
<p>First you have to register the validation exception handler that will process the validation errors coming from the server. This is not required in this example because all the constraints can be processed locally on the client, but it&#8217;s always useful in case the server has additional constraints. Just add this in the <em>init</em> method of <em>Main.mxml</em>.</p>
<pre class="brush: as3; title: ; notranslate">
Spring.getInstance().addExceptionHandler(ValidatorExceptionHandler);
</pre>
</p>
<p>In <em>Home.mxml</em>, add the <em>v</em> namespace and define a <em>FormValidation</em> attached to the edit form and the bound entity :</p>
<pre class="brush: xml; highlight: [5]; title: ; notranslate">
&lt;s:VGroup
    xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
    xmlns:s=&quot;library://ns.adobe.com/flex/spark&quot;
    xmlns:mx=&quot;library://ns.adobe.com/flex/mx&quot;
    xmlns:v=&quot;org.granite.validation.*&quot;
    xmlns:e=&quot;com.wineshop.entities.*&quot;
    xmlns=&quot;*&quot;
    width=&quot;100%&quot; height=&quot;100%&quot;
    initialize=&quot;selectVineyard(new Vineyard())&quot;&gt;
    ...
</pre>
<pre class="brush: xml; highlight: [4]; title: ; notranslate">
&lt;fx:Declarations&gt;
    &lt;e:Vineyard id=&quot;vineyard&quot;/&gt;
    &lt;s:ArrayCollection id=&quot;wineTypes&quot; source=&quot;{Wine$Type.constants}&quot;/&gt;
    &lt;v:FormValidator id=&quot;formValidator&quot;
        entity=&quot;{vineyard}&quot;
        form=&quot;{formVineyard}&quot;/&gt;
&lt;/fx:Declarations&gt;
</pre>
</p>
<p>We can also define a FormValidator for the item renderer :</p>
<pre class="brush: xml; highlight: [4,5,6]; title: ; notranslate">
&lt;s:itemRenderer&gt;
    &lt;fx:Component&gt;
        &lt;s:ItemRenderer&gt;
            &lt;fx:Declarations&gt;
                &lt;v:FormValidator id=&quot;wineValidator&quot;
                    form=&quot;{wineEdit}&quot; entity=&quot;{data}&quot;/&gt;
            &lt;/fx:Declarations&gt;

            &lt;s:states&gt;&lt;s:State name=&quot;normal&quot;/&gt;&lt;/s:states&gt;
            &lt;s:HGroup id=&quot;wineEdit&quot;&gt;
                &lt;s:TextInput text=&quot;@{data.name}&quot;/&gt;
                &lt;s:TextInput text=&quot;@{data.year}&quot;/&gt;
                &lt;s:DropDownList
                    selectedItem=&quot;@{data.type}&quot;
                    requireSelection=&quot;true&quot;
                    dataProvider=&quot;{outerDocument.wineTypes}&quot;
                    labelField=&quot;name&quot;/&gt;
            &lt;/s:HGroup&gt;
        &lt;/s:ItemRenderer&gt;
    &lt;/fx:Component&gt;
&lt;/s:itemRenderer&gt;
</pre>
</p>
<p>These two declarations will allow to display error messages on the field during editing. The <em>FormValidator</em> takes advantage of the replication of the Bean Validation annotations to ActionScript 3 to know what validations have to be applied on the client data.</p>
<p>Finally we can keep the user from trying to save an invalid object by adding the following line :</p>
<pre class="brush: as3; highlight: [2]; title: ; notranslate">
private function save():void {
	if (formValidator.validateEntity())
		wineshopService.save(vineyard);
}
</pre>
</p>
<p><em>mvn package</em>, jetty, &#8230;</p>
<h3>Step 6 : Real-time data push</h3>
<p>Enabling data push is just a question of configuration. There are 4 things to check :</p>
<ul>
<li>Declare a topic messaging destination in the Spring configuration <em>app-config.xml</em></li>
<pre class="brush: xml; title: ; notranslate">
&lt;graniteds:messaging-destination id=&quot;wineshopTopic&quot;
    no-local=&quot;true&quot; session-selector=&quot;true&quot;/&gt;
</pre>
<li>Declare the topic and publish mode on the @DataEnabled annotation on the exposed services</li>
<pre class="brush: java; highlight: [2]; title: ; notranslate">
@RemoteDestination
@DataEnabled(topic=&quot;wineshopTopic&quot;, publish=PublishMode.ON_SUCCESS)
public interface WineshopService {
</pre>
<li>Declare the DataObserver for this topic in <em>Main.mxml</em></li>
<pre class="brush: as3; title: ; notranslate">
Spring.getInstance().addComponent(&quot;wineshopTopic&quot;, DataObserver);
Spring.getInstance().addEventObserver(&quot;org.granite.tide.login&quot;,
    &quot;wineshopTopic&quot;, &quot;subscribe&quot;);
Spring.getInstance().addEventObserver(&quot;org.granite.tide.logout&quot;,
    &quot;wineshopTopic&quot;, &quot;unsubscribe&quot;);
</pre>
</ul>
<p>Of course the three declarations should use the same topic name, but this is all you need to enable data push.</p>
<p><em>mvn package</em>, jetty, &#8230;</p>
<p>Now if you open many browsers, all the changes made in one browser should be dispatched to all other browsers.</p>
<h3>Step 7 : Conflict handling</h3>
<p>In any multiuser application, there may be cases where different users do changes on the same entity concurrently. Using optimistic locking is a common technique to handle these cases and avoid database inconsistencies. GraniteDS is able to handle these errors cleanly in either normal remoting operations or with real-time data push.</p>
<p>This is quite simple to configure, you just need to register an exception handler for the JPA <em>OptimistickLockException</em> and an event listener on the Tide context that will be called when a concurrent modification conflict occurs :</p>
<pre class="brush: as3; title: ; notranslate">
private function init():void {
    ...
    Spring.getInstance().addExceptionHandler(OptimisticLockExceptionHandler);

    Spring.getInstance().getSpringContext().addEventListener(
        TideDataConflictsEvent.DATA_CONFLICTS, conflictsHandler);
}

private function conflictsHandler(event:TideDataConflictsEvent):void {
    Alert.show(&quot;Someone has modified this vineyard at the same time\n. &quot;
        + &quot;Keep your changes ?&quot;,
        &quot;Conflict&quot;, Alert.YES | Alert.NO, null, function(ce:CloseEvent):void {
        if (ce.detail == Alert.YES)
            event.conflicts.acceptAllClient();
        else
            event.conflicts.acceptAllServer();
    });
}
</pre>
</p>
<p>The most difficult part is to actually obtain a conflict. After your rebuild and restart jetty, open two browsers. Create a vineyard in one of the browsers, it will appear in the second one. Edit it in the second browser and change something, for example its name, without saving. Then in the first browser, change the name to a different value and save. An alert should appear in the second browser.</p>
<h3>Step 8 : Reverse lazy loading</h3>
<p>This final feature is not very visual, but it can improve a lot the performance of your application. The support for server-to-client lazy loading ensures that the amount of data transferred in this direction is limited, but a problem can arise in the other direction (client-to-server). Once all your object graph is loaded on the client by transparent loading or manual operations, the complete loaded object graph will be sent back to the server even when only a property of the root object has been changed. With very deep and complex object graphs, this can really kill the performance of write operations.</p>
</p>
<p>GraniteDS now provides a new feature called reverse lazy loading that allows to fold the object graph before transmitting it to the server. It will take in account the changes made locally by the user to fold all parts of the graph that have not been updated, and still send the parts of the graph containing the changes.</p>
<p>This can be setup as follows : in the initialization method of the application, register an argument preprocessor :</p>
<pre class="brush: as3; title: ; notranslate">
Spring.getInstance().addComponents([UninitializeArgumentPreprocessor]);
</pre>
</p>
<p>And then in the service methods that update entities, simply add the <em>@Lazy</em> annotation to the incoming arguments :</p>
<pre class="brush: java; title: ; notranslate">
public void save(@Lazy Vineyard vineyard);
</pre>
</p>
<p>To really see what happens, you have to run <em>mvn jetty:run-war</em> in debug mode from the Eclipse M2E plugin, and put a breakpoint in the method <em>save()</em>. Then create a vineyard and some wines, and save it. Close and reopen the browser to restart from a clean state, edit and change the name of the vineyard you just created and click on <em>Save</em>. By inspecting the incoming <em>Vineyard</em> object on the debugger, you can see that the collection of wines is marked uninitialized. Now change the name of one of the wine and click on <em>Save</em>. This time the collection will be initialized and contain the <em>Wine</em> object you just updated.</p>
<p>Or you can just trust that it works and that it&#8217;s better to use it than not&#8230;</p>
<h3>Conclusion</h3>
<p>We&#8217;re done with this tutorial on the data management features. You are now be able to see what you can do with GraniteDS and how it can simplify your developments, and even bring new possibilities for your applications.</p></p>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/KYwDmEEc15k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/12/05/graniteds-data-management-tutorial/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/12/05/graniteds-data-management-tutorial/</feedburner:origLink></item>
		<item>
		<title>Quick start with GraniteDS</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/uBa2x5lDKBM/</link>
		<comments>http://granitedataservices.com/blog/2011/12/02/quick-start-with-graniteds/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 20:38:46 +0000</pubDate>
		<dc:creator>William</dc:creator>
				<category><![CDATA[GraniteDS]]></category>

		<guid isPermaLink="false">http://granitedataservices.com/?p=1207</guid>
		<description><![CDATA[You have now two very easy ways to quickly create a new GraniteDS project &#8211; or to get&#8230;]]></description>
			<content:encoded><![CDATA[<p>You have now two very easy ways to quickly create a new GraniteDS project &#8211; or to get quickly started with the platform if you are not familiar with it: a dedicated Eclipse wizard and four Maven archetypes. Both allow to create fully functional projects with only few clicks or command-line options, resulting in pre-configured, ready to deploy, skeleton applications with most of the major features you would use in a real-world project: Flash Builder configuration, Ant build file, JavaEE framework and JPA provider integration, code generation setup, real-time messaging configuration, etc.</p>
<p>If you are a Maven user, you can start with the archetypes that work with embedded servers ( Jetty or Embedded GlassFish), see <a href="#maven">this paragraph</a> below. Using the wizard can however be helpful in defining proper configurations for other target application servers and environments such as Tomcat or JBoss.</p>
<h3>Using the Eclipse Wizard</h3>
<p>First, you need to install the GraniteDS wizard and builder plugins in Eclipse. From Eclipse, you can use the Eclipse Marketplace dialog (search for &#8220;GraniteDS&#8221;) or add the GraniteDS update site (<a href="http://www.graniteds.org/public/update-site/" target="_blank">http://www.graniteds.org/public/update-site/</a>) to the list of available software sites:</p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/available.png"><img class="aligncenter size-full wp-image-1371" title="Available Software" src="http://granitedataservices.com/wp-content/uploads/2011/12/available.png" alt="" width="453" height="265" /></a></center></p>
<p>You will need to install both the GraniteDS Builder and the GraniteDS Wizard plugins. It will register a GraniteDS / GraniteDS Project wizard with three default templates:</p>
<ul>
<li>The <strong>Pojo template</strong> is a simple template that creates a project configured for basic remoting to a Java service.</li>
<li>The <strong>Chat template</strong> is a simple template that creates a project configured for basic client-to-client messaging with a default chat application.</li>
<li>The <strong>Spring/EJB/Seam/CDI template</strong> is a bit more advanced and allows to create a project configured with a complete Flex, Java and GraniteDS technology stack, including popular Java frameworks such as Spring and EJB3, JPA support and real-time data push.</li>
</ul>
<p>The three templates generate a combined Flex/Java project that can be easily converted to an Eclipse WTP project and deployed to a local or remote application server. If you use Flash Builder, the necessary configuration files can be optionally generated so the project can be immediately compiled in Flash Builder. Finally a minimal ant build file will be produced so you can build the project manually if needed.</p>
<h4>Let&#8217;s see how this works in a few steps:</h4>
<p>First select the menu File / New / Other.. (or just type Ctrl+N) then lookup the GraniteDS section and select GraniteDS Project.</p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step1.png"><img class="aligncenter size-full wp-image-1259" title="Step 1" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step1.png" alt="" width="525" height="500" /></a></center></p>
<p>Select a template, for example the last one and click Next.</p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step2.png"><img class="aligncenter size-full wp-image-1260" title="Step 2" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step2.png" alt="" width="525" height="500" /></a></center></p>
<p>Choose a name for your project, choose your preferred technologies, for example choose Spring 3, Tomcat 7 and Hibernate. Fill up the other information, in particular your Flex SDK home directory (it should be ideally a Flex 4.5 SDK) and the deployment folder of the application server (for example something like <em>/home/dev/apache-tomcat-7.0.22/webapps</em> for Tomcat 7). Keep default values for the others, check Flash Builder and Ant+Ivy build options and click on <em>Finish</em>.</p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step3.png"><img class="aligncenter size-full wp-image-1261" title="Step 3" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step3.png" alt="" width="525" height="758" /></a></center></p>
<p>The creation of the new project in the workspace can take some time because the wizard will fetch all necessary libraries on the central Maven repository. If you are using Flash Builder 4.5, you may get the following warning because the generated configuration files are targeted at Flash Builder 4, so just select Flex SDK 4.5+.</p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step4.png"><img class="aligncenter size-full wp-image-1262" title="quickstart-step4" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step4.png" alt="" width="513" height="328" /></a></center></p>
<p>With Flash Builder, you will always have an error about HTML wrapper files after the project is built (this is a known Flash Builder issue). Just right click on the error message as suggested and select <em>Recreate HTML templates</em>.</p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step5.png"><img class="aligncenter size-full wp-image-1264" title="Step 5" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step5.png" alt="" width="820" height="355" /></a></center></p>
<p>If you don&#8217;t use Flash Builder, you can simply use the target <em>build.flex</em> of the generated <em>build.xml</em> ant file that will run the compilation of the Flex application.</p>
<p>At this point, you already have a working project, fully configured for the technologies and server you have chosen in the wizard page. You have now two options to deploy it to your server: run the <em>deploy.war</em> target of the generated ant <em>build.xml</em> file or use Eclipse WTP.</p>
<p>In order to use WTP, you first have to convert the project to a <i>faceted</i> project by right clicking on the project and selecting the menu <em>Configure / Convert to Faceted Form&#8230;</em></p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step61.png"><img class="aligncenter size-full wp-image-1265" title="Step 6" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step61.png" alt="" width="738" height="374" /></a></center></p>
<p>On the next page, select <em>Dynamic Web Project</em> with the correct version (3.0 for Tomcat 7 or JBoss 6/7, 2.5 for Tomcat 6 or JBoss 4/5) and select a corresponding server runtime.</p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step7.png"><img class="aligncenter size-full wp-image-1266" title="quickstart-step7" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step7.png" alt="" width="1022" height="643" /></a></center></p>
<p>Finally, right click on the project and select <em>Debug / Debug on Server&#8230;</em></p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step8.png"><img class="aligncenter size-full wp-image-1267" title="Step 8" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step8.png" alt="" width="677" height="354" /></a></center></p>
<p>On the last screen, just check that the correct server is selected (here it should be Tomcat 7) and click on <em>Finish</em>.</p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step9.png"><img class="aligncenter size-full wp-image-1268" title="Step 9" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step9.png" alt="" width="525" height="683" /></a></center></p>
<p>Eclipse will start the application server and open a Web browser on the application welcome page. You should get something like this:</p>
<p><center><a href="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step10.png"><img class="aligncenter size-full wp-image-1269" title="Step 10" src="http://granitedataservices.com/wp-content/uploads/2011/12/quickstart-step10.png" alt="" width="982" height="626" /></a></center></p>
<p>You can log in with admin:admin or user:user, and try to enter a few names. If you open a second <b>browser</b> (<i>and not only another tab or window of the same browser!</i>) and point it to the same page (<a href="http://localhost:8080/springgds">http://localhost:8080/springgds</a>), you should see your modifications reflected in real-time in both browsers.</p>
<p>If you setup automatic publishing in Eclipse WTP (that should be the case by default), any change you make on the Flex application will be automatically deployed on the server. You can simply refresh the page to check your changes once compiled, no need to redeploy anything to develop your UI!</p>
<p><a name="maven"></a></p>
<h3>Using the Maven archetypes</h3>
<p>If you are a Maven user, it&#8217;s likely that you will prefer to start with an archetype. There are four existing GraniteDS archetypes available on the Maven central repository:</p>
<p>archetypeGroupId: org.graniteds.archetypes
archetypeVersion: 1.1.0.GA
archetypeArtifactId:</p>
<ul>
<li><strong>graniteds-spring-jpa-hibernate</strong>: Flex 4.5 + Spring 3 + Hibernate 3.6 + GraniteDS 2.3 with standard RemoteObject API</li>
<li><strong>graniteds-tide-spring-jpa-hibernate</strong>: Flex 4.5 + Spring 3 + Hibernate 3.6 + GraniteDS 2.3 with Tide API</li>
<li><strong>graniteds-tide-seam-jpa-hibernate</strong>: Flex 4.5 + Seam 2.2 + Hibernate 3.6 + GraniteDS 2.3 with Tide API</li>
<li><strong>graniteds-tide-cdi-jpa</strong>: Flex 4.5 + CDI/Weld 1.1 + JPA 2.0 + GraniteDS 2.3 with Tide API</li>
</ul>
<p>The Tide archetypes are equivalent to what you get with the Spring/EJB/Seam/CDI template of the Eclipse Wizard we have seen if the first paragraph. The main differences are that you don&#8217;t need to have a Flex SDK installed as it will be retrieved from the Maven repository and that you get 3 separate projects: a Java project, a Flex project and a Webapp project.</p>
<p>Let&#8217;s reproduce what we did with the Eclipse Wizard, first with a command line (Maven 3.x required):</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">
mvn archetype:generate
    -DarchetypeGroupId=org.graniteds.archetypes
    -DarchetypeArtifactId=graniteds-tide-spring-jpa-hibernate
    -DarchetypeVersion=1.1.0.GA
    -DgroupId=org.example
    -DartifactId=springgds
    -Dversion=1.0-SNAPSHOT
</pre>
<p>Once the archetype is created, you can build the project with:</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">
cd springgds
mvn clean package
</pre>
<p>And finally run the embedded jetty server with:</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">
cd webapp
mvn jetty:run-war
</pre>
<p>You can now browse <a href="http://localhost:8080/springgds">http://localhost:8080/springgds</a> and check that the application works.</p>
<p>The CDI archetype requires a Java EE 6 server and uses an embedded GlassFish that you can run with:</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">
cd webapp
mvn embedded-glassfish:run
</pre>
<p>With the Eclipse Maven integration (the M2E plugin), you can simply choose one of the archetypes when doing <em>New Maven Project</em>.</p>
<p>To deploy the application to a <i>real</i> server, you can use the following goal to build a war file:</p>
<pre class="brush: bash; gutter: false; title: ; notranslate">
mvn war:war
</pre>
<p>Note however that when doing this you may have to change the configuration of the application. In general you have to change the name of the <em>Gravity</em> servlet in <em>web.xml</em> and most likely update your JPA configuration. You can use the Eclipse Wizard to generate a configuration corresponding to your case.</p>
<h3>Conclusion</h3>
<p>It now takes literally 5 minutes (and less than 1 minute after the first run) to start a new Flex / Java project with GraniteDS. You no longer have any excuse not to try it!</p>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/uBa2x5lDKBM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/12/02/quick-start-with-graniteds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/12/02/quick-start-with-graniteds/</feedburner:origLink></item>
		<item>
		<title>Maven archetypes updated to GraniteDS 2.3.0, Flex 4.5 and Flexmojos 4</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/nLR8LZmoHrw/</link>
		<comments>http://granitedataservices.com/blog/2011/11/21/maven-archetypes-updated-to-graniteds-2-3-0-flex-4-5-and-flexmojos-4/#comments</comments>
		<pubDate>Mon, 21 Nov 2011 13:25:49 +0000</pubDate>
		<dc:creator>William</dc:creator>
				<category><![CDATA[GraniteDS]]></category>
		<category><![CDATA[2.3.0]]></category>
		<category><![CDATA[archetypes]]></category>
		<category><![CDATA[maven]]></category>

		<guid isPermaLink="false">http://granitedataservices.com/?p=1160</guid>
		<description><![CDATA[Following the release of GraniteDS 2.3.0.GA, we have updated the Maven archetypes, now in version 1.1.0.GA. Here are&#8230;]]></description>
			<content:encoded><![CDATA[<p>Following the release of GraniteDS 2.3.0.GA, we have updated the Maven archetypes, now in version 1.1.0.GA.</p>
<p>Here are the changes :</p>
<ul>
<li>Upgrade to GDS 2.3.0.GA</li>
<li>Upgrade to Flexmojos 4.0-RC2</li>
<li>Upgrade to Flex SDK 4.5.1</li>
<li>Fixed some issues in POMs when used in Eclipse with the m2e plugin</li>
<li>Fixed Tide/Seam archetype</li>
</ul>
<p>As a reminder, here is how you can use the archetype to build a simple project with Flex/GraniteDS/Spring and Hibernate :</p>
<pre>mvn archetype:generate 
  -DarchetypeGroupId=org.graniteds.archetypes 
  -DarchetypeArtifactId=graniteds-tide-spring-jpa-hibernate 
  -DarchetypeVersion=1.1.0.GA 
  -DgroupId=com.myapp 
  -DartifactId=example
  -Dversion=1.0-SNAPSHOT</pre>
<p>There are still 4 existing archetypes, all of which are now based on Flex 4.5 and Spark components :</p>
<ul>
<li><strong>graniteds-spring-jpa-hibernate</strong>: Spring 3 + JPA/Hibernate + GraniteDS with RemoteObject API</li>
<li><strong>graniteds-tide-spring-jpa-hibernate</strong>: Spring 3 + JPA/Hibernate + GraniteDS with Tide API</li>
<li><strong>graniteds-tide-seam-jpa-hibernate</strong>: Seam 2.2 + JPA/Hibernate + GraniteDS with Tide API</li>
<li><strong>graniteds-tide-cdi-jpa</strong>: CDI/Weld 1.1 + JPA + GraniteDS with Tide API</li>
</ul>
<p>Once the project is created, you can build it easily with</p>
<pre>mvn install</pre>
<p>And then run it in Jetty (Spring or Seam) with :</p>
<pre>cd webapp
mvn jetty:run-war</pre>
<p>Or in the Embedded GlassFish 3.1.1 (CDI) with :</p>
<pre>cd webapp
mvn embedded-glassfish:run</pre>
<p>Once started you can access the default generated application at <a href="http://localhost:8080/example/example.swf" target="_blank">http://localhost:8080/example/example.swf</a>. By default there are two users created that can access the application : admin / admin and user / user.</p>
<p>You can then easily build a war with :</p>
<pre>mvn war:war</pre>
<p>Note that in this case you may have to change the configuration if your application server target is not the same as the embedded maven plugin. For example, if you target Tomcat, you will have to adapt the Gravity servlet in web.xml accordingly. Also note that the default configuration uses an embedded H2 database and locally defined security.</p>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/nLR8LZmoHrw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/11/21/maven-archetypes-updated-to-graniteds-2-3-0-flex-4-5-and-flexmojos-4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/11/21/maven-archetypes-updated-to-graniteds-2-3-0-flex-4-5-and-flexmojos-4/</feedburner:origLink></item>
		<item>
		<title>Announcing Granite Data Services 2.3.0 GA (final)!</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/eDqPnhwomFI/</link>
		<comments>http://granitedataservices.com/blog/2011/11/09/announcing-granite-data-services-2-3-0-ga-final/#comments</comments>
		<pubDate>Wed, 09 Nov 2011 19:31:45 +0000</pubDate>
		<dc:creator>Franck</dc:creator>
				<category><![CDATA[GraniteDS]]></category>

		<guid isPermaLink="false">http://granitedataservices.com/?p=1154</guid>
		<description><![CDATA[Hi all, Granite Data Services 2.3.0 GA (final) is out and available for download here: http://www.graniteds.org/confluence/display/DOWNLOAD. Maven artifacts&#8230;]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>Granite Data Services 2.3.0 GA (final) is out and available for download here: <a href="http://www.graniteds.org/confluence/display/DOWNLOAD">http://www.graniteds.org/confluence/display/DOWNLOAD</a>. Maven artifacts have been uploaded and should be shortly available as well.</p>
<p>This final release comes with fixes for the few issues that were discovered in the recent 2.3.0 RC1. The full change log can be found on <a href="http://www.graniteds.org/jira/secure/IssueNavigator.jspa?reset=true&amp;jqlQuery=project+%3D+GDS+AND+fixVersion+%3D+%222.3.0.GA%22+AND+status+%3D+Resolved+ORDER+BY+priority+DESC&amp;mode=hide">GraniteDS&#8217; Jira</a>.</p>
<p>Among many other things, GraniteDS 2.3.0 brings:</p>
<ul>
<li>Client-side lazy-loading.</li>
<li>Clustering improvements.</li>
<li>JMS integration fixes.</li>
<li>Hibernate 4 / JBoss 7 / Flex 4.5 support.</li>
</ul>
<p>See also this post about these new features / improvements: <a href="http://granitedataservices.com/blog/2011/10/12/more-details-on-the-new-features-in-graniteds-2-3/">More details on the new features in GraniteDS 2.3</a>.</p>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/eDqPnhwomFI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/11/09/announcing-granite-data-services-2-3-0-ga-final/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/11/09/announcing-granite-data-services-2-3-0-ga-final/</feedburner:origLink></item>
		<item>
		<title>More details on the new features in GraniteDS 2.3</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/Xz3MjwB7uak/</link>
		<comments>http://granitedataservices.com/blog/2011/10/12/more-details-on-the-new-features-in-graniteds-2-3/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 10:02:58 +0000</pubDate>
		<dc:creator>William</dc:creator>
				<category><![CDATA[GraniteDS]]></category>
		<category><![CDATA[Hibernate 4]]></category>
		<category><![CDATA[JBoss AS 7]]></category>
		<category><![CDATA[Lazy-loading]]></category>

		<guid isPermaLink="false">http://www.granitedataservices.com/?p=1122</guid>
		<description><![CDATA[GraniteDS 2.3.0 RC1 is mostly a bugfix and incremental improvements release but contains a few new features :&#8230;]]></description>
			<content:encoded><![CDATA[<p>GraniteDS 2.3.0 RC1 is mostly a bugfix and incremental improvements release but contains a few new features :</p>
<h3><strong>Support for JBoss AS 7 / Hibernate 4</strong></h3>
<p>JBoss have once again changed their VFS internal implementation in AS 7, breaking the class scanner in GraniteDS. It was still possible to run GraniteDS in non-scan mode but this is now fixed and you can now benefit from the very fast JBoss AS 7 with GDS 2.3.</p>
<p>Another issue with JBoss AS 7 is its deep integration with Hibernate 4 which makes very painful to deploy Hibernate 3.x applications (i.e. <em>all</em> Hibernate applications). There are a few workarounds described on the Hibernate blog <a href="http://relation.to/Bloggers/SomeTipsOnUsingHibernateInJBossAS700Final">here</a>. However it&#8217;s recommended to upgrade to H4 as soon as possible, and GraniteDS now fully supports Hibernate 4. Just use the granite-hibernate4.jar instead of granite-hibernate.jar and you&#8217;re done.</p>
<h3><strong>Support for Flex 4.5+</strong></h3>
<p>Flex 4.5 broke a few APIs and there were two main issues with Tide :</p>
<ul>
<li>The client libraries crashed when run in a mobile application</li>
<li>The <em>PagedQuery</em> was unusable</li>
</ul>
<p>These two issues are now fixed and you will find a version of the granite-flex45.swc client libraries compiled with the Flex SDK 4.5 <a href="http://www.graniteds.org/bamboo/browse/GDSCP-GDSCPN-75/artifact/shared/GraniteDS-swcs">here</a>. Unfortunately it is not yet available with the &#8216;normal&#8217; distribution because our build system was not able to build with two different versions of the Flex SDK. The library can be found only in the new <a href="http://www.graniteds.org/bamboo/browse/GDSCP-GDSCPR-22/artifact">Community Platform</a> distribution (which will be the default distribution format starting from GraniteDS 3.0). For the final release we will try to add it manually and it should be also available as a maven artifact.</p>
<h3>Reverse lazy-loading</h3>
<p>The support of lazy-loaded associations when retrieving detached entities from the server is an important feature of GraniteDS and greatly helps limiting the amount of data transferred through the network. However it works only in the server to client direction. The problem is that once you have loaded all associations on the client, passing an object as an argument of a remote method call will send the whole loaded object graph to the server, even if you have only changed a simple property.</p>
<pre>public function savePerson():void {
    person.lastName = "Test";
    personService.save(person);   // This will send all loaded collections associated to the Person object
}</pre>
<p>Obviously this is not very efficient, so you can now ask Tide to uninitialize the object graph before sending it. You can do it manually with :</p>
<pre>var uperson:Person = new EntityGraphUnintializer(tideContext).uninitializeEntityGraph(person) as Person;
personService.save(uperson);</pre>
<p>Here all loaded collections of the <em>Person </em>object will be uninitialized so <em>uperson </em>contains only the minimum of data to correctly merge your changes in the server persistence context. <span style="direction: ltr;">If there is a change deeper in the object graph, the uninitializer is able to detect it and will not uninitialize the corresponding graph so the server receives all changes.</span></p>
<pre><span style="direction: ltr;">person.contacts.getItemAt(0).email = 'test@test.com';</span>
var uperson:Person = new EntityGraphUnintializer(tideContext).uninitializeEntityGraph(person) as Person;
personService.save(uperson);</pre>
<p>Here <em>uperson </em>will still contain the loaded collection of contacts, but if there are other collections, they will be uninitialized.</p>
<p>If you want to uninitialize more than one argument, you have to use the same <em>EntityGraphUninitializer </em>for all so they share the same context :</p>
<pre>var egu:EntityGraphUnintializer = new EntityGraphUninitialize(tideContext);
uperson1 = egu.uninitializeEntityGraph(person1);
uperson2 = egu.uninitializeEntityGraph(person2);
personService.save(uperson1, uperson2);</pre>
<p>Calling the <em>EntityGraphUninitializer </em>manually is a bit tedious and ugly, so there is a cleaner possibility when you are using generated typesafe service proxies. You can annotate your service method arguments with <em>@org.granite.tide.data.Lazy</em> :</p>
<pre>public void save(@Lazy Person person) {
}</pre>
<p>Gas3 will then generate a <em>[Lazy]</em> annotation on your service methods (so take care that you need to add the <em>[Lazy]</em> annotation to your Flex metadata compilation configuration). <span style="direction: ltr;">Next in the Flex application, register </span><span style="direction: ltr;">the <em>UninitializeArgumentPreprocessor </em></span><span style="direction: ltr;">component in Tide.</span></p>
<pre>Tide.getInstance().addComponents([UninitializeArgumentPreprocessor]);</pre>
<p>Once you have done this, all calls to <em>PersonService.save()</em> will use an uninitialized version of the <em>person </em>argument.</p>
<p>It is important to note that it will <strong>not</strong> uninitialize the associations in your &#8216;normal&#8217; Tide context and that there will not be any change to your client entities. Tide will simply copy the necessary entities in a temporary context, uninitialize the associations of the copies before the passing them as arguments to the remote call and then discard everything.</p>
<p>Unfortunately this new feature cannot yet work with Seam context variables (and thus with the <em>Home</em> component). Only method arguments can be processed, but this should cover be the vast majority of use cases. Support for context variables requires a major refactoring and will come with GDS 3.0.</p>
<h3>Injection of the Gravity singleton</h3>
<p>In GDS 2.2 you needed a <em>ServletContext</em> to retrieve the <em>Gravity</em> singleton from a server application, which is not always possible or suitable and implies a dependency on the Servlet API. With GDS 2.3, the singleton is available in the framework context and can simply be injected.</p>
<p>With Spring or CDI :</p>
<pre>@Inject
private Gravity gravity;</pre>
<p>With Seam :</p>
<pre>@In("org.granite.seam.gravity")
private Gravity gravity;</pre>
<p>The DI capabilities of EJB3 are too limited to allow something like this. If you need to be independent from the Gravity API, just use a JMS topic and send messages with the JMS API.</p>
<h3>Improved support for transparent data push (ON_COMMIT mode and non-GDS threads)</h3>
<p>GraniteDS provides a data push feature allowing to track updates on JPA entities and transparently dispatch them in real-time through Gravity to Flex clients. However in GDS 2.2 there were two limitations : the updates could be tracked only from a thread managed by GraniteDS (an HTTP remoting or messaging request), and the ON_COMMIT mode allowing transactional dispatch of the updates through JMS was not supported out-of-the-box.</p>
<p>GraniteDS 2.3 comes with a set of interceptors (unfortunately one for each technology : Spring, Seam, EJB3 and CDI ; so much for interoperability for such a basic thing as an interceptor) managing the ON_COMMIT mode that can also be used to track the updates on any non-GraniteDS thread.</p>
<p>The setup is simple, just add the <em>useInterceptor=true</em> parameter on the <em>@DataEnabled</em> annotation and use either ON_SUCCESS or ON_COMMIT. ON_SUCCESS is the default mode and simply means that the dispatch will occur for all successful calls. ON_COMMIT means that the dispatch will occur when the transaction commits, it ensures that the dispatch is transactional when used in conjuction with a transacted JMS topic.</p>
<p>Then configure the interceptor for your target framework :</p>
<p>For Spring, a<span style="direction: ltr;">dd this in your context :</span></p>
<pre>&lt;graniteds:tide-data-publishing-advice/&gt;</pre>
<p>Take care that you have to use the latest xsd :</p>
<pre>xsi:schemaLocation="http://www.graniteds.org/config http://www.graniteds.org/public/dtd/2.3.0/granite-config-2.3.xsd"</pre>
<p>For Seam, nothing to do, the interceptor is implicitly setup when the <em>@DataEnabled(useInterceptor=true) </em>annotation is applied.</p>
<p>For CDI, just enable the interceptor in beans.xml :</p>
<pre>&lt;beans
    xmlns="http://java.sun.com/xml/ns/javaee"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/beans_1_0.xsd"&gt;	 
    &lt;interceptors&gt;
        &lt;class&gt;org.granite.tide.cdi.TideDataPublishingInterceptor&lt;/class&gt;
    &lt;/interceptors&gt;
&lt;/beans&gt;</pre>
<p>For EJB3, you have to setup the interceptor on each EJB :</p>
<pre>@Stateless
@Local(MyService.class)
@Interceptors(TideDataPublishingInterceptor.class)
@DataEnabled(topic="myTopic", publish=PublishMode.ON_COMMIT, useInterceptor=true)
public class MyServiceBean {
    ...
}</pre>
<p>Or globally in ejb-jar.xml :</p>
<pre>&lt;assembly-descriptor&gt;
      &lt;interceptor-binding&gt;
         &lt;ejb-name&gt;*&lt;/ejb-name&gt;
         &lt;interceptor-class&gt;org.granite.tide.ejb.<span style="direction: ltr;">TideDataPublishingInterceptor&lt;/</span>interceptor-class&gt;
      &lt;/interceptor-binding&gt;
      ...
&lt;/assembly-descriptor&gt;</pre>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/Xz3MjwB7uak" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/10/12/more-details-on-the-new-features-in-graniteds-2-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/10/12/more-details-on-the-new-features-in-graniteds-2-3/</feedburner:origLink></item>
		<item>
		<title>Announcing Granite Data Services 2.3.0 RC1!</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/GA-RC9vekkM/</link>
		<comments>http://granitedataservices.com/blog/2011/10/11/announcing-granite-data-services-2-3-0-rc-1/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 20:20:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GraniteDS]]></category>

		<guid isPermaLink="false">http://www.granitedataservices.com/?p=1114</guid>
		<description><![CDATA[Hi all, Granite Data Services 2.3.0 Release Candidate 1 is out and available for download here: http://www.graniteds.org/confluence/display/DOWNLOAD. Many (59!)&#8230;]]></description>
			<content:encoded><![CDATA[<p>Hi all,</p>
<p>Granite Data Services 2.3.0 Release Candidate 1 is out and available
for download here: <a rel="nofollow" href="http://www.google.com/url?sa=D&amp;q=http://www.graniteds.org/confluence/display/DOWNLOAD&amp;usg=AFQjCNEIIhXxvhV0RtAeYurlvQBRpziytg" target="_blank">http://www.graniteds.org/confluence/display/DOWNLOAD</a>.</p>
<p>Many (59!) bugfixes, improvements and new features are coming with
this new release and the full change log can be found on GraniteDS&#8217;
Jira:
<a rel="nofollow" href="http://www.google.com/url?sa=D&amp;q=http://www.graniteds.org/jira/secure/IssueNavigator.jspa%3Freset%3Dtrue%26jqlQuery%3Dproject%2B%253D%2BGDS%2BAND%2BfixVersion%2B%253D%2B%25222.3.0.RC1%2522%2BAND%2Bstatus%2B%253D%2BResolved%2BORDER%2BBY%2Bpriority%2BDESC%26mode%3Dhide&amp;usg=AFQjCNFy_vmbqpM8OMWPZJbOn4OdQokwKQ" target="_blank">http://www.graniteds.org/jira/secure/IssueNavigator.jspa?reset=true&amp;j&#8230;</a>.</p>
<p>Among many other things, GraniteDS 2.3.0 brings:</p>
<ul>
<li>Client-side lazy-loading.</li>
<li>Clustering improvements.</li>
<li>JMS integration fixes.</li>
<li>Hibernate 4 / JBoss 7 / Flex 4.5 support.</li>
</ul>
<p>Maven artifacts are coming as well. In the next few days, we will be discussing many of the  new features and improvements in more detail. So stay tuned!</p>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/GA-RC9vekkM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/10/11/announcing-granite-data-services-2-3-0-rc-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/10/11/announcing-granite-data-services-2-3-0-rc-1/</feedburner:origLink></item>
		<item>
		<title>Get GraniteDS News and Tutorials in Portuguese!</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/7FblZ8oaUqw/</link>
		<comments>http://granitedataservices.com/blog/2011/10/11/get-graniteds-news-and-tutorials-in-portuguese/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 19:01:35 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GraniteDS]]></category>

		<guid isPermaLink="false">http://www.granitedataservices.com/?p=1106</guid>
		<description><![CDATA[For all of our Portuguese speaking users, the brilliant Fabiano Frizzo has been putting up a blog about&#8230;]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.ffrizzo.com/"><img class="alignleft" title="flex-blog-brazil" src="http://www.granitedataservices.com/wp-content/uploads/2011/10/flex-blog-brazil-300x211.png" alt="GraniteDS Brazil Flex Blog at blog.ffrizzo.com" width="300" height="211" /></a>For all of our Portuguese speaking users, the brilliant Fabiano Frizzo has been putting up a blog about GraniteDS in Brazil! Fabiano is a very talented programmer and avid user of the GraniteDS framework. By publishing news and updates in Portuguese, Fabiano hopes that more developers in Brazil and around the globe will be able to discover the benefits of the GraniteDS framework. Thanks Fabiano!</p>
<p>Fabiano&#8217;s blog is up and running at <a href="http://blog.ffrizzo.com/">http://blog.ffrizzo.com/</a> &#8211; go visit, bookmark and tweet about it now if you know Flex developers in Brazil.</p>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/7FblZ8oaUqw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/10/11/get-graniteds-news-and-tutorials-in-portuguese/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/10/11/get-graniteds-news-and-tutorials-in-portuguese/</feedburner:origLink></item>
		<item>
		<title>How GraniteDS compares to BlazeDS</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/zjWayR76yqs/</link>
		<comments>http://granitedataservices.com/blog/2011/09/13/how-graniteds-compares-to-blazeds/#comments</comments>
		<pubDate>Tue, 13 Sep 2011 15:01:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GraniteDS]]></category>
		<category><![CDATA[advantages]]></category>
		<category><![CDATA[blazeds]]></category>
		<category><![CDATA[comparison]]></category>
		<category><![CDATA[features]]></category>
		<category><![CDATA[graniteds]]></category>

		<guid isPermaLink="false">http://www.granitedataservices.com/?p=1091</guid>
		<description><![CDATA[We get a lot of questions from developers and architects about some of the major differences between BlazeDS&#8230;]]></description>
			<content:encoded><![CDATA[<p>We get a lot of questions from developers and architects about some of the major differences between BlazeDS and GraniteDS. They are quite significant. You can compare some differences already in a <a href="http://www.granitedataservices.com/compare-graniteds/">quick comparison table</a> on our website, but we&#8217;ve created a more detailed comparison in the presentation below. Please feel free to share this presentation!</p>
<p>The presentation highlights some of the main advantages of GraniteDS in the following areas:</p>
<ul>
<li>Licensing and Support</li>
<li>JPA Integration</li>
<li>Remoting</li>
<li>Real-Time Messaging</li>
<li>Client Frameworks</li>
<li>Validation and Numeric Types</li>
<li>Mobile Platforms Support</li>
</ul>
<div style="width:600px" id="__ss_9241844"> <iframe src="http://www.slideshare.net/slideshow/embed_code/9241844" width="600" height="465" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe>  </div>
<p>What do you think, did we forget anything? Let us know your thoughts in the comments.</p>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/zjWayR76yqs" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/09/13/how-graniteds-compares-to-blazeds/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/09/13/how-graniteds-compares-to-blazeds/</feedburner:origLink></item>
		<item>
		<title>Flex Connector 1.1 for Nuxeo Released With GraniteDS</title>
		<link>http://feedproxy.google.com/~r/GraniteDataServices/~3/yrF54ctzDgM/</link>
		<comments>http://granitedataservices.com/blog/2011/08/31/flex-connector-1-1-for-nuxeo-released-with-graniteds/#comments</comments>
		<pubDate>Wed, 31 Aug 2011 15:32:04 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[GraniteDS]]></category>
		<category><![CDATA[flex]]></category>
		<category><![CDATA[graniteds]]></category>
		<category><![CDATA[java]]></category>
		<category><![CDATA[nuxeo]]></category>
		<category><![CDATA[open-source]]></category>

		<guid isPermaLink="false">http://www.granitedataservices.com/?p=1078</guid>
		<description><![CDATA[Nuxeo is a global leader in Open Source Enterprise Content Management (ECM), that enables architects and developers to&#8230;]]></description>
			<content:encoded><![CDATA[<p>Nuxeo is a global leader in Open Source Enterprise Content Management (ECM), that enables architects and developers to easily build, deploy, and run state of the art applications. The Nuxeo Enterprise Platform (Nuxeo EP) is a Java-based content infrastructure designed to be used as a development environment for content- and case-based applications. Nuxeo EP is an extensible and configurable set of ECM services and modular plug-ins that allows an organization to build out specific horizontal or vertical applications.</p>
<p>Nuxeo has just <a href="http://blogs.nuxeo.com/dev/2011/08/flex-connector.html">recently released</a> version 1.1. of its Flex connector that lets Flex applications interact with Nuxeo using AMF, the binary format used to serialize ActionScript objects. The Nuxeo Flex Connector relies on GraniteDS to enable to easily read, search, create, update documents stored in Nuxeo, manage workflows and tasks, use conversion services, manage users and send notifications, etc. The following image highlights the integration: </p>
<p>To learn how to use the connector, please refer to the Wiki &#8211; <a href="http://doc.nuxeo.com/x/H4AO">What is Nuxeo Flex Connector</a>. The Flex connector comes with several samples that will help you get started quickly. </p>
<p>So what&#8217;s up next? Nuxeos first goal is to update GraniteDS and the Flex SDK. The current implementation will have to be updated to the lastest 2.2 version of GraniteDS and all sample applications will be built on Flex4. </p>
<p>We are happy to see GraniteDS in use and look forward to powering the Nuxeo Flex applications! </p>
<img src="http://feeds.feedburner.com/~r/GraniteDataServices/~4/yrF54ctzDgM" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://granitedataservices.com/blog/2011/08/31/flex-connector-1-1-for-nuxeo-released-with-graniteds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://granitedataservices.com/blog/2011/08/31/flex-connector-1-1-for-nuxeo-released-with-graniteds/</feedburner:origLink></item>
	</channel>
</rss>

