Author

Topic: Javascript (Read 1572 times)

legendary
Activity: 826
Merit: 1001
rippleFanatic
February 21, 2012, 07:47:39 AM
#17
I plan on developing mostly browser-based applications. I'll go to lower-level non-scripting languages when I need server-based utilities.

Javascript is really taking off on the server-side, as node.js.  node.js is the cutting edge for server-side web apps, they're about to release version 1.0 which will have windows support (as in, you'll be able to host your node.js webserver on Microsoft Windows).

JQuery is the best place to start.  For fancy stuff, look to css3/html5.  If you want to get really fancy, check out d3.js - it uses a jQuery-like syntax.

Just keep nibbling at it, playing with demos and example code.  Think of something you want to make and just try to build it.

When your code starts getting to 100+ lines (the javascript code, not including the HTML markup), you should start thinking about code structure.  Ruby on Rails got famous because it was great at providing an MVC framework for web apps.  Coding anything beyond the most simple of web apps can get really hairy when you just start pasting together PHP scripts.

That's why people use frameworks.  jQuery is great, but its not a framework.  If you're doing a client-side app, unstructured jQuery can get very hairy beyond 100 lines or so.  Changes get harder and harder to make and the complexity gets unmanageable, and bugs get more and more common because of all the unintended side-effects when different parts of your code are all using global variables.  As an intermediate with javascript/jquery, I have been learning this the hard way very recently.

Writing structured, maintainable, modular code becomes very important.  Using objects, and choosing the right 'design pattern' for the job is how you do this.  MVC is basically a combination of several other more basic design patterns.  Essential JavaScript Design Patterns For Beginners is a great online-book for getting familiar with design patterns.  It just got a substantial update the other day.  There's a chapter on how to use design patterns with jQuery.

backbone.js is the most popular MVC framework for javascript.  It can run on node.js for the server-side, as well as used on the client-side (code can even be shared between the two, simplifying the development of a web-app).  It is fully compatible with jQuery.

Remember, jQuery makes it easy to lots of things, but it doesn't provide a framework for structuring an app - which will be the challenge you face after getting past the basics.

Don't worry much about MVC and design patterns for now (you will later if your app gets complex enough).  Take a look at the source code for bitcoinmonitor.com - its completely unobfuscated:  http://bitcoinmonitor.com/static/heartbeat.js.  He doesn't use any fancy design patterns, but his code is well-structured.  But if you read the code in the libraries he uses (flot code), fancier design patterns are used.
hero member
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
February 19, 2012, 02:48:35 PM
#16
My first web scripting language was Javascript. I do JQuery mostly now along with some mobile development top-layer platforms.
jQuery is JavaScript.

More specifically, JQuery is a custom written Javascript library.
Jon
donator
Activity: 98
Merit: 12
No Gods; No Masters; Only You
February 19, 2012, 02:03:19 PM
#15
I plan on developing mostly browser-based applications. I'll go to lower-level non-scripting languages when I need server-based utilities.
donator
Activity: 308
Merit: 250
February 19, 2012, 11:46:28 AM
#14
My first web scripting language was Javascript. I do JQuery mostly now along with some mobile development top-layer platforms.
jQuery is JavaScript.
legendary
Activity: 1896
Merit: 1353
February 19, 2012, 11:41:34 AM
#13
I meant to say "design language", not "client side". I am speaking of in-browser website development languages, not desktop programming.
http://pyjs.org/
hero member
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
February 19, 2012, 11:37:24 AM
#12
I want to learn Javascript [...]
Where do I start?

www.python.org


That's just ignorant. You're going to confuse people who don't know the difference between server-side and client-side languages. Ignorant people like OP.

Wait.... I know the difference, but now I'm confused.  WTF does that have to do with Python?  Python is very useful both client-side and server-side.

I meant to say "design language", not "client side". I am speaking of in-browser website development languages, not desktop programming.
legendary
Activity: 1904
Merit: 1002
February 19, 2012, 11:33:22 AM
#11
I want to learn Javascript [...]
Where do I start?

www.python.org


That's just ignorant. You're going to confuse people who don't know the difference between server-side and client-side languages. Ignorant people like OP.

Wait.... I know the difference, but now I'm confused.  WTF does that have to do with Python?  Python is very useful both client-side and server-side.
legendary
Activity: 1896
Merit: 1353
February 19, 2012, 05:00:14 AM
#10
I want to learn Javascript [...]
Where do I start?

www.python.org


That's just ignorant. You're going to confuse people who don't know the difference between server-side and client-side languages. Ignorant people like OP.
yes, but I like your new avatar!
hero member
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
February 19, 2012, 04:56:47 AM
#9
I want to learn Javascript [...]
Where do I start?

www.python.org


That's just ignorant. You're going to confuse people who don't know the difference between server-side and client-side languages. Ignorant people like OP.
legendary
Activity: 1896
Merit: 1353
February 19, 2012, 04:55:35 AM
#8
I want to learn Javascript [...]
Where do I start?

www.python.org
hero member
Activity: 588
Merit: 500
Hero VIP ultra official trusted super staff puppet
February 19, 2012, 04:36:47 AM
#7
If you're a beginner and you want to get started with making websites, understand the differences:

Programming is not what Javascript is for. Scripting is the lightweight, compiled-at-runtime version of programming that is easier for beginners to use.

If you want to learn something that isn't as hardcore as Perl or Python, PHP is the best for newbies to get started (except that it teaches you poor security practices).

If you want to learn something that is for web browsers, you will need to work with Javascript. JQuery is a top-layer to Javascript. It rides on top and is useless without Javascript. While using JQuery, you will also be using Javascript, the only difference being that you can do the same thing in JQuery in one line that used to take Javascript 100 lines to achieve.

My first web scripting language was Javascript. I do JQuery mostly now along with some mobile development top-layer platforms.

My first scripting language was mIRC script, then Dragonspeak for Furcadia, then PHP.

My first programming language was QBasic/Visual Basic for DOS.

I would recommend if anyone is trying to "get their feet wet" that the first thing they get into is PHP (most widely used) and MySQL. (I can hear all the security gurus cringing right now). If you're planning on saving the planet however, get into Perl, Erlang, and HTML5.

Ean
full member
Activity: 199
Merit: 100
February 19, 2012, 03:36:07 AM
#6
I honestly wouldn't recommend JavaScript as a first programming language -- it's got a lot of things that differ greatly from C/Java, which are much more common (untyped variables, for one). Obviously if you need JavaScript for a project, then yeah, you don't really have a choice. If you just want to get a good foundation for programming, C++ or Java would be better, and would have better resources available (college textbooks especially).

If you really must use JavaScript, the reference I used to get started is http://www.cs.brown.edu/courses/bridge/1998/res/javascript/javascript-tutorial.html. Lots of universities computer science depts. have useful tutorials online -- some even have lab assignments you can work through.

Are you saying the greatest difference between C/Java and Javascript are untyped variables?

Javascript is not perfect in any way, but if you want to learn to program you should just start doing stuff. Javascript is as good as anything for that.

In my opinion the lack of type declaration is a good thing while learning the basics since you don't have to struggle with irrelevant details.

I honestly wouldn't recommend C++ to anyone unless you want to hack the bitcoin client.
sr. member
Activity: 518
Merit: 250
February 19, 2012, 02:31:42 AM
#5
I honestly wouldn't recommend JavaScript as a first programming language -- it's got a lot of things that differ greatly from C/Java, which are much more common (untyped variables, for one). Obviously if you need JavaScript for a project, then yeah, you don't really have a choice. If you just want to get a good foundation for programming, C++ or Java would be better, and would have better resources available (college textbooks especially).

If you really must use JavaScript, the reference I used to get started is http://www.cs.brown.edu/courses/bridge/1998/res/javascript/javascript-tutorial.html. Lots of universities computer science depts. have useful tutorials online -- some even have lab assignments you can work through.
Jon
donator
Activity: 98
Merit: 12
No Gods; No Masters; Only You
February 18, 2012, 11:11:29 PM
#4
Jquery for Dummies is meeting my needs.

Thanks!
hero member
Activity: 812
Merit: 1000
February 18, 2012, 10:19:42 PM
#3
I want to learn Javascript as my first real programming language. I am good with HTML and CSS so I have completed that part of the suite. I now need to get to the deeper parts of web development.

Where do I start?

i guess most people learn javascript and then move on to jquery, but i'm doing it in reverse... jquery is helping me learn javascript.
legendary
Activity: 947
Merit: 1042
Hamster ate my bitcoin
February 18, 2012, 09:42:03 PM
#2
Hello World.
Jon
donator
Activity: 98
Merit: 12
No Gods; No Masters; Only You
February 18, 2012, 09:40:17 PM
#1
I want to learn Javascript as my first real programming language. I am good with HTML and CSS so I have completed that part of the suite. I now need to get to the deeper parts of web development.

Where do I start?
Jump to: