Wanna Create Dynamic Websites? Learn JavaScript

By Daniel Scocco

If you want to become an expert programmer and make a living developing software you’ll need to learn a wide range of stuff, from logic gates to how the hardware works, from algorithms to data structures and programming paradigms (if this is actually what you are looking for I suggest you peek at the curriculum of the Computer Science degree on some good university and follow along).

If all you want is to be able to tweak your websites and add some dynamic effects here and there (e.g., creating quizzes or dynamic widgets), on the other hand, the road can be much shorter. All you’ll need is some basic knowledge of programming logic (this introduction on Wikiversity is decent) and JavaScript, which is a scripting language that is executed directly in the browser and which can alter elements of HTML pages in real time.

Another good option is PHP, but lately I am finding that JavaScript gives you much more flexibility, especially if you want to create dynamic effects without re-loading the web pages. On top of that you are now able to interface with your database (e.g., MySQL) using Javascript too, so you can use it even to power applications where you need to store/retrieve user data.

The W3Schools website has a good JavaScript tutorial to get you started. I like particularly because it’s focused on practical things you can do with it.

Once you start studying and reading about JavaScript you’ll inevitably hear about libraries like JQuery and Zepto.js. They basically create helper functions and constructs to make your life as a developer easier. My recommendation, however, is to avoid studying or using those libraries until you have a good knowledge about the core JavaScript.




Share

20 Responses to “Wanna Create Dynamic Websites? Learn JavaScript”

  • Broderie Iasi

    Thanks for sharing that W3Schools tutorial.

  • John Kim

    I’m starting by first learning html and css. Once my understanding of these two technologies are clear, I will begin learning javascript.

  • Kiran Pagar

    As far as web is concerned, there is endless debate in choosing platform. That discussion ends in one of three, .NET stack, Java/J2EE stack or PHP/mySQL stack. And any of the option is simply as good as the next one.

    But in recent years, javascript is coming up really strong. With node.js(thanks Ryan Dahl!)/backbone.js/mongoDB stack, it’s now true fourth option in debate.
    Some of the major benefits are javascript on server as well as client(this one is biggie, right!), scalable NoSQL database, fast, reliable, light blah blah…!

    Trello.com, now has more than 1.5 million users, is good example for this.

  • James

    Javascript has become increasingly important in the development of dynamic web sites, especially as html5 becomes more popular. One of my favorites is the canvas element. Javascript, in conjunction with the canvas element, can be used to create charts, graphs, games, an image editing app, etc.

  • Osman Hameed

    Thanks for the reminder and for sharing the link!

  • kalyan

    Thanks for the article Daniel. But I heard and read (somewhere) that using too many JS on a site can slow down the render of a web site, causing it load slow and then possibly driving off potential visitors. All the available online webpage test tools, such as Google page speed, Yslow, webpagetest suggest less use of JS on a site so that it can load faster. Any thoughts on this Daniel?

  • Jeffrey

    Thanks for sharing the link!

  • MK Sam

    thanks for the article, JavaScript is becoming more and more popular in these days , but I’ve heard that javascript can slow your website browse which can cause loss in search traffic. Is it true ?

  • Daniel Scocco

    @kalyan and @MK Sam, too much of anything is bad. So yeas don’t use JavaScript everywhere just for the sake of it, cause in this case it will slow down your pages.

    There are many things you can only achieve via JavaScript though. For instance, do you use Gmail or Google Analytics? There’s a lot of JavaScript there. Should Google remove those dynamic effects to speed up things? I don’t think so, cause they are the core of the applications.

    Bottom line: use JavaScript to achieve things that are essential to your website/application.

  • SATISH

    @kalyan, @MK, @Daniel,

    Good point. yes, it takes more time to load ..but only if the JavaScript you’re using is synchonous. i.e., rendering of other page elements/resources stops until the JavaScript code is loaded.

    There is much better JavaScript code, which is asynchronous. i.e., browser isn’t interrupted by these JavaScript code. They load independently, and the browser continues to load the other elements of the page simultaneously.

    This is the reason many ad networks are switching to asynchronous ad codes. Even Google recently switched to asynchronous ad code:
    http://technotip.org/did-you-switch-to-adsense-asynchronous-ad-code-yet/

    Advantage of learning jQuery, node.js is we can use callback functions and write asynchronous code much more efficiently. backbone.js is somewhat advanced. After all these continue learning with jsconsole and other such frameworks. yes, it never ends. node.js and related technologies are relatively new and will change/improve and you’ll have to be upto date. If you have the passion, you’ll sustain orelse you might find every improvement/change as pain in the a**.

    My suggestion, if you’re new to these web technologies, then first learn HTML5, CSS3, jQuery, bootstrap(),PHP MySQL, codeigniter(or other similar PHP framework),node.js, mongod,

  • SATISH

    @kalyan, @MK, @Daniel,

    Good point. yes, it takes more time to load ..but only if the JavaScript you’re using is synchonous. i.e., rendering of other page elements/resources stops until the JavaScript code is loaded.

    There is much better JavaScript code, which is asynchronous. i.e., browser isn’t interrupted by these JavaScript code. They load independently, and the browser continues to load the other elements of the page simultaneously.

    This is the reason many ad networks are switching to asynchronous ad codes. Even Google recently switched to asynchronous ad code:
    http://technotip.org/did-you-switch-to-adsense-asynchronous-ad-code-yet/

    Advantage of learning jQuery, node.js is we can use callback functions and write asynchronous code much more efficiently. backbone.js is somewhat advanced. After all these, continue learning with jsconsole and other such frameworks. yes, it never ends. node.js and related technologies are relatively new and will change/improve and you’ll have to be up to date. If you have the passion, you’ll sustain orelse you might find every improvement/change as pain in the ass.

    My suggestion, if you’re new to these web technologies, then learn in this order HTML5, CSS3, jQuery, bootstrap(or other similar),PHP MySQL, codeigniter(or other similar PHP framework),node.js, mongod ….etc

    Better to learn related things. Do not continuously switch between android, .net, PHP, j2ee, j2me, Perl, ruby etc, stay/stick with 1 field for sometime before you think of making the switch.. Better stick with related technologies and excell in it, rather than being jack of all technologies!!

    These web technologies are not that difficult either. you’ll fall in love, if you learn it the right way.

    If you wish you can have a quick look at these jQuery tutorial list, you can go through it in 48hrs and learn from these free text notes and video tutorials:
    http://technotip.com/2514/jquery-tutorial-list/

    Happy learning ..happy coding

    Don’t just write the code, compose them!

  • SATISH

    oops …Daniel, delete my first comment and approve only 2nd comment. Am using my cell phone to write these comments and I pressed submit button by mistake, and the first comment was posted incomplete!

    Hope my 2nd comment helps someone!

  • Christopher Quinn

    Interesting post. Tried to learn JavaScript but was too distracted with other projects and work to really give it a serious effort.

    Perhaps I should take a second look! Last I looked, our local community college had a short class on this during the summer and I almost considered enrolling for their 4 week class.

    Chris

  • Mary HUnter

    Are you familiar with codeacademy.com?

    I love that site. I did their jQuery tutorial earlier this year and really enjoyed it. I think they have a javascript one too.

    cheers,

    Mary

  • Speedbird103

    This will seem like a stupid question, but how hard is javascript to learn? I’ve also been put off by using it because I’ve heard it can slow down your website? I suppose it depends on what you broadband speed is?

  • Monu Singh

    I have tried using w3school and learned half way but didn’t able to make it to 2nd lesson. It is interesting but i found that there is a lack of softwares for free, can anyone let me know which software i can use to learn it at fullest.

    Thanks

  • jayesh prajapati

    Javascript has become progressively important in the growth of powerful web websites, especially as html5 becomes more popular. One of my most favorite is the fabric factor. Javascript, together with the fabric factor, can be used to make maps, maps, activities, an picture modifying app, etc.

  • John W

    Hey MK Sam,

    yes it is true that using more java script can be harmful and loss your rankings. But it is not bad at all.

    If you know the proper way to use it then you will not get any problem.

  • Rajesh

    JS is awesome! After learning HTML and CSS I advice students to start learning JavaScript. Node JS is also becoming famous these days.

  • Peter @ Shank Buttons

    I started to go through OOP javascript and took my self to the next level. I’m pretty amazed how javascript can be leveraged and use it as a programming language. I am currently developing a web based game engine with it and I hope it come out well.

Comments are closed.