I am making a small chat application(Just for grasping java Networking concepts into action)
I am using folowing components
Java Swing for front end GUI.
JDBC with Oracle to store user database their name password etc.
and I am making this application to run on my localhost and maximum 50 users can communicate with each other and can register on server
I am not making this application as web app but a simple Ip based communication.
So do i need any other technology to complete this project
Start by working through the networking section of the Oracle Java Tutorial, particularly "All about sockets". It contains a pair of client/server programs that you can play with to learn the basics.
Here is a little synoposis of my project and based on that what I think I will use technology
In that User will register them self with server.
user can search currently connected user and registered user.
user can chat with each other.
server can broadcast msg to all user when any user is connect or disconnect.
If a register user is login then it will show welcome msg
and many more
I am using for front end I will use Java Swing and AWT
for database I am using Oracle database
and core java prigramming concepts.
Will there be any better suggestion for technology that I write here?\
Can you be more specific about what you're asking? So far, everything you've mentioned can be done with the classes that come with the JDK. It even comes with a DB (JavaDB, I think it's called), so you don't even need a separate DB. Is that what you're asking?
ok let me put my idea if you have a better suggestion for design and perfomance let me know
For front end GUI design :JAVA FX
For Database related operation:Oracle DB
For Networking related operation:java.net api
For programming concept:Core Java Concept
I read somewhere that there is a JAVA NIO like stuff for Networking ?would it be best as compare to Native Java.net package
Any other best suggestion for above menthion technology replacement
NIO is a newer version of java.io, but I advise to ignore it for the time being, and just work with the InputStream and OutputStream that Socket provides.
Seeing that this is a student project I advise to disregard performance entirely. It would likely be premature optimization, and at this stage in your quest for programming proficiency is the wrong thing to focus on.
If you have access to an Oracle DB, fine, otherwise JavaDB should be sufficient.
I don't understand what you mean by "core Java concept" (or "programming concept", actually), so I can't comment on that.
Overall I would say you should nail down the requirements first before making decisions about which technologies to use. Like, what actions can a user perform? Which pieces of data are needed for that, and from where to where do they need to be sent? Which ones do need to be persisted, and for which ones is it sufficient to keep them in memory? Those question are much more important than which API you're going to use for the various pieces.
As a final remark, let me point out that over the years I have seen many people ask here about how to get started building a chat system. I have no idea why that is so popular, but you'll find those discussions using the Search link at the top of the page. I don't recall anyone ever reporting that they actually succeeded in doing so. Some probably did and never came back here, but many folks struggled to make even a meaningful start. Although it is certainly not rocket science, it is not trivial either. So my advice is to start with the simplest thing that could possibly work and get that going. No GUI, no DB, just CLI clients and a server. Start with all message being sent to everyone who is connected. Once that works, let clients do one-on-one chats. I think you'll find that that will already be more work than you expected.
Ulf Dittmer wrote:
As a final remark, let me point out that over the years I have seen many people ask here about how to get started building a chat system....
The other thing that seems to happen often is the lack of understanding of networking. They get it working on their school system, and then it doesn't work from home, talking to their friends on the internet.
And the whole topic changes to understanding the difference between LAN/WAN, what is a firewall, router, etc., what is NAT, private IP addresses, etc. etc. etc.