Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / May 2007

Tip: Looking for answers? Try searching our database.

Choosing standalone tech: SWT / Swing ??

Thread view: 
mcorleone@gmail.com - 12 May 2007 15:32 GMT
Hello,

I need to write a desktop application, i don't need to make it
accessible from web (so Struts, Struts 2.0 and webwork are not in the
table).

I was wondering, what's the industrial standard for J2EE stand alone
applications ??. SWT, Swing ???.

Of course, hibernate will be handling ORM. And the last thing is....
what do you use to handle invoice printing ??? JasperReports ??.

Thank you very much,
Regards!
Arne Vajhøj - 12 May 2007 15:58 GMT
> I need to write a desktop application, i don't need to make it
> accessible from web (so Struts, Struts 2.0 and webwork are not in the
[quoted text clipped - 5 lines]
> Of course, hibernate will be handling ORM. And the last thing is....
> what do you use to handle invoice printing ??? JasperReports ??.

SWT and Swing are not part of J2EE. I do not think a desktop
standalone application can be J2EE.

Whether to choose SWT or Swing, then pick whatever you like
the most.

Be aware that SWT is not available for all platforms. But most
likely it is available for the platform for a desktop app.

No ideas about the reporting.

Arne
Andrew Thompson - 12 May 2007 15:59 GMT
...
>...desktop application...
...
>I was wondering, what's the industrial standard for J2EE stand alone
>applications ??. SWT, Swing ???.

I am not sure what 'industrial standard' (I'd be looking
to 12.7mil rebar, myself) nor the industry standards are.

OTOH - I can tell you that in terms of employment
opportunities, as well as the numbers of people around
these parts* that have experience in the toolkit, I'd
say Swing outnumbers SWT by a factor of at least
10 to 1 (probably closer to 20 to 1).

* Here and, more particular to this part, comp.lang.java.gui

Note also that one '?' is always enough to signify
a question.

Signature

Andrew Thompson
http://www.athompson.info/andrew/

mcorleone@gmail.com - 12 May 2007 16:21 GMT
Swing then, it won't be J2EE, and i'll use just one '?' in the future.

Thank you both for your time,
Regards

> mcorle...@gmail.com wrote:
>
[quoted text clipped - 23 lines]
>
> Message posted viahttp://www.javakb.com
mcorleone@gmail.com - 12 May 2007 16:52 GMT
By the way... if i wanted to make it J2EE compliant, how should it
be ?. Anybody knows a good tutorial ?.

My guess is, please correct me if i'm wrong, Swing in the front end
(presentation tier), and Tomcat running logic tier (implemented by me)
and business tier (hibernate).

The big question is... how do you 'glue' Swing and the logic'n
business tiers?

Thanks!!!

On 12 mayo, 12:21, mcorle...@gmail.com wrote:
> Swing then, it won't be J2EE, and i'll use just one '?' in the future.
>
[quoted text clipped - 30 lines]
>
> - Mostrar texto de la cita -
Andrew Thompson - 12 May 2007 17:33 GMT
>By the way... if i wanted to make it J2EE compliant, ...

Please refrain from top-posting, I find it most confusing.
<http://www.physci.org/codes/javafaq.html#toppost>

J2EE is Sun's name for stuff that generally occurs on the
server.  A web site generated by Java would use J2EE.

J2SE is Sun's name for 'core and desktop' API's, the
GUI parts include AWT (uses native components) and
Swing (has richer toolset).  SWT is another GUI toolkit
(obviously).

A J2EE powered server might put output to a browser,
as HTML, or HTML improved with Javascript, or to an
(AWT) Applet, or a (Swing) JApplet, or an AWT or
Swing based application, or the web started versions
of the same.  I am not sure about SWT (shrugs).

A J2SE based GUI to would usually be refered to as a
rich client, and the HTML equivalent, a 'thin client' (as
opposed to a 'poor client' ;).

J2EE is important to understand, but before you attempt
it, you should have a good understanding of (at least) the
non-GUI parts of the J2SE, because in J2EE programming,
you often find yourself importing J2SE classes!

>..how should it be ?

>... Anybody knows a good tutorial ?.

For the J2SE, I recommend Sun's own 'Java Tutorial'.
It be downloaded or browsed on-line.
<http://java.sun.com/docs/books/tutorial/>

>My guess is, please correct me if i'm wrong, Swing in the front end
>(presentation tier), and Tomcat running logic tier (implemented by me)
>and business tier (hibernate).
>
>The big question is... how do you 'glue' Swing and the logic'n
>business tiers?

..hmm.  Just checking, but you do realise that you
can do all of 'purely desktop' applications *without*
a server at all, right?  What is the application?

If you need a server, what do you actually need it for?
What information for the application changes?
Does the app. offer the viewing/editing of information
held in a central location?

Signature

Andrew Thompson
http://www.athompson.info/andrew/

Lew - 12 May 2007 18:43 GMT
mcorleone@gmail.com wrote:
>> My guess is, please correct me if i'm wrong, Swing in the front end
>> (presentation tier), and Tomcat running logic tier (implemented by me)
>> and business tier (hibernate).

No.  Swing is not for JEE apps, generally.  (Nor is SWT; they serve the same
architectural niche.)

As Andrew said, you might invoke an applet that uses Swing, but that has
nothing to do with JEE either.

Swing (SWT) => desktop or applet.
Not JEE.

JEE uses servlets, HTML and JSP for the front end.  (Use JSP, not "raw"
servlets.)  There can be client-side scripting there, too.

Not Swing.

Signature

Lew

mcorleone@gmail.com - 12 May 2007 21:06 GMT
> Please refrain from top-posting, I find it most confusing.
> <http://www.physci.org/codes/javafaq.html#toppost>

Thanks for the tip Andrew

> .hmm.  Just checking, but you do realise that you
> can do all of 'purely desktop' applications *without*
> a server at all, right?  What is the application?

Now i get it, i hadn't understood clearly the difference between J2EE
and J2SE. The application has to generate invoices, and control stock.

> If you need a server, what do you actually need it for?
> What information for the application changes?
> Does the app. offer the viewing/editing of information
> held in a central location?

Yes, it allows viewing / editing, and right now, only in a central
location. But i was just trying to find a better way of designing the
whole thing. Suppose that i get a request (in six months) to allow
more than one instance, in different machines. A central server,
working with SOAP, providing persistance functions, and a client
written in swing, sounds nice.

I've got experience working with Webwork (similar to Struts) and
Hibernate -which is, as far as i understand now, J2EE-. But i got
requested to make this development standalone, non-web, and that's the
reason behind Swing.

Also, it also seems easy to implement the invoice-printing code. I
have no idea how to work around that in a web development. Exporting a
report as PDF and printing it from acrobat looks awful.

Thank you again,
Regards!!
Lew - 13 May 2007 17:20 GMT
> Also, it also seems easy to implement the invoice-printing code. I
> have no idea how to work around that in a web development. Exporting a
> report as PDF and printing it from acrobat [sic] looks awful.

Actually, it's a very clean and easy solution, although Acrobat is not
required.  It works for both desktop and web apps.

Signature

Lew



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.