I am currently creating an application that has a user, the user can follow others, post content, amongst a few other features and am wondering what would be the most ideal way to store and create data for a demo. I started building a rails site but felt that is becoming fairly time consuming for a demo application. Does anyone have any suggestions? pLists, JSON file, XML files?
我目前正在创建一个具有用户,用户可以关注其他人,发布内容以及其他一些功能的应用程序,并且想知道为演示存储和创建数据的最理想方式。我开始构建一个rails网站,但觉得这对于演示应用来说变得相当耗时。有没有人有什么建议? pLists,JSON文件,XML文件?
2 个解决方案
#1
2
What is the nature and size of the data?
数据的性质和大小是什么?
- pLists are convenient for a few dozen lines since they are easily converted into a dictionary at runtime.
- If you have hundreds of items, you're probably better off writing an xml file and parsing it.
pLists很方便几十行,因为它们很容易在运行时转换成字典。
如果您有数百个项目,那么最好还是编写一个xml文件并进行解析。
#2
-1
Simplest way is to way the object to FILE use Keyed Archiving. If you are bored about right almost same Keyed Archiving code each time. try to use Accessorizer
最简单的方法是将对象转向FILE使用密钥存档。如果您每次都对几乎相同的Keyed Archiving代码感到厌倦。尝试使用Accessorizer
#1
2
What is the nature and size of the data?
数据的性质和大小是什么?
- pLists are convenient for a few dozen lines since they are easily converted into a dictionary at runtime.
- If you have hundreds of items, you're probably better off writing an xml file and parsing it.
pLists很方便几十行,因为它们很容易在运行时转换成字典。
如果您有数百个项目,那么最好还是编写一个xml文件并进行解析。
#2
-1
Simplest way is to way the object to FILE use Keyed Archiving. If you are bored about right almost same Keyed Archiving code each time. try to use Accessorizer
最简单的方法是将对象转向FILE使用密钥存档。如果您每次都对几乎相同的Keyed Archiving代码感到厌倦。尝试使用Accessorizer