Home

News: From Zero to Java EE in 60 seconds: Seam Forge is heating up Java Web Development

  1. It's been a few months since our last release, but we have a lot of goodies for you this time, and for those of you who haven't taken a look, or seen it at all, Seam Forge is really starting to pick up steam. Since this is the third release of "Angry Kitten," we decided it was time to let out a whole pack of excited, ill tempered little furballs.

    Download Forge 1.0.0.Alpha3 - Read the Reference Guide - Learn about Forge at JBoss World.
    Get involved by joining Users or Dev mailing lists.

    Introduction

    How many times have you wanted to start a new project in Java EE, but struggled to put all the pieces together? Has the Maven archetype syntax left you scratching your head? Everyone else is talking about cool new tools in other languages or frameworks, and you're left thinking, "I wish it were that easy for me." Well, there's good news: You don't have to leave Java EE just to find a developer tool that makes starting out simple. Seam Forge is heating up Java EE, and is ready to work it into a full-fledged project.

    In addition to being a rapid-application generation tool, Forge is also an incremental enhancement tool that lets you to take an existing Java EE projects and safely work-in new functionality. Forge comprehends your entire project, including the abstract structure of the files, and can make intelligent decisions of how and what to change.

    Whether you want to get your startup off the ground today, or make your big customers happy tomorrow, Forge is a tool you should be looking at.

    What can Seam Forge do for me?

    If you're wondering what Forge actually "does," then keep reading, because it's hard to fit everything in to one blog post.

    • Create Java web applications from scratch in a matter of seconds.
    • Setup Java Persistence (JPA) for Hibernate, EclipseLink, and OpenJPA on JBoss AS 6, JBoss AS7 and GlassFish
    • Setup Java Server Faces (JSF)
    • Setup Contexts and Dependency Injection for Java (CDI)
    • Create JPA @Entities in just a few commands, including adding new fields, relationships, and collections.
    • Generate barebones UI from @Entity classes for adding, removing, editing, and deleting rows from the database.
    • Manage project dependencies and repositories.

    But more than all this, which is really just scratching the surface of what's possible already, Forge is an extendable platform for Plugin development. It's more than just a tool for creating Java or Java EE applications, and in fact has been designed to be technology agnostic; Forge is not limited to Java EE. Plugins can be written for any variety of technologies.

    For instance: Let's take the case where I want to add PrettyFaces to my new or existing web application in order to support URL-rewriting and "pretty URLs:" putting parameters in URL's: E.g: http://example.com/store/product/24/ (Normally in Java Web Applications, accessing values in URLs can be difficult, meaning you'd have to parse out any values by hand, or use a tool like this one.)

    Forge doesn't bundle a plugin for PrettyFaces, but because such a plugin exists, I can go out to the web and tell Forge to install it. Not only that, but I can also install the plugin through a number of different methods:

    Plugins can be installed via any of the following sources:

    Install a plugin from a local JAR file.

    $ forge jar-plugin ~/Desktop/prettyfaces-plugin.jar

    Install a plugin from a remote JAR file.

    $ forge url-plugin http://example.com/download/prettyfaces-plugin.jar

    Install a plugin from Maven

    $ forge mvn-plugin com.ocpsoft.forge:prettyfaces-plugin

    Prototype, example only: Search the cental Forge plugin index for plugins to install.

    $ forge find-plugin prettyfaces
    $ forge install-plugin prettyfaces

    Compiles and installs plugins from a local project.

    $ forge source-plugin ~/projects/prettyfaces-plugin/

    Checkout, compile, and install plugin from a Git version control repository

    $ forge git-plugin git://github.com/ocpsoft/prettyfaces-forge-plugin.git

    Let's take a closer look at installing plugins from Git; for example, this is Forge installing the PrettyFaces URL-rewriting plugin. Notice that Forge knows how to check-out, build, and install the plugin all in one step. This is a convenient method of plugin distribution because it means that the deliverable JAR need not be hosted in any kind of artifact repository; simply write a plugin, put it in a public git repository like GitHub, share the Git repository URL and you can now distribute the plugin. If you want to distribute specific versions, then use the "--ref {version}" argument for the "git-plugin" command, like so:

    $ forge git-plugin {repo-url} --ref {tag/branch}

    What is the big deal about Plugins? Why is this important?

    At this point, some of you might be thinking one of two things: either, "Wow, cool! That looks easy!" or "Why should I care? It's already easy enough to do everything," and undoubtedly one of the most important answers to this question is, "because it's incredibly easy to write Plugins." Just take a look at the plugin writing guide and see how easy it is to get started.

    If you take a look at the sources of the PrettyFaces plugin itself, you can see that it doesn't take much to write a Forge plugin that actually does something, and the reason this plugin requires more than one class is because it is taking advantage of some of the more advanced features like custom <TAB> auto-completion, and the concept of being installed into a project, which has considerable benefits when you have features depending on other features.

    Let's also consider the situation where you've written a really cool piece of software, and you just can't wait to get people to try it out. The problem is, though, that your software takes a little bit of setup, and users/developers don't really know how to get started with it; that's where Forge comes in with its distributed plugin system. By writing a plugin to streamline the installation and configuration of your software,  you can greatly reduce the barrier to entry for new users, and make the life of existing users easier by providing features that they can use every day.

    Going back to our example, to install URL-rewriting into a new or existing app, simply run the following two commands (as needed.)

    $ prettyfaces setup
    $ prettyfaces mapping --pattern /login --viewId /pages/login.xhtml{code}

    Now that seems a whole lot easier than adding dependencies to a Maven POM, going out and finding an example config file, copying and pasting it, and so on. This just one simplification that Forge enables.

    Great, Forge looks awesome. Now what?

    We hope you enjoy the latest release of Seam Forge, and would like to solicit involvement. The project is advancing quickly, picking up new community members all the time, and if you are an application developer and just can't wait to try it out, if you are interested in writing plugins, if you are interested in contributing to the Project, or if you just want to give some feedback, the following links are for you:

    Threaded Messages (7)

  2. Go Lincoln :-)!

  3. Roo?[ Go to top ]

    Am I correct in thinking that Forge aims to solve the same problem as Spring Roo?

    Also, is there a release roadmap? RC? Final?

    Looks interesting though, definitly worth a look. Roo is a good intiative, and definitly usable in rapid prototyping. I found it's heavy use of AOP made it a bit opaque and unflexible though.

  4. Roo?[ Go to top ]

    I tried Roo and opened the generated source to learn how to use Spring and GWT from the experts and the code is not easy to understand (at least to me) compared to appfuse-generated code.

  5. Roo?[ Go to top ]

    Seam Forge looks like IDE (or standardized) version of "Seam gen"(which is pretty old now). However we can look at it - once it has better documentation(and it shows how to customize generated code).

    I dont think Seam roo is good for complex project yet - http://java.dzone.com/articles/when-use-spring-roo

    But again - i had struggled with seam-gen - due to lack of documentation(for customizations) and lack of direct support for tomcat.

    Regards,

    Zahid

    http://www.jroller.com/seam

     

     

  6. loose release schedule[ Go to top ]

    http://seamframework.org/Documentation/SeamForge#H-ReleasePlan

  7. JSF only?[ Go to top ]

    At the risk of starting a flamewar (and you know some douchnozzle is gonna want to...) can seamforge be used with wicket as well?  I prefer wicket though maybe the time is ripe to look at jsf2.

  8. #SeamForge and Wicket[ Go to top ]

    At the risk of stopping a flame war... absolutely it can.

    As long as: