Solved

Is Swing good choice for intranet UI?

Posted on 2004-08-10
18
584 Views
Last Modified: 2013-11-23
Dear Experts,

I am looking for advice re-designing a UI.

The company I work for created a “version 1.0” UI for our reporter product using only ASP’s, vbScript, HTML and a little javaScript. (There is no Visual Basic, or any other OOP component).  It runs exclusively on our customers’ intranets.

To me, the internal code looks very messy.  There is no structure.  We are considering re-writing it using mostly Swing, for these “OOP” reasons:

  Far less code.
  Far better organized code.
  Easier to maintain.
  Quicker to bring similar products to market.

I have worked a little with all these technologies, but I don’t know nearly enough to make the decision myself.  This is very important for my company.  This UI would form the basis of everything we do over the next few years.

These are the basic specifications:

  intranet-only
  less than 10 concurrent users (normally just one)
  fairly complex user input requiring:
      a dozen separate screens
      a few thousand input fields
      connection to server’s MS Access database (holds info about those fields)
      sophisticated responses to user input (shows report preview, based on user input, etc.)
  multiple complex calls to underlying middleware
  Java plug-in is probably not a problem


So, Experts!  

Do you think my assumptions about the advantages of Swing are basically correct?

Do you think Swing is a good, reasonably “industry-standard” solution under these circumstances?

Any advice will be greatly appreciated.

0
Comment
Question by:BrianMc1958
  • 5
  • 4
  • 4
  • +4
18 Comments
 
LVL 35

Expert Comment

by:girionis
Comment Utility
If you want to go with Java then Swing is indeed the standard. But before you delve into Swing you might want to take a look at the following links:

http://www.jgoodies.com/index.html
http://www.oop-reserch.com/xmlpanel_1_2_2.html
http://cloudgarden.com/jigloo/index.html (plugin for eclipse)
http://www.wsoftware.de/SpeedJG/

The are basically some libraries and API that can help you build GUIs faster :)
0
 

Author Comment

by:BrianMc1958
Comment Utility
Thanks, girionis.  We understand that Swing is the standard for Java.  We're just not sure if we should use Java/Swing, or something else.  As far as IDE, we're thinking JBuilder if we go with Swing.
0
 
LVL 35

Expert Comment

by:TimYates
Comment Utility
> multiple complex calls to underlying middleware

How?  Command line?

I think you will need a swing applet with some servlets to do the processing on the server...
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
Well I do not see any problems about using Swing. Besides the only other thing you could use is SWT which is native specific. Do you have anything else in your mind apart from Swing?
0
 
LVL 2

Expert Comment

by:leeprovoost
Comment Utility
i don't understand. the solutions now is a website (asp, vbscript, etc) running on your intranet and now you want to try swing for that? so you want to make a client/server application?

swing would be a good thing if you want to such a desktop application. perhaps also consider looking to the java web start technologie. which is some kind of a combination of the advantage of a webapplication (if something changes, you only have to update one place) with the power and richness of a desktop application.: http://java.sun.com/products/javawebstart/

grtz

lee
0
 

Author Comment

by:BrianMc1958
Comment Utility
To leeprovoost:  My basic idea would be Swing, running in an applet, available from a browser.  I know that Swing is more often associated with desktop applications.  I think our situation (complex UI, intranet, small number of users) falls somewhere between browser world and client-server/desktop world.  Given the complexity of our UI, and the small number of users, it seems like "rich" client would better serve our needs.  And a "rich" client seems to require a programming language more sophisticated than vbscript.

So the question I'm asking the experts is: Is it practical (and more or less normal) to put a sophisticated Swing application inside an applet, where a small number of intranet users would access it from Internet Explorer?  The applet would almost entirely replace the asp, vbscript, etc.    

To TimYates:  We're not sure how the applet would return the user input.  Servlet is likely.  It would be better if a servlet was not necessary, though.

To girionis:  Apart from Swing, we might just need to continue with what we have.  Again, I don't know much about user interfaces.  What we have looks very disorganized to me.  Maybe that is just the way ASP-based sites look.  

Thank you all for your comments.  We would love to hear more...
0
 
LVL 15

Expert Comment

by:Javatm
Comment Utility
Hello BrianMc1958;

I are using the correct choice =-) be sure to use Java and you will like it. In my company we use Applet, Servlet and JSP combinations for our interface.
Its actually the same as what your wanting to do. We use it in intranet w/ thousands of users, it handles multiple knowledgebases records and
solutions. Technically speaking its an industry standard Our expert system is done through java and we are now 5.2 so I dont think you will
have any problems to it. Just be sure you have all the neccessary tutorials.

http://java.sun.com/j2ee/1.4/docs/tutorial/doc/index.html

Regards : Javatm

 
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
> My basic idea would be Swing, running in an applet, available from a browser.

I'd suggest looking at using applications via web start instead of applets.
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
Well I believe Swing is the way to go then if you do not want to use HTML clients. We just finished a project where we used HTML instead of Swing and it was very complicated, the code looks ugly (since there is lots of JavaScript and DHTML there), complicated and it we had problems making it work in all browsers (which still does not work on all browsers). If we had gone with Swing from the beginning it would have saved us time and effort.

>So the question I'm asking the experts is: Is it practical (and more or less normal) to put a
>sophisticated Swing application inside an applet, where a small number of intranet users would
>access it from Internet Explorer?

I do not see why it is not practical. I am not an expert on Swing -I have only written a few Swing applications- but I had no problem writting them and making them available to the user. Besides Swing provides you with more or less everything you need in order to build a GUI. I have to admit though, at times it can get complicated.
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
LVL 92

Expert Comment

by:objects
Comment Utility
If you'd like to see an example of applets used in a web based application you could have a look at:

http://www.evalu8.com.au
0
 
LVL 7

Expert Comment

by:grim_toaster
Comment Utility
What is the skillset in the company?  Are there at least a couple of Java programmers who are familiar with Swing, etc?  If not then perhaps choosing a technology that has experienced developers would be the better option,

--> Java plug-in is probably not a problem
I think that would be very important to verify that you can get the latest JVM installed on the client machines, and ensure that it won't conflict with any other software/sites that they use.  This would limit you considerations.

Also, as the current implementation uses vbScript, am I correct in assuming that all of your clients machines will only be using IE?  Can you get a minimum version across all clients?

It sounds to me (although I don't know the full details) that all you require is a simple website, written in JSP/servlets, or your current implementation of ASP.  Your reasoning to change the underlying technology (for OOP reasons) seems a bit strange.  I couldn't comment on the ASP code, but if it looks messy (are you an ASP programmer?) then perhaps that particular implementation was not done correctly?

As for the far less code, I would say that the amount of code would probably be considerably more if written in Swing as opposed to simple HTML pages with dynamic content (ASP/JSP), especially as you have a few thousand input fields (this will take quite a long to develop as well).
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
Installing the vm in an intranet environement shouldn't be a big drama.
0
 

Author Comment

by:BrianMc1958
Comment Utility
To Objects (and LeeProvoost):  Thanks. I am looking into Java Web Start.  Our UI will need to call our middleware on the originating server (which then calls legacy apps...), so that conncection would need to be available with Web Start.  Do you folks know if that works?


To giroinis:  Thanks for the warning about Swing complexity.  We don't want to be naive about that.


To grim_toaster:  Hmmm. Why do they call you that?  I'm particularly interested in your response, as you're challenging everything.  Our customers all use IE.  Noted your point about plug-in issues. Otherwise:

-->What is the skillset in the company?  
  We don't have much Swing experience yet.  I have written one SMALL Swing app.  However, we are considering Swing as the main component for our company's future UI strategy.

-->It sounds to me (although I don't know the full details) that all you require is a simple website, written in JSP/servlets, or your current implementation of ASP.  Your reasoning to change the underlying technology (for OOP reasons) seems a bit strange.

   I DO want to be told if what I'm proposing is strange.  I'm proposing it because I have worked on the original UI, adding thousands of lines of vbScript.  In the course of doing that, I discovered things like:

    the site consists of about a hundred ASP's (not including images, etc.)
    everything hangs together using INCLUDEs (it's basically all one huge program)
    vbScript has no data typing
   
  I want to apply OOP to the situation because this is NOT a simple web site.  It's really a full-blown application, that just happens to eventually communicate the user'sinput to some middleware.  It has thousands of line of complex internal logic that don't directly relate to the interface itself.

--> I couldn't comment on the ASP code, but if it looks messy (are you an ASP programmer?) then perhaps that particular implementation was not done correctly?

  I am NOT an ASP programmer.  I had been assuming ASP programming was just inherently messy. Would it be less messy if it had a strong Visual Basic (not vbScript) component?  I've been told Visual Basic is OOP.  Is that what would normally provide structure here?

Thank you especially, Mr grim, for providing the grim perspective.  I would especially like to hear more from you.


To everyone:  This is my first EE post.  If I am not using this forum appropriately, please let me know.  (Is it OK to have such an open-ended discussion?)



0
 

Author Comment

by:BrianMc1958
Comment Utility
Addendum for grim_toaster:

-->As for the far less code, I would say that the amount of code would probably be considerably more if written in Swing as opposed to simple HTML pages with dynamic content (ASP/JSP), especially as you have a few thousand input fields (this will take quite a long to develop as well).

We have maybe 200 unique fields.  We have a few thousand displayed in tables, that the user could select to print, etc.  If the total amount of code in Swing would be more than in HTML, that defeats the whole purpose.  Could you say a little more on that, too?

Thanks.
0
 
LVL 92

Expert Comment

by:objects
Comment Utility
> Do you folks know if that works?

Yes your application could make connections to server.
0
 
LVL 7

Accepted Solution

by:
grim_toaster earned 250 total points
Comment Utility
--> To grim_toaster:  Hmmm. Why do they call you that?
Have you ever tried to come up with a name that you can remember for all these web-sites (i.e. hotmail, ee) that didn't have hundreds of obscure numbers at the end (1958)?

--> We don't have much Swing experience yet.
If this is to be a critical part of your business (and its future) then I would suggest getting a couple of experienced Swing developers (and architects) to at least kick start the process, the initial expense will pay off in the long run - of course, only if you go with the Swing route.

--> I want to apply OOP to the situation because this is NOT a simple web site.
What sort of processing are you expecting to be doing on this thick-client?  Complex calculations/validation checks?  When you say not a simple web site, would you imply that amazon was a simple web site?

--> the site consists of about a hundred ASP's (not including images, etc.)
I'm currently working on for a project that consists of about 1500 java classes just for the swing side of things (there's even more for the midtier and thinclients!).  If 100 ASP pages are required, then it's not necessarily a bad thing.  However, I'm assuming the use of the ASP includes is to reduce the amount of duplicate code (a good practice), so I would expect there to be significant differences between each page?

--> vbScript has no data typing
Although data typing is a good thing, this would boil down to how you are using the data.  Does the client really need to know the difference between an int and a long (for example).  Or should the client only care about receiving user data, passing it off to be processed by the midtier (and the legacy apps), and passed back to the client for display?  But again, this is dependant on the type of processing you require to do on the client side.

--> However, we are considering Swing as the main component for our company's future UI strategy.
Have you considered an MVC structure?  Whereby your presentation logic is seperate from your processing logic.  If you follow that approach it would be (relatively) simple to use the same processing logic, but have different UI's

--> If the total amount of code in Swing would be more than in HTML, that defeats the whole purpose.  Could you say a little more on that, too?
It's also to do with the complexity of what goes on behind the scenes, in a Swing app you need to create a JVM, be wary about object creations, etc, and a very simple bit of code to print out a table of text would look like:

public class TestApplet extends javax.swing.JApplet {
    public TestApplet() {
        Object[][] tableData = new Object[][] {
                { "Row 1", "Some value" },
                { "Row 2", "Some value" } };

        javax.swing.JTable jt = new javax.swing.JTable(tableData, new Object[] { "Label", "Data" });
        this.getContentPane().add(jt);
    }
}

Whereas, an html version (I don't know how ee will display this), I find considerably more readable, and fewer lines, plus if you wanted to include things such as textfields, the java implementation would require custom renderers/editors, whereas the html version would be as simple as <input type="text"....

<html>
    <body>
        <table border="1">
            <tr><th>Label</th><th>Data</th></tr>
            <tr><td>Row 1</td><td>Some value</td></tr>
            <tr><td>Row 2</td><td>Some value</td></tr>
    </body>
</html>

Obviously, ignore the formatting of both, as I'm trying not to just have a huge post, but you get the idea.  The other thing you will have to worry about is the formatting of the swing layouts - most of the time is spent "tweaking" irritating formatting issues than doing the actual code, whereas with HTML/ASP/JSP you can at least use many of the decent HTML authoring tools (there are some for swing, but I've not managed to find one that's usable on a large scale project).


As another question though, how is the back-end (i.e. the server) currently developed?  Are you planning to re-write that?  And how are you accessing the legacy apps?
0
 

Author Comment

by:BrianMc1958
Comment Utility
Thank you everyone, especially Mr. Toaster, for your help.  I'm afraid I can't pursue this further right now, although I hope to do so later.
0
 
LVL 35

Expert Comment

by:girionis
Comment Utility
:)
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
parentbit challenge 3 51
Free Alternative to JIRA 4 53
Java and GPO 11 46
Java Timer (static) 9 10
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now