Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6807163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T19:47:54+00:00 2026-05-26T19:47:54+00:00

I am writing a small personal file-server with Play! and it’s my first web

  • 0

I am writing a small personal file-server with Play! and it’s my first web application. What are the recommended practices for storing preferences that users can modify through a preference panel.

My first idea was to use a property file in the conf directory, but I must be able to modify it during runtime. Is the conf directory writable, whatever the deployment option ?

Are there built-in options for that or is there a better approach ?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T19:47:55+00:00Added an answer on May 26, 2026 at 7:47 pm

    As said by Kim Stebel, the usual solution is to use what you application already has, which is most of the time a database engine, being relational or not. That’s because most of the time, user preferences come after some other data where already persisted.

    But in your case, it seems that the file system is you persistence engine, and you don’t seems to need transactions or excessively good read/write performance for the discussed feature, so I would keep that part the simplest possible until some other persistence engine is needed: I would just serialize user preference object to some text format (JSON or XML comes to mind) and save them in the filesystem: no mapping hell for now, no premature choice (and even the possibility to corrupt^W edit your user preference with your favorite text editor, directly on the server, yeah 😉

    That being said, there is a ton of good framework for that job, in Scala or from the Java ecosystem.

    For the XML mapping, I don’t thing Scala native library is the best choice. It’s easy to produce XML structure with it, but the mapping from XML to Scala object is at best horrible.
    XStream (http://x-stream.github.io/) is quite good for that, but you will have to use Java collection, or add your own (and that wasn’t my idea of the ‘most simple’).

    For JSON mapping, there is several really good libraries in Scala. Google and other stackoverflowers may have more details, but I know there is at least these two:

    • Lift-JSON (https://github.com/lift/lift/tree/master/framework/lift-base/lift-json/) – I used that one, and even if the API seems sometimes strange to me and the doc is a little too light, the automatic deserialization to case class is really cool;
    • Jerkson (https://github.com/codahale/jerkson) is reported to be quite simple and good

    Hope it helps,

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm writing a small web server in Python, using BaseHTTPServer and a custom subclass
I'm writing a small agent in java that will play a game against other
I'm writing a small web server, and having a problem with parsing a request.
I'm writing a small client application to communicate with a server. I open a
I am writing a small program that will read a plain ASCII text file
I have an application where I am reading and writing small blocks of data
Coming from a PHP background, I'm used to writing small functions that return a
I'm writing a small application in VB.NET and I would like some of the
I'm writing a small ajax class for personal use. In the class, I have
I'm writing a small non-commercial web app, and I'm wondering how to pass data

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.