Why HTML 5?


64-Bit 4D Developer

Meinereiner freut sich, daß 4D in seiner 64-Bit-Version noch systemnaher wird als bisher. Meine eigene Büroverwaltung und die vieler meiner Kunden braucht 4D Write, ergo bleiben sie vorerst auf der 32-Bit 4D. Wird Zeit sich Gedanken zu machen, umzusteigen auf 4D WritePro. Bisher hieß es, das interne Format von 4D WritePro sei HTML mit 4D-spezifischen Ergänzungen. Nachvollziehbar, HTML kennte keine Tabs, braucht Ergänzungen. Ganz ohne Tabulatoren wird es nicht gehen, auch wenn ich in HTML hervorragende Tabellen habe, Listen und Einzüge und mir so viele bisher benötigte Tabs sparen kann.

HTML kann überall und auf jedem Gerät gelesen werden. Ein wichtiger Vorteil von HTML5 gegenüber PDF, dem elektronischen Papier, ist die automatische Anpassung an die verfügbare Monitorfläche. Das Buzzword dazu ist Responsive Webdesign. Die Anpassungen an Bildschirmgrößen sind mit  HTML5 und CSS3 leicht zu erreichen. JavaScript ist nur eine Option. Für die meisten Veröffentlichungen aus einer Datenbank, wie Briefe, Angebote und Rechnungen, komme ich ohne JavaScript aus.

HTML hat eine lange Geschichte hinter sich. Aktuell ist HTML5 und wird von allen Betriebssystemen, mobil und stationär, gekonnt. Windows und Internet Explorer hängen nur deshalb hinterher, weil viele Anwender noch immer Rechner und/oder OS aus der ersten Dekade der 2000-er Jahre einsetzen. Die bleiben dann auch bei 4D Write, weil die V16 sowieso nicht auf ihren Rechnern läuft.

Warum HTML5

aus Mark Pilgims Dive into HTML5

Dive into HTML5 von Mark Pilgrim ist die gute Anleitung, Copyrights 2009-2011. Mir wichtig sind die SEMANTIC ELEMENTS IN HTML5. Mit semantischem Markup, läßt sich ein Text hervorragend strukturieren, ohne im eigenen Durcheinander von class-Attributen zu versinken. Hier die Liste neuer Tags in HTML5 die besonders für die Textverarbeitung wichtig sind:

  • Abschnitt <section> und Abschnittsüberschriften <hgroup>
  • Navigation <nav>
  • Artikel <article>
  • Einschub <aside>
  • Kopf <header>
  • Fuß <footer>
  • Markierung <mark> und
  • Datum, Zeit <time>

Durch semantisches Markup wird mein Text bestens gesetzt und ich spare mir CSS-Klassen zu erfinden.

Manifest zum offline lesen

Will ich mein HTML-Text verwenden wie ein Buch oder auf dem iPhone Homescreen ablegen, muß ich kein ePub/eBook zusammenstellen. Mit weniger Aufwand erzeuge ich eine WebApp aus dem Text. Der Trick ist, dem HTML ein Manifest zur Seite zu stellen. Im Manifest sind die notwendigen Dokumente der Seite gelistet und ein Icon kann es auch haben. Das Icon ist auf dem Homescreen leicht wiederzufinden, alle Elemente sind bereits geladen und nun kann offline gelesen werden.

Das brauche ich, falls ich ein Dokument aus der Datenbank per eMail versende und der Empfänger es auch offline lesen können muß.

HTML5 macht Formulare sexy

Formulare in erlebtem HTML sind schrecklich. Meist zuviel Bootstrap, zu wenig Verständnis von HTML5. Formulare in HTML5 fängt mit Platzhaltern an, setzt den Focus automatisch, kennt eMail- und Web-Adressen mit und ohne Überprüfung, erleichtert die Werteingabe und die Datumsauswahl und macht wenn nötig Eingaben zwingend, kann suchen, Farben auswählen … ist A FORM OF MADNESS.

Den Reichtum eines 4D Formulares erreiche ich mit HTML5-Formularen noch nicht. Fürs Ausfüllen von Erfassungsbögen reicht es allemal hin.

Maschinenlesbar

Leider heben Microdata nicht ab. Dahinter stecken jedoch gute Ideen. HTML-Seiten kann jeder im Browser lesen und mit Microdata-Tags versetzt ist die gleiche Seite maschinenlesbar. Die Rechnung ist also nicht nur schön zu drucken, sie kann auch als eMail-Anhang versandt und vom Empfänger gelesen und seiner Maschine ausgelesen werden.

Eigentlich ist HTML5 ein hervorragendes Format zum Datenaustausch mit Mensch und Maschine. Das ist noch nicht eingesickert.

Leider

wird mehr über HTML5 geredet, Buzzwords, die nahezu niemand umzusetzen versteht. Jede WebSite erfindet eigene CSS-Klassen für die es HTML5-Tags gibt. Vielleicht liegt es an den Tools, sicherlich auch an den gestandenen Web-Entwicklern, die es immer schon umständlich gemacht haben.

Und 4D WritePro?

4D WritePro ist ein HTML-Erzeuger mit 4D-spezifischen Tags. Das ist ein guter Ansatz. Doch fand ich im Handbuch unter 4D Write Pro Bereich verwenden diesen Hinweis:

Das interne Dokumentformat von 4D Write Pro ist eine proprietäre HTML Extension, die mit XHTML 1.1 oder HTML 4.0 kompatibel ist, jedoch nur eine Untermenge von HTML/CSS Attributen und Tags unterstützt. …

Das ist nicht erfreulich! Ich bin perplex. HTML 4 ist längst zu schwach, hatte seine beste Zeit in den 0-er-Jahren dieses Jahrhunderts. HTML sauber schreiben, sprich alle Tags XML-konform setzen, ist bereits XHTML und in Code leicht zu erzielen. Saubere HTML-Seiten sind mit den 4D-XML-Befehlen fehlerfrei auszulesen, zum Nachlesen.

Ich verstehe nicht warum  4D WritePro auf ein veraltetes Format setzt? Ich halte das für keine gute Idee! Wenn schon neu geschrieben und lange unterwegs, dann bitte auch vorwärts gewandt.



64-Bit 4D Developer

Myself likes 4D getting more native lately while developing into a 64-bit app. My own office.app relies on 4D Write as are the office.apps of my customers, which means to stay 32-Bit 4D for the time coming. Today I should start thinking about how to migrate to 4D WritePro. All announcements have emphasised that the internal format of 4D WritePro would be HTML with 4D-specific add-ons. Obviously, HTML knows nothing about tabs, which makes enhancements necessary. We probably can’t omit tabs completely, even when using these powerful tables of HTML, or lists which overall reduces the need for tabs considerably.

HTML can be read everywhere on any device. An important advantage compared to the electronic paper aka PDF, is HTMLs capability to adapt to different screen estate easily. The buzzword to know is responsive webdesign. Adapting to different screensizes is achieved using HTML5 and CSS3. JavaScript is an option only. Most documents created by a database, like correspondence, offer, invoices will not need JavaScript at all.

HTML is a long story. Currently HTML5 is suitable for all OSes, mobile and on your desk. Windows and Internet Explorer are lagging behind, because their users still use computers and/or OSes from the first decade of the 2000s. Those users stay with 4D Write, because V16 will not run on their equipment.

Why HTML5

aus Mark Pilgims Dive into HTML5

Dive into HTML5 by Mark Pilgrim is a recommended read, copyright is from 2009-2011. I want to emphasise on SEMANTIC ELEMENTS IN HTML5. Using semantic markup means, you structure your text by content without getting lost in a mess of css-classes you have to invent. This is the list of tags new to HTML5 which are important for text processing :

  • Section <section> and section headers <hgroup>
  • navigation <nav>
  • article which is bigger than a paragraph <article>
  • belonging to <aside>
  • header <header>
  • footer <footer>
  • mark <mark> und
  • date and time <time>

Semantic markup reduces the burden to invent css.

Manifest for offline reading

To read my HTML-text like a book or saving to the iPhone homescreen I need not create an ePub/eBook. It means less efforts to build a simple webapp. All I need to include is a cache.manifest along my html-files. That manifest lists the accompanying files and even supports an icon. That icon is easy to find on your homepage, all files are already loaded, start reading offline and stay connected.

That kind of web.app should be comfortable, if mailing an attached document which the recipient should be able to read, even when offline.

HTML5 brings sexiness to forms

Forms of real life HTML are terrible, mostly. Bootstrap does not compensate for missing knowledge about HTML5. Forms in HTML5 start with placeholders, set focus automatically, know how to behave concerning email- and web-addresses with or without validation, support entering values and dateselection and enforce required inputs, know when to search, or how to select color … this is A FORM OF MADNESS.

4D forms are still more powerful than HTML5-forms. HTML5-forms are sufficient to get response, to ask for some data, to prepare feedback.

Machinereadable

It’s a pity Microdata doesn’t gain track. Microdata is a good idea and a good enough implementation today. Everybody can read HTML-pages from a browser. That same page enhanced with Microdata-tags is machine-readable, too. That invoice not only prints nicely, it could be attached to an email and imported into the system.

HTML5 is a preferable format to exchange information with both men and machine, indeed. It’s missing adaptation.

Sorrily

there is more HTML5-buzzwording than real life usage. Every single website invents their own css-classes which could be easily replaced by HTML5-tags. Maybe the tools are out of date. Then there are seasoned developers, who are used to doing things complicated
.

And 4D WritePro?

4D WritePro creates HTML with 4D-specific tags. This is an appreciated attempt. Now I’m surprised by the manual Using a 4D Write Pro area which notes:

The 4D Write Pro internal document format is a proprietary HTML extension, compliant with XHTML 1.1 or HTML 4.0, but which supports its own subset of HTML/CSS attributes and tags. …

I’m perplexed by this statement. Today HTML4 is to weak. HTML4 had it’s heydays in the first decade of this century. Machine written HTML should easily comply to XML-rules, aka XHTML. As I have tested myself, 4D XML-commands are capable of extracting properly written HTML into XML. XHTML is out of date, too.

I’m wondering why 4D WritePro uses an antiquated format like HTML4? This is not a good idea, not at all! Written new from scratch and taking its time deserves better.