from reading some links on SO, came across ‘playframework’ to build java web app. I am not sure if my choice is right for what my test project.
Am familiar to do this in .net but trying to learn java along the way
the default page shows the following text fields with a submit button
enter fname
enter lname
enter dob
enter zipcode
the above fields and their text should be driven by a config file or from db. would like to do it using a config file so users can add new fields to enter.
the data is collected and placed in text file, mysql on my machine is not loading correctly.
i would be much obliged for any guidance.
I would suggest looking at the Yabe tutorial to learn how to write an application that uses a database. The tutorial is pretty clear and is part of the project, so it is written by experts on Play! You can find information on the models and JPA on the play documentation site as well.
On a bit of a side note, I have worked on several projects that used dynamically generated fields stored in databases. This led to pretty miserable performance, since you need to create a table that is something like
where entity is the thing being described by the textfields (e.g. a user), label is something like ‘zip code’ and value is something like 12345 (Albany, NY). You are now returning multiple rows per entity. You have to make value large enough for any anticipated field. Searching by zip code is quite inefficient, especially if you scale up to millions of users.
Play has excellent support for NoSQL databases. Once you are comfortable with the play framework, you can look into some of these other databases. If you are wanting to write a production system at web scale with the ability to alter the fields for each entity, a schema less database is probably a better choice than a relational database.