This week's book giveaway is in the Agile/Processes forum.
We're giving away four copies of Building Green Software: A Sustainable Approach to Software Development and Operations and have Anne Currie, Sarah Hsu , Sara Bergman on-line!
See this thread for details.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

Java Technology Guidance.

 
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Appologies in advance for possibly posting in the wrong forum, but if you read on you may understand why !

I have for the last 18 months been writing a J2SE (1.5) Java application that runs on a users desktop. It uses Swing & some AWT. I would like to extend the application so that some elements of it can be run from a wireless 802.11b device running Windows (versions vary). I have done some experimentation installing IBM's J9 JVM on a PDA and using RMI to connect to my development machine. I work's, but it was problematic to get the PDA configured with J9 and SWT and ideally I would like a solution that would be very easy to deploy.

So, I think I heading towards a web based application, but I have been totally blown away by the number and diversity of Java based J2EE technoligies out there, servlets, struts, velocity, jsp and so on. Frankly I don't have time to investigate all these possibilities so I am hoping that if I can highlight my requirements someone can prepare a shortlist.

1) Assume PDA has only basic IE funtionality (no JavaScript or applet support). So I guess I'm eliminating Ajax and the like in favour of a total server side solution.

2) I would like to utilise my existing business logic Java class library (.jar) which I've created for the desktop element of the application in the server side logic. I don't mind having to create some form of wrapper's around calls to my existing code, but I don't want two separate versions to maintain.

3) I would like to adopt a technology which is well known, well supported and has a good future (shelf life). I have a habit of learning stuff just as something better replaces it.

4) I would like to be able to develop and deploy using the latest Tomcat server software on my laptop.

5) The application would require user sessions to be persistent (sorry of this is the wrong terminology), so for example they can logon and have their username and password validated by using my existing class library, but have an instance of that class held in server memory so that when they perform a transaction I can use this information to check permissions etc.

I don't mind learning something new, but I would like to have some assistance picking the correct technology in advance.

Many thanks again,

Dave
 
Ranch Hand
Posts: 2308
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I think a simple web application infrastructure is sufficient for your need.You may consider learning Struts , servlets ,jsp.While writing view components you might see like what all html components are well supported by the mobile browser that you might use.
 
David Garratt
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

Are you saying that a simple solution would require Struts , servlets and JSP ?

Thanks

Dave
 
David Garratt
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Perhaps I should elaborate on my question. When you browse through Amazon's bookstore you can find books on each of these subjects, which implies that they are solutions in their own right. Do you know of any good resources (links or books) that would illustrate which bits (servlets, jsp, struts etc) do what. Which my limited knowledge I assume that the servlet is the business logic side of things, whilst struts and jsp are used to build the presentation (html) side of things. If so they does struts incorporate jsp ? If not they when do I use one rather than the other ?

Thanks

Dave
 
(instanceof Sidekick)
Posts: 8791
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Just as we often recommend people start Java with a text editor rather than jump into an IDE, I'd recommend starting Java web with naked servlets & JSPs rather than a framework like Struts. Ben Souther, one of the regulars here, has a nifty set of Simple Servlet Examples that start with about the least code you can possibly make run. Invest a day and see if those make sense to you. After you build a few simple pages you may bump into some of the problems Struts was meant to solve. Or not.

BTW: Persistent state to mimic what's held in memory in a Swing app can be hard to scale past a few users. Let's defer that conversation until you have played with servlet a bit.
 
David Garratt
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thats very helpful. Many thanks. I will start with servlets, however do you mean that the servlet approach may be wrong if I have too many users, or just that it might require a complicated design to get it right.

Thanks

Dave
 
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm with Stan: deep six behemoths like Struts. Straight Servlets and JSP 2.0 is all you will need.
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Additional thoughts:

You shouldn't need to wrap your business classes if you have already coded them in a UI-agnostic manner. If not, now would be a good time to refactor.

Be sure to follow established code patterns (this article might be helpful) and use a JSP 2.0 engine (Tomcat 5.5).
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by David Garratt:
however do you mean that the servlet approach may be wrong if I have too many users



No, he was talking about persistence. Servlets/JSP scales well to many users.


that it might require a complicated design to get it right.



The urge today seems to be to create over-complicated and over-engineered Rube Goldberg designs to solve simple problems. Hence the popularity of large frameworks.

I'd advise to keep things simple until or unless you have a good reason to go complicated. A simple front controller and native servlets and JSP is all that is needed for the vast majority of web apps.
 
David Garratt
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could I also ask you to consider jsf for my needs. I get the impression that it allows user interfaces to be built from a standard set of components, what would the advantages/disadvantages be for me with this ? Sorry if I'm drifting off topic but I would like to keep the same thread/topic running.

Dave
 
Bear Bibeault
Sheriff
Posts: 67753
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You won't get a JSF endorsement from me. I put it into the "more complex than it's worth" category.
 
David Garratt
Ranch Hand
Posts: 342
1
Mac Eclipse IDE Safari
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Enough said :-)

Thanks

Dave
 
reply
    Bookmark Topic Watch Topic
  • New Topic