Skip to main content

Reusable Visual Web Components

4 replies [Last post]
chris55
Offline
Joined: 2007-12-08

I recently made the switch (more like ran away) from .NET to Java. I simply got tired of the M$ framework/IDE upgrade treadmill. I am working on Ubuntu 7.10 with NetBeans 6 (+ICEfaces), JDK 1.6, J2EE 5, TomCat 5.5, Glassfish 2 and MySql 5. My question relates to building reusable visual web components using NetBeans. I reviewed tutorials on JSF and Facelets but remain alittle confused... Does NetBeans support a framework (Facelets/JSFTemplating) to visually build a web component (+ interfaces/delegates/data source plumbing/etc.) and visually drop it within a JSP or another web component? This feature exists in MS Visual Studio (2002+) as usercontrols/web controls that can be dropped onto an ASPX or another usercontrol/web control. Any help would be appreciated as I am very eager to jump-start my Java learning curve. Please include any books or links.

Thanks,

Chris

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
matte1974
Offline
Joined: 2007-12-11

Hi Chris,
I hope the links and tips helped you. ( If you have appfuse and look at how maven is used by the sample project with jetty built into the buildprocess you really have a fast and good framework to develop with. )

For your questions about reusable components, I don't know. I suggest you send in a post on netbeans user forum, nbusers@netbeans.org, at http://www.netbeans.org/community/index.html

Else there are some documentations about this at

1. http://www.netbeans.org/kb/index.html
2. http://www.netbeans.org/kb/trails/web.html
3. http://www.netbeans.org/kb/60/web/pagefragments.html

saheek
Offline
Joined: 2005-08-02

You might want to take a look at IT Mill Toolkit 5:

http://www.itmill.com/itmill-toolkit/

It does not have a visual designer, but the programming model is much like VB or Swing. It provides a lot of Ajax enabled components based on GWT (Google Web Toolkit) and is open sourced (Apache 2.0).

And, take a look at the tutorial video. Its on Eclipse, but NetBeans should be almost as easy: http://www.itmill.com/videos/The_IT_Mill_Toolkit_5_QuickStart_with_Eclip...

matte1974
Offline
Joined: 2007-12-11

Hi Chris, good choice by the way :)

Here comes some tips and links to get you going.

Build framework:
1. Maven - http://maven.apache.org/ - easy to get started, powerful with dependency management
2. Ant - http://ant.apache.org/

IDE:
1. Eclipse - outstanding and free - http://www.eclipse.org/downloads/ (no good visual web support)
2. Intellij - best ide, low price - http://www.jetbrains.com/idea/
3. Netbeans - best visual web support but you need a lot of cpu and memory to enjoy it.

JSF Frameworks:
1. Richfaces, http://labs.jboss.com/jbossrichfaces/ - in my opinion the best JSF component framework. Easy to use, ajax support, look at the demo app or download the demoapp, https://www.redhat.com/apps/WebForm/richfaces_demo.html
2. Facelets

Kickstart web development:
1. Check out appfuse. It will get you going with the best frameworkd and patterns in java. See http://appfuse.org/display/APF/Home
* Use maven to ease the development, testing and run/redeploy fast. see http://appfuse.org/display/APF/AppFuse+QuickStart
* Use hsqldb as a fast, in develop environment only, database. For integration tests etc. http://hsqldb.org/

Webserver:
1. Jetty - http://www.mortbay.org/
* with maven - http://docs.codehaus.org/display/JETTY/Maven+Jetty+Plugin
2. tomcat - http://tomcat.apache.org/

chris55
Offline
Joined: 2007-12-08

Matte1974,

Thanks so much for replying to my post. I thought people where completely scared (or poorly informed here). Anyway, I took a look at the links you provided. I really like Maven and JBoss' Rich Faces. But I have few questions relating to building pages using the Visual Web Components/architecture...

A. I note that NetBeans 6 supports Page Fragments and Virtual Forms, which allow for visual subcomponent page construction. Do these visual constructs provide programmatic interfaces so that I could dynamically set properties (i.e. display all menu links except 'Contact Us')?
B. Sinking web application exceptions and redirecting/transferring the user to a single dynamically generated error page (i.e. the news item you searched for no longer exists; below is a listing of current news items vs. the resource you requested does not exist)?
C. Handling session state (appended query string parameters <=> Db; etc). Can this be handled by a HttpSessionHandler bean?

Thanks.

Chris