• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Offline Editor Design

 
Ranch Hand
Posts: 449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I have a typical requirement in one of my web based projects. The problem is broken into two parts:

1.The users want to store some notes/comments about a product into the database. These notes/comments are in the rtf(Rich Text Format) containing bold, italics, bullets, spell check etc. text formats. To resolve this we found out a rich text web editor that can give us bold, italics, bullets, spell check etc. features. The question is how shell we store the text in dattabase? In rtf format or in plain text format. We have to read back data for reports also.

2.The real problem is users want this to work as an offline solution also. Means they should be able to export this text and should be able to work on comments from home. Once they are back in office, they should be able to import these contents back to the application.
Whatever solution we work on should be consistent. Even the spellchecker also should be same.


What could be the best design under this scenario?
[ August 01, 2006: Message edited by: Bear Bibeault ]
 
Rancher
Posts: 13459
Android Eclipse IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Programming Diversions forum is for puzzles and other stuff of general interest. This is bit specific.

I'm moving it to HTML and JavaScript, hopefully Eric knows what to do with it.

Dave
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1. rtf is a plain text format. If you want to preserve the formatting, just store the characters of the rtf in a varchar or clob if very large.

2. You'll need to be more specific about off-line capabilities. Obviously, when offline, no connection to a server is available so you may need to provide a desktop solution.
[ August 01, 2006: Message edited by: Bear Bibeault ]
 
Vijay S. Rathore
Ranch Hand
Posts: 449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Ms-Word as a desktop solution is ruled out, since how can we create a word document by pulling data from database as well as how can we extract data from ms-word once the offline file is uploaded to server.

What could be other possible desktop solutions?
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I wouldn't necessarily recommend Word as a solution, but your reasons for ruling it out are not valid.

You need to be online to get the data from the database in the first place, so you could download the RTF to Word (I'd use a servlet), go offline, let the user use Word to their heart's content, then when back online, they could upload the file back to your system.
 
Vijay S. Rathore
Ranch Hand
Posts: 449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You missed one point, if I directly upload word file, how will I extract data for reporting purposes? Apache POI is not mature enough to read word documents.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You didn't say anything about reporting. You just mentioned rtf. How do you plan to pull report data out of the rtf?
 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Bear Bibeault:
You didn't say anything about reporting. You just mentioned rtf.

And no doubt there are other requirements that you haven't seen yet. Possibly when all these requirements are clear, you will find that you have to produce a full content management system. If that's the case, perhaps you should consider just buying a CMS and saving yourself all that work.
 
Vijay S. Rathore
Ranch Hand
Posts: 449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

1. The users want to store some notes/comments about a product into the database. These notes/comments are in the rtf(Rich Text Format) containing bold, italics, bullets, spell check etc. text formats. To resolve this we found out a rich text web editor that can give us bold, italics, bullets, spell check etc. features. The question is how shell we store the text in dattabase? In rtf format or in plain text format. We have to read back data for reports also.



Well it is not the whole page that we need to store and retrieve in rtf format, but some segments of the page to be stored and retrieved.

The reports are needed in PDF format, so we are looking for some rtf to PDF sort of utility.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
HTML and JavaScript does not allow it to be saved to the local disk unless you are talking IE only with ActiveX or you look into a Flash storage solution with Flex.

I would say look into a client application since that would be easier to push out than making sure everyone has Flash installed or allow a site to save locally with only IE.

Eric
 
Vijay S. Rathore
Ranch Hand
Posts: 449
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Is there an XML alternative possible for this case? rtf is pretty much in the XML format.

If somehow we find a client app that can render the xml at the offline end, and then import feature in web application gets the xml and performs the extraction of rtf portion, then I think we will be good.

We looked at Infopath from Ms-Office, but because of company policy we cannot push it to all offline machines.

Is there a similar alternative available?
 
Paul Clapham
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Vijay S. Rathore:
rtf is pretty much in the XML format.

RTF is nothing like XML.
 
Ranch Hand
Posts: 128
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
For generating the reports you can do this way. Get the blob object from the DB and write a praser to remove the html tags and get the content only. Then for generating PDF you can write FO Code with the necessary format and wherever and then include the content with the FO Code. Hope this helps. We had same kind of issue we solved this way.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Arulanand Dayalan:
Get the blob object from the DB and write a praser to remove the html tags ...



There are no HTML tags in RTF.
reply
    Bookmark Topic Watch Topic
  • New Topic