austgl / zen-coding

Automatically exported from code.google.com/p/zen-coding
0 stars 0 forks source link

use zen code as html transport format #49

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Not a problem, but an idea. Since zen code describe html in less text it
could be adapted as a protocol for html representation and transportation.
Just thought I'd bring that up for discussion.

Original issue reported on code.google.com by mikerin....@gmail.com on 23 Nov 2009 at 10:50

GoogleCodeExporter commented 8 years ago
Currently, it's not possible to rollback HTML to CSS expression because of lack 
of proper syntax. Maybe in future

Original comment by serge....@gmail.com on 24 Nov 2009 at 8:51

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
wow, it would be awesome

Original comment by iamsemmu on 30 Jan 2010 at 7:57

GoogleCodeExporter commented 8 years ago
btw it'd be a fine feature to rollback html to zen-coding selector with 
stripping 
all the textnodes and attributes — now it's possible with 0.6, am I right?

Original comment by kizmarh on 18 Feb 2010 at 10:20

GoogleCodeExporter commented 8 years ago
I made a size comparison

With one line that starts:
html>(head>title+style+script[src="jquery.js"]+script(body>(#all>(#header(#main>
h1+p.hl+h2+p(#footer
(I know the syntax is probably incorrect with no closing brackets - but it 
works)

saved in small.txt and gzipped into small.txt.gz (the standard compression of 
web-server/browsers)
expanded (via zen-coding into html) and saved as big.txt and compressed to 
big.gz

My conclusion - zen-coding seems to reduce file-size even after gzip. This 
means that HTTP transmissions would be faster if it could be used as a complete 
replacement for HTML/CSS - It could be implemented as an optional compression 
format (like gzip) so the header would determine if the browser was capable of 
decoding zen-coded content, and then the server either parses it server side, 
or passes it to be parsed client side.

I think for zen-coding to become a serious tool, it needs to develop some 
greater purpose, as currently it is a nice concept for a niche programmer 
group, but if it could fully express HTML/CSS/JavaScript in a more concise 
fashion - it's use would grow beyond being nice for the coder, to being nice 
for the consumer - reducing their bandwidth (on phones - meaning less data and 
cost of webpage) and useful for templating web pages efficiently.

--
Bytes / File name
100 / small.txt
117 / small.txt.gz
374 / big.txt
196 / big.txt.gz

Original comment by billymoo...@gmail.com on 15 Sep 2010 at 7:20