Jump to content

Do you Javascript is "crap"?  

33 members have voted

  1. 1. Do you Javascript is "crap"?

    • No, it is awesome
      15
    • No, it is just fine
      16
    • Yes, it is "crap"
      2


Recommended Posts

About three users on this forum got to talking about Javascript (CLICKY), and I decided to make a poll.

So what do you think?

Is javascript "crap"?

 

Please explain your answer.

 

There is no way that anybody can tell me that javascript is crap...

 

users can turn javascript off...

 

 

It all hipe javascript/ajax it all clint controlled sorry everyone but i dont think javasript means anythink to anyone sorry....

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/
Share on other sites

As I said in the other topic, it depends on how the programmer uses it. Sure, if you program it in a way so the site is dependent on having Javascript on, then it's not a good thing, but as I also said, it's not the language's fault that the programmer uses it poorly. If you properly separate the layers (content (HTML), presentation (CSS), behavior (Javascript)) and use unobtrusive Javascript then I believe Javascript can lead to richer user interfaces. I believe that the picture redarrow has of Javascript is more a shortcoming of himself rather than of the language itself. If you want me to elaborate further, please say so and I'll be happy to give you a working example.

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-542027
Share on other sites

Also, just because some vendors' implementations/interpreters suck, doesn't mean the language as intended is crappy. Otherwise CSS sucks too and even HTML.

 

You can do some pretty damn cool UI stuff with JavaScript, given the right library. I (fairly) recently discovered ExtJS, and it's greatly increased my appreciation of JavaScript. It's pretty complicated (to me at least - js is not my best skill) with a ton of options, but you can finally do all that stuff that you found missing in Web interfaces.

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-542062
Share on other sites

Javascript gained great popularity over past years especially with ajax sites. How ever just as we have seen in the past with flash, its sometimes just totally useless and only gets used because its just so cool.

 

Javascript is great if it serves a purpose which  sometimes means making a site look a little bit cooler but mostly it should be used to improve users experience.

 

When ever i start a new project creating a website i first make sure everything works with just plain php and html. after that i try to give it just extra touch with javascripting.

 

as for saying javascript sucks... i mean c'mon thats just too childish that kinda makes me think of those people that says xbox is better then ps3 or something.

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-542121
Share on other sites

Very profound answers.  Thank you all for your insight on the matter.  I, for one, do not know very much Javascript.  I just known enough to make certain things easier on the user.

 

Daniel0-if you would like to elaborate, go ahead.  I think it would be interesting to hear anything and everything (to a certain extent) that everyone has to say here.

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-542164
Share on other sites

Daniel0-if you would like to elaborate, go ahead.  I think it would be interesting to hear anything and everything (to a certain extent) that everyone has to say here.

 

I'll put up a live example later today.

 

Edit:

http://phpfreaks.com/daniel/unobtrusive_javascript/

 

Files/source of interest:

http://phpfreaks.com/daniel/unobtrusive_javascript/index.txt

http://phpfreaks.com/daniel/unobtrusive_javascript/lib.txt

http://phpfreaks.com/daniel/unobtrusive_javascript/backend.txt

http://phpfreaks.com/daniel/unobtrusive_javascript/script.js

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-542167
Share on other sites

Right, so I forgot to tell WHY the above would be a good idea. By completely separating the Javascript and HTML you'll have easier maintainable code as it will not be all mixed up.

 

Also, if you look at the Javascript and the link, then you'll see that the link actually has a href, but the Javascript attaches a click event to the link and returns false so the link will not be followed. This means that the users who have have Javascript off or are using browsers which are not capable of handling Javascript will still be able to use the application. However, the users who can use Javascript will experience the application as being more responsive and will probably have an overall better experience. It will also save some bandwidth seeing as in this case the response from the AJAX will be something like {"success":true,"new_number":18} which is 32 B long, where as a loading the page will be 551 B (approximately 1722% larger). On a very busy site with many such things, the savings could be significant.

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-542399
Share on other sites

  • 3 weeks later...
  • 2 weeks later...

Using Javascripts that are presentation style like draggable elements cursor elements, are really annoying and distracting.  But javascript has some nice features otherwise. 

 

It seems to me that these elements of JS can be implemented to benefit the user in a non-distracting way.

 

Ex: i am currently working on a moto-cross fantasy league site.  There are 40+ riders in each pre-entry list for each race. To me it seems more logical to be able to search a database and drag and drop the results than A) having the user type the riders name or B) having a extremely large drop down menu

 

Granted i haven't really explored any other options, which i intend to do when i cross the bridge of developing this feature.  but it just seems like the easiest, user friendly way to approach that situation.

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-568649
Share on other sites

I think javascript is absolutely great.

You can hide website elements with single clicks (user interface).

Use ajax for fast applications.

Move widgets and other stuff around (example i saw was a php messenger where they used js to move the window conversations around, "minimize" them and even close them).

 

Where would we be without javascript? :P

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-571470
Share on other sites

"js and ajax techniqe is verry good, but it over complexifies stuff and is not very reliable but its all we got"

 

It 'over complexifies' stuff?  Wouldn't that depend on the skill of the scripter using it?  I can handle most JS (including AJAX) just fine.

 

It's not very reliable?  I think you need to back that up.  If a user has JS enabled, and it was coded to be compatible with all (atleast most) browsers, where would this reliability problems come from?

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-572307
Share on other sites

its very functional if you learn how to use it.

 

Exactly! I don't know much JavaScript but I suppose there's always time to give it a go... I'm not sure if there is an official resource for JS for an explanation on every part of JS (like there is for server-side scripting languages such as PHP, etc). There may be an official resource so do let me know if there is :P. JavaScript is a little complicated and it has some really weird code that just does little things, like document.write() - and there are 2 things into that bit of code, one for document and one for write - why can't they make it simple - like output() lol...

Link to comment
https://forums.phpfreaks.com/topic/105775-javascript-is-crap/#findComment-573983
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.