<?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>Java never die &#187; java frameworks</title>
	<atom:link href="http://www.javaneverdie.com/category/java-frameworks/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javaneverdie.com</link>
	<description>Java modern frameworks. But not only.</description>
	<lastBuildDate>Fri, 27 Aug 2010 20:25:45 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>What java framework(s) to use for web application programming?</title>
		<link>http://www.javaneverdie.com/java-frameworks/what-java-frameworks-to-use-for-web-application-programming/</link>
		<comments>http://www.javaneverdie.com/java-frameworks/what-java-frameworks-to-use-for-web-application-programming/#comments</comments>
		<pubDate>Mon, 27 Jul 2009 08:18:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[java frameworks]]></category>

		<guid isPermaLink="false">http://www.javaghost.com/?p=149</guid>
		<description><![CDATA[Java not in vain considered to be the language of frameworks. Cayenne, iBatis and of course Hibernate for O/R mapping. Spring, Guice and what else for Dependency Injection. Spring MVC, Struts, Java Server Faces (JSF) and a few dozen else for MVC. Google Web Toolkit (GWT) for RIA applications. Some new thing in java programming [...]


Related posts:<ol><li><a href='http://www.javaneverdie.com/java/choosing-language-and-framework-for-my-dream-application/' rel='bookmark' title='Permanent Link: Choosing language and framework for my dream application'>Choosing language and framework for my dream application</a></li>
<li><a href='http://www.javaneverdie.com/java/sequence-of-learning-java-programming/' rel='bookmark' title='Permanent Link: Sequence of learning Java programming'>Sequence of learning Java programming</a></li>
<li><a href='http://www.javaneverdie.com/java-frameworks/java-domain-driven-frameworks-review/' rel='bookmark' title='Permanent Link: Java Domain Driven Frameworks review'>Java Domain Driven Frameworks review</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Java not in vain considered to be the language of frameworks.</p>
<p>Cayenne, iBatis and of course  Hibernate for O/R mapping.<br />
Spring, Guice and what else for Dependency Injection.<br />
Spring MVC, Struts, Java Server Faces (JSF) and  a few dozen else for MVC.<br />
Google Web Toolkit (GWT) for RIA applications.<br />
<span id="more-149"></span></p>
<p>Some new thing in java programming world: Domain Driven frameworks.<br />
This class of frameworks contains: OpenXava, Spring Roo, Naked Objects, Roma Framework and few more.</p>
<p>Who are in a position in this deal? What framework(s) to use?</p>
<p>Standard de facto  is to use Spring, Hibernate and some MVC framework. From them (MVC) possible to say Struts<br />
the most widely used in the past. JSF pretend to be a standard. And Spring MVC simply the best. Recently become popular Wicket and his little brother Click.</p>
<p>But this kind of software development though very flexible, powerful and scalable, seems to be really overkill for 80% of web applications, that more effectively can be implemented with some so called Domain Driven frameworks like Spring Roo, Naked Objects or OpenXava.</p>
<p>Read <a href="http://javaneverdie.com/java/java-domain-driven-frameworks-review"> Java Domain Driven Frameworks Review</a> for comparison and basic knowledge about<br />
such frameworks.</p>
<p>If your application must be RIA use GWT. It may be 1-2% of all web applications.</p>
<p>And the rest can be implemented with traditional trio: Spring, Hibernate and MVC* framework of your choice.</p>
<p>*Some experts notes that Wicket is not MVC framework, but to not come in redundant complexity in this<br />
simple article let think about that it is MVC or something like and can plays his role in web application.</p>


<p>Related posts:<ol><li><a href='http://www.javaneverdie.com/java/choosing-language-and-framework-for-my-dream-application/' rel='bookmark' title='Permanent Link: Choosing language and framework for my dream application'>Choosing language and framework for my dream application</a></li>
<li><a href='http://www.javaneverdie.com/java/sequence-of-learning-java-programming/' rel='bookmark' title='Permanent Link: Sequence of learning Java programming'>Sequence of learning Java programming</a></li>
<li><a href='http://www.javaneverdie.com/java-frameworks/java-domain-driven-frameworks-review/' rel='bookmark' title='Permanent Link: Java Domain Driven Frameworks review'>Java Domain Driven Frameworks review</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.javaneverdie.com/java-frameworks/what-java-frameworks-to-use-for-web-application-programming/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Domain Driven Frameworks review</title>
		<link>http://www.javaneverdie.com/java-frameworks/java-domain-driven-frameworks-review/</link>
		<comments>http://www.javaneverdie.com/java-frameworks/java-domain-driven-frameworks-review/#comments</comments>
		<pubDate>Thu, 02 Jul 2009 11:16:13 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[java frameworks]]></category>

		<guid isPermaLink="false">http://www.javaghost.com/?p=127</guid>
		<description><![CDATA[I tried to look for framework like Rails or Jango but in Java. Below are the results: &#8211; Trails; &#8211; OpenXava; &#8211; NexOpen; &#8211; JMatter; &#8211; Naked Objects; &#8211; Roma Framework; &#8211; Bastion. All of them use Domain Driven Design or Model Driven Architecture and Convention over Configuration approach. You write POJO and get whole [...]


Related posts:<ol><li><a href='http://www.javaneverdie.com/java-frameworks/what-java-frameworks-to-use-for-web-application-programming/' rel='bookmark' title='Permanent Link: What java framework(s) to use for web application programming?'>What java framework(s) to use for web application programming?</a></li>
<li><a href='http://www.javaneverdie.com/java/java-persistence-code-generation-tools/' rel='bookmark' title='Permanent Link: Java persistence code generation tools'>Java persistence code generation tools</a></li>
<li><a href='http://www.javaneverdie.com/java/choosing-language-and-framework-for-my-dream-application/' rel='bookmark' title='Permanent Link: Choosing language and framework for my dream application'>Choosing language and framework for my dream application</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>I tried to look for framework like Rails or Jango but in Java.<br />
Below are the results:<br />
<span id="more-127"></span></p>
<p>&#8211; <a href="http://trailsframework.org"><strong>Trails</strong></a>;<br />
&#8211; <a href="http://openxava.org"><strong>OpenXava</strong></a>;<br />
&#8211; <a href="https://nexopen.dev.java.net"><strong>NexOpen</strong></a>;<br />
&#8211; <a href="http://jmatter.org"><strong>JMatter</strong></a>;<br />
&#8211; <a href="http://nakedobjects.org"><strong>Naked Objects</strong></a>;<br />
&#8211; <a href="http://romaframework.org"><strong>Roma Framework</strong></a>;<br />
&#8211; <a href="http://bastionframework.org"><strong>Bastion</strong></a>.</p>
<p>All of them use Domain Driven Design or Model Driven Architecture and Convention over Configuration approach.<br />
You write POJO and get whole application with generated view and DAO level with connection to database of your choice.</p>
<p>So i need one framework and i have seven to choose from.</p>
<p>I will use next methodology. Framework must be:</p>
<p>1. known;<br />
2. well documented;<br />
3. must have open source examples;<br />
4. must be very simple and quick to start;<br />
5. must be under commercial friendly license (like<a href="http://en.wikipedia.org/wiki/Apache_License"> Apache License</a>);<br />
6. i prefer code generation over generic usage;<br />
7. i want framework that can make for me all work from ajaxable view to database schema;<br />
8. last but not least: i should like it.</p>
<p>Here are results of Link Popularity Check program compared above frameworks sites.</p>
<div style="text-align: left;"><img style="width: 648px; height: 546px;" src="http://docs.google.com/File?id=dgnwcmwc_6fjj7gffg_b" alt="" /></div>
<p>As you can see Trails is most popular, Naked Objects the next and so on..</p>
<p>So go from end: Bastion seems to be still subject to mature and deleted by principle 1-4, 7.</p>
<p>NexOpen is much better, but still is unknown and more important does not create view level and<br />
must be integrated with some MVC framework like Spring MVC or Struts. Such framework also<br />
nice to have, but now i need something more productive less flexible. Deleted with option to use<br />
in future.</p>
<p>OpenXava seems to be very good documented, known enough,  shipped with examples (too simple),<br />
qaManager open source project available to download and can be used as example.<br />
So i will try it to create sample application.</p>
<p>Roma framework very good documented, known, so i will try it too.</p>
<p>JMatter also good documented, known,  but generate Swing application run by Java Web Start.<br />
I want framework that generate web application played in browser. Deleted with option to use<br />
in future.</p>
<p>Naked Objects that is , by the way, a Naked Objects Pattern implementation, also known,<br />
well documented, shipped with examples etc. The next  candidate for my dream framework.</p>
<p>And at last Trails seems to be a good example of situation, when most popular is not the best.<br />
Poor documented, using Maven is required in order to start new project. I have nothing against<br />
Maven, but i want something  more user friendly for such framework. Its name recalls Rails.<br />
Deleted.</p>
<p>Temporary summary: Naked Objects, Roma framework  and OpenXava.</p>
<p>Now i will start to create sample application with each of this frameworks.</p>
<p>For beginning i will create domain class Worker with some properties such name, salary etc.,<br />
and calculate time for creating whole application from download framework to deploy application<br />
to application server.</p>
<p>And the next step i will create custom method on domain class and custom button on view<br />
to run this method and calculate time will be taken on each framework to complete.</p>
<p><strong>OpenXava</strong>.</p>
<p>Distributed package contains eclipse workspace and tomcat with hipersonic database.<br />
So, in order to start new project you must:<br />
1. start eclipse choosing OpenXava workspace;<br />
2. create new project called worker from eclipse menu;<br />
3. Go to the project OpenXavaTemplate and execute CreateNewProject.xml using<br />
Ant. You can do it with Right Button on CreateNewProject.xml &gt; Run as &gt; Ant<br />
Build. Ant ask you the project name, type worker.;<br />
4. configure datasource;<br />
5. from command line run tomcat, run database;<br />
6. write our Worker class;<br />
This is how Worker class looks like:</p>
<pre class="java" name="code" >
package com.mycompany.domain;

import javax.persistence.*;

import org.openxava.annotations.*;

@Entity
public class Worker {
@Id @Column(length=3) @Required
private int id;
@Column (length=40) @Required
private String name;
@Column (length=10) @Required
private int salary;

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public int getSalary() {
return salary;
}

public void setSalary(int salary) {
this.salary = salary;
}

public int getId() {
return id;
}

public void setId(int id) {
this.id = id;
}

}</pre>
<p>Note, simple annotations added to support persistence</p>
<p>7. edit (specify jdbc driver) and run updateSchema ant task;<br />
8. run deployWar ant task;<br />
9. point browser to http://localhost:8080/worker/xava/module.jsp?application=worker&amp;module=Worker</p>
<p>Note, that only step 3 is OpenXava specific. Other steps is very common to regular web<br />
application development. Step 7 &#8212; updateSchema ant task, must be run only if domain<br />
class was changed. Tomcat shouldn&#8217;t be restarted each time after deploy.</p>
<p>All above steps took about 5 minutes to complete.</p>
<p>Here the result application screenshots:<br />
<img src="http://docs.google.com/File?id=dgnwcmwc_7f994bxwk_b" alt="" /><br />
1.List mode. note, that list already contains filters. From list mode we can search, export to pdf,<br />
export to exsel, launch create new/detail page, delete selected row.<br />
.</p>
<p>2. in order to see detail mode we must add row to list<br />
<img src="http://docs.google.com/File?id=dgnwcmwc_8qv8dvr9s_b" alt="crud" /><br />
From detail mode  we can create new or update existing entity, delete and also search by<br />
all fields.</p>
<p>Don&#8217;t forget, that it took for us about 5 minutes to start new project and create above<br />
application (<strong>BTW full AJAX</strong> !)</p>
<p><strong>Roma framework</strong></p>
<p>1. create ROMA_HOME environment variable (point to installation directory <img src='http://www.javaneverdie.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ;<br />
Roma comes with a console tool to help in generating stuff. Assure to be in the<br />
$ROMA_HOME directory or just set once for ever the $ROMA_HOME directory in the PATH.<br />
2. run console command:<br />
roma create web worker com.mycompany.worker D:/projects/worker<br />
3. run eclipse with any workspace;<br />
4. import existing project from D:/projects/worker to workspace;<br />
5. write our Worker class (no annotations needed!);<br />
6. run console command to add view module:<br />
roma add view-echo2  ;<br />
7. run  console command to add application server:<br />
roma add web-jetty  ;<br />
8. run console command to add persistence module:<br />
roma add persistence-datanucleus ;<br />
9. run console command to generate CRUD code:<br />
roma crud com.mycompany.worker.domain.Worker ;<br />
10.edit HomePage.java;<br />
11.create debug configuration for jetty;<br />
12.run build.xml;<br />
13.run debug (jetty servlet container).</p>
<p>This is the result :</p>
<p><img src="http://docs.google.com/File?id=dgnwcmwc_10p54fktf2_b" alt="" /><br />
Note, filters placed separated from list. Only == statement can be used with filters value. But in OpenXava<br />
also &lt;=, =&gt;, starts etc.</p>
<p>I must to say that running application with Roma take me many time and was very confused, though<br />
I had the biggest expectations about this framework. The echo2 view implementation (above screenshot)<br />
only properly works in Opera browser.</p>
<p>To change view implementation:<br />
roma add view-html;<br />
run build.xml;<br />
relaunch jetty;<br />
<img src="http://docs.google.com/File?id=dgnwcmwc_11gmtkxktr_b" alt="" /><br />
much less impressible, but works without exceptions.<br />
Roma uses generated code instead of generic usage in OpenXava. And if to believe to documentation must be<br />
much more flexible. But this flexibility leads to complexity. I still want to use it, i wish that<br />
creators will improve documentation adding kickstart flow and default configuration. Also filters must be<br />
improved. There is Romulus Eclipse Plugin for Roma Framework available, but working with a little confusing too.</p>
<p><strong>Naked Objects</strong></p>
<p>Naked Objects seems to be the simplest and most quick to start. No web development knowledge needed at all.</p>
<p>1. Start Eclipse, create new java project and add libraries to classpath from naked objects distribution.<br />
2. Copy web directories from naked objects distribution to project root.<br />
3. Create Worker class</p>
<pre class="java" name="code" >
package com.mycompany.domain;

import org.nakedobjects.applib.AbstractDomainObject;

public class Worker extends AbstractDomainObject{

    private int id;
    private String name;
    private int salary;

    public String title(){
        return name;
    }

    public int getId() {
        resolve(id);
        return id;
    }
    public void setId(int id) {
        this.id = id;
        objectChanged();
    }
    public String getName() {
        resolve(name);
        return name;
    }
    public void setName(String name) {
        this.name = name;
        objectChanged();
    }
    public int getSalary() {
        resolve(salary);
        return salary;
    }
    public void setSalary(int salary) {
        this.salary = salary;
        objectChanged();
    }

}</pre>
<p>4. Create nakedobjects.properties file contains next line:<br />
nakedobjects.services=repository#com.mycompany.domain.Worker</p>
<p>5.Create Eclipse Run Configuration and run it.</p>
<p>All above steps take one-two minutes to complete, depends how quick you type.<br />
Unlike OpenXava produced by default is complete application with login page,<br />
welcome page, menu etc.<br />
login:<br />
<img src="http://docs.google.com/File?id=dgnwcmwc_13ftmcgqfp_b" alt="" /><br />
welcome:<br />
<img src="http://docs.google.com/File?id=dgnwcmwc_14dg933jhc_b" alt="" /><br />
main:<br />
<img src="http://docs.google.com/File?id=dgnwcmwc_15fsvz4zgm_b" alt="" /><br />
new:<br />
<img src="http://docs.google.com/File?id=dgnwcmwc_16c4sxstm8_b" alt="" /><br />
list:<br />
<img src="http://docs.google.com/File?id=dgnwcmwc_17f3rhgvd4_b" alt="" /><br />
List is not something. No additional functionality like export to pdf or excel. Searching only<br />
by title.<br />
But it looks like complete application that not ashamed to show to colleagues or customers.<br />
So, summarize the results of above we have two finalists Naked Objects and OpenXava .<br />
I would use Naked Objects for something very simple like Domain Driven Design presentation<br />
and OpenXava for something a little more complex. Note, this is only the first impression that<br />
can be changed in a more detailed acquaintance.</p>
<p><strong>So meet the winner: OpenXava .</strong><br />
Java on OpenXava?</p>
<p>to be continued&#8230;</p>


<p>Related posts:<ol><li><a href='http://www.javaneverdie.com/java-frameworks/what-java-frameworks-to-use-for-web-application-programming/' rel='bookmark' title='Permanent Link: What java framework(s) to use for web application programming?'>What java framework(s) to use for web application programming?</a></li>
<li><a href='http://www.javaneverdie.com/java/java-persistence-code-generation-tools/' rel='bookmark' title='Permanent Link: Java persistence code generation tools'>Java persistence code generation tools</a></li>
<li><a href='http://www.javaneverdie.com/java/choosing-language-and-framework-for-my-dream-application/' rel='bookmark' title='Permanent Link: Choosing language and framework for my dream application'>Choosing language and framework for my dream application</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.javaneverdie.com/java-frameworks/java-domain-driven-frameworks-review/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
	</channel>
</rss>
