Sunday, August 20, 2006

Tapestry NetBeans Plugin

This is repost of my original post - since it was linked by Geertjan and NetBeans weekly news at two different URLs, here it goes...:

I've read up a bit on Tapestry and I've followed Geertjan's blog for quite a while now. I've been a NetBeans fan for quite a while now (since 3.5), and Geertjan's blog has been really eye opening in what is possible with NetBeans. So, a while back, he was really excited about Wicket, and he started working on a plugin for developing Wicket apps in NetBeans. It appears that in the last few months, with the help of Petr they've built quite a nice set up to support Wicket in NetBeans.

What that means about me is that I will try to do something similar, but with Tapestry. What I will try to do is to develop a plugin that will support Tapestry development in NetBeans. Geertjan has already done most of the work here as he has covered a lot of the topics that are required to build a nice web framework support plugin for NetBeans. At the same time, as he seems to point out in one of his latest entries, the information that is required to build such a plugin is either scattered all over the net (or the NetBeans.org site), or is in the source code for his Wicket support plugin . Now that I'm trying to organize my thoughts about this project better, I start noticing that he's also done a great job of documenting his work and his progress along the way. However, I guess giving it a second run wouldn't hurt anyone.

I will probably try to put up a post that would list the proposed features for such a plugin. However, the idea is that the plugin should make working with Tapestry easier, maybe even to the point of not having to know all the nitty-gritty details of exactly how Tapestry works. It should probably have all the nice features of the Wicket plugin, translated into the Tapestry world.

One thing that I've considered in the past is to dig into the Spindle project (which is an Eclipse Tapestry support plugin which has an Eclipse specific and an Eclipse agnostic part) and try to adapt it to work for NetBeans. Now, the thing is that part of my goals includes learning the NetBeans APIs along the way. So, while sometime down the road, looking into using the Spindle implementation and putting up a NetBeans frontend to it would make sense, it appears that for now it would make the most sense to see about implementing the basics in NetBeans only...

I will also probably post more details on the steps required to accomplish this; however, after a few hours of playing around with NetBeans, the tutorials on the site, Geertjan's tutorials, as well as the NetBeans APIs, I've put together the first few things for the plugin... Here are a couple of screenshots that just give me an enormous adrenaline rush...


First, a blank Tapestry project, set up and ready to go (I wish I knew how to do this a while back at work, as with both Tapestry and JSF/Facelets I've always kept referring to a sample project that I know it works when I've done new projects...):


Geertjan is probably going to laugh at this one as this is dirt simple to do, but damn, it is nice to be able t accomplish this.




The next one is showing how the Tapestry framework is added to the list of supported frameworks in a standard NetBeans web project. I admit right off the bat that I took all the code from the Wicket plugin and replaced all references to Wicket with references to Tapestry. I still need to remove some of the config options here that really have nothing to do with Tapestry, but this is a very nice start (I was initially having some trouble getting the framework support in - I spent a good number of hours until I found out exactly how to register the framework in the IDE).





The last one is a list of a couple of new file types added to a project. Most likely, I will have to restrict them to Tapestry projects only, but it's a nice start again. THere is more work to be done to maybe create a graphical customizer for a Tapestry page, but still.. I'm pumped.. :-)


3 comments:

  1. Hi Alex.
    Good news you're working on this. I'm not really a netbeans guy, but i don't mind playing with it now and then.
    So, I was thinking of doing something similar but then i found your entry.
    Have you set up a project for this? Are you planning on sharing what you already have?
    I believe that a lot of people would find it useful - even as it is today.

    Anyway, the next thing you should do is contact Hugo and Geoff... and grab the spindle-core code, it's IDE agnostic, you can even write a custom ant task with it.
    So, what are your plans?

    ReplyDelete
  2. andyhot,
    I haven't set up a project for this yet. I was planning to do it when I get closer to having something more complete than this - in it's current status, it's just a very superficial setup with really no depth to it. I really would be embarrassed to create a project that is as incomplete as this is.

    Regarding using spindle-core, I did consider it as a possibility, but I think it will become more useful later on as I become more familiar with what NetBeans brings to the table. It seems that in an initial stage like this, trying to learn both spindle-core and NetBeans APIs would be a bit too much to handle at the same time. I'm sure that after I beat my head against the wall for a while without spindle-core, I'll probably find spindle-core VERY useful... :-)

    If you are interested in doing something together, I wouldn't mind putting something out there (I hear google code hosting is really nice for small projects) and we can work on it together. From experience, I know that nothing beats working on a team on something like this..

    ReplyDelete
  3. Yep, i'm interested + already had a little talk with the guys from https://nbwicketsupport.dev.java.net/
    Check out http://andyhot.di.uoa.gr for my mail
    We can continue this talk there...

    ReplyDelete