You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by " (¯`·.k ! k !.·´¯)" <g_...@yahoo.com> on 2008/06/15 07:03:55 UTC

How can i user Swing as "V" in the Struts MVC

Hi .. i m going to build a struts based application but i dont want to use JSP's&nbsp; instead of JSP's i want to use Swing GUI .. how can i communicate Swing GUI with struts app and how i will get the response back .. e.g. search results ........

waiting for reply ....


Re: How can i user Swing as "V" in the Struts MVC

Posted by Frans Thamura <fr...@meruvian.org>.
i designed my cimande project (http://www.blueoxygen.org)

and this is several idea



i wish there is a desktop version for Struts2, so my Cimande DX can be one
kernel

but we are using JSON now to work with S2, and the problem with JSON RPC, i
still cannot solve it


take a look of the idea

hope anyone have a smiliar project like us here

http://flickr.com/photos/fthamura/2509950211/
http://flickr.com/photos/fthamura/2344519319/


Frans

Re: How can i user Swing as "V" in the Struts MVC

Posted by Angelo zerr <an...@gmail.com>.
Hi

the topic is very interesting.

For me the View can be :

* HTML description of the view where the browser interpret HTML to displauy
UI.
* XML content, JSON content...and with Ajax we can update the UI or do
another thing.

I have read the tutorial http://javaboutique.internet.com/tutorials/Swing/
and I understnd that View is used as data and not to generate Swing UI.

So my question is what do yout manage :

1. The server returns HTML content and Swing interface is generated?
2. The server some content (XML, JSON....) and you use this content to
populate UI but the Swing UI is built at hand?

If you are interested with first point, perhaps you should be interested
with my TK-UI project <http://tk-ui.sourceforge.net/> where you can describe
you UI with XHTML and XUL (or anther XML markup) and render it into Swing
and SWT.

My project is not finished but I start to manage XHTML basic description
like XHTML element like input, XHTML Table, XUL widgets (textboxn
listbox...)

If you are interseted don't hesitate to contact me, we could think about
Swing (or SWT) View with Struts2.

Regards Angelo

2008/6/16 Frans Thamura <fr...@meruvian.org>:

> there is a project called pendulum, using swing as V, but the project never
> grow up
>
> i think that will be cool if struts2 have a View in Swing
>
> F
>

Re: How can i user Swing as "V" in the Struts MVC

Posted by Frans Thamura <fr...@meruvian.org>.
there is a project called pendulum, using swing as V, but the project never
grow up

i think that will be cool if struts2 have a View in Swing

F

Re: How can i user Swing as "V" in the Struts MVC

Posted by Felipe Lorenz <fe...@gmail.com>.
yes, you can... but you'll need a HTTPClient from apache.. or do your http
connection by yourself. And determine de communication, cause normally, the
response from Struts is a JSP file.. or html..., otherwise, you can change
the response to XML.. almost a WebServices.. EHHEHEHE

Do a simple teste... but I belive that's possible...

On 6/16/08, Dimitris Mouchritsas <di...@eurodyn.com> wrote:
>
> Ehteshamul Haque wrote:
>
>> I dont know whether is it possible or not. But the question is interesting
>> to me. If possible, please someone answer.
>>
>> ----------------
>> Ehteshamul Haque
>>
>>
>> 'A great man is not the one who never falls, but the  one who rises every
>> time he falls'
>>
>> --- On Sat, 6/14/08, (¯`·.k ! k !.·´¯) <g_...@yahoo.com> wrote:
>> From: (¯`·.k ! k !.·´¯) <g_...@yahoo.com>
>> Subject: How can i user Swing as "V" in the Struts MVC
>> To: "apache struts" <us...@struts.apache.org>
>> Date: Saturday, June 14, 2008, 10:03 PM
>>
>> Hi .. i m going to build a struts based application but i dont want to use
>> JSP's&nbsp; instead of JSP's i want to use Swing GUI .. how can i
>> communicate Swing GUI with struts app and how i will get the response back
>> ..
>> e.g. search results ........
>>
>> waiting for reply ....
>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>>
> Well, I suppose you could use javascript-applet communication, but it seems
> a bit far fetched. I don't
> think your architecture is correct here. Swing guis are supposed to talk to
> the business layer, not to
> the controller layer.
>
> Regards
> Dimitris
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

Re: How can i user Swing as "V" in the Struts MVC

Posted by Dimitris Mouchritsas <di...@eurodyn.com>.
Ehteshamul Haque wrote:
> I dont know whether is it possible or not. But the question is interesting to me. If possible, please someone answer.
>
> ----------------
> Ehteshamul Haque
>
>
> 'A great man is not the one who never falls, but the  one who rises every time he falls' 
>
>
> --- On Sat, 6/14/08, (¯`·.k ! k !.·´¯) <g_...@yahoo.com> wrote:
> From: (¯`·.k ! k !.·´¯) <g_...@yahoo.com>
> Subject: How can i user Swing as "V" in the Struts MVC
> To: "apache struts" <us...@struts.apache.org>
> Date: Saturday, June 14, 2008, 10:03 PM
>
> Hi .. i m going to build a struts based application but i dont want to use
> JSP's&nbsp; instead of JSP's i want to use Swing GUI .. how can i
> communicate Swing GUI with struts app and how i will get the response back ..
> e.g. search results ........
>
> waiting for reply ....
>
>
>       
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>   
Well, I suppose you could use javascript-applet communication, but it 
seems a bit far fetched. I don't
think your architecture is correct here. Swing guis are supposed to talk 
to the business layer, not to
the controller layer.

Regards
Dimitris

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How can i user Swing as "V" in the Struts MVC

Posted by Ehteshamul Haque <eh...@yahoo.com>.
I dont know whether is it possible or not. But the question is interesting to me. If possible, please someone answer.

----------------
Ehteshamul Haque


'A great man is not the one who never falls, but the  one who rises every time he falls' 


--- On Sat, 6/14/08, (¯`·.k ! k !.·´¯) <g_...@yahoo.com> wrote:
From: (¯`·.k ! k !.·´¯) <g_...@yahoo.com>
Subject: How can i user Swing as "V" in the Struts MVC
To: "apache struts" <us...@struts.apache.org>
Date: Saturday, June 14, 2008, 10:03 PM

Hi .. i m going to build a struts based application but i dont want to use
JSP's&nbsp; instead of JSP's i want to use Swing GUI .. how can i
communicate Swing GUI with struts app and how i will get the response back ..
e.g. search results ........

waiting for reply ....


      

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Re: How can i user Swing as "V" in the Struts MVC

Posted by Dave Newton <ne...@yahoo.com>.
--- On Sun, 6/15/08, (¯`·.k ! k !.·´¯) <g_...@yahoo.com> wrote:
> Hi .. i m going to build a struts based application but i
> dont want to use JSP's&nbsp; instead of JSP's i
> want to use Swing GUI .. how can i communicate Swing GUI
> with struts app and how i will get the response back ..
> e.g. search results ........

http://javaboutique.internet.com/tutorials/Swing/

That's a pretty old article, IIRC, but the ideas may still be useful.

These days I'd just use Swing to consume services and send back JSON, YAML, or XML.

Dave


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org