Is postMessage()-usage limited to HTML5 documents? - postmessage

we are developing a webapp and we are using xhtml documents. We ran into same-origin-policy-issues and now we are wondering if postMessage() could fit our needs?
Anyway, we won't be able to switch to HTML5! Can we use use postMessage()?

Related

What Rich text editor should I use for a custom CMS

I want to build a custom CMS where users a Rich text editor is the main way to create content rather than wiki markup.
Besides stability and performance, I want the RTE to be easily extensible. The latter point is very important because I intend to extend it to my needs.
For example I want the users to be able to embed OpenSocial gadgets and whiteboard (based on canvas) into the page. I also the want the users to embed media source like (youtube, slideshare etc).
My preliminary investigation shows that Dojo's (dijit) RTE and TinyMCE are pretty good. How would you compare the two in terms of stability, performance and extensibility. Any other RTE's I should be looking at that fit the bill?
PS: I am using dojo as the main js library.
Hava a look here (blog post with some very helpfull informations).
My own opinion is that there are two free available rtes that are close to each other in comparison. Those are CKEditor and Tinymce. My experience lies on the tinymce side and i can say that the extensibility using own plugins is great with it. Some independent tests have shown that tinymce seems to be more adavanced than CKEditor, others claim CKEditor is better. You will have to decide on your own (development is advancing further each day and new functionality has been developed since those tests).
You may also have a look here for comparisons and discussions:
http://verens.com/2007/09/27/fckeditor-vs-tinymce-vs-everything-else/
http://verens.com/2007/09/27/fckeditor-vs-tinymce-vs-everything-else/
http://www.mediacurrent.com/blog/wysiwyg-shootout-and-winner

Web Dev: How to write a website specification doc? [closed]

Closed. This question is opinion-based. It is not currently accepting answers.
Want to improve this question? Update the question so it can be answered with facts and citations by editing this post.
Closed 5 years ago.
Improve this question
I'm writing a specification document for my website (it's a school project, btw). I currently have some proze about the overall layout and theme of the website, how you navigate through the website, and a brief description of the contents. I however do not have a list of all pages; should I include that?
Also, how can I determine the technical specifications for my website? I know, for example, that I need PHP 5 (or compatible), but I'm not sure what version of HTML, CSS and JavaScript to ask for. How can I determine these requirements?
I would think that the list of each page would be included in the Navigation section of your document. Also to determine which version you HTML, CSS, and Javascript might I suggest using a blanket "Use of standards compliant HTML, CSS, and Javascript which will render in all major browsers". Or something similar. You don't necessarily need to pidgin-hole yourself into using a specific format as long as it does what you want in the browsers you want.I think a good requirements doc would steer away from making decisions like this for the developer and stick to decisions such as what the content looks like, what the navigation map is, what content to provide, and functionality.
As an example of what standards there are for HTML, if you want your page to "validate" as a particular HTML standard then you would want to indicate that version in the header but the header itself is unnecessary for the browser except to tell it to render in standards or quirks mode. For a "standards" mode site use of the HTML 5 doc type is all that you need.
The HTML version can be found in the first DOCTYPE tag, usually on the first line:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
In this case, it's XHTML 1.0 Transitional.
As for CSS, most browsers use version 2, but it's trivial unless you're using some crazy new CSS features slated for the next release. For javascript, according to the wikipedia page, the latest version is 1.8.2. This again doesn't really matter that much, differences between Javascript versions are usually extremely minor.
Writing a technical spec.
Answer the following questions.
1) What is your site for? What purpose does it serve?
2) Who is the site made for, do they buy into the answer to question 1?
3) The audience from question 2... what type of computers / devices will they access the website from?
From answering these questions you will know the minimum requirements that you have to design for. For instance, if everyone you are marketing to is older with ancient hardware (develop in straight HTML no javascript, use tables for layout) ;) If you are aiming for a younger, computer savvy audience, develop using HTML5, CSS3, jQuery.
Server side tech doesn't make a difference unless you are trying to create a site at scale. (to support millions of users)
I would include a sitemap (list of pages)

OpenSource CMS for pdf files

I am looking for some opensource suggestions for a CMS which facilitates alot of pdf files. I have thousands of pdf files and I would like to use a CMS which makes handling these files as easy as possible.
Thanks for any suggestions.
Plone has great support for binary files like PDFs: upload, download, manage security/access restrictions, manage caching of them and have the PDF's full-text indexed for search out of the box.
I don't know your requirements, but if I were you, I'd store an editable copy of the CMS content (in HTML) and render it each time it is saved.
To render HTML in the best manner possible, use a tool like WKHTMLTOPDF - easily connected to PHP.

Document -> Flash viewer, not hosted

I've got a content management solution where we present scanned images (TIFF), PDFs, word docs for viewing. While we can simply embed a PDF, sometimes depending on user preferences it's a bit fiddly and sometimes not user-intuitive.
I'd like a solution like scribd, embedit, etc, but not hosted. I want to run the application on our own servers and manage it that way (for legal reasons, and our clients won't buy the service if it's hosted somewhere else).
SWFtools looks a little basic for my needs, plus doesn't do doc, docx or ppt.
Any options? Doesn't have to be free, but would be ideal.
As far as I understand (Scribd) uses swftools. And it is not basic, it is amazingly flexible. Convert everything into PDF and use swftools to convert PDF's into swf or something like Scribd does (SCB, what they call it, modified swf).
webSupergoo has a .net component that will do this...
Their ABCpdf component can import and export a wide range of graphic and document formats, including those you've mentioned.
The installation also contains an SWF demo project that can be freely adapted, and used as the basis for a scribd-like service.
http://www.websupergoo.com/products.htm
you can try this alternative solution :
FreepapeR.
You can display pdf documents. The pdf is converted using swftools (pdf2swf), using php on the server side or locally by hand, the user interface is written in as3.
Hope this helps...

How does google make make those awesome PDF reports in Analytics and when you print a Google Doc etc? [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
When you print from Google Docs (using the "print" link, not File/Print) you end up printing a nicely formated PDF file instead of relying on the print engine of the browser. Same is true for some of the reports in Google Analytics . . . the printed reports as PDF's are beautiful. How do they do that? I can't imagine they use something like Adobe Acrobat to facilitate it but maybe they do. I've seen some expensive HTML to PDF converters online from time to time but have never tired it. Any thoughts?
If you are specifically looking at how Google does it. If you look at the PDF Properties page, they use Prince 6.0 (see princexml.com)
There are lots of other PDF generators out there. I've had great success with PDFlib for tricky jobs.
iTextSharp and iText are opensource and free PDF generation libraries for .NET and Java respectively.
I've used them to generate report PDF's before and was quite happy with the results.
http://itextsharp.sourceforge.net/
http://www.lowagie.com/iText/
Great free alternative to PrinceXML: wkhtmltopdf . There are plenty of wrapper libraries for various languages - but I've only used Ruby ones. However the product itseld is on par with PrinceXML IMHO.
I have had success with pd4ml. It has a tag library, so you can turn any existing HTML into PDF by
<pd4ml:transform>
<!-- Your HTML is here -->
<c:import url="/page.html" />
</pd4ml:transform>
Well, I doubt it's as easy as generating HTML . . . I mean, first of all, PDF is not a human readable format and it's not plain text (like SVG). In fact, I would compare a SVG file to a PDF file in that with both you have precise control over the layout on a printed page. But SVG is different in that it's XML (and also in that it's not supported completely in the browser . . . still looking into SVG too). Come to think of it, SVG should probably will be my next question.
I know Google doesn't use .NET and I doubt they use Java so there must be some other libraries they use for generating the PDF files. More importantly, how do they create the PDF's without having to rewrite everything as a PDF instead of as HTML? I mean, there has to be some shared code for between when they generate the HTML view as opposed to the PDF view. Come to think of it, maybe the PDF view and the HTML view are completely separate and they just have two views and hence why the MVC development style seems to be the way to go.
Rendering a PDF is hard, complex problem. However generating them, is not. Simply make up some entities, and generate. It's about same problem domain as generating HTML for webpage vs. displaying (rendering) it.