Subscribe: PSquad's Corner
http://radio.weblogs.com/0108886/rss.xml
Added By: Feedage Forager Feedage Grade B rated
Language: English
Tags:
action  ant  app  conversion  cvs module  great  idea  make  nice  orion  sandbox  stuff  web inf  web xml  web  webwork  work  xwork 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: PSquad's Corner

PSquad's Corner



Java, School, Technology, and "other" stuff



Last Build Date: Mon, 27 Jan 2003 04:46:32 GMT

Copyright: Copyright 2003 Patrick Lightbody
 



WebWork 2.0 Coming Along

Thu, 23 Jan 2003 09:11:19 GMT

So everyone has decided on the WebWork 2.0 Mission Statement and the XWork 1.0 Mission Statement (thanks to Jason Carreira for wording these statements so nicely). This means that development on both platforms will now begin to roll ahead. In fact, just tonight I did a few things for WebWork:

  • Added simple PropertyTag and PushTag implementations
  • Added a FilterDispatcher that allows you to access a view of the action and have the action itself execute. This means that SimpleCounter.action and success.jsp  will have the same effect when accessed from the browser. They can both be running in your web app together, or you can choose to use only the *.action way, or the view way. Whatever you want!

Jason has also put in some nice validation stuff in to XWork that is worth checking out. We're going to see if FormProc would be a good fit here as well.




WebWork 2.0 and SiteMesh

Thu, 16 Jan 2003 07:37:23 GMT

Now that I'm toying with the idea of WebWork 2.0 and XWork, I'd like to mention that I've been thinking about using SiteMesh to replace the IncludeTag stuff in WebWork 1.x. They have a very strong overlap, but SiteMesh is a bit more powerful and it'd be great to make use of SiteMesh in an area other than what it's famous for (the PageFilter). Don't have time for an example of the overlap, but maybe later I'll put one up if someone asks.




What about XWork AND WebWork

Thu, 16 Jan 2003 07:34:14 GMT

I got an idea today (it was entirely my idea, no one else suggested it first -- hehe, J.O.): What if XWork and WebWork were both developed actively and released as seperate projects? XWork would be the "kernel" for WebWork and would focus entirely on non-web-related stuff. Essentially, it would be be nothing more than a generic command pattern framework as well as a nice lifecycle/IoC system (thanks again, JoeW) similar to Avalon. But the point is that it'd be small. In fact, I built this in sandbox and it came out to 1500 lines of code and only 32KB as a jar file.

Then there would be WebWork, which would include a ServletDispatcher, better configuration settings for the web, and a huge amount of focus on the the taglibs and macros for JSP and Velocity. This would include Jasper Reports stuff as well, and all that jazz. And of course, WebWork 2.0 would depend on XWork 1.0 (which, as stated above, would be a tiny jar file)

I think that this would solve the complaints of both parties ("it won't be web-specific enough" and "it won't be generic enough") and would allow for both projects to bloom in the direction that they should. I don't think that this is a far-fetched idea. In fact, I know it's possible and I think it'll work out well. I've already made a WebWork subdirectory in the sandbox CVS module and moved the web-specific stuff of XWork in there.

Any thoughts?




Ant console

Thu, 16 Jan 2003 07:24:45 GMT

Anyone know why there hasn't been a nice ant task that essentially gives the user a little text input field where they can type in task names and have them executed? This would be just like the maven console, but of course for ant. Would make building apps even quicker, since we could keep the ant process running and just press "[up-arrow] [enter]" to rebuild. Of course, this is for when you aren't using it with IDEA... you ARE doing that, right?



My sad blog posts

Wed, 15 Jan 2003 01:22:31 GMT

For anyone that reads my posts and thinks, "gee, that guy sure sucks at spelling", or "gee, that guy can't keep his train of thought", or "gee, that guy is an idiot", I have an answer for at least the first two thoughts (the last one I can't help you with, sorry). When I write my blog posts, I'm usually sitting in a lecture hall, crammed in with 500 other students, hopelessly trying to pay attention to the lecture while still blabbing away about some useless topic. So I hope that clears it all up.




Setting it straight: What is XWork?

Tue, 14 Jan 2003 23:18:17 GMT

So I saw today that there was a blog entry discussing XWork and that it might be less powerful for the web... or less powerful as a command framework. And I'm not saying David is the one who things this, he's meerly interpreting the nonsense that is going on the WebWork mailing list. About a month ago I emailed the OpenSymphony mailing lists stating that I would no longer participate in the flamefests that so often appear on the list. Of course, I still continue to developer for a ton of the projects there and I respond to all the emails as possible (as long as they aren't pointless flames). With that said, you may or may not know that I'm the main driver of XWork right now. I've been the one who's been mucking around in the sandbox CVS module and making lots of changes. Some have been controversial (like switching the action context from ThreadLocal to a simple Map), but the point I've made all along is that this is a play pen. A place for various developers (such as Rickard and Jason) to toy with as well. It's a very loose process that I think can work very well if the damn idiots would stop screaming and just let things play out. Once we're ready to present something, if it sitll sucks, then bitching and moaning is acceptable. Anyway, enough about the sandbox module politics, now on to what XWork is all about... As nice as WebWork is, it has a lot of problems. In many cases, it's over engineered (just look at BeanUtil). The configuration scheme used in it can be clearly seen as one that started simple and slowly evolved but never quite grew up. What I wanted to do with XWork was start with a clean slate in terms of code, and then re-build the great ideas in WebWork, but this time go through and do it in a manner that was a much cleaner implementation. Yes, it will be a great command framework, similar to Avalon, in fact. But let me make this next part clear: it will work better for the web than WebWork does as well. The code in CVS currently behaves just like WebWork and has all the web-based features WebWork had. But right off the bat it does one thing better: type conversion. Since the web uses Strings for inputs of all forms, inputting "YYYY/mm/DD" and having it converted to a Date object in your Action is a nice feature. WebWork did this, and it was nice. WebWork even (after my constant badgering, Matt was kind enough to get this in even during his busy sschedule) could get the Date object as a String value of "YYYY/mm/DD". But the problem here is that you couldn't customize type conversion on a per-Action or per-Attribute level. Type conversion was very static and limited. So what I did in XWork was include type conversion in the very core: The Configuration object. But type conversion by itself is a weak argument. I know. If that was it, I would have just proposed we fix up WebWork's type conversion and possible configuration and that's it. But XWork is so much more. There are now Interceptor and Inversion of Control patterns represented (thanks Jason and JoeW!). The expression language uses Ognl, which is (arguably) much better than the old WW EL. The dispatcher code has been simplified down to the point that all you need to do is the following to have an action invocation execute:Dispatcher d = new Dispatcher("FooAction");// the action has already executed at this point, // including the View, such as an action chain// or HttpServlet request dispatcher or redirectString result = d.getResult(); // might be "success"FooAction foo = (FooAction) d.getAction();OgnlValueStack vs = d.getStack(); So what this means is that in order to execute an action, all you really need to do is "new Dispatch()" and that's it. This makes using actions in a generic framework very easy. But it doesn't hurt XWork from being fantastic in the Web context. While I haven't written any taglibs yet, I have made sure that an example WAR will be part of the main deployment. So please, please, don't thi[...]



OSUser - Overhaul

Thu, 09 Jan 2003 04:09:57 GMT

So work has finally begun on the real OSUser overhaul -- it's going to rule! David Smiley and Phillip Mudd have started some serious work. You can find it in the CVS module "sandbox" in the subdirection OSUser. I'm VERY excited about this!



Commons Digester

Tue, 07 Jan 2003 04:45:58 GMT

Just saw what Digester is all about... damn it's cool. I'll make sure that all my OpenSymphony configs switch to using it (unless it has like a million dependencies).



Calling all Orion users

Tue, 07 Jan 2003 04:45:12 GMT

Anyone actually ever get Orion to auto-compile sources? Can it see when sources change, then compile and redeploy?



OSWorkflow query support

Sat, 04 Jan 2003 20:58:51 GMT

OSWorkflow 2.5 is coming right along. The biggest thing that will be in this release will be query support. I've already got it implemented in the MemoryWorkflowStore and it is demonstrated in the example web app (which btw, will also be beefed up in the next release). I'm not entirely sure how dynamic queries can be implemented in EJB -- this is a tough problem. JDBC and Ofbiz won't be very hard at all, however.

This brings me to another idea: what about using Lucene for workflow queries? Is that even possible? Could a query like, "find me all workflows where bob is the owner of the current step 'Review'"? My main problem is the relationship between a Workflow entry and it's steps might be hard to feed to Lucene:

One WorkflowEntry has many CurrentSteps and also has many HistorySteps. Not sure how Lucene could handle this... or maybe I'm asking too much.




Resin sorta works

Tue, 31 Dec 2002 18:38:04 GMT

An ugly hack that can still let me get almost what I want with quick development was to make a proxy to transactions and then turn them off for Resin. Ugly, not production quality, but lets me get almost all of what I need. Still not very happy about the sad state of app servers, especially Orion since it offers features that don't seem to work and otherwise would be everything I need. But I guess that's the story of Orion... it's always just "almost perfect".




Why do all app servers suck?

Tue, 31 Dec 2002 18:29:03 GMT

OK, after thinking I'd found the holy grail of super quick webapp development (see previous story), I found that Resin's JTA implementation is the pits. Great. So I tried to apply the same technique to Orion. Except that Orion doesn't have any feature in orion-web.xml to let it deploy from my src structure (outlined below). Specifically, it can't be told where WEB-INF/lib is, where-as Resin and Jetty can. Also, Orion (even though the options are there in orion-web.xml) doesn't seem to see my source changes (or class changes even!) and redeploy the webapp. Great.

Jetty and Tomcat are a no-go, because that would mean I have to use Tyrex, which I refuse to do. JBoss+Jetty might work, but is hard to get working inside of IDEA and also still doesn't solve the redeploy issue I'm trying to address.

So here's by directory structure:

  • build/java (IDEA compiles classes here)
  • src/java (sources)
  • src/webapp (complete webapp, minus WEB-INF/classes and WEB-INF/lib)
  • lib/core (what will become WEB-INF/lib)

I'm sure a lot of you see a familiar structure here (a la maven, but not quite maven). Any thoughts of how I can get a good app server (say, Orion) to quickly redeploy (I'm fine if I having to touch web.xml, I can automate this with an ant task that automatically runs after compile) while also running within IDEA (that's key for me)? Another problem with Orion was that the classpaths that IDEA sets up when running Orion inside of IDEA screw up Orions ClassLoaders, and so touching web.xml has no effect. Sigh, I give up.

Anyone got any tips to share?