Friday, October 3, 2014

SQL, Servers, and more!

Today I forgot my laptop, but I wanted to document what I got done yesterday!

  • Finished connection to SQLite Database (Using SQLite JDBC Driver, and Java's DriverManager)
  • Successfully created SQLite Databases (Called USERS) with 3 columns - UserID VARCHAR(15), Password VARCHAR(15), and Permissions VARCHAR(MAX). The permissions string file has no limit, allowing for a very large number of permissions.
  • Permissions is a list of user permissions, and I also started working on a command to add permissions to the user, if the user has the permission to add permissions, or add permissions to a user via console
  • Added "admin" command for user - Doesn't do anything yet, but will give a user the "hasAdmin" permission, marking them as a game admin
  • Created Java methods for getting and setting information in the database
  • Soon to add: Saving userID and Password to database, saving permissions to database, checking userID and Password combinations to allow a user to login to the game
  • The server and SQLite database are saved in the same folder, and server preferences are loaded from a java Preferences file (specifically titled server.preferences) and the SQLite database, users.db, is in the same directory.
  • Server notifies server admin of creation of databases, database connection, starting, stopping, handles commands, and prints stack traces if necessary, via System.out.println, and taking commands with a Scanner.
  • GitHub was also setup this week for AndroidRPGNew and AndroidRPGServer projects. However, the code updated this week hasn't been pushed yet (as I plan to push it at the end of every week, and I don't have access to my laptop right now).
While I got most of this done yesterday, it really took all week. Lots of bugfixes, etc. resulted in a lot of time being used up researching it all, but I'm happy with the result!

1 comment:

  1. Its great to see you continuing to use this blog to keep track of the resources you plan to use in your project. Please continue to do that.

    What I want to add now is better documentation of your project from a "User Story" kind of level (see http://en.wikipedia.org/wiki/User_story). Please start Monday with a user story that describes what end user functionality you plan to work on during the week. It is in that context the details of the specific resources you use will make sense.

    ReplyDelete