Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
PureMVC
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  12 messages - Expand all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
marcelo melo  
View profile  
 More options Oct 23 2008, 7:48 am
From: "marcelo melo" <marcelotm...@gmail.com>
Date: Thu, 23 Oct 2008 09:48:48 -0200
Local: Thurs, Oct 23 2008 7:48 am
Subject: PureMVC
Hi, is anyone using PureMVC for Java / GWT?

Thanks


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Flemming Boller  
View profile  
 More options Oct 23 2008, 7:53 am
From: "Flemming Boller" <flemming.bol...@gmail.com>
Date: Thu, 23 Oct 2008 13:53:57 +0200
Local: Thurs, Oct 23 2008 7:53 am
Subject: Re: PureMVC

Yes I am.  I think is it rather nice little MVC implementation, which has
made it more easy for us to make
components talk to each other in a loosely coupled way.

Minus is however, that it easy also to create a spider web of notifications
that is hard to overview.

But common sense and "keep it simple" should be used here :-)

/Flemming

On Thu, Oct 23, 2008 at 1:48 PM, marcelo melo <marcelotm...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo melo  
View profile  
 More options Oct 23 2008, 8:11 am
From: "marcelo melo" <marcelotm...@gmail.com>
Date: Thu, 23 Oct 2008 10:11:31 -0200
Local: Thurs, Oct 23 2008 8:11 am
Subject: Re: PureMVC
Totally agree with you... Simplicity is key most of the times (at
least it should :) ).

I have one question that is really annoying me. Having used it
(puremv) with Flex, it is easy to fire an event at the View and
associate it with a method at the Mediator. But, how to deal with it
on GWT? I am adding the Mediator as the event listener of the View (by
making it implement the relevant View listeners - ClickListener,
etc.), but I'm not quite sure if it's the best way to do it...

Any ideas?

Thanks!

On Thu, Oct 23, 2008 at 9:53 AM, Flemming Boller


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Flemming Boller  
View profile  
 More options Oct 23 2008, 11:06 am
From: "Flemming Boller" <flemming.bol...@gmail.com>
Date: Thu, 23 Oct 2008 17:06:31 +0200
Local: Thurs, Oct 23 2008 11:06 am
Subject: Re: PureMVC

Hi
We have done it like the mediator has a reference to the view (which
implements a gwt- neutral interface).

The View has a "hard reference" the mediator.

We want the mediator to be "unaware" of GWT because that means we are able
to perform many junit tests of the "gui"
without using the GETTestCase....which is a "no-go" Testcase :-)

Please let me hear how you progress and the experiences you have with
puremvc....

/FLeming

On Thu, Oct 23, 2008 at 2:11 PM, marcelo melo <marcelotm...@gmail.com>wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
yunhui song  
View profile  
 More options Oct 23 2008, 1:09 pm
From: "yunhui song" <songyunhui2...@gmail.com>
Date: Thu, 23 Oct 2008 10:09:22 -0700
Local: Thurs, Oct 23 2008 1:09 pm
Subject: Re: PureMVC

Hi

   I have used Guice and Gin to implements MVC framework(like backend spring
framework). By this way view(ui), event Listener and data
access(xmlHttpReqeust wrapped by REST-GWT) can be seperated by three layers.

   Gin module used to initialize and couple all the instance used in the GWT
module. It's a typicall Ioc container. I found it is rocking by this way in
my project.

Sammi

On Thu, Oct 23, 2008 at 8:06 AM, Flemming Boller
<flemming.bol...@gmail.com>wrote:

--
Best Regards,
Sammi

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Ed  
View profile  
 More options Oct 24 2008, 4:35 am
From: Ed <post2edb...@hotmail.com>
Date: Fri, 24 Oct 2008 01:35:29 -0700 (PDT)
Local: Fri, Oct 24 2008 4:35 am
Subject: Re: PureMVC
Have a look at mygwt (call gxt now). They use a nice MVC
implementation.

-- Ed

On Oct 23, 7:09 pm, "yunhui song" <songyunhui2...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Matthieu  
View profile  
 More options Oct 24 2008, 4:46 am
From: Matthieu <Matthieu.ma...@gmail.com>
Date: Fri, 24 Oct 2008 01:46:19 -0700 (PDT)
Local: Fri, Oct 24 2008 4:46 am
Subject: Re: PureMVC
Hi,

>>>Flemming Boller

 We used Gwt only component too.
Our mediator give this components a  'Gwt ClickListener' wich send
Pure Notification.

Matthieu.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Broyer  
View profile  
 More options Oct 24 2008, 6:39 am
From: Thomas Broyer <t.bro...@gmail.com>
Date: Fri, 24 Oct 2008 03:39:40 -0700 (PDT)
Local: Fri, Oct 24 2008 6:39 am
Subject: Re: PureMVC

On 23 oct, 19:09, "yunhui song" <songyunhui2...@gmail.com> wrote:

> Hi

>    I have used Guice and Gin to implements MVC framework(like backend spring
> framework). By this way view(ui), event Listener and data
> access(xmlHttpReqeust wrapped by REST-GWT) can be seperated by three layers.

>    Gin module used to initialize and couple all the instance used in the GWT
> module. It's a typicall Ioc container. I found it is rocking by this way in
> my project.

I'm curious how you're binding event listeners using Gin.
Would you mind sharing some code?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo melo  
View profile  
 More options Oct 24 2008, 6:57 am
From: "marcelo melo" <marcelotm...@gmail.com>
Date: Fri, 24 Oct 2008 08:57:48 -0200
Local: Fri, Oct 24 2008 6:57 am
Subject: Re: PureMVC
Ok, that sounds like a good idea, especially concerning unit testing.
I was avoiding to couple the View with the Mediator, but now your
advice makes sense to mee.

Thanks!

On Thu, Oct 23, 2008 at 1:06 PM, Flemming Boller


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
yunhui song  
View profile  
 More options Oct 26 2008, 7:09 pm
From: "yunhui song" <songyunhui2...@gmail.com>
Date: Sun, 26 Oct 2008 16:09:49 -0700
Local: Sun, Oct 26 2008 7:09 pm
Subject: Re: PureMVC

Hi,

  Actually, Gin is used to implements Ioc Container. It can bind everything
not only event Listener.

  Guice or Spring can do that naturally, but because GWT can not support
Java reflection, such as forClass("className").getInstance. So Gin use
generic and annotation to do that.

  I have a open source project to do that.  GinModule and GindInjector are
key players for that.
  please check out here, that's a real world project.
    http://openorg.googlecode.com/svn/trunk/magpie

Enjoys,
Sammi

--
Sammi
http://code.google.com/p/openorg

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Thomas Broyer  
View profile  
 More options Oct 26 2008, 9:50 pm
From: Thomas Broyer <t.bro...@gmail.com>
Date: Sun, 26 Oct 2008 18:50:07 -0700 (PDT)
Local: Sun, Oct 26 2008 9:50 pm
Subject: Re: PureMVC

On 27 oct, 00:09, "yunhui song" <songyunhui2...@gmail.com> wrote:

> Hi,

>   Actually, Gin is used to implements Ioc Container. It can bind everything
> not only event Listener.

>   Guice or Spring can do that naturally, but because GWT can not support
> Java reflection, such as forClass("className").getInstance. So Gin use
> generic and annotation to do that.

Sorry, I should have been clearer: I know what Guice (and Gin) and
Spring are. Just that they cannot AFAIK inject listeners (i.e. call
some addXListener method, eventually several times on a single
instance). Of course you can use method injection with a
setXListeners(List<XListener>) method (should be supported by Gin as
of today) but I wouldn't call it "injecting event listeners"; or
inject event sources or event targets but that's not flexible at all
(why having "event listeners" in this case, just keep references to
the injected widgets and call the appropriate methods on them)

>   I have a open source project to do that.  GinModule and GindInjector are
> key players for that.
>   please check out here, that's a real world project.
>    http://openorg.googlecode.com/svn/trunk/magpie

I've seen some widgets be injected other widgets but not a single
event listener (or I missed something).

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
yunhui song  
View profile  
 More options Oct 26 2008, 11:26 pm
From: "yunhui song" <songyunhui2...@gmail.com>
Date: Sun, 26 Oct 2008 20:26:48 -0700
Local: Sun, Oct 26 2008 11:26 pm
Subject: Re: PureMVC

Hi Thomas,

>     I've seen some widgets be injected other widgets but not a single

event listener (or I missed something).

It's true that for my project I only injected some widgets on a main panel.
 That's the project specific choice. Because it's more easy to do that.

I'am not very clear your use case now. Let me have a guess for the use case:

1. We have two widgets w1 and w2, both of them would fire Event clickEvent.

2. We need one Event Listener named CommonEventListener, we expect it can be
used to process clickEvent fired from both w1 and w2.

3. We hope the container, that is Gin to inject when system initialize. So
refractor the code like.
    W1 w1 = new W1();
    w1.addClickEventListener(new CommonEventListener(p1,p2){});

    W2 w2 = new W2();
    w2.addClickEventListener(new CommonEventListener(p1,p2){});
by:

  CommonEventListener aCommonEventListener =
injector.getCommonEventListener();
  W1 w1 = injector.getW1();
  w1.addClickEventListener(aCommonEventListener);
  W2 w2 = injector.getW2();
  w2.addClickEventListener(aCommonEventListener);

Because polymorphism is not usable in GWT, we can not use W1 or W2's common
interface or base class as CommonEventListener. My suggestion is:

private W1 w1;
private W2 w2;
@inject
public CommonEventListener(W1 w1,W2 w2){
   //w1 and w2 should be created by ginmodule as singleton instance.
   this.w1 = w1;
   this.w2 = w2;

}

public void onClick(Event e){
   if(e.getSource() == w1){
      //w1.update();
   }else if(e.getSource() == w2){
      //w2.update();
   }

}

I don't think it's an perfect solution(you must change the parameter, as you
said, use List<T> is same like ). But it should be able to manage the
listener and ui creation by container and unit test could be implemented
easily.

Hope that is not confusing.

Sammi

--
Sammi
http://code.google.com/p/openorg

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »