<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	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/"
	>

<channel>
	<title>agimatec &#187; ajax</title>
	<atom:link href="http://www.agimatec.de/blog/tag/ajax/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.agimatec.de/blog</link>
	<description>Clash of realities</description>
	<lastBuildDate>Tue, 22 Dec 2009 16:50:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Influencing AJAX-GUIs With Metadata</title>
		<link>http://www.agimatec.de/blog/2009/04/influencing-ajax-guis-with-metadata/</link>
		<comments>http://www.agimatec.de/blog/2009/04/influencing-ajax-guis-with-metadata/#comments</comments>
		<pubDate>Tue, 28 Apr 2009 16:13:43 +0000</pubDate>
		<dc:creator>roman.stumm</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[Add new tag]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Codegenerierung]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[metadata]]></category>
		<category><![CDATA[Portlet]]></category>
		<category><![CDATA[Validierung]]></category>

		<guid isPermaLink="false">http://www.agimatec.de/blog/?p=606</guid>
		<description><![CDATA[This article explains how to create metadata that we use for scaffolding flexible AJAX GUIs . I keep the text as short as possible by providing a step-by-step cookbook based on code examples. What you should know: Metadata for scaffoling your GUI (described here). What you need to compile/run the examples: java1.5 or newer opensource [...]]]></description>
			<content:encoded><![CDATA[<p>This article explains how to create metadata that we use for scaffolding flexible AJAX GUIs . I keep the text as short as possible by providing a step-by-step cookbook based on code examples.</p>
<p>What you should know:</p>
<ul>
<li>Metadata for scaffoling your GUI (described <a title="Generate Your UI Using Metadata " href="http://www.agimatec.de/blog/2009/03/generate-your-ui-using-metadata/">here</a>).<span id="more-606"></span></li>
</ul>
<p>What you need to compile/run the examples:</p>
<ul>
<li>java1.5 or newer</li>
<li><a href="http://code.google.com/p/agimatec-validation/">opensource framework: agimatec-validation</a> : download agimatec-validation.jar</li>
<li>optional: javax.servlet.jar (servlet-api)</li>
<li>optional: <a href="http://code.google.com/p/agimatec-tools/">opensource frameworks/tools: agimatec-tools</a> : download annomark-dist.zip and annogen.jar</li>
</ul>
<p><strong>1. Create model classes</strong></p>
<p>We start with a plain java class, our model, used to transport attributes from the server to the GUI. (You can use <a title="Direct Web Remoting" href="http://directwebremoting.org/">DWR</a> for marshaling object instances between Java and JavaScript/JDOM).</p>
<p><strong>Example class &#8220;Business&#8221;:</strong></p>
<blockquote><p>import javax.persistence.*;</p></blockquote>
<blockquote><p>public class Business {<br />
@Id<br />
@Column(name=&#8221;business_id&#8221;, nullable=false, unique=true)<br />
Long businessId;<br />
@Column(name=&#8221;name&#8221;, nullable=false, unique=true, length=200)<br />
String name;<br />
@Column(name=&#8221;active&#8221;, nullable=false)<br />
boolean active;<br />
// getters, setters follow&#8230;<br />
}</p></blockquote>
<p><strong>2. Write or generate xml meta data</strong></p>
<p>You can write the xml meta data manually, or &#8211; if your classes have javax.persistence.* annotations &#8211; you can generate them using agimatec-tools/annomark.jar (described <a title="annomark explained" href="http://code.google.com/p/agimatec-tools/wiki/annomark">here</a>):</p>
<blockquote><p>&lt;bean id=&#8221;com.agimatec.Business&#8221; impl=&#8221;com.agimatec.Business&#8221;&gt;<br />
&lt;feature key=&#8221;mainKey&#8221;&gt;<br />
&lt;value class=&#8221;string&#8221;&gt;businessId&lt;/value&gt;<br />
&lt;/feature&gt;<br />
&lt;property name=&#8221;businessId&#8221;&gt;<br />
&lt;feature key=&#8221;uniqueKey&#8221;&gt;<br />
&lt;value class=&#8221;boolean&#8221;&gt;true&lt;/value&gt;<br />
&lt;/feature&gt;<br />
&lt;/property&gt;<br />
&lt;property name=&#8221;name&#8221; mandatory=&#8221;true&#8221; maxLength=&#8221;200&#8243;&gt;<br />
&lt;feature key=&#8221;uniqueKey&#8221;&gt;<br />
&lt;value class=&#8221;boolean&#8221;&gt;true&lt;/value&gt;<br />
&lt;/feature&gt;<br />
&lt;/property&gt;<br />
&lt;property name=&#8221;active&#8221; mandatory=&#8221;true&#8221;/&gt;<br />
&lt;/bean&gt;</p></blockquote>
<p>Store the file as &#8220;beaninfos-default.xml&#8221; in the classpath.</p>
<p><strong>2. Access the MetaBean</strong></p>
<p>This requires agimatec-validation.jar to compile:</p>
<blockquote><p>import com.agimatec.validation.MetaBeanManagerFactory;<br />
import com.agimatec.validation.model.MetaBean;</p>
<p>MetaBeanManagerFactory.getRegistry().<br />
addResourceLoader(&#8220;beaninfos-default.xml&#8221;);</p>
<p>MetaBean metabean = MetaBeanManagerFactory.getFinder().findForClass(Business.class);</p></blockquote>
<p><strong>3. Generate JSon for metabean(s)</strong></p>
<p>We want to use the meta data in the AJAX layer, to have information about the properties, their types and additional features (mandatory, max-length, &#8230;) as a JSON formatted string. agimatec-validation offers a JSONGenerator, based on a freemarker template:</p>
<blockquote><p>import com.agimatec.validation.json.JSONGenerator;</p>
<p>JSONGenerator generator = new JSONGenerator();<br />
String json = generator.toJSON(metabean);<br />
System.out.println(json);</p></blockquote>
<p>This prints this JSON string:</p>
<blockquote><p>agimatec.namespace(&#8220;agimatec.metadata&#8221;);</p>
<p>(function(){</p>
<p>var metaBean0 = {<br />
&#8220;id&#8221; : &#8220;com.agimatec.Business&#8221;,<br />
&#8220;beanClass&#8221; : &#8220;com.agimatec.Business&#8221;,<br />
&#8220;name&#8221; : &#8220;Business&#8221;,<br />
&#8220;features&#8221; :{   &#8220;mainKey&#8221; : &#8220;businessId&#8221;},<br />
&#8220;properties&#8221; :{<br />
&#8220;active&#8221;:{<br />
&#8220;name&#8221; : &#8220;active&#8221;,<br />
&#8220;type&#8221; : &#8220;boolean&#8221;,<br />
&#8220;features&#8221; : {       &#8220;mandatory&#8221; : true       }},<br />
&#8220;businessId&#8221;:{<br />
&#8220;name&#8221; : &#8220;businessId&#8221;,<br />
&#8220;type&#8221; : &#8220;long&#8221;,<br />
&#8220;features&#8221; : {       &#8220;uniqueKey&#8221; : true       }},<br />
&#8220;name&#8221;:{<br />
&#8220;name&#8221; : &#8220;name&#8221;,<br />
&#8220;type&#8221; : &#8220;java.lang.String&#8221;,<br />
&#8220;features&#8221; : {       &#8220;maxLen&#8221; : 200,       &#8220;mandatory&#8221; : true,       &#8220;uniqueKey&#8221; : true       }},<br />
&#8220;version&#8221;:{<br />
&#8220;name&#8221; : &#8220;version&#8221;,<br />
&#8220;type&#8221; : &#8220;int&#8221;,<br />
&#8220;features&#8221; : {       }}}};</p>
<p>agimatec.metadata.metaBeans = {&#8220;com.agimatec.Business&#8221; : metaBean0};})();</p></blockquote>
<p><strong>4. Write a servlet to deliver JSON for the AJAX GUI</strong></p>
<p>The java code for the servlet should not be a surprise, for it consists of what we have seen so far:</p>
<blockquote><p>public void init() throws ServletException {<br />
super.init();<br />
MetaBeanManagerFactory.getRegistry().addResourceLoader(&#8220;beaninfos-default.xml&#8221;);<br />
}</p>
<p>public void service(HttpServletRequest servletRequest, HttpServletResponse res)<br />
throws ServletException, IOException {<br />
Map&lt;String, MetaBean&gt; metaBeans = MetaBeanManagerFactory.getFinder().findAll();<br />
// output JSON:<br />
res.setContentType(&#8220;text/javascript&#8221;);<br />
PrintWriter writer = res.getWriter();<br />
String json = new JSONGenerator().toJSON(metaBeans.values());<br />
writer.write(json);<br />
}</p></blockquote>
<p>Thats basically all! With this infrastructure your AJAX GUIs have access to meta information about the model classes.</p>
<p><strong>5. Enrich meta data with information for the GUI-layer</strong></p>
<p>You can enrich the xml meta data with additional hints (field sequence, formats, &#8230;) &#8211; whatever your GUI needs. If hhe additional information cannot be generated automatically, you should keep them in a separate xml-file:</p>
<blockquote><p>&lt;bean id=&#8221;com.agimatec.Business&#8221;&gt;<br />
&lt;feature key=&#8221;DESCRIPTION&#8221;&gt;<br />
&lt;value class=&#8221;string&#8221;&gt;{name}&lt;/value&gt;<br />
&lt;/feature&gt;<br />
&lt;feature key=&#8221;SORTING&#8221;&gt;<br />
&lt;value class=&#8221;list&#8221;&gt;<br />
&lt;string&gt;name&lt;/string&gt;<br />
&lt;string&gt;active&lt;/string&gt;<br />
&lt;/value&gt;<br />
&lt;/feature&gt;<br />
&lt;!&#8211;Visualisation as table&#8211;&gt;<br />
&lt;feature key=&#8221;TABLE_COLUMNS&#8221;&gt;<br />
&lt;value class=&#8221;list&#8221;&gt;<br />
&lt;string&gt;name&lt;/string&gt;<br />
&lt;string&gt;active&lt;/string&gt;<br />
&lt;/value&gt;<br />
&lt;/feature&gt;<br />
&lt;/bean&gt;</p></blockquote>
<p>Save this as &#8220;beaninfos-gui.xml &#8221; in the classpath and register the file in the init() method of the servlet, too:</p>
<blockquote><p>MetaBeanManagerFactory.getRegistry().addResourceLoader(&#8220;beaninfos-gui.xml&#8221;);</p></blockquote>
<p>You see, that the JSON code will contain the additional information as well, because the MetaBeanManager merges them.</p>
<p>So far, we have the infrastructure to support meta data that allows us to build generic AJAX GUIs. The JSON string can be cached, because it will never change while the application is running.</p>
<p><strong>6. User-specific meta data</strong></p>
<p>We can go one step further: We can also support user-specific meta data! A usual requirement in a web application is, that &#8211; depending on the role of a user that is logged in &#8211; field-level permissions must be supported:<br />
User A is allowed to change the &#8220;active&#8221;-state of our &#8220;Business&#8221; entity, while User B has read-only access to the field and the field is hidden for User C, &#8230;</p>
<p>This could also be useful, when a user can customize its GUI (disable fields) by himself or when the application is used by different companies with different settings for their users&#8230;.</p>
<p>How does it work? &#8211; Use additional xml files and merge them in the JSON servlet. (You can also generate the meta beans during runtime programmatically).</p>
<p>beaninfos-role1.xml:</p>
<blockquote><p>&lt;bean id=&#8221;com.agimatec.Business&#8221;&gt;<br />
&lt;property name=&#8221;active&#8221;&gt;<br />
&lt;feature key=&#8221;readonly&#8221;&gt;<br />
&lt;value class=&#8221;boolean&#8221;&gt;true&lt;/value&gt;<br />
&lt;/feature&gt;<br />
&lt;/property&gt;<br />
&lt;/bean&gt;</p></blockquote>
<p>Extension of the servlet:</p>
<blockquote><p>String customInfos = &#8220;beaninfos-role1.xml&#8221;; // determine this from session or request dynamically!<br />
XMLMetaBeanInfos xmlInfos =<br />
new XMLMetaBeanURLLoader(getClass().getResource(customInfos)).load();<br />
Map&lt;String, MetaBean&gt; metaBeans =<br />
MetaBeanManagerFactory.getEnricher().enrichCopies(xmlInfos);</p></blockquote>
<p>The statements after &#8220;// output JSON&#8221; stay the same (see previous code fragment).</p>
<p><strong>More information?</strong></p>
<p>We already got some more posts in German about metadata and code generation, explaining the concepts and giving examples:</p>
<ul>
<li><strong></strong><strong><a title="TransferObjects generieren" href="http://www.agimatec.de/blog/2008/05/transferobjects-generieren/">TransferObjects generieren</a></strong></li>
<li><strong></strong><strong><a title="agimatec-tools als OpenSource auf google.code released!" href="http://www.agimatec.de/blog/2008/06/agimatec-tools-als-opensource-auf-googlecode-released/">agimatec-tools als OpenSource auf google.code released!</a></strong></li>
<li><strong></strong><strong><a title="Statt Modellieren: Annotieren und generieren" href="http://www.agimatec.de/blog/2008/04/statt-modellieren-annotieren-und-generieren/">Statt Modellieren: Annotieren und generieren</a></strong></li>
<li> <strong><a title="Klassen mit Mehrwert: Validierung und Metadaten" href="http://www.agimatec.de/blog/2008/04/klassen-mit-mehrwert-validierung-und-metadaten/">Klassen mit Mehrwert: Validierung und Metadaten</a></strong></li>
</ul>
<p>The open-source frameworks have a WIKI and additional examples or junit testcases, that help you.</p>
<p>If you have questions, do not hesitate to contact us!</p>
<p><span style="color: #333333;"><strong>This is the fifth article in our mini-series about developing highly ajaxified portlets. Other articles are:</strong></span></p>
<ul>
<li><strong><a href="http://www.agimatec.de/blog/2009/03/generate-your-ui-using-metadata/">Generate Your UI Using Metadata </a></strong></li>
<li><strong><a href="http://www.agimatec.de/blog/2009/02/client-side-inter-portlet-communication-done-right/">Inter Portlet Communication</a></strong></li>
<li><strong><a href="http://www.agimatec.de/blog/2009/01/using-yui-to-load-your-javascript-modules/">Using YUI loader for your own javascript modules</a></strong></li>
<li><strong><a href="http://www.agimatec.de/blog/2008/10/advanced_javascript_namespaces_for_portlets/">Portlet namespaces and javascript</a></strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.agimatec.de/blog/2009/04/influencing-ajax-guis-with-metadata/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Client-Side Inter Portlet Communication Done Right</title>
		<link>http://www.agimatec.de/blog/2009/02/client-side-inter-portlet-communication-done-right/</link>
		<comments>http://www.agimatec.de/blog/2009/02/client-side-inter-portlet-communication-done-right/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 13:00:20 +0000</pubDate>
		<dc:creator>Sebastian Schuth</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Portlet]]></category>

		<guid isPermaLink="false">http://www.agimatec.de/blog/?p=449</guid>
		<description><![CDATA[Using our framework, we are able to develop extremely modular portlet-based solutions that fit no matter how we combine them by using a service-publishing pattern.]]></description>
			<content:encoded><![CDATA[<p><img class="size-full wp-image-525 alignright" title="gears" src="http://www.agimatec.de/blog/wp-content/uploads/2009/02/istock_000002874245xsmall.jpg" alt="gears" width="425" height="282" />Using portlets, you are able to develop tiny little applications that are suitable for a small subset of the actual functionality your customer wants. By combining them, they make it possible to create powerful but still modular applications that meet exactly the use cases your customer needs help with.</p>
<p>In theory.</p>
<p>In practice, you will be faced with a problem that is obviously a blind spot of the portlet definition (at least, the &#8220;old&#8221; JSR-186): how to communicate between portlets. The ability to mix-and-match portlets is key to a truly pluggable application formed of portlets.</p>
<p>To solve the communication problem, we have developed a solution much like the one <a href="http://www.liferay.com/web/jferrer/blog/-/blogs/1031319">developed by the folks at liferay</a>, but a bit more tuned and optimized for a fully pluggable solution.</p>
<p><span id="more-449"></span></p>
<h1>Portlet Services and Invokers</h1>
<p>Our implementation follows a simple pattern: Portlets are able to promote services to a page-central instance and can include interaction elements that are used to invoke services that match certain criteria:</p>
<ul>
<li>the type of object the service must be able to handle</li>
<li>the type of operation the service offers</li>
</ul>
<p>Promoting a service to other portlets includes:</p>
<ul>
<li>specifying what type of operation (CREATE/READ/UPDATE/DELETE) is offered</li>
<li>a text telling the user what happens when invoking the service</li>
<li>the function that should get called on service activation</li>
</ul>
<p>Using these simple building blocks we can offer users a list of actions that are available for a specific object:</p>
<h1>Completely discoupled</h1>
<p>The major advantage of our solution is that we do not hard-wire which portlets offers what to other portlets. All you have to do is insert a service invoker into the UI and the framework does the work for you. All people working on the project can work in parallel, the communication overhead is minimal. All the developers must do is offering a portlets services using the framework and give services a name that speaks.</p>
<p>This makes turns our product into a completely customizable platform that fits exactly our users&#8217;s needs.</p>
<h1>Maximum flexibility</h1>
<p>The framework makes splitting up responsibilities between portlets easy and puzzling just the right application for the job together possible. After adding a new portlet to a page, all service menus are automatically updated to offer new services that may have been added by the new portlet.</p>
<div id="attachment_451" class="wp-caption alignnone" style="width: 313px"><img class="size-full wp-image-451 " title="Service menu showing some services that may be invoked" src="http://www.agimatec.de/blog/wp-content/uploads/2009/01/service-menu2.jpg" alt="Service menu" width="303" height="223" /><p class="wp-caption-text">A generated service menu</p></div>
<div id="attachment_452" class="wp-caption alignnone" style="width: 415px"><img class="size-full wp-image-452 " title="Service menu for another set of portlets, showing additional &quot;Ping&quot; service" src="http://www.agimatec.de/blog/wp-content/uploads/2009/01/service-menu.jpg" alt="Service menu for a different set of portlets" width="405" height="172" /><p class="wp-caption-text">Service menu for a different set of portlets</p></div>
<p>What you see in these screenshots is that depending on which portlets are available, the portlet will offer different actions for an object (for Screenshot 2, the &#8220;Ping&#8221; portlet was added). All information about which services are available is calculated client-side and for the current setup. Adding a new portlet will add its services to the actions list. The text that appears inside the menu is set by the portlet offering the service.</p>
<p><img class="size-full wp-image-534 alignnone" title="Service menu and service button" src="http://www.agimatec.de/blog/wp-content/uploads/2009/02/servicemenuandbutton.png" alt="Service menu and service button" width="629" height="147" /></p>
<p>Invoking services is not limited to the context menus. We also use buttons for services that enable the creation of new items.</p>
<h1>Impacts on portlet design</h1>
<p>All this makes it easy to develop portlets that are designed to fulfill small tasks the right way. Reusability of portlets is massively increased. And on top of all this you get a consistent usage pattern that your customers will be familiar with when you are adding more functionality.</p>
<p><span style="color: #333333;"><br />
</span></p>
<p><span style="color: #333333;"><strong>This is the third article in my mini-series about developing highly ajaxified portlets. In this blog, you can also find articles about:</strong></span></p>
<ul>
<li><span style="color: #333333;"><strong><a href="http://www.agimatec.de/blog/2009/01/using-yui-to-load-your-javascript-modules/">Using YUI loader for your own javascript modules</a><br />
</strong></span></li>
<li><span style="color: #333333;"><strong><a href="http://www.agimatec.de/blog/2008/10/advanced_javascript_namespaces_for_portlets/">Portlet namespaces and javascript</a></strong></span></li>
</ul>
<p><span style="color: #333333;"><strong>In my next post in this series, i will give a little insight into how we use metadata generated by our server to make creating a fully ajax portlet a breeze. Meanwhile, check out our posts about testing our Ajax frontends using <a href="http://www.agimatec.de/blog/2008/08/selenium-testing-of-massive-ajax-apps/">Selenium</a> and the <a href="http://www.agimatec.de/blog/2009/01/javascript-unit-tests-with-the-yui-testmanager/">YUI Test framework</a>.</strong></span><em><br />
</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.agimatec.de/blog/2009/02/client-side-inter-portlet-communication-done-right/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Ajax vs. Flex revisited</title>
		<link>http://www.agimatec.de/blog/2009/01/ajax-vs-flex-revisited/</link>
		<comments>http://www.agimatec.de/blog/2009/01/ajax-vs-flex-revisited/#comments</comments>
		<pubDate>Wed, 14 Jan 2009 22:13:11 +0000</pubDate>
		<dc:creator>Simon Tiffert</dc:creator>
				<category><![CDATA[English]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://www.agimatec.de/blog/?p=444</guid>
		<description><![CDATA[Eight month ago I posted this entry in german. After a comment that this post is needed in English, I will translate it and rethink if I would confirm my pro and con. Could you compare Ajax and Flex? Sure! Both are technologies in the web frontend, which cover the same domain. Should you compare [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.agimatec.de/blog/wp-content/uploads/2008/04/istock_000005334677xsmall.jpg" alt="Äpfel und Birnen" width="424" height="283" /></p>
<p>Eight month ago I posted <a href="http://www.agimatec.de/blog/2008/04/ajax-vs-flex/">this entry in german</a>. After a <a href="http://www.agimatec.de/blog/2008/04/ajax-vs-flex/#comment-355">comment</a> that this post is needed in English, I will translate it and rethink if I would confirm my pro and con.</p>
<p>Could you compare Ajax and Flex? Sure! Both are technologies in the web frontend, which cover the same domain.</p>
<p>Should you compare Ajax and Flex? Sure! To learn more about the strengths and weaknesses and pull the right technology for the use case out of the hat.</p>
<p><span id="more-444"></span></p>
<p><strong>What are the pros of Ajax?</strong></p>
<ul>
<li>HTML, CSS and Javascript are widely known and there are a lot of people who have programmed with this languages</li>
<li>The end user is very familiar with it. He knows the browser very well and knows how things are working, what buttons look like and where he could click, &#8230;</li>
<li>There is no need for a plugin, because everything is supported natively in the browser (plugins could be a huge problem in controlled enterprise environments)</li>
<li>Client and server side patterns are very mature and you get clobbered over the head with frameworks (in a positive way). Webwork, Struts (1 and 2), Spring, Turbine, Tapestry, JavaServer Faces, &#8230; in the Java world, YUI, Prototype, JQuery, Dojo, Ext, &#8230; in the Javascript world (to name just a few).</li>
</ul>
<p><strong>What are the cons of Ajax?</strong></p>
<ul>
<li>It still is HTML with all its weaknesses. Rounded corners, small effects, browser incompatibilities, &#8230; &#8230; nearly everything is possible, but it is often laborious and not really straightforward</li>
<li>Ajax is based on Javascript. At the beginning everything seams to be great. But then you realize, that you are just scratching on the surface and you are falling in a deep hole. When you are back at the top, you can see the strengths of the language</li>
<li>The Javascript/Ajax frameworks are getting better and better. Two years ago there also exist a lot of frameworks, but they weren&#8217;t very mature or well documented in some parts</li>
<li>The performance can suffer a lot of from the use of DOM manipulations. Sortable tables or other complex operations are working at limit of the practiable</li>
<li>Browser and their technologies have evolved in the last years, but HTML wasn&#8217;t created to be dynamic.</li>
</ul>
<p><strong>What are the pros of Flex?</strong></p>
<ul>
<li>Steep learning cureve at the beginning. After a few days you can create applications, which would take longer with HTML, CSS, and Javascript even after some years of training</li>
<li>Sexy interfaces. A Flex application looks better at the first sight. Rounded and transparent layers, gradients just as you like them without complex scaling background images. Small effects just working after two lines of code and doesn&#8217;t have an impact at the browser performance</li>
<li>Integration of multimedia data. A video player or a control to play MP3s, just a few lines of code. Clean and straightforward</li>
</ul>
<p><strong>What are the cons of Flex</strong></p>
<ul>
<li>A Flex application looks like a Flex application. Not a big downside, but a designer needs to learn how to style it. Else you just got a 08/15 application, what can be a problem when Flex is spread wider</li>
<li>Small application can be developed really fast, but if an application gets larger, you are loosing yourself in Flex. Frameworks like Cairngorm solving the problem but the learning curve is getting flatter and flatter</li>
<li>I18N, automatic builds and code generation are possible but a lot of enterprise features are hidden very well. The community around Flex is growing but in a lot of areas you are alone with just a hand full of google hits</li>
<li>Flex is generating Flash and the language MXML is in the opposite to pure Actionscript the strength, to get faster to your goals. But Flex is just on top of Flash and the separation of MXML and Actionscript is often to fluent, to be very homogeneous</li>
<li>The FlexBuilder is no IntelliJ and the tools are still very unpolished. The development of applications is possible but it could be a lot better in some parts</li>
</ul>
<ul></ul>
<p><strong>Conclusion:</strong></p>
<p>If you need a multimedia application with some content which should look very nice, then Flex fits very well. But if you want to manage data and you want a wide support for your application, then Ajax is still the better choice. Flash still feels like a foreign object in the web. Deep links, copy of content, loading time and the existing knowlege and usability of HTML are arguments against Flex. But if the web application should feel as close as possible like a desktop application, then Flex is a good way and maybe the AIR technology is the goal. When developing a touchscreen application we also had the decision between Flex and HTML. I think it was a good choise to try Flex because of the interface speed (no page rendering) and the missing page reloads. It feels more natural for this kind of product.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.agimatec.de/blog/2009/01/ajax-vs-flex-revisited/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
