Thanks much Ryan, no worries here.. I posted a link to the sample code in my article..
On Dec 15, 5:50 pm, Ray Ryan <rj...@google.com> wrote: > Sony, even if this doesn't make it into the incubator there is nothing > stopping you from placing it in your own Google Code project and publicizing > it here and on users. I imagine there are a lot of DSL fans out there who > might be interested. > rjrjrOn Tue, Dec 16, 2008 at 9:29 AM, Sony <xsonymat...@gmail.com> wrote: > > > For more info on this topic refer to my Article: Fluent DSL for Rich > > UI > > on theServerSide.com: > >http://www.theserverside.com/news/thread.tss?thread_id=52241 > > on my blog: > >http://sonymathew.blogspot.com/2008/12/fluent-dsl-for-rich-ui.html > > > Thanks > > Sony > > > On Oct 27, 11:55 am, Sony <xsonymat...@gmail.com> wrote: > > > dflorey, Isaac > > > Thank you for your comments. First off, I want to make sure I am > > > going about this the right way. Was I supposed to post AxisPanel > > > myself or wait for a reply from a sponsor? I didn't join the group > > > itself till after my 2nd email attempt. Thanks again for posting this > > > for me. > > > > Regarding: IDE Formatting: > > > Good point - but to me the gain in readability with the manual > > > indentation is worth not auto formatting select packages. Most people > > > use manual indentation anyways and resort to Auto formatting when > > > files are checked in. > > > > Regarding: Unconventional method names: > > > I expected this to be the main opposition from the GWT team. See > > > Martin Fowler's DomainSpecificLanugage and FluentInterfaces. Some > > > would argue against the conventional setter/getter/add method names > > > for a complex domain. What I have used is a Domain-Specific-Language > > > (DSL) or a Fluent Interface (language within a language) to handle the > > > complex domain of UI layouts. > > > -- > > > Checkout Martin Fowler's entries. > >http://www.martinfowler.com/bliki/DomainSpecificLanguage.htmlhttp://w... > > > -- > > > I would in-fact argue that using Fluent layouts all-around would > > > benefit GWT greatly and bring about even greater usage - such Fluent > > > layouts could out-do any framework with XML or HTML layouts if > > > properly supported. > > > > Regarding: Just a helper class, no advantage over exiting panels: > > > Yes, AxisPanel can be viewed as a helper class - nothing too > > > innovative. The innovative parts if any are: 1) combining Vertical/ > > > Horizontal layout concepts under one hood to create a very powerful > > > layout in my experience - capable of laying out almost any complex > > > layout needs and 2) providing a succinct readable DSL ("Fluent > > > language within a language") for almost any complex layout needs. > > > -- > > > I would in-fact argue against the need for several layout panels > > > existing in GWT today - they could all be replaced with one > > > AxisPanel. I would like to push this same concept out to Swing as > > > well - where layouts can be quite cumbersome. > > > > Regarding: GXT BorderLayout, > > > The GXT BorderLayout you linked to is fantastic - especially the nifty > > > pin/collapse functionality for each border panel. I would have coded > > > a border layout quite quickly as follows: (without the nifty pin/ > > > collapse of-course) > > > > AxisPanel p = new AxisPanel() > > > .y().width("100%") > > > .x(new ContentPanel()).css("north").width("100%").q() > > > .x().width("100%") > > > .y(new ContentPanel()).css("east").width("25%).q() > > > .x(new ContentPanel()).css("center").width("50%).q() > > > .y(new ContentPanel()).css("west").width("25%).q() > > > .q() > > > .x(new ContentPanel()).css("south").width("100%").q() > > > .q() > > > > Also consider: a different version: PinAxisPanel > > > Say PinAxisPanel had a Fluent AxisPanel like interface with properties > > > like collapse(true) (why restrict to just the border layout, any Panel > > > could be made Pinnable/Collapsible). I think this would be even more > > > fabulous. > > > > Also consider: if layout requirements changed: > > > Say the business wants to split the contents of the south panel into 3 > > > parts and move them adjacent to the contents of the east, center and > > > west panels respectively (perhaps inside them place them at the top, > > > center, and bottom respectively) and add different styling and so on. > > > If my south panel's contents were laid out using the same AxisPanel in > > > the same expression (instead of new ContentPanel()) - I could easily > > > move the contents around until I obtained the right look and results - > > > rather than creating new wrapper panels with new variable names, > > > changing panel insertions etc. Overall readability of my layout is > > > easily grasped and modified. > > > > I'll chill, you relax, we'll just chillax, > > > Sony > > > > On Oct 24, 5:04 pm, "Sony Mathew" <xsonymat...@gmail.com> wrote: > > > > > Hello again, I am still looking for a sponsor for AxisPanel. I would > > > > appreciate any feedback - good or bad. > > > > > I am currently evaluating GWT for our team as we would like to make the > > jump > > > > over to Rich UI. Other frameworks we are evaluating include Flex and > > > > Laszlo. At a minimum we needed to demonstrate that we can layout our > > > > current web-pages easily with a few sprinkles of rich widgets here and > > > > there. > > > > > The drawbacks several developers pointed out immediately were 1) > > verbosity > > > > of the Java code 2) Layout structure not clear from the Java code and > > 3) > > > > Layout modifications required tedious wrapping in additional panels to > > > > achieve desired look. The last point was the most painful - needing to > > come > > > > up with more variable names new wrapper panels, updating existing panel > > > > insertions, moving Style names around etc. > > > > > At this point GWT was pretty much knocked off the evaluation list in > > favor > > > > of XML declarative Flex or Laszlo. The idea of being able to stay in > > Java > > > > for the whole development cycle appealed to me greatly - but not at the > > cost > > > > of overall productivity. But since I had this bias for Java and felt a > > > > powerful OO language like Java should be able to provide better > > > > expressiveness than an XML declarative equivalent - I decided to create > > the > > > > AxisPanel (I usually leave such things to experts). > > > > > AxisPanel was a bigger hit than I had first expected. I was able to > > > > transform the web-pages quickly. Verbosity decreased to a minimum - > > more > > > > succinct than XML or HTML equivalents. Clarity in structure is > > immediate as > > > > x / y indicates the direction of widgets and indentation shows nesting. > > > > Modifications in styles and structure can be done in a snap as every > > x/y > > > > panel can be styled and new ones added quickly. In most cases we could > > > > layout a whole page in one Java expression. I would like to push this > > > > concept out to Swing and other OO UI frameworks as well. > > > > > AxisPanel definitely could be optimized (I put it together quick) - > > e.g. > > > > currently it uses a series of Vertical/HorizontalPanels - but could be > > > > optimized to use the DOM API directly for more efficient output. > > > > > I would appreciate any feedback - good or bad. Please see email below > > and > > > > attached java files for details on AxisPanel. > > > > > Thanks > > > > Sony > > > > > ---------- Forwarded message ---------- > > > > From: Sony Mathew <xsonymat...@gmail.com> > > > > Date: Wed, Oct 8, 2008 at 11:32 AM > > > > Subject: Looking for Incubator sponsor for AxisPanel. > > > > To: Google-Web-Toolkit-Contributors@googlegroups.com > > > > > GWT makes it easy to create and listen to the widgets that the user > > > > interacts with (like buttons, textboxes, etc.) but when designing a UI > > one > > > > can spend a considerable amount of time in layout of these interactive > > > > widgets - positioning and spacing them just right. GWT does provide > > many > > > > layout Panels but their usage creates extremely verbose code that is > > hard to > > > > grasp after the layout is written. > > > > > AxisPanel provides a simple concise way to layout a complex UI using > > short > > > > continous expressions that place your widgets in either the X or Y axis > > > > allowing you to recursively create a layout of any degree of > > complexity. > > > > Every intermediate X or Y axis panel is stylable and customizable on > > the fly > > > > within the same expression. AxisPanel can shrink a page length of Java > > code > > > > to one easy-to-read expression which enables easy experimentation until > > your > > > > layout is achieved. Allows you to focus your time/energy on the > > interesting > > > > dynamics that GWT handles so beautifully and less on the > > not-so-interesting > > > > layout details. AxisPanel is also more concise than its equivalent HTML > > or > > > > Declarative XML type layouts. > > > > > *Sample Usage:* > > > > > AxisPanel p = new AxisPanel(); > > > > p.css("search").size(800,600).align(0,0).space(10).border(1) > > > > .y().css("options").size(0.4,1.0).space(10).align(-1,0) > > > > .x("Enter your Search here:").q() > > > > .x(searchBox,searchButton).size(-10,-10).border(1).q() > > > > .q() > > > > .y().size(-10,-10).align(0,0).space(20).border(1) > > > > .x().css("header").size(10,200).align(0,0).border(1) > > > > .x(textbox2, label2).q() > > > > .y(textbox3, button3).q() > > > > .q() > > > > .x().css("help").border(1).size(100,20) > > > > .x(helpLabel, helpSearchBox, helpHyperLink).q() > > > > .y(textbox5, button5).q() > > > > .q() > > > > .x(searchResultsTable).css("results").size("100%","100%").q() > > > > .y(textbox6,button6).q() > > > > .q() > > > > > *How to Read:* > > > > > - AxisPanel > > > > The root panel and the starting target to which all additions go. > > The > > > > AxisPanel is a VerticalPanel (Y Axis) to start with. > > > > - .y(Widget...) > > > > Adds a VerticalPanel (Y Axis) to current target panel with the given > > > > Widgets. Switches target to this new Y Axis Panel and all further > > actions > > > > are directed to this Panel. The added widgets will line up > > vertically (Y > > > > Axis) within this new Panel. > > > > - .x(Widget...) > > > > Adds a HorizontalPanel (X Axis) to current target panel with the > > given > > > > Widgets. Switches target to this new X Axis Panel and all further > > actions > > > > are directed to this Panel. The added widgets will line up > > horizontally (X > > > > Axis) within this new Panel. .x(String) is convenience shortcut for > > .x(new > > > > Label(String)). > > > > - .css(String), size(int,int), border(int), space(int) etc. > > > > Add css class, size, borderWidth, spacing etc. to the target widget. > > > > size() is overloaded e.g. negative and double values are relative to > > > > parent's size. > > > > - .q() > > > > Done adding to the current target Panel. Switches target back to > > parent > > > > panel in use before this panel. Every x() or y() axis additions > > should end > > > > with a q(). But You do NOT close the root AxisPanel with a q() since > > The > > > > expression can be restarted on > > > > ... > > > > read more » --~--~---------~--~----~------------~-------~--~----~ http://groups.google.com/group/Google-Web-Toolkit-Contributors -~----------~----~----~----~------~----~------~--~---