• Post Reply Bookmark Topic Watch Topic
  • New Topic

Criticism for concept  RSS feed

 
Dwayne Barsotta
Ranch Hand
Posts: 86
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Since starting to post here regularly you guys have given me some awesome and professional criticism.   I would like to ask for some more.  In my application I am incorporating an embedded database. first I deciding between SQLite or Derby - leaning towards derby as its completely written in Java.

My application will implement a user log in system.  This alone is proving to be hard to research. But at this moment thats not my real concern.  My concern is with the initial start up of the application.  I obviously need the database running right away to store the users initial credentials.

Right now this is what I am thinking of doing.  When my application starts I will have a controller class (concept I learned from another post here) the class will call a database class that first checks if the database exists.  IF the database does not exist this denotes one of two things have happened either this is the first time running the application after instal.  Or the user has decided to reset the application to original condition (this is going to be a feature I am programming in later.  Incase the user wants to make the application seem as if it was just installed and delete all stored data.

In either case, the database object will tell the controller that no database is set up.  Here the controller will call an appropriate class to present a form that allows the user to input needed information and ultimately build the new database based off the input.  From here the application can restart a database will be discovered and reported to the controller, controller then opens a "Login" screen, where the application runs as normal. 

What do you think about this procedure?  Can you see anything I should modify or do different?

Lastly can you suggest tutorials on implementing a login system?    
 
Knute Snortum
Sheriff
Posts: 4279
127
Chrome Eclipse IDE Java Postgres Database VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The concept seems solid to me.  I'm using basically the same procedure (with SQLite) in an app I'm writing.
 
Dwayne Barsotta
Ranch Hand
Posts: 86
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Knute Snortum wrote:The concept seems solid to me.  I'm using basically the same procedure (with SQLite) in an app I'm writing.



Have you any opinions on the benefits between MySQL and Derby?   My applicator is a java desktop application. Right now I'm making a stand-alone version. After I will be building a new version for a networked implementation.
 
Junilu Lacar
Sheriff
Posts: 11493
180
Android Debian Eclipse IDE IntelliJ IDE Java Linux Mac Spring Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm a lazy programmer and designer, if someone has already come up with a good solution, I'm going to use it instead of trying to roll my own. Spring Security has a pretty comprehensive login and authorization framework. I'm sure you can use an embedded DB like Derby with it. Another options is externalizing authentication and using a trusted network and OAuth2, like how some apps allow you to login with your Facebook or Google account. Rolling your own can be a great learning exercise but when it comes to creating real and practical solutions, I defer to the folks who have a lot more time thinking about and developing solutions for things like user authentication and authorization
 
Dwayne Barsotta
Ranch Hand
Posts: 86
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you as usual great advice.  I will research both this methods.  As you said though, I'm learning so for this application I think it's like to do as much of my own work as possible.  I honestly didn't even think about externalizing the authentication, although I found a lot of the external services I would love to use but there are prescription costs involved. Maybe if I can get a marketable product then I can consider these.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!