Results 1 to 11 of 11
  1. #1
    Yarin1312 is offline Member
    Join Date
    Jul 2012
    Posts
    12
    Rep Power
    0

    Default Users System- where to start

    So i want to develop app with user system using swing for the gui, and i have some question:
    1.i know that i need a database server, so i have a question, for example lets say i want to use mysql server and i want that everybody who download my app can connect to his user thats mean he connect to the database, but thats mean the database should be in the internet so i have to buy a server? and if yes so there is a free database that i can use like free storage sites?
    2.If i want to build a user system where should i start? i mean what should i know? Every user have his private information and those things, thats all things save in the database?

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: Users System- where to start

    Start simple: starting at Java 1.6 the distribution comes bundled with 'JavaDB' (or 'Derby'); it's a complete relational database implemented in Java and (of course) it has a full JDBC implementation. There's no need to buy anything (see the db subdirectory in your JDK directory).

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  3. #3
    Yarin1312 is offline Member
    Join Date
    Jul 2012
    Posts
    12
    Rep Power
    0

    Default Re: Users System- where to start

    Quote Originally Posted by JosAH View Post
    Start simple: starting at Java 1.6 the distribution comes bundled with 'JavaDB' (or 'Derby'); it's a complete relational database implemented in Java and (of course) it has a full JDBC implementation. There's no need to buy anything (see the db subdirectory in your JDK directory).

    kind regards,

    Jos
    And how users all over the internet can use my database? i mean when they download the app? Do you have a tutorial to give me?

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: Users System- where to start

    Are these users supposed to be sharing data?
    If not then they will have their own local database.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  5. #5
    sehudson's Avatar
    sehudson is offline Senior Member
    Join Date
    Mar 2010
    Posts
    384
    Rep Power
    10

    Default Re: Users System- where to start

    Is there a particular reason that want to use a swing application as opposed to building a web application? If you're trying to develop a swing application to be used by many people in a way similar to the way people use traditional web applications on the internet, I would think that you are still going to need to develop a separate back-end application that is deployed on a server somewhere to handle requests for information from the database. RESTful web services might be the way to go. Google App Engine provides a free PaaS (Platform as a Service) where you can deploy your back end application. App Engine gives you access to a database that you don't have to worry about setting up or maintaining for the most part. Then, in your SWING application, you can include a RESTful client to communicate with your back-end. That is the way I would go with something like this, but maybe people have other opinions.

  6. #6
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    14,422
    Blog Entries
    7
    Rep Power
    28

    Default Re: Users System- where to start

    Quote Originally Posted by Yarin1312 View Post
    And how users all over the internet can use my database? i mean when they download the app? Do you have a tutorial to give me?
    Read the documentation: the database can either be accessed in single user mode or in a 'network mode' by several users.

    kind regards,

    Jos
    Build a wall around Donald Trump; I'll pay for it.

  7. #7
    Yarin1312 is offline Member
    Join Date
    Jul 2012
    Posts
    12
    Rep Power
    0

    Default Re: Users System- where to start

    Quote Originally Posted by JosAH View Post
    Read the documentation: the database can either be accessed in single user mode or in a 'network mode' by several users.

    kind regards,

    Jos
    Quote Originally Posted by sehudson View Post
    Is there a particular reason that want to use a swing application as opposed to building a web application? If you're trying to develop a swing application to be used by many people in a way similar to the way people use traditional web applications on the internet, I would think that you are still going to need to develop a separate back-end application that is deployed on a server somewhere to handle requests for information from the database. RESTful web services might be the way to go. Google App Engine provides a free PaaS (Platform as a Service) where you can deploy your back end application. App Engine gives you access to a database that you don't have to worry about setting up or maintaining for the most part. Then, in your SWING application, you can include a RESTful client to communicate with your back-end. That is the way I would go with something like this, but maybe people have other opinions.

    To be clearly i'm trying to do some thing like a browser game, but as a normal app that people should download, its not contain very big graphics that swing cant handle,
    so i try a project that its like a game that containg information and those things, like a game browser hen you have to wait time and you can build things but its simple,
    but every user have his information like he have 300 money and somebody else have 500, and every body have his own user and this things...

    Any idea for how i start and what exactly i have to know?

  8. #8
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: Users System- where to start

    As I say, if user A doesn't need access to anything from user B then they can have their own embedded database to hold those values. Or you could completely avoid a DB if it's only small amounts of data that doesn't need querying. Just use some form of save file.

    To be honest, I would probably go with the save file. Hide it behind a DAO interface and you can swap it out later if you need to.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  9. #9
    Yarin1312 is offline Member
    Join Date
    Jul 2012
    Posts
    12
    Rep Power
    0

    Default Re: Users System- where to start

    Quote Originally Posted by Tolls View Post
    As I say, if user A doesn't need access to anything from user B then they can have their own embedded database to hold those values. Or you could completely avoid a DB if it's only small amounts of data that doesn't need querying. Just use some form of save file.

    To be honest, I would probably go with the save file. Hide it behind a DAO interface and you can swap it out later if you need to.
    it should be kind of online game so i think that there is a place for db no?

  10. #10
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    13,541
    Rep Power
    26

    Default Re: Users System- where to start

    Why online though?
    What part of the game needs access to a database that is not on the same machine as the app?

    You see, you haven't actually explained that.
    Please do not ask for code as refusal often offends.

    ** This space for rent **

  11. #11
    benji2505 is offline Senior Member
    Join Date
    Sep 2014
    Location
    MA, USA
    Posts
    398
    Rep Power
    6

    Default Re: Users System- where to start

    The question people are asking is whether you really need a client-server architecture, because it opens up a large can of potential issues. There are many ways to work around it.
    If you want to walk this way, check out the JDBC API, which should let you talk to an external database via SQL.

Similar Threads

  1. Help making a Menu system for Student List System
    By jason3460 in forum New To Java
    Replies: 0
    Last Post: 12-09-2012, 02:39 PM
  2. system.out.printf versus system.out.format
    By bigsonny in forum New To Java
    Replies: 10
    Last Post: 06-21-2011, 11:40 PM
  3. Replies: 1
    Last Post: 01-18-2011, 07:27 PM
  4. Replies: 0
    Last Post: 12-21-2010, 04:21 PM
  5. Replies: 5
    Last Post: 03-20-2009, 11:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •