Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

Java Server/Client Help

Options
  • 01-03-2006 2:15pm
    #1
    Registered Users Posts: 8,267 ✭✭✭


    To build a client/server news application service. Simply put, the news service application should be able to publish news articles that are downloaded to the client viewer so that the user can read them. These news articles should have at least one image and should have different types, e.g. current affairs, sports, entertainment.

    Problem Detail
    The news client/server application should have all the functionality that you deem necessary for such a service. However, it should consist of the following minimum functionality:

    Client Application - It should have a client news application. This client should be capable of receiving news articles from the news server and displaying them in a way that is convenient for the user. It should:

    Should be able to submit requests for news articles of different types.

    Have a Graphical User Interface (GUI) that makes it easy for user to view news articles and submit requests.

    Should be able to display the news article and associated images.


    Server Application - There should be a server application that can be used to publish news articles and to make them available to clients on request. It should:

    Have a suitable GUI to allow an "editor" to add a news article and associate at least one image and further descriptive detail

    Collect and display usage details and statistics.

    Be capable of handling many client requests at the same time

    Be capable of shutting down in a graceful manner.


    Ok Guys i have missed a few weeks previous to this in college and am under real pressure.

    Just looking for some help on were i should start with this. Like what would you start with first ....... generally just were you would start and go about this cause i am a bit lost.

    Like should i start with GUI interfaces first or try and understand how the server client works first.

    Any help appreciated please ?


Comments

  • Registered Users Posts: 8,267 ✭✭✭opr


    Sorry just a little bit more on my thought on the gui applications.

    Would you have one of them thats stores the info from lets say a text file so that the text file can be updated.

    The other GUI with have a a set of buttons that when pressed called this certain info.

    Sorry if i am not making much sense. Have only been really look at it since yesterday.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    I would go with a http server and then have your GUI just write files to the area of the servers public area.

    Then have the client request the information via http. Maybe have headers to verify it is the client (that would require a cgi script though).

    Making a URL connection is very simple in Java. You could probably find info on jguru.


  • Registered Users Posts: 8,267 ✭✭✭opr


    Sorry should have also said its all has to be done using Java.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Well you can create a network server in java. Probably best to break it up into 3 seperate applications.

    1 - Client.
    2 - File server.
    3 - Server client.


  • Registered Users Posts: 8,267 ✭✭✭opr


    Yeah thats the more or less the way i am approaching it.

    I have gone through some simple examples today of getting a date and time and send it from the server to the client in a Java env.

    My problems is now were do i start with the GUI interface for the server. Should i store the info in text file or should this be embedded into the java code. How can i update the info ?


  • Advertisement
  • Registered Users Posts: 919 ✭✭✭timeout


    You should keep an eye on the fact you might need to display an image with the article. This is actually quite minor if the program itself does not work. So get it doing the client server part(the hardest and most marks alocated part) first with a basic text file.

    Then when looking at the image part maybe a text file could contain the location on the server of the image and its name while your GUI should perhaps have a seperate area for the image to be displayed above the text.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Now that I think of it. Why not an application server? J2EE is java?


  • Registered Users Posts: 8,267 ✭✭✭opr


    Hobbes wrote:
    Now that I think of it. Why not an application server? J2EE is java?

    From the way lecturer is talking in class i think the way you first suggected is the way he wants it. Seems to be how most of the class are approaching it with the Client,File server and Server client.

    So i am gonna give this a go.

    Heads melted looking at examples so goona give it a break and started fresh tommorow :)

    Thanks for the help so far.


  • Registered Users Posts: 8,267 ✭✭✭opr


    Ok after todays work i am a bit further on.

    I now have a program with a Server , Client , connection handler and lets say a News file.

    The client requests the news file from the server and server will send back
    what is in the news file. This is just text that is embedded in the Java code.

    I have the GUI up and running for the client its very basic just a text area and a get news button which is working.

    Not really sure were to go from here have i gone down the wrong road. As i now need a GUI that stores the stuff on the server and can also be updated but not sure how i can go about this.

    I was thinking maybe if i sent a text file instead of the text in the java code but how would i do this ?

    Or any other suggestions ?


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    Just a quick question. Did you plan everything out on paper before shooting ahead and writing the application?


  • Advertisement
Advertisement