Bitcoin Forum
December 10, 2016, 03:19:59 AM *
News: Latest stable version of Bitcoin Core: 0.13.1  [Torrent].
 
   Home   Help Search Donate Login Register  
Pages: [1]
  Print  
Author Topic: Javascript  (Read 1327 times)
Jon
Donator
Member
*
Offline Offline

Activity: 98


No Gods; No Masters; Only You


View Profile
February 19, 2012, 01:40:17 AM
 #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?

The Communists say, equal labour entitles man to equal enjoyment. No, equal labour does not entitle you to it, but equal enjoyment alone entitles you to equal enjoyment. Enjoy, then you are entitled to enjoyment. But, if you have laboured and let the enjoyment be taken from you, then – ‘it serves you right.’ If you take the enjoyment, it is your right.
1481339999
Hero Member
*
Offline Offline

Posts: 1481339999

View Profile Personal Message (Offline)

Ignore
1481339999
Reply with quote  #2

1481339999
Report to moderator
1481339999
Hero Member
*
Offline Offline

Posts: 1481339999

View Profile Personal Message (Offline)

Ignore
1481339999
Reply with quote  #2

1481339999
Report to moderator
1481339999
Hero Member
*
Offline Offline

Posts: 1481339999

View Profile Personal Message (Offline)

Ignore
1481339999
Reply with quote  #2

1481339999
Report to moderator
Advertised sites are not endorsed by the Bitcoin Forum. They may be unsafe, untrustworthy, or illegal in your jurisdiction. Advertise here.
yogi
Legendary
*
Offline Offline

Activity: 947


Hamster ate my bitcoin


View Profile
February 19, 2012, 01:42:03 AM
 #2

Hello World.

payb.tc
Hero Member
*****
Offline Offline

Activity: 812



View Profile
February 19, 2012, 02:19:42 AM
 #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.
Jon
Donator
Member
*
Offline Offline

Activity: 98


No Gods; No Masters; Only You


View Profile
February 19, 2012, 03:11:29 AM
 #4

Jquery for Dummies is meeting my needs.

Thanks!

The Communists say, equal labour entitles man to equal enjoyment. No, equal labour does not entitle you to it, but equal enjoyment alone entitles you to equal enjoyment. Enjoy, then you are entitled to enjoyment. But, if you have laboured and let the enjoyment be taken from you, then – ‘it serves you right.’ If you take the enjoyment, it is your right.
Vanderbleek
Full Member
***
Offline Offline

Activity: 227


View Profile WWW
February 19, 2012, 06: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.

If I helped, feel free to donate to:
BTC: 1DimPUBPnmZuWu5XrMa3xVnFgMz1iGBNdr
LTC: LLqQuvRZd4uZyenER2mE8d3ns1N1qBWQjD
Ean
Full Member
***
Offline Offline

Activity: 199



View Profile
February 19, 2012, 07: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.

Quote from: Douglas Adams
The World Wide Web is the only thing I know of whose shortened form takes three times longer to say than what it's short for
Matthew N. Wright
Untrustworthy
Hero Member
*****
Offline Offline

Activity: 588


Hero VIP ultra official trusted super staff puppet


View Profile
February 19, 2012, 08: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.


ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
February 19, 2012, 08:55:35 AM
 #8

I want to learn Javascript [...]
Where do I start?

www.python.org

Electrum: the convenience of a web wallet, without the risks
Matthew N. Wright
Untrustworthy
Hero Member
*****
Offline Offline

Activity: 588


Hero VIP ultra official trusted super staff puppet


View Profile
February 19, 2012, 08: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.

ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
February 19, 2012, 09: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!

Electrum: the convenience of a web wallet, without the risks
notme
Legendary
*
Offline Offline

Activity: 1526


View Profile
February 19, 2012, 03:33:22 PM
 #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.

https://www.bitcoin.org/bitcoin.pdf
While no idea is perfect, some ideas are useful.
12jh3odyAAaR2XedPKZNCR4X4sebuotQzN
Matthew N. Wright
Untrustworthy
Hero Member
*****
Offline Offline

Activity: 588


Hero VIP ultra official trusted super staff puppet


View Profile
February 19, 2012, 03:37:24 PM
 #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.

ThomasV
Legendary
*
Offline Offline

Activity: 1722



View Profile WWW
February 19, 2012, 03:41:34 PM
 #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/

Electrum: the convenience of a web wallet, without the risks
mcorlett
Donator
Sr. Member
*
Offline Offline

Activity: 308



View Profile
February 19, 2012, 03:46:28 PM
 #14

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

Jon
Donator
Member
*
Offline Offline

Activity: 98


No Gods; No Masters; Only You


View Profile
February 19, 2012, 06: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.

The Communists say, equal labour entitles man to equal enjoyment. No, equal labour does not entitle you to it, but equal enjoyment alone entitles you to equal enjoyment. Enjoy, then you are entitled to enjoyment. But, if you have laboured and let the enjoyment be taken from you, then – ‘it serves you right.’ If you take the enjoyment, it is your right.
Matthew N. Wright
Untrustworthy
Hero Member
*****
Offline Offline

Activity: 588


Hero VIP ultra official trusted super staff puppet


View Profile
February 19, 2012, 06: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.

bitcoinBull
Legendary
*
Offline Offline

Activity: 826


rippleFanatic


View Profile
February 21, 2012, 11: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.

College of Bucking Bulls Knowledge
Pages: [1]
  Print  
 
Jump to:  

Sponsored by , a Bitcoin-accepting VPN.
Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2006-2009, Simple Machines Valid XHTML 1.0! Valid CSS!