About RichStyle
RichStyle is a multilingual, minimalism, object-oriented, and model-driven HTML/CSS framework published as a Debian package.
It’s featured with three main advantages:
- From user’s perspective:
- Usability: See Algorithmic Software Usability Measurement.
- Performance: It’s meant to be the ever faster HTML/CSS framework, and generates the ever faster web pages.
- From developer’s perspective:
- Maintainability: It’s a well-structured object-oriented HTML/CSS framework.
See RichStyle Documentation.
- Maintainability: It’s a well-structured object-oriented HTML/CSS framework.
Mission
Since I attended my first IT-related course; an MS Windows and Office course, more than ten years ago, I’ve been asking my self:
Could HTML be an alternative to common document formats, like DOC, DOCX, and ODT?
HTML format actually overcomes office-applications’s formats in the following aspects:
- Flexibility: Separating format from content.
- Compatibility: with the world wide publishing environment (Web).
- No needs for special application to read/view it: Only a browser is needed.
- Custom format for each media : screen, paper, TV… etc.
- Developed/Supervised by: a wide spectrum of companies and organizations, including Microsoft; The developer of the popular office suite «MS-Office».
So; could HTML/CSS standards offer an alternative to office-applications’ capabilities?
No doubt that HTML standards and tools at that time weren’t mature enough, they were poor comparing to the exist office tools and applications that were, in turn, growing without disciplines or clear standards.
However, although HTML5 and CSS3 nowadays offer powerful standards implemented by powerful user agents; there are three main limits for HTML files comparing to DOC/ODT files:
- Portability: Not all the contents will be stored in the HTML file itself, but under a separated directory.
Images, CSSs, and JavaScript files will be stored out of the HTML file itself.
However, an archive file, contains the main HTML file and all the related files, would be a good solution.
An other solution, for images specifically, is DataURL. - Security (Password Protection): You can not set a password for an HTML file.
The solution here is also an archive file as mentioned herein before. - Printability: You can not store margin settings, page numbers, and so on in the HTML file itself. Actually, CSS3 drafts offer specifications for printing settings, and some of theses specifications are applied in RichStyle, but waiting for support from user agents, since the only one that support them, as far as I know so far, is PrinceXML.
Desktop Format | HTML Format | |
---|---|---|
Flexibility: Separating format from content | ✕ | ✓ |
Compatibility: with the world wide publishing environment (Web) | ✕ | ✓ |
No needs for special application to read/view it | ✕ (Needs…) | ✓ (Only a browser) |
Custom format for each media (screen, paper, TV… Etc) | ✕ | ✓ |
Developed/Supervised by | ✕ Limited | ✓ Wide spectrum of companies and organizations. |
Portability | ✓ | ✕ |
Password Protection | ✓ | ✕ |
Printing settings | ✓ | ✕ |
Vision
RichStyle library offers a standard document format called «.web
», which is simply a clean HTML5 file assigned with preformatted CSS files installed by the library too.
It could also serves as a typical solution for:
It adds a template file called «Web-Document.web
» to Nautilus file manager, associated with central CSS files installed by the library.
This template file aims to achieve three main objects:
- Browsers Support:
The output file format could be read using any web browser without the producing application itself, since the output file format is actually just an HTML file. - System consistency:
Fonts and colors are meant to be complied with the host-system’s theme.
User may outsource the document’s format-instructions to the entire-system’s theme, so that all documents around can comply the system’s theme, and have the same spirit of the whole system. This maintains the quite balance between Richness and Consistency. - All-in-one file format:
Using CSS3, you are supposed to be able to display the same document in different “views” for different media, with no need to reproduce it for each media; a view for web pages, another for printing media (papers), a third one for projector, and so on.
GWrite represents —theoretically— the closest implementation to my vision for the perfect word processor; an HTML/CSS-powered word processor, as a front-end for RichStyle library.
I’ve developed a custom version of TinyMCE, called rsTinyMCE, as a prototype to illustrate this vision as much as possible.
The aspects that I couldn’t represent in this prototype, had drawn in the following fake screenshot.
The differences, as you see, are:
- A combo box for the active languages: adds
lang=""
attribute to any tag or string. RichStyle library will take care of the directionality according to the selected language. - Views: Screen, Print, Source, Split.
- «Find» field should appear in the tool-bar itself, just like Firefox, not as a pop-up window.
Values
- Object-Oriented Programming (OOP):
- Tags are used to represent only content objects.
- Tag-attributes are used to represent only content’s attributes.
- CSS rules are used to represent presentation’s attributes.
- Tags’ behaviors are represented —if any— by jQuery events instead of the regular HTML events.
- Technology Priority: CSS, jQuery, JavaScript, and PHP.
This means that everything could be done using CSS, should be done using CSS, otherwise, it will be done using jQuery. The next choice is JavaScript. Server-side technologies, like PHP, will be the last choice. - No classes,
div
orspan
tags as much as possible, raw HTML tags should be enough. - Icons used in RichStyle comply with Unicode standard as much as possible.
- No repetition: every link/item in the page should appear one time.
Compatibility
RichStyle is compatible with the following browsers:
- Arora 0.11.0
- Epiphany 3.28.1
- Firefox 62.0
- Chromium 69.0.3497.81
- Falkon 3.0.0
- Konqueror 5.0.97
It’s also compatible with PrinceXML 11.