Discussions

News: AppFuse: Start Your J2EE Web Apps

  1. AppFuse: Start Your J2EE Web Apps (9 messages)

    Matt Raible started AppFuse as a way to get a quick start into a J2EE project (what with the myriads of open source tools that you could be using). His article discusses the project, what is consists of, and how to start using it.

    Introduction
    One of the hardest parts about J2EE development is getting started. There is an immense amount of open source tools for web app development. Making a decision on which technologies to use can be tough -- actually beginning to use them can be even more difficult. Once you've decided to use Struts and Hibernate, how do you go about implementing them? If you look on the Hibernate site or the Struts site, you'll probably have a hard time finding any information on integrating the two. What if you want to throw Spring into the mix? As a developer, the best way for me to learn is by viewing sample apps and tutorials that explain how to extend those applications. In order for me to learn (and remember) how to integrate open source technologies such as Hibernate, Spring, Struts, and Ant/XDoclet, I created AppFuse. The beauty of AppFuse is you can actually get started with Hibernate, Spring, and Struts without even knowing much about them. Using test-driven development, AppFuse and its tutorials will show you how to develop a J2EE web application quickly and efficiently.
    What is AppFuse?
    So after all that history, what is AppFuse? At its very core, AppFuse is a web application that you can package into a .war and deploy to a J2EE 1.3-compliant app server. It's designed to help you create new web applications using a new target in its build.xml file. The new target allows you to specify a name for your project and a name for the database it will talk to. Once you've created a project, you can instantly create a MySQL database and deploy it to Tomcat using ant setup. Furthermore, you can verify that the basic functionality of your new application works by running ant test-all. At this point, you might sneer and say, "What's the big deal? Anyone can create a .war file and deploy it to Tomcat." I agree, but do you have a setup-tomcat target that will configure Tomcat with JNDI resources for connections pooling and mail services? Most of what AppFuse does is not rocket science. In reality, it's nothing more than a directory structure, a build file, and a bunch of base classes -- with a few features thrown in. However, it has vastly accelerated my ability to start projects and develop high-quality, well-tested web applications.

    AppFuse tries to make it as simple as possible to build, test, and deploy your application. It virtually eliminates setup and configuration, which are often the hard parts. Tools like Ant, JUnit, XDoclet, Hibernate, and Spring can be difficult to get started with. Furthermore, features like authentication, password hints, "remember me," user registration, and user management are things that most web apps need. AppFuse ships with tutorials for developing DAOs, business delegates, Struts actions (or Spring controllers), integrating tiles and validation, and uses an Ant-based XDoclet task (written by Erik Hatcher) to generate master/detail JSPs from model objects. It uses slick open source tag libraries like Struts Menu (for navigation) and the Display Tag (for paging and sorting lists).
    Read AppFuse: Start Your J2EE Web Apps

    Threaded Messages (9)

  2. Maven Gen App[ Go to top ]

    Actually this is one of the things I wished maven:genapp had a lot more of. I've created a few small ones, but I think AppFuse would provide a larger more realistic version than.
  3. I like the idea behind this system, but I have once complaint with his direction.

    Rather than picking a set of technologies, integrating it, and setting up the template and refining it, he's begun adding "redundant" and overlapping technologies.

    One of the big problems for new Java user today is the overwhelming amount of "choice" that we have today.

    Choice is good. Choice is wonderful. I like choice. But it is literally overwhelming when you are not far enough along the curve to be able to discriminate between the vast assortment of frameworks et al.

    .NET can be considered "easier" for the simple reason that you don't have to assemble, much less select, the vast array of tools and support code to get your app off the ground. You're pretty much stuck, for good or ill, with what MS provides you. So, by choosing .NET you've delegated that choice to MS, and can settle in with just "dealing with it".

    People have a variety of opinions on the assorted frameworks. Some work better than others in different domains or support different kinds of development models. But those with an opinion are those who (I hope) basically worked through the assorted disparate bits of software so they could discern the distinctions that they provided. Not every developer has the time, nor necessarily the experience, to be able to go through that process.

    I think something like AppFuse should try and avoid overlapping technologies. By selecting this kind of project, the user shouldn't have to then decided which parts within the project they should use over other parts within the project. A simple contrived example is that something like AppFuse shouldn't have Hibernate and iBatis (I'm not saying that they do, it's a contrived example), as they basically fill the same role and require the user to make that choice. That limits the projects usefullness, IMHO.

    A project like AppFuse hopefully would provide a realistic, practical, proven and usable base platform that a new developer can choose where they can simply focus on learning the techs provided with the confidence that they were selected for their quality and stability and functionality. The developer can then focus solely on mating their application vision with that technology without taking all of the time to evaluate competing platforms, or second guessing that they've made the "wrong choice" on a specific component.
  4. Choices: are they good or bad?[ Go to top ]

    I am sure Matt Raible has an opposite opinion, and mine is half-way in between his and yours.

    To me choices are good to a certain degree. So I do want to see Hibernate, iBATIS, and JDO all in there, but not OJB and Cayenne. I want to see Struts, and JSF, but not WebWork, Spring MVC, and Tapestry included.

    But ultimately it is up to Matt to decide, and I think in a sense he is documenting his learning process of all the cool new OSS frameworks and feeding that back to the community. I think that in itself has a lot of value.
  5. Choices: are they good or bad?[ Go to top ]

    I am sure Matt Raible has an opposite opinion, and mine is half-way in between his and yours.To me choices are good to a certain degree. So I do want to see Hibernate, iBATIS, and JDO all in there, but not OJB and Cayenne. I want to see Struts, and JSF, but not WebWork, Spring MVC, and Tapestry included.But ultimately it is up to Matt to decide, and I think in a sense he is documenting his learning process of all the cool new OSS frameworks and feeding that back to the community. I think that in itself has a lot of value.
    I am curious if you can justify as to why u want to see Struts & JSF, but not Webwork & Tapestry. Is it just ur personal choice or is there a technical reasoning to it. I hope u dont expect Matt to build AppFuse arnd ur personal choices.
  6. Choices: are they good or bad?[ Go to top ]

    I work for a large global corporation, and it is in our best interest to use either official or de-facto standards for our projects. One of the main reasons is that it is easier to find less expensive resources (you know what I mean) if we stick to standards.

    To me, Hibernate, iBATIS, JDO, Struts, and JSF are standards or very close to standards. Don't get me wrong, OJB, Cayenne, WebWork, Spring MVC, and Tapestry may be great open-source frameworks, but their adoption rates need to pick up before they enter our radar screen.
  7. Different versions of AppFuse[ Go to top ]

    One suggestion I have is to create a base version of AppFuse that uses Struts and Hibernate, which are by far the most-popular technologies to build web apps. Then he can offer other options by mixing and matching different kinds of web and persistence technologies. My observation is that Matt likes to explore and experiment with new stuff - so if the old Struts/Hibernate combo gets boring :-), may be he can recruit volunteers to maintain the base AppFuse version while he cranks out the exciting JSF/WebWork/Tapestry/JPOX/Cayenne/OJB stuff.
  8. Why so many choices?[ Go to top ]

    One suggestion I have is to create a base version of AppFuse that uses Struts and Hibernate, which are by far the most-popular technologies to build web apps. Then he can offer other options by mixing and matching different kinds of web and persistence technologies. My observation is that Matt likes to explore and experiment with new stuff - so if the old Struts/Hibernate combo gets boring :-), may be he can recruit volunteers to maintain the base AppFuse version while he cranks out the exciting JSF/WebWork/Tapestry/JPOX/Cayenne/OJB stuff.
    Actually, the default version of AppFuse does use Struts and Hibernate. If you want to use iBATIS, for example - you have to install it. Same goes for Spring MVC. The reason for Hibernate and iBATIS is simple. Hibernate works well when you have (1) full control over the database or (2) a good DBA (for Hibernate-friendly views and such). I worked on a project last year that had a *very* ugly database (think 10 table joins in a query) - and iBATIS worked perfect for this. There's also the option to use both, where some DAOs use iBATIS and others use Hibernate.

    The other options: WebWork, Tapestry and JSF will also be "installable" options. As far as developers having a hard-time choosing which technologies to use - I hope to be able to answer that question for them after I've developed all the different versions. Most likely the answer will be - which one do you have the most experience with?
  9. Good samples and docs[ Go to top ]

    I love a good sample application with documentation. I look forward to this project growing, and providing others with good examples of plugging different Open Source projects together.

    Thanks Matt
  10. EJOSA[ Go to top ]

    This idea is the same as EJOSA (Enterprise Java Open Source Architecture or in our example Enhydra and JOnAS Application):

    http://ejosa.sourceforge.net

    Download the complete docu:
    http://prdownloads.sourceforge.net/ejosa/ejosa-revo-doc.pdf?download

    The process to begin:
    http://ejosa.sourceforge.net/ejosa-images/ejosa-template-process-matrix.jpg

    The structure:
    http://ejosa.sourceforge.net

    What EJOSA can offer you more:
    On the top we use MDA (Model Driven Architecture) with AndroMDA!

    Cheers,
    Lofi.

    BTW. to learn writting a real application based on EJOSA, check out OpenUSS (also Open Source).