A place for users and developers of the Xataface to discuss and receive support.
by zopemgr » Tue Apr 25, 2006 4:12 pm
Hello,
In the ?Intro to Dataface? pdf presentation, on slide 40 you mention the Htmlarea widget type and on slide 42 you?ve included the FCKeditor for the blurb field.
What I?m wondering is does the FCKeditor output text with html markup, both of which go into the ?blurb? text datatype field in the database?
In our application, in some cases we?ll need to bulk import into the ?blurb? field [say 50 or 100 documents]. In other cases, manual entry will be fine. I'm not sure what format to use to import into the MySQL db.
Thank you,
Robert
-
zopemgr
-
- Posts: 66
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Tue Apr 25, 2006 5:22 pm
FCKEditor produces text with HTML markup that is saved in the underlying TEXT mysql field for the record. It also allows you to to edit the source code directly (by pressing a button which opens a source editor in a pop-up window) which will result in the exact source being saved in the Database.
By importing 50 to 100 documents do you mean that you need to be able to store 50 to 100 files in each record and be able to access each file individually once they are saved in the database? -- or is it that you just need to store a lot of text in the field.
If you need to store separate documents it is probably best to use relationship to another "Documents" table and add each document as a separate record.
I could give you more specific advice if I knew about what you are trying to do.
Thanks for the interest
Best regards
Steve Hannah
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by zopemgr » Wed Apr 26, 2006 2:07 pm
A. Store a lot of text in one field of each record.
Let?s say a mysql table has 100 records, and each record has 10 fields, with one being a TEXT field. The TEXT field will contain 300 to 1000 words, and the remaining 9/10 fields have coordinate data like title, street, city, province, url, etc. Usually data is entered into all fields, including the TEXT field [copy and paste], manually. I have applications to import into all fields.
Referencing the application in your ?Intro to Dataface? presentation, the TEXT field could simply be the body of an abstract. I?ve developed with phpMyAdmin a process to import the 9/10 fields, and I?m working on the import process into the TEXT field.
Based on the editor producing text with HTML markup and saving both in the TEXT field, my draft process to accomplish the same result is:
1. Receive abstracts in MS Word .doc or .rtf format. 2. Convert to/save as HTML document. 3. Open page with IE. 4. View page source in Notepad. 5. Save Notepad.txt file. 6. *Import Notepad.txt file into the TEXT field.
*All abstracts should be in one CSV .txt file, from my limited experience so far, and then abstracts 1 ? 100 will be imported into records 1 ? 100.
I hope I can streamline this clumsy process, but embedding it into an AutoMate script, for example, will make it speedy.
B. Dataface is a breakthrough for me because it enables near ?instant? creation of admin functionality I/O for existing or new databases. I am developing tools and content for scientists and engineers worldwide. Dataface and your tools-integrated-into-a-solution ??web application framework that factors out all of this common functionality? elevates [info] product development to a new level. It solves a problem.
I organize my time to maximize the time I have to be creative, and it looks like Dataface frees up time from creating data-centric websites to focus more time on targeting existing and new markets. Thanks!
-
zopemgr
-
- Posts: 66
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Wed Apr 26, 2006 3:40 pm
That sounds like quite an involved process. I'm sure there is probably a history behind it so forgive me if I make suggestions that don't fit the mold.
There are a few things about your process that I don't understand:
1. Have you already received these abstracts or are you preparing a process to receive submissions in the future?
2. If you have already received the submissions, are they stored in one big CSV file or an MS Word file?
3. If you have not already received the submissions, why not just have the individual submitters fill in the html form with the appropriate values to save you the time of having to import them all.
4. Is it your preference to store the abstracts as plain text (with no html) or with html?
A couple of comments:
1. FCKEditor (The editor that is packaged with Dataface) is capable of receiving content pasted from MS Word maintaining . i.e., your process can at least be reduced to copying and pasting from MS Word into FCKEditor (Dataface).
2. It is possible, and quite easy, to define a custom serialization for any of the fields in Dataface. You could, for example, have the HTML automatically stripped from the abstracts field when it is saved to the database.
3. Dataface has some (as yet undocumented) support for importing bulk records. You would just need to write an import filter that shows dataface how to parse the raw data and place it into the database.
Thanks for the compliments on Dataface. I'm glad that it is useful to you. I appreciate any comments, feedback, and feature requests you might have.
Best regards
Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by Robert » Thu Apr 27, 2006 6:55 pm
I've got more comments, but with the available time, two questions for now:
Could you pls give me a brief example/explanation of:
* a custom serialization - does it always reduce [HTML..stripped] or can it add to content inputted? * the scope of support for importing bulk records [for any datatypes?]. And, effort reqd to write an import filter.
BTW I looked fairly closely at a converter - Excel to MySQL. Fairly quickly, it did not support some recent MySQL features and required a change to the [older] MySQL settings. This did not seem the way to go to me. phpMyAdmin has some import functionality which was faily straight forward to use, to import into a test table [I just used the table from the "Intro to Dataface" pdf to have something to start with.]
I'm just interested to learn better ways to import into a MySQL table.
Thanks,
Robert
-
Robert
-
- Posts: 2
- Joined: Wed Dec 31, 1969 5:00 pm
by shannah » Fri Apr 28, 2006 12:59 am
>* a custom serialization - does it always reduce [HTML..stripped] or can it add to content inputted? I have created a new How-to on this subject at http://framework.weblite.ca/documentation/how-to/how-to-define-custom-serialization-for-fields>* the scope of support for importing bulk records [for any datatypes?]. And, effort reqd to write an import filter. I'll get to answering this in more detail tomorrow, but the idea is that you just define a method in the delegate class to import a certain type. The method is expected to return an array of Dataface_Record objects, which will then be inserted into the Database by Dataface... The level of effort to write one of these depends on the complexity of the incoming data type and on the quality of libraries you have at your disposal. In general you can usually find a library to make managing any type of data pretty easy. Best regards Steve
-
shannah
-
- Posts: 4457
- Joined: Wed Dec 31, 1969 5:00 pm
by Robert » Fri Apr 28, 2006 3:12 am
I'm looking forward to studying the serialization how-to this weekend.
Thanks,
Robert
-
Robert
-
- Posts: 2
- Joined: Wed Dec 31, 1969 5:00 pm
Return to Xataface Users
Who is online
Users browsing this forum: No registered users and 10 guests
|