A Website Entirely In HTML5 ?

Monkey Targets Forums/HTML5/A Website Entirely In HTML5 ?

semar(Posted 2013) [#1]
All,
what are, in your opinion, the pros and cons of a website entirely in HTML5 ?

The amount of creativity unleashed from the Monkey language would bring a new interactive experience in a website wouldn't it ?

On the other site, when I just need to add a link to another page, the whole code should be recompiled - ops, retranslated - again.

By the way, how can I add an html link using Monkey ? So that it behaves like a link in a normal html page, you know..

Please discuss.

Sergio.


slenkar(Posted 2013) [#2]
i think it would be cool, also a flash version could be exported for IE
To save system resources dont do 'setupdaterate' and clear the screen when things are happening, like scolling or changing pages


Sammy(Posted 2013) [#3]
You could have problems with the various lower end of the hardware spectrum, telephones, tablets, never mind browser compatabilty. You may need a traditional HTML version for them. That's the downside, upshot is though you could have lovely interactive and pretty unique look to your website for those who can use it.


Paul - Taiphoz(Posted 2013) [#4]
for the lower end tablets and phones you can simply redirect them to a streamlined version of your site, its what I do with my blog, visit it from an iphone and you get an iphone version of the site, goto it via the browser and you get the full thing.

As a test I wrote one of those image/news sliders which worked quite well although had its quirks, but yeah if you spend the time on it, you could really make something epic.

one of the coolest iv seen so far , sorry dont recall who it was but it was a ludum dare regular, who made his website a game, to open pages you have to move your player and shoot blocks or something its all a bit vague sorry lol just recall how cool i thought the idea was at the time.

it made me think about a mario style platformer, where i would jump onto a platform and that platform would then expand to reveal a page of content, but i never really took the idea any further than a few drawings.


Spinal(Posted 2013) [#5]
Although I did understand the question, I did the biggest face-palm ever when I read it.

"what are, in your opinion, the pros and cons of a website entirely in HTML5 ?"

!!!! HTML is what websites are made of, 5 is just the latest version. You don't need Monkey to make an HTML5 website, the code will be incredibly bloated and, well, pointless. Any html5 website should be written in html+css, not in monkey.


semar(Posted 2013) [#6]
!!!! HTML is what websites are made of, 5 is just the latest version. You don't need Monkey to make an HTML5 website, the code will be incredibly bloated and, well, pointless. Any html5 website should be written in html+css, not in monkey.

You have indeed a point here. However, I personally find more comfortable writing it in Monkey than with a text editor.

That is, my question could also interpreted as:
"what are, in your opinion, the pros and cons of a website entirely written with Monkey ?"

Of course a plain HTML5 text file is easier to edit and modify than a translated/obfuscated monkey file.. But with Monkeys editor you have the power of thirty party libraries/modules like Diddy, TimeLineFX, etc. at your disposal.

Sergio.


slenkar(Posted 2013) [#7]
Wouldnt it have huge security issues?
Lets say you have a comment box or a forum, you would need to use php to hide the MYSQL passwords and code, the source to a webpage is available to anyone so that wouldnt work.
You wouldnt be able to call a php script from monkey without exposing how it works, so spammers could post a billion comments if they just looked how you are calling the php script.


Zurrr(Posted 2013) [#8]
posibble but i don't like the loading part. btw can work around


Nicholas Peanut(Posted 2013) [#9]
"what are, in your opinion, the pros and cons of a website entirely written with Monkey ?"

only cons.
just a few :
- no security
- no separation of logic
- no styling
- embedded fonts
- slow build cycle
- needs a compile for every change
- no clear api to communicate with
- you cannot use the >1000.000(!) JavaScript libs on Github. without overly complex hacks
- if you get stuck on some problem, there is only a very small community that isn't build around 'making websites'

the things those thirty party libs do are all available to you when you just use html/css3/Javascript and the occasional js lib.

the only pro I think you see is:
- you don't have to learn new things.

in my opinion you're better of making a website in html5, and if you would want panels that resize when a mario bounces on them, you just add a little javascript/css3 into the mix.

anyway in short: use monkey for making gaem, use html for making web


semar(Posted 2013) [#10]
Interesting arguments indeed..


frank(Posted 2013) [#11]
- no security

Why? Slenkar his argument isn't different than any website using AJAX to post forums posts. There is nothing different than any (AJAX) webpage.

- no separation of logic

Why? You can make an MVC in Monkey; with the node.js target it seems very doable both frontend and backend. The eventually compiled version won't have separation but who cares about that?

- no styling

Why? You can build anything; you can even build games in Monkey, so you can style/theme anything you want. It might be more work, but what's the issue here?

- embedded fonts

This is a problem?

- slow build cycle

Why? If you have your dev pipeline set up it might be faster or slower than 'normal' pages; not sure why this is different? For me Monkey is not slower than most other stuff. We are desperately missing a REPL / interpreter indeed. Someone should make that. Besides that, I catch a lot of potential bugs with the types in monkey which go unnoticed until (much) later with normal JS.

- needs a compile for every change

Indeed; that's an issue. On the other hand, Monkey has types which makes errors easier to catch during compile than pure HTML5 making it, for me, usually as fast or faster than JS even including compiles. Also, a lot of people are not writing pure html/css/js anymore but sass, coffeescript and such; those need compile cycles too.

- no clear api to communicate with

You can make that API or model after an existing API of some existing library. There are examples in Haxe of this; some people even implemented a subset of CSS on top of a Haxe gui lib.

- you cannot use the >1000.000(!) JavaScript libs on Github. without overly complex hacks

Depends what you are doing. There are a quazillion canvas libs which can all be quite easily used. And you can mix with DOM but then you're not doing anymore what you asked.

- if you get stuck on some problem, there is only a very small community that isn't build around 'making websites'

That's true.

What I think is a huge problem; SEO. When you write websites with Canvas (which is what you are asking, right?) Google cannot read the text you have in the site and thus it cannot index it.

Hence it would make a lot more sense, like Corona does (but not for HTML), to add a native controls library for the frontend which, in html5, translates to normal html tags with css (in some encapsulation with Monkey, overridable with normal css if you really have to. yuck css). And for the backend a Monkey API on top of node & PHP (so you can use it on any server).

Then you have the best of both worlds and transparent at that.


Carlo(Posted 2014) [#12]
i am a create a full website
example
www.dracoders.com
it a dinamic site


Volker(Posted 2014) [#13]
Fails here under Firefox. Can't click any buttons :-(
Chrome and IE works.


slenkar(Posted 2014) [#14]
tested on chrome, nice website fills the whole screen
have you tried making a forum or other type-in form thingy?


Sub_Zero(Posted 2014) [#15]
Works fine in opera 18 here :) nice site


Carlo(Posted 2014) [#16]
not work in Fire Fox in my computer work fine


arawkins(Posted 2014) [#17]
Another disadvantage is poor search engine optimization. A lot of your content is going to be buried inside the canvas element in your code, as images, whereas with a normally marked up html website, all that text and semantic structure can be indexed. Flash swfs have a similar problem. I think your best bet would be to use Monkey as an enhancement to a html+css website, as opposed to a replacement. Monkey could be a good tool for visual and interactive content (slideshows, photo galleries, maps, virtual tours, etc.).


slenkar(Posted 2014) [#18]
How did you get the scroll bar on the browser to work with the webpage and how did you get the scrollbar to resize itself properly?


Dabz(Posted 2014) [#19]
If I was to build a website with monkey in mind, I would personally use a cross between tradition web languages, such as html and php, then embed monkey apps in it to make it a bit more flashy (And if a browser doesnt handle apps well, draw placeholder images instead)... There really should be a happy medium I think, but at the minute, I wouldnt rely only on monkey to power one, browsers are still not reliable when handling html5 canvas drawing, and mobiles are just terrible at supporting anything that usesclient side scripting (html5 canvas, and flash)... Nope... I wouldnt go there!

Dabz


Paul - Taiphoz(Posted 2014) [#20]
Dabz, I am planning to do something like that at the moment, I am about to pull my site down and redesign it, my first thought was to create a script that would function like a tradisional slider, sliding in images, that link to source images and displaying some information about the game, I think these would probably be about 800*400 and I would have one each per game so the page might have a number of them on it.

I'm wondering about performance tho how will a browser handle more than one canvas in the same page when there could be as many as 6 or 7, would the size of the canvas be an issue would smaller 300*300 canvas' stack up better than wider ones.

lots of things for me to think about and test before I make a move on it tho.