2009/8/26 Ernesto Reinaldo Barreiro <reier...@gmail.com>

> Hi Erick,
> Thanks for your answer!
>
> In evaluating frameworks we are trying to see how they do satisfy the
> following conditions:
>
> -Easy of use and developers productivity. I know this sounds very vague but
> I essentially mean things like. What components (taglibs in case of struts)
>  do I get for free? How easy is to combine and use them? Are they
> extensible? In here, I would like if possible to avoid having
> our developers having to write tons of JavaScript/JSP spaghetti code which
> at the end result in unmaintenable code... To illustrate this lets see what
> takes me to build the table I have show at the image
>
> http://antilia.googlecode.com/svn/wiki/Grid.PNG
>
> HTML
>
> <div>
>    <div wicket:id="table" style="padding-top: 5px;"></div>
>  </div>
>
> Java
>
> TableModel<Person> tableModel = new TableModel<Person>(Person.class, "id",
> "name", "lastName1");
> ....
> Table<Person> table = new Table<Person>("table",tableModel,
> Person.createPersons());
> add(table);
>
> All the JavaScript, Ajax navigation, etc. is taken care by the component.
> So, in JSP parlance I would like something like
>
> <mytalib:grid model="${myModel}" dataProvider="${myProvider}"/>
>
> and those objects added at the server side...
>
> - Learning curve. How difficult will be for our developers to adapt to a
> new
> framework.  Struts2 has advantage here because right now  we are using
> struts 1.
> - How easy will be maintaining the internal tools, components we create
> ourselves and/or how stable-backward compatible are the external
> components-tools we choose to use.



There's usually a trade-off between simplicity and out-of-the-box
functionality and flexibility (how open to extensibility and customization).
Where you opt for on this spectrum should depend a lot on the sophistication
of your development team. If your team is sophisticated enough, it's better
to opt for a framework that
has a fairly steep learning curve in the beginning but allows for powerful
extensibility which string developers will demand/like later on. If your
team is fairly weak, then I think the out-of-the-box no-hassle widgets are
what you want.

We're actually trying to find a happy medium or rather, to meet both needs
with the struts-jquery plugin.

A) OUT-OF-THE BOX SIMPLICITY: We're providing a number of standard widgets
and components with built-in 'commnication' between them so that developers
can
implement all standard functionality simply: For example, to have two select
boxes, one which is updated when the other changes, you can use the
following code:

      <sj:select id="firstSelect" name="firstSelect"
*onChangeTopics="firstSelectChanged"
list="firstSelectList"*/>
       <sj:select id="secondSelect"
*reloadTopics="firstSelectChanged"* *src="secondSelect.action"
elementIds="firstSelect"*/>

       where *firstSelectList *is any kind of iterable collection in your
model (action).

       Or you could create a draggable div with it's contents loaded
remotely that drops into a droppable area simply div like this:

      <sj:div *draggable="true"  src="myDivAction.action"*>
      <sj:div *droppable="true"*>Drop Into Me</sj:div>

The one limitation I explained before is that the out-of-the-box widgets
will be limited by what is released by

B) EXTENSIBILITY AND POWER-USER SUITABILITY:  By using jQuery, a
publish/subscribe event model which allows developers to
develop/subscribe/publish ANY custom handlers for the component events and
by providing a plug-in mechanism for custom widgets, the ability for
developers to extend the framework is virtually unlimited.  What may be an
issue with wicket in this area (from what i know... i may be wrong) is that
if you are depending solely on the the provided components, there are bound
to be special use cases where you want slightly different functionality or
an altogether different component which isn't and to develop it yourself
you're probably going to want to use a framework like jQuery anyway to amke
things much easier at which point you might as well be using something like
the struts-jquery framework.  I also cannot stress enough the power of the
publish.subscribe framework the struts-jquery plugin uses for interaction
between ajax components and with any custom code. I'm not sure if wicket
provides something as useful for de-coupled event handling/ component
interaction.


>
> As for  Wicket AJAX implementation... You can see an example of how it
> works
> here
>
> http://wicket.apache.org/exampleajaxcounter.html
>
> I think it deserves expending sometime looking at what Wicket does, even if
> you don;t plant to use it, because you can get ideas of how things could be
> done in different ways
>

I agree. I will definitely give it a run as soon as i find some time!


> IMHO, it is really a neat thing... because your don't have to know any Java
> script library whatsoever and your can control at the server side which
> components to update via AJAX. I didn't know about the grid
>
> http://www.trirand.com/jqgrid/jqgrid.html
>
> It looks really nice... I'll look into it and see if can make a neat
> Component out of it...
>

Great.

One (somewhat esoteric) issue to be aware of is that there is a difference
between a jquery ui component and a qualified jQuery ui 'WIdget". Bona-fide
jquery-ui "widgets" follow a particular design pattern and structure of
sorts (see jQuery ui site). There are not that many jquery plugins that
implement the proper "widget' paradigm. Largely because it's pretty new
jqGrid does not for example. Ideally, it would be nice to get all ui
components to be proper widgets and I suspect that will happen over time as
plugin-developers update their components.  Ultimately it would be nice to
have all widgets included in the framework be proper "widgets" as that may
allow us to provide better plugin hooks etc, but it's not a requirement by
any means


> Best,
>
> Ernesto
>
>
> 2009/8/25 Obinna <obi...@gmail.com>
>
> > Ernesto,
> > I understand what you mean. You're right to point to the issue of
> > maintainability as a main concern. One of the big issues with trying to
> > support an external AJAX framework really is maintainability. That was a
> > big
> > problem with the dojo plugin where the dojo framework changed
> dramatically
> > between releases and there simply weren't the resources to basically
> > re-write the plugin to keep up. This has led to an intentional strategy
> > with
> > the jquery plugin to only implement (as part of the default plugin), the
> > widgets that are officially released as part of the jquery-ui release.
> This
> > really mitigates the risk and job of maintaining the plugin.  Having said
> > that, in fact specifically because of this, the plugin must allow for
> easy
> > integration of custom widgets (see the 'Custom Widget' sample so the
> > showcase <http://struts2-jquery.apposit.com/home.action> site) and if
> the
> > plugin is adopted widely enough, one should quickly see a proliferation
> of
> > plugin-plugins :) - custom widgets that end users have developed for the
> > plugin.
> > What's great is that anything that is implemented as a jquery widget can
> be
> > easily integrated as a struts2-jquery widget, so a big part of your
> answer
> > in evaluating this particular plugin is should really be how much you
> like
> > jquery and it's ajax/widget functionality vs. the js/ajax that other
> > plugins/wicket offer - IMO jquery really is about as good as it gets both
> > as
> > a js/ajax library and a js widget library ;). Funny you should mention a
> > grid control, becuase I am just considering implementing and plugging in
> a
> > widget using the jquery jQGrid
> > <http://www.trirand.com/jqgrid/jqgrid.html>control at the moment.
> > jQuery is a powerful js framework of choice in
> > general, and has *TONS* of custom widgets (some better than others) which
> > you can use independently or choose to integrate with struts2 using the
> > plugin.
> >
> > Maturity may of course be a concern of yours, and though struts 2 is very
> > mature, but the jquery-plugin for it is still in its youth if that
> matters
> > to you. I am using it effectively in production at the moment, but then
> > again I am also working on it.
> >
> > I'm not familiar with wicket's functionality (it's somehting i've been
> > planning to check out), so please explain what you mean by 'what they
> offer
> > in terms of functionality and producivity'. Do you mean the list of
> > available components/widgets? I can't speak for the struts team but my
> > feeling is that the goals of struts and wicket are quite different and
> that
> > should really effect your choice.
> >
> > Hope this helps.
> >
> >  -Eric
> >
> >
> >
> > 2009/8/25 Ernesto Reinaldo Barreiro <reier...@gmail.com>
> >
> > > Hi Obinna,
> > > Thanks for your answer...
> > >
> > > I have seen and tried both the dojo plugin and the
> struts2-jquery-plugin
> > in
> > > an small showcase application I have built just to summarize (for
> > internal
> > > use) what is available for struts2.... But to be sincere I'm not very
> > > impressed about what they offer in terms of productivity and
> > functionality
> > > if you compare them with what you get using a component based
> frameworks
> > > like Wicket.  Please, I have no intention to say that there is anything
> > > wrong with those plugins, I'm a developer myself and I know how much
> > energy
> > > demands maintaining something... It is just that the way to work with
> > them
> > > seem to me unnatural after trying Wicket's AJAX implementation.
> > >
> > > For instance, something I haven't found is a good free grid component
> > > supporting AJAX navigation and advanced functionality like draggable,
> > > resizable columns... Something like:
> > >
> > > http://antilia.googlecode.com/svn/wiki/Grid.PNG
> > > http://antilia.googlecode.com/svn/wiki/GridExport.PNG
> > > http://antilia.googlecode.com/svn/wiki/Panels.PNG
> > >
> > > So, I just was wondering what kind of tag-libraries, components, etc.
> > > People
> > > use to build such applications...and how much effort was to build
> them...
> > > and weather those applications where freely available just to see how
> do
> > > they look and what kind of functionality I can expect to achieve...
> > >
> > > Best,
> > >
> > > Ernesto
> > >
> > >
> > >
> > >
> > > 2009/8/25 Obinna <obi...@gmail.com>
> > >
> > > > I have used struts 2 for a number of RIAs but unfortunately none of
> > them
> > > > are
> > > > public. In the past I used to use it with the dojo plugin, and
> samples
> > > for
> > > > using that framework are available with the struts showcase, however
> > > > support
> > > > for that has been stopped and struts 2 is moving toward implementing
> a
> > > > standard jquery plugin. At the moment there are two functional
> > > incarnations
> > > > of a jquery ajax plugin at:
> > > > http://code.google.com/p/struts2-jquery-plugin/and
> > > > http://code.google.com/p/struts2-jquery/ which are in the process of
> > > > getting
> > > > merged very soon. Both have fairly extensive showcase sites and
> > > > documentation.
> > > >
> > > > I also used struts 1 in the past, and general speaking, I've found
> the
> > > move
> > > > from struts 1 to struts 2 nothing short of revolutionizing. With the
> > > > current
> > > > jquery ajax plugins (and the general power of jquery itself for
> > > > non-componentized interface stuff), the applications I am producing
> now
> > > are
> > > > quite impressive (if i may say so myself :) ) and rapid to develop.
> > > >
> > > > - Eric
> > > >
> > > > On Tue, Aug 25, 2009 at 1:27 PM, reiern70 <reier...@gmail.com>
> wrote:
> > > >
> > > > >
> > > > > Sorry for multiple post of the same question but I thought my
> message
> > > > > didn't
> > > > > make it to the list as I get
> > > > > the following notification
> > > > > ---
> > > > > Hi. This is the deliver program at bjtu.edu.cn.
> > > > > I'm afraid I wasn't able to deliver your message to the following
> > > > > addresses.
> > > > > This is a permanent error; I've given up. Sorry it didn't work out.
> > > > >
> > > > > 02211...@mail.bjtu.edu.cn
> > > > > quota exceed
> > > > > --- Attachment is a copy of the message.
> > > > >
> > > > > [这是服务器 bjtu.edu.cn 的投递程序返回的提示信息]
> > > > >
> > > > > 到下列地址的信件投递失败,对方服务器无法正常接受或者拒绝接受这封邮件,
> > > > > 这是一个永久性的错误,服务器已经放弃继续投递。
> > > > > 02211...@mail.bjtu.edu.cn
> > > > >
> > > > > 对方服务器返回错误提示:
> > > > > quota exceed
> > > > > --
> > > > > [附件是您所发送信件的原件]
> > > > > ---
> > > > >
> > > > > Does anyone has the same problem?
> > > > >
> > > > > Best.
> > > > >
> > > > > Ernesto
> > > > >
> > > > >
> > > > > reiern70 wrote:
> > > > > >
> > > > > > Hi,
> > > > > >
> > > > > > I have been trying to find references to enterpise WEB
> > applications,
> > > or
> > > > > > Rich
> > > > > > Internet Applications, out there using struts2 but I have found
> > > > > > no references on struts 2 web site or in this mailing list. My
> > > > apologies
> > > > > > if this information is available somewhere on the strust2 site or
> > > this
> > > > > > list and I somehow I just missed it.
> > > > > >
> > > > > > Right now we are evaluating different technologies to be used for
> > > > > > WEB development at our company and struts2 is one of them (as we
> > are
> > > > > > currently using struts 1 for development). In fact, one of the
> > > > objectives
> > > > > > of
> > > > > > the our quest is to select a Java WEB framework that allows us to
> > > > easily
> > > > > > build Rich Internet Applications with lots of AJAX based widgets
> > and
> > > > AJAX
> > > > > > like functionality...
> > > > > >
> > > > > > Any pointers to publicly available struts2 based RIA applications
> > > will
> > > > be
> > > > > > welcome...
> > > > > >
> > > > > > Best,
> > > > > >
> > > > > > Ernesto
> > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > View this message in context:
> > > > >
> > > >
> > >
> >
> http://www.nabble.com/example-of-rich-internet-applications-%28RIAs%29-using-struts-2-tp25131617p25131900.html
> > > > > Sent from the Struts - User mailing list archive at Nabble.com.
> > > > >
> > > > >
> > > > >
> ---------------------------------------------------------------------
> > > > > To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
> > > > > For additional commands, e-mail: user-h...@struts.apache.org
> > > > >
> > > > >
> > > >
> > >
> >
>

Reply via email to