Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (113)
games submitted by our members
Games in WIP (563)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 ... 3 4 [5] 6
  ignore  |  Print  
  JavaScript is a scam  (Read 13080 times)
0 Members and 1 Guest are viewing this topic.
Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #120 - Posted 2011-11-10 14:14:05 »

I think the point of HTML5 is that it's not meant to handle those things. Nor even is browser-hosted JavaScript really. I suspect the big thing for HTML5 on the horizon is televisions and tablet computing.

Cas Smiley

Offline appel

JGO Wizard


Medals: 50
Projects: 4


I always win!


« Reply #121 - Posted 2011-11-10 14:23:46 »

appel,

Does HTML 5 support Open GL?  Does it allow full handling of both left and right mouse button events?

OpenGL in HTML5 is supported as Canvas WebGL.

Not sure about the left/right mouse button events, haven't tested it well enough, but there are plenty webgl demos out there.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline Evil-Devil

Senior Member


Medals: 2


Fir Tree Master


« Reply #122 - Posted 2011-11-10 14:38:58 »

You have WebGL with HTML 5. Though its horrible slow compared to Java JNI bindings it is still possible to use and its growing.

//edit, damn work ^^" two posts in the meantime
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #123 - Posted 2011-11-10 15:16:55 »

And still shafted, because it requires Microsoft to implement it and roll it out.

Cas Smiley

Offline sproingie

JGO Kernel


Medals: 202



« Reply #124 - Posted 2011-11-10 15:42:16 »

I can't wait for all the exploits to come out against WebGL.  Does anyone think their OpenGL driver is hardened for security?
Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #125 - Posted 2011-11-10 15:46:48 »

Exactly why Microsoft aren't enabling it. WebGL is really just a small hole though really. Does anyone really think that with Javascript and browsers having basically all the power of an ordinary desktop client that the latest crop of HTML5 browsers aren't basically going to be riddled with security holes like swiss cheeses to the extent that Java, PDF and Flash holes are going to look like Fort Knox security? And think about it: it's easy to disable plugins. Not so easy to disable your browser.

Cas Smiley

Offline appel

JGO Wizard


Medals: 50
Projects: 4


I always win!


« Reply #126 - Posted 2011-11-10 15:56:09 »

Exactly why Microsoft aren't enabling it. WebGL is really just a small hole though really. Does anyone really think that with Javascript and browsers having basically all the power of an ordinary desktop client that the latest crop of HTML5 browsers aren't basically going to be riddled with security holes like swiss cheeses to the extent that Java, PDF and Flash holes are going to look like Fort Knox security? And think about it: it's easy to disable plugins. Not so easy to disable your browser.

Cas Smiley
Browser makers can do little with regards of security when it comes to plug-ins for your browser, e.g. Java applets, PDF docs or Flash. The makers of those plugins have to ensure security, so you have browser security as a distributed responsibility instead of as a single responsibility.
If, let's say, Mozilla implements HTML5, it's up to them to make it secure. They cannot guarantee security if you use 3rd party plugins, nor should they. And it's a lot easier nowadays to update your browser (e.g. FireFox) than it is to update your browser + all your plugins. At least for me, it's a whole lot bothersome to accept to update that annoying Adobe Acrobat reader than it is to update FireFox.

So, in practice, HTML5 might reduce security holes because it reduces the need for plugins, and people will overall be more up-to-date.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline princec

JGO Kernel


Medals: 376
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #127 - Posted 2011-11-10 16:03:06 »

I somehow doubt it. Only time will tell if my predictions are right but there appear to be plenty of security questions over the HTML5+JS combo. Won't be long before we see the big ones being used for sploits.

Cas Smiley

Offline JL235

JGO Coder


Medals: 10



« Reply #128 - Posted 2011-11-10 16:50:11 »

I can't wait for all the exploits to come out against WebGL.  Does anyone think their OpenGL driver is hardened for security?
I believe some browsers, either Firefox or Chrome (or both?), only enable WebGL on certain cards in order to avoid security holes. Plus most issues found will probably be OS and driver specific.

CSS3....when it is fully supported in IE11+ the web could look much better.
Many CSS 3 selectors were implemented in IE 8 and even IE 7. IE 9 supports pretty much all of the selectors that other browsers supports, and the ones which are missing are typically also missing or very buggy in other browsers.

For visuals, all the main stuff is already supported by IE 9. This includes border radius, box shadows and CSS transitions (through the -ms- prefix). CSS gradients are missing, but you can use SVG as a background (and of course the old DirectX filters, which even IE 6 supports, but they don't play nicely with properties such as border-radius). The only noticeable property which is missing is text shadow, for which there is no pure CSS alternative (you'd have to include a piece of text twice in your HTML and use one of them as the shadow). Gradients and text shadow are supported in IE 10.

The reason why Webkit and Firefox support so many more advanced features then IE is because the features are rushed in, at sub-par quality, with bugs and issues left outstanding. Take a look around the Mozilla bug tracker and you can find plenty of known HTML5 bugs which are several years old, and I personally encounter these bugs all the time. For example in Firefox you can break the matrix inside the canvas, leaving it in a state where it's no longer usable, at all, even if you explicitly set a new matrix using 'setTransform'. It's also possible to setup and draw to a canvas, and have the contents appear on a totally different separate canvas, due to rendering bugs.

Pretty much all of my JS 'just works' in IE 9, whilst it is rare that I don't encounter a browser specific bug in Firefox or Chrome (especially Firefox).

Offline longino

Junior Member


Medals: 1



« Reply #129 - Posted 2011-11-10 18:17:45 »

Comments like this show how little you really know about concurrency in JavaScript, because your just flat wrong. In JavaScript objects cannot be shared between threads. All communication is performed using messages, which are copied when sent, and this cannot be circumvented. It's just like Erlang.

That's not the problem (Well, unnecessary copying is, but that's not what we are talking about).

The problem is the global environment and other objects caught in the lexical environment when declaring closures. The global variable could be changed. Definitely not like Erlang.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline longino

Junior Member


Medals: 1



« Reply #130 - Posted 2011-11-10 18:21:27 »

Seriously... people should stop hating and start loving JavaScript, because it will play such a big role in this trend. Not knowing JavaScript in a few years will be equivalent to "not able to make web pages", and let's face it, most of what programmers do nowadays is web page related.

Haha.
Offline JL235

JGO Coder


Medals: 10



« Reply #131 - Posted 2011-11-10 19:21:47 »

Comments like this show how little you really know about concurrency in JavaScript, because your just flat wrong. In JavaScript objects cannot be shared between threads. All communication is performed using messages, which are copied when sent, and this cannot be circumvented. It's just like Erlang.
The problem is the global environment and other objects caught in the lexical environment when declaring closures. The global variable could be changed. Definitely not like Erlang.
Two Web Workers cannot reference the same variable in JS, so yes, it's like Erlang.

Offline Chromanoid

Junior Member


Medals: 3



« Reply #132 - Posted 2011-11-10 20:06:52 »

I use GWT. JavaScript is like tacky duct tape. As long as I don't have to touch it, it doesn't bother me.
Offline Evil-Devil

Senior Member


Medals: 2


Fir Tree Master


« Reply #133 - Posted 2011-11-11 09:44:30 »

CSS3....when it is fully supported in IE11+ the web could look much better.
Many CSS 3 selectors were implemented in IE 8 and even IE 7. IE 9 supports pretty much all of the selectors that other browsers supports, and the ones which are missing are typically also missing or very buggy in other browsers.

For visuals, all the main stuff is already supported by IE 9. This includes border radius, box shadows and CSS transitions (through the -ms- prefix). CSS gradients are missing, but you can use SVG as a background (and of course the old DirectX filters, which even IE 6 supports, but they don't play nicely with properties such as border-radius). The only noticeable property which is missing is text shadow, for which there is no pure CSS alternative (you'd have to include a piece of text twice in your HTML and use one of them as the shadow). Gradients and text shadow are supported in IE 10.
Yes, the support is growing, but to slow! And even thus features implemented were buggy. Attribute Selectors, pseudo-classes and a lot more. I agree that the IE Dev Team has done a great job improving the render engine since IE6 but there is still a lot of work to be done. For example the border-radius, why haven't they implemented in IE8? Instead they kicked out the interface and done another horrible to use interface. At least they fixed the Box-Modell Issues.

Well and at the other site of their products they stripped of Outlooks HTML caps back to the '90s!

Maybe all this will end some day.

//edit: Another thing i missed out. IE9 hardware acceleration is pretty neat when you hear about it. But when you have to disable it to see any website its pretty lame. Not to mention that the initial 64bit release did not worked either.

I'm looking forward for IE10, but they could have done so much more...
Offline JL235

JGO Coder


Medals: 10



« Reply #134 - Posted 2011-11-11 20:35:22 »

CSS3....when it is fully supported in IE11+ the web could look much better.
Many CSS 3 selectors were implemented in IE 8 and even IE 7. IE 9 supports pretty much all of the selectors that other browsers supports, and the ones which are missing are typically also missing or very buggy in other browsers.

For visuals, all the main stuff is already supported by IE 9. This includes border radius, box shadows and CSS transitions (through the -ms- prefix). CSS gradients are missing, but you can use SVG as a background (and of course the old DirectX filters, which even IE 6 supports, but they don't play nicely with properties such as border-radius). The only noticeable property which is missing is text shadow, for which there is no pure CSS alternative (you'd have to include a piece of text twice in your HTML and use one of them as the shadow). Gradients and text shadow are supported in IE 10.
Yes, the support is growing, but to slow! And even thus features implemented were buggy. Attribute Selectors, pseudo-classes and a lot more. I agree that the IE Dev Team has done a great job improving the render engine since IE6 but there is still a lot of work to be done. For example the border-radius, why haven't they implemented in IE8? Instead they kicked out the interface and done another horrible to use interface. At least they fixed the Box-Modell Issues.
A little unfair, since the box-model was fixed when IE 6 came out. That was quite a long time ago. I also personally use the box-model quite heavily on my pages (through box-sizing), as certain layouts are relatively simple to build using it.

Offline appel

JGO Wizard


Medals: 50
Projects: 4


I always win!


« Reply #135 - Posted 2011-11-11 22:05:07 »

I hate the box-model, been CSS'ing a bit lately, and it still whacks my mind.

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #136 - Posted 2011-11-12 18:37:50 »

And still shafted, because it requires Microsoft to implement it and roll it out.

Depends on your market. IE is below 30% in some countries. Also, IE's share is generally a lot lower among gamers.

I hate the box-model, been CSS'ing a bit lately, and it still whacks my mind.

See box-sizing.

To be honest, I think that box-sizing:border-box would have been the better default. It's a lot more powerful and also more flexible.

弾幕 ☆ @mahonnaiseblog
Offline appel

JGO Wizard


Medals: 50
Projects: 4


I always win!


« Reply #137 - Posted 2011-11-12 20:56:51 »

I think that's one of the worst URL fails I've seen in my life.  Grin

Check out the 4K competition @ www.java4k.com
Check out GAMADU (my own site) @ http://gamadu.com/
Offline ra4king

JGO Kernel


Medals: 345
Projects: 3
Exp: 5 years


I'm the King!


« Reply #138 - Posted 2011-11-12 21:36:03 »

@Onyx
You don't put quotations around the URL. You simply do: [url=http://www.url.com]My URL[/url]

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #139 - Posted 2011-11-12 21:56:05 »

Well, that's UBB for you. Sometimes you need quotes, sometimes they are optional, and sometimes they don't work.

弾幕 ☆ @mahonnaiseblog
Offline JL235

JGO Coder


Medals: 10



« Reply #140 - Posted 2011-11-13 02:55:19 »

To be honest, I think that box-sizing:border-box would have been the better default. It's a lot more powerful and also more flexible.
Agreed. We already have one property for outer padding, the margin, we don't need two. So it's much more useful if padding works inside width/height then outside. Working around this model is also much easier then working around the default model.

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #141 - Posted 2011-11-13 20:39:13 »

To be honest, I think that box-sizing:border-box would have been the better default. It's a lot more powerful and also more flexible.
Agreed. We already have one property for outer padding, the margin, we don't need two. So it's much more useful if padding works inside width/height then outside. Working around this model is also much easier then working around the default model.
The key point is that it can be used in conjunction with percentage dimensions. Additionally, you don't have to do the math yourself if you're using fixed sizes.

So yea, Microsoft did have the right idea here.

By the way, this wasn't the first nor the last time that specs were incorrectly interpreted, because that incorrect interpretation sounds saner (i.e. more useful).

Personally, I still think the current box model was a mistake. It's very inconvenient and very limited. Fortunately we now do have a choice. If we don't need to support anything below IE8, that is.

弾幕 ☆ @mahonnaiseblog
Offline Nate

JGO Kernel


Medals: 145
Projects: 4
Exp: 14 years


Esoteric Software


« Reply #142 - Posted 2011-11-13 21:41:45 »

I find just not doing any fecking websites at all extremely satisfying. Smiley

Offline Evil-Devil

Senior Member


Medals: 2


Fir Tree Master


« Reply #143 - Posted 2011-11-14 14:57:01 »

Oh, that Box-Sizing article is new to me. Haven't knew there is a switch like that.

Actually I tried allways to go with: size = width | height + padding + border. Except for rare cases like mixing relativ/absolut block/inline elements together that worked pretty fine.
Offline duce

Senior Newbie





« Reply #144 - Posted 2011-12-07 02:44:40 »

I'm going to be honest, I don't like JavaScript, it isn't my type of language, but I'm forced to use it. I love how easy it is to set up a small script of 10-20 lines of code, but I really hate writing big applications with it. I really hope Google's Dart(http://dartr.com/) takes off. They made some very valid points in their explanation for creating the language. I got a chance to play around with it, and I much prefer the syntax. Right now, it compiles right into JS, but Google wants to strive for this language on browsers, as well as the server.
Offline CommanderKeith
« Reply #145 - Posted 2011-12-08 08:30:40 »

I also hate javascript, HTML, CSS, PHP and friends. I've been learning it over the last 5 days to try and make online multi-choice exam questions for my students and it's been frustrating.

There are 8 reasons why i hate it so far:
  • 1 No predictive text insertion in Netbeans or eclipse AFAIK. In java i can type a variable and then press '.' and the IDE will show all of its fields and methods. Not so when using javascript, i guess because it is not strongly typed.
  • 2 No exceptions and javascript just silently fails when there's an error. I think I need fire bug to solve that, but why can't the IDE just catch it?
  • 3 To do anything useful on the web I need to learn 5 different languages: HTML, javascript, PHP, CSS and SQL with all of their little ridiculous peculiarites. These range from different ways to declare variables (var vs $) to different ways to doing comments (// vs /*  */ vs <!-- -->).
  • 4 No definitive javadoc equivalent, I have to search random crap on google to find answers and ways of doing things.
  • 5 The 'DOM tree' is silly. It doesn't make sense that everything is a node, including attributes, yet attributes are not children of the nodes that they belong to and they have no parent. In that case attributes shouldn't be nodes!
  • 6 All the browsers have different ways of doing things.
  • 7 The crazy mixture of manipulating the DOM with text using element.innerHTML="stuff" vs doing it using DOM nodes, which are supposed to give the same result but often don't.
  • 8 Trial and error lucky dip approach of programming in javascript where anything may or may not work and it's not clear why.

I've been meaning to give GWT a go since it's supposed to fix some of those issues, but that means learning yet another API that may or may not actually help

Offline cylab

JGO Ninja


Medals: 49



« Reply #146 - Posted 2011-12-08 13:22:00 »

Some "help":

1) Code-Completion works in Netbeans with .js files, but not so great in embedded scripts (which should banned anyway - google "unobstrusive javascript"). Don't know about Eclipse - best JS-Support is in Intellij Idea.
2) You can install a JS-Debugger based on Firebug with Netbeans
5-7) To ease this pain, I recommend jQuery

Mathias - I Know What [you] Did Last Summer!
Offline JL235

JGO Coder


Medals: 10



« Reply #147 - Posted 2011-12-08 13:22:01 »

1 No predictive text insertion in Netbeans or eclipse AFAIK. In java i can type a variable and then press '.' and the IDE will show all of its fields and methods. Not so when using javascript, i guess because it is not strongly typed.
Try Visual Studio, this does have auto-completion.

2 No exceptions and javascript just silently fails when there's an error. I think I need fire bug to solve that, but why can't the IDE just catch it?
Yes it does. With IE 6 (and some other IE versions) the error was shown to the user, and this meant if you went to a broken page, you would receive half a dozen script error dialogues. Due to the annoyance of this, errors are hidden from users, until shown.

In Firefox you can see errors using the error console (ctrl+shift+J), or through Firebug (right click, inspect). Chrome, IE, Opera and Safari all have equivalents for displaying thrown errors in one form or another, and include their own DOM navigators and debuggers. You can also get Firebug Lite for non-Firefox browsers.

3 To do anything useful on the web I need to learn 5 different languages: HTML, javascript, PHP, CSS and SQL with all of their little ridiculous peculiarites. These range from different ways to declare variables (var vs $) to different ways to doing comments (// vs /*  */ vs <!-- -->).
You can use JavaScript server side too, and you could take a look at Ruby which is much nicer to write than PHP.

Tbh any real web development rarely uses lots of SQL directly, as it's pretty common to use an ORM. There are plenty around, and I even wrote my own over about 2 days so I could avoid SQL in PHP.

HTML/CSS vs pages of Java just comes down to personal taste.

4 No definitive javadoc equivalent, I have to search random crap on google to find answers and ways of doing things.
Check out the Mozilla reference or the MSDN. I also find Quirksmode useful for looking up compatibility, although it's often only accurate on popular stuff.

The specs are also online, which state the objects, attributes and methods that different standards support. Some of these are massive, and go into lots of detail, but some like the one for the Canvas element, are invaluable.

5 The 'DOM tree' is silly. It doesn't make sense that everything is a node, including attributes, yet attributes are not children of the nodes that they belong to and they have no parent. In that case attributes shouldn't be nodes!
I presume you are talking about 'setAttributeNode' and 'getAttributeNode'? They are rarely used, and I didn't know they existed until you mentioned them. Try 'getAttribute' and 'setAttribute' instead. Attributes aren't nodes, they are key-values stored on the DOM nodes, it just happens that those two methods give a 'node-like' interface.

However it's common for only library writers to work directly on the DOM. Everyone else just uses jQuery (or similar).

6 All the browsers have different ways of doing things.
Use jQuery.

7 The crazy mixture of manipulating the DOM with text using element.innerHTML="stuff" vs doing it using DOM nodes, which are supposed to give the same result but often don't.
Again, use jQuery.

8 Trial and error lucky dip approach of programming in javascript where anything may or may not work and it's not clear why.
Check your errors. Even when you just get a browser specific error code, it's often enough to be able to look up the issue.

I hope that helps!

Offline CommanderKeith
« Reply #148 - Posted 2011-12-08 14:41:53 »

Thanks cylab and jl235,  much appreciated. I'll try your recommendations. Yes I was using embedded script so i'll change that first thing.
Jquery seemed like bloat so avoided it but I'll have a closer look now.

Offline oNyx

JGO Coder


Medals: 2


pixels! :x


« Reply #149 - Posted 2011-12-08 19:16:57 »

I also hate javascript, HTML, CSS, PHP and friends. I've been learning it over the last 5 days to try and make online multi-choice exam questions for my students and it's been frustrating.[...]

Oh boy. That's quite the project. I actually did something similar last week. It was a survey with several pages, additional questions which are shown if you select specific answers, 14-15 languages, matrix questions, radio buttons, checkboxes, textareas, optional stuff, nagging if required stuff wasn't filled in, and things like that.

Pretty complicated, really.

I used a data-driven approach, client-sided templating (with inline templates), and event delegation. I used jQuery as base lib and underscore's template engine (I'd use Handlebars or plain Mustache nowadays).

This really isn't something a beginner could have pulled off. Also, someone was willing to pay about 5000€ for that. It really was quite a bit of work which required quite a bit of experience.

Well, take a look at SCORM. It's some kind of elearning standard. There are tools for creating those SCORM files and there are also players which display them. This might be exactly what you want.

[...]Jquery seemed like bloat so avoided it but I'll have a closer look now.

jQuery is bloat. However, it makes DOM manipulation/transversal, events, effects, and ajax a lot easier. You'll need very little code for all these things. It also takes care of compatibility issues (aka "browser normalization").

In most cases, it's totally worth those ~33kb (1.7.1, minified, gzipped).

弾幕 ☆ @mahonnaiseblog
Pages: 1 ... 3 4 [5] 6
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

Dwinin (16 views)
2014-09-12 09:08:26

Norakomi (50 views)
2014-09-10 13:57:51

TehJavaDev (58 views)
2014-09-10 06:39:09

Tekkerue (27 views)
2014-09-09 02:24:56

mitcheeb (50 views)
2014-09-08 06:06:29

BurntPizza (34 views)
2014-09-07 01:13:42

Longarmx (20 views)
2014-09-07 01:12:14

Longarmx (23 views)
2014-09-07 01:11:22

Longarmx (22 views)
2014-09-07 01:10:19

mitcheeb (31 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!