Beating Rails in its own game (5-minute movie on Seam Eclipse Tools)

Can you write a complete CRUD web application for 8 inter-linked database tables in 5 minutes? The application needs to support

* 1-1-, 1-n, n-n associations (navigation and search)
* Composite keys in tables
* Search on any column
* Paged search result list
* Automatic required input fields based on database schema
* AJAX-based input validation
* Rich UI widgets for Date/Time
* Ready-made access security infrastructure (just add login logic using Java code)
* Completely CSS and XHTML based layout

Now, can you do that with Java?

With the newly announced Red Hat Developer Studio and JBoss Seam, you can do all the above with a few mouse clicks! Here is a 5-minutes flash movie to illustrate how it is done:

Watch the Movie

If you prefer command line tools over GUI tools in Eclipse, the good news is that all the above features are available from command line ANT scripts as well. Checkout Seam Gen documentation.

The demo is a very small part of a 4-hour tutorial Ram Venkataraman, James Williams, Max Rydahl Andersen, and Max Katz put together for EclipseCon 2007. The complete tutorial covers JBoss Eclipse tools for server management, Seam Gen, database browsing, database query analyzer, Facelets visual editing, business process editor, rules editor, and much more. We will probably make the entire tutorial available online on JBoss web sites after we have a chance to polish it.

28 Responses to “Beating Rails in its own game (5-minute movie on Seam Eclipse Tools)”

  1. xingye Says:

    Yuan,你好!请问你可以说汉语么?我是个来自中国的开发者,是一个小公司的开发负责人。我一直都在关注seam,并想将它应用到我们的实际工作当中。虽然我知道这有一定的风险,但我还是想尝试一下。因为我们目前从事的都是一些很小的MIS项目,我想,我们可以与seam共同成长。目前国内关于seam的内容还不多,我想知道seam是否有中文计划。我希望能更多的得到你们的帮助,祝seam项目越办越好:D
    Hello Yuan,I’m a Chinese developer. I have been paid attention to seam for a long time, and wants to apply it our practical work. Although I know there risks, but I’ll try.Now there few Chinese contents about seam,i want to know whether seam has a Chinese bluepoint?

  2. Michael Yuan Says:

    HI xingyue,

    Let’s use English on this site for the benefit of everyone else. Thanks. :)

    Thank you for your interests in Seam and I wish you good luck with it.

    We do have plans to translate some Seam content to simplified Chinese — probably around May this year. If you can help developing / translating Seam content to Chinese, please let me know and we’d really appreciate your help!

    cheers
    Michael

  3. leon Says:

    Hi Michael,
    I am learning seam form v1.0. I love seam! And I love your blog too. So, may I translate “Beating Rails in its own game” to Chinese and republish it on my blog(http://actactact.blogspot.com? Absolutely, I will sign your name as author.:)

    Best regards
    Leon Lee

  4. Michael Yuan Says:

    Leon,

    Of course you can translate it and post on your blog. Ping me back when you have it posted! :)

    cheers
    Michael

  5. leon Says:

    Hi Michael,
    I had finished translation for this article.
    If I have free time I will translate more blogs and document. :)

  6. Dan Allen Says:

    I’m excited about Seam and the Seam Gen tools. I think that a product such as this is long overdue in the Java Open Source space. However, I am not impressed about editing a facelet without having to redeploy. Never has it been necessary to redeploy an application when modifying a view. I want to see it ability to edit a Java class file and not see the server come crashing down 3 seconds later. My typical development cycle is “Edit Java Code” - “Hard Kill Server” - “Start Server” - “Try Out New Feature”. Of course, because of that, I spend a lot of hours in unit tests.

  7. Michael Yuan Says:

    Dan,

    Actually, the new version of Seam Gen (in the CVS) will allow you do exactly what you describe here. In the “development mode”, it provides a custom Tomcat classloader to monitor the class files in your app. Once you copy over a newer file, you app is automagically updated without a restart. :)

    cheers
    Michael

  8. xing Says:

    Michael,

    I’ve found a folder named “jboss-seam-ide” on anonymous cvs.It’s an eclipse plugin, isn’t it?I downloaded and built it, but nothing happened.

    why???

    Best regard.
    Xing

  9. Michael Yuan Says:

    Xing,

    You have to wait another couple of weeks before the Red Hat Developer Studio officially releases its Eclipse plugin components. Patience … Thanks.

    cheers
    Michael

  10. Tony Herstell Says:

    Perhaps have a word with the MyEclipse boys. They seem to explode the whole ear into the server deploy area.. you then code and any changes made take effect instantly.. there is no deploy step.

  11. Tony Herstell Says:

    Perhaps to elaborate….

    This how it feels….

    In the 1960 people built projects with Ant, deployed them with Ant to the servers and had to kill re-start the servers.

    In the 1990’s hot deployment started to work, so people still built the projects with Ant, deployed them with Ant to the server and this time the server would do it’s best to swap in the new code (very successfully!).

    Come the 2006’s Exploded deployment comes along (MyEclipse etc) where the “code” area of your IDE IS the deploy area of your Server… so all you need to do is change the code in your IDE and it automagically just works (within reason)! No Restart required…

    Some people, some are highly respected, still don’t know what exploded deployment is (it may in fact all be done using Ant for all I know)… anyhow… I think it’s cus people have not bothered to use/learn their IDE… If it aint built/deployed then it can’t be runnable…

    T.

  12. Michael Yuan Says:

    What is the benefit of having the exploded EAR inside the “deploy” directory? I mean, with our Eclipse setup, the file is copied to the exploded deployed EAR when you save a change from the editor. If you are making a change to the XHTML file, you see the effect immediately by reloading the browser. If you make a change to a Java file, you will need to re-start the *app* (NOT the server).

    With an exploded EAR inside the “deploy” directory, you still cannot modify a Java class file and see its effect without re-starting the app (i.e., touch the application.xml file). But with our approach, we can have a custom classloader in the exploded EAR and have it pick up any class file changes without re-starting.

    cheers
    Michael

  13. Tony Herstell Says:

    Nope, You don’t need to re-start the app.
    I told you no one believes it. :)
    Perhaps I should video it working.

  14. Tony Herstell Says:

    Well, it would cost nothing to talk to the MyEclipse boys to see how it’s done (smoke and mirrors?).
    Occasionally you get a message saying the server Can’t cope with the change and needs to re-start.
    Perhaps it dopes re-start the app; but I dont think so.

  15. Tony Herstell Says:

    I am sure your way will be better (just look at Seam) but useful to have all the facts.

  16. Michael Yuan Says:

    Tony,

    Re-starting the app and re-starting the server are two very different things … It seemed that you are using the two terms together in comment #14 …

    Also, I am pretty sure that you cannot deploy a single class file without re-starting the app, unless of course, if you use a custom class loader. MyEclipse guys might well use the custom class loader approach. But Seam has it too. :)

    In any case, it does not require us to put the build directory into the deploy directory.

    cheers
    Michael

  17. Tony Herstell Says:

    Great news.
    I can’t wait till the “SEAM” IDE is available.

  18. Tony Herstell Says:

    http://myeclipseide.com/enterpriseworkbench/help/index.jsp?topic=/com.genuitec.myeclipse.doc/html/quickstarts/webprojects/index.html

    section 7.1

    Yup, they simply copy the changed files across automatically. Nothing Magical.

    It seams that if you help the hot deployment then it would work better anyhow.

  19. Tong Wang Says:

    Hi Michael,

    Just watched the movie and wonder how to get the Seam Gen plugin for Eclipse. I tried using the command line tool, but it didn’t work for me.

    Thanks,
    Tong

  20. Scott Says:

    I am new to Eclipse and NetBeans. I read on one website not to use the Hibernate menu options relating to Seam, because it is out of date. They recommend using the seam-gen options. After seeing the movie, I was wondering how you added this to the menu?

    Also, I ran across websites/articles on MyEclipse. What is the difference between the Eclipse and MyEclipse? Which is better?

  21. Anthony Says:

    Wow, really impressive! Changing a JSP without a restart!

    I’m sold! I think this Java framework really is different from all the others. This one really will save us time and increase our productivity. I know this one won’t be like all those previous frameworks.

    This technology will also free up more time for my team to focus on our UML diagrams, CMM Level 5 certification, and other critical enterprise initiatives.

    And this will finally shut up all those Rails and dynamic language script kiddies. It also ought to shut up all those whiny developers who can’t suck it up and stop complaining about restarts and long compile-deploy cycles. (If you can’t take it like a man, then feel free to go to some girly-man language like Ruby, Python, or SmallTalk — leave the heavy lifting and scalability to us big boys).

    Anyway, keep up the good work! And keep fighting the good fight! Because Enterprise Java has not been deprecated, and it’s worth fighting for! We’ve been victimized for too long by those Ruby FUD-masters.

    Never give up!

    (You guys need to write up a good white paper on this — that should help our cause).

  22. Sakuraba Says:

    I am soooooooooooooo looking forward to this integrated development approach to JEE.

    And save changes + refresh browser development is gonna make it even better.

    Thank you guys at Red Hat!

  23. renton Says:

    Is it known when Red Hat Developer Studio will be released to public with functionality mentioned?

  24. Puran Singh Says:

    Seam is great!!

  25. Daniel Cardenas Says:

    Hi Michael,

    I wonder for the Seam Gen plugin for Eclipse. How can i install it? I have downloaded the source code from http://anonsvn.jboss.org/repos/jbosstools/ but I don’t know ho to compile and install it.

    I hope you can help me.

  26. Toni Says:

    From where can we download the source code or the database schema of the demo application?

  27. can bariscan Says:

    Awesome :D you’re the man! What’s the news with the full tutorial ? I love visual tutorials (better see than read and try to make sense) I’m new here I’ll be a fan of this blog soon

  28. Gordon Says:

    Looks great, but I can’t figure out how to restrict the tables it uses to generate. E.g. if I have 10 tables but I am only interested in two of them.

Leave a Reply