Bitcoin Forum

Bitcoin => Development & Technical Discussion => Topic started by: Fuzzy on May 22, 2012, 08:18:50 AM



Title: What web related programming languages should I learn to make BitCoin Websites?
Post by: Fuzzy on May 22, 2012, 08:18:50 AM
I've been wondering this since I learned about Bitcoin and got into mining a year ago. What skills and what programming languages do you need to know to make a website that deals with handling users and bitcoin transfers?

Since the bitcoin protocol is so new, where did people figure out how to stream bitcoins from the client to a web page/database and back?

I've just started learning C++ and plan on picking up something more web/front end related after I've worked through the current book.

Any advice is appreciated.  :)


Title: Re: Where do you learn to develop sites that handle bitcoins?
Post by: CIYAM on May 22, 2012, 08:26:05 AM
I've been wondering this since I learned about Bitcoin and got into mining a year ago. What skills and what programming languages do you need to know to make a website that deals with handling users and bitcoin transfers?

You can do all the bitcoin related work using "bitcoind" which can be called from any language that allows "system" type calls (so which language you want to use is really not so relevant unless you are wanting to use a library interface).

Regarding using bitcoind you might be interested to have a look at https://en.bitcoin.it/wiki/Original_Bitcoin_client/API_Calls_list.

For handling "users" with the one wallet you can use "accounts" although bear in mind if you are going to actually run a "hot wallet" you will likely need to learn more about server security than about programming itself (you are probably well aware of this point with all the events that have happened in recent months).

Also if you are interested in the possibility of building Bitcoin web apps in C++ then you might be interested in my up and coming open source project (PM me for details).


Cheers,

Ian.


Title: Re: Where do you learn to develop sites that handle bitcoins?
Post by: kangasbros on May 22, 2012, 05:43:41 PM
If you like the django web framework (python), you can use the django_bitcoin library, which is developed by me + couple of other contributors.

https://github.com/kangasbros/django-bitcoin

I wrote a short tutorial about how to use it:

http://blog.kangasbros.fi/?p=85


Title: Re: Where do you learn to develop sites that handle bitcoins?
Post by: Stephen Gornick on May 22, 2012, 07:54:27 PM
Related:
 - http://en.bitcoin.it/wiki/Category:Shopping_Cart_Interfaces


Title: Re: Where do you learn to develop sites that handle bitcoins?
Post by: Fuzzy on May 23, 2012, 09:46:07 PM
Thanks for the replies guys. Looks like I may be able to at least try some stuff with C++ first.

Was hoping a few more devs would reply with regards to good web based languages to learn, but I guess they're busy working on stuff :D


Title: Re: Where do you learn to develop sites that handle bitcoins?
Post by: kangasbros on May 23, 2012, 10:34:02 PM
Thanks for the replies guys. Looks like I may be able to at least try some stuff with C++ first.

Was hoping a few more devs would reply with regards to good web based languages to learn, but I guess they're busy working on stuff :D

Personally I don't recommend going for C++ if you want to create web applications. Even PHP would be better choice. But I guess you have some reasons to choose that way, best of luck :)


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: DeathAndTaxes on May 23, 2012, 10:36:57 PM
Fuzzy I am going to get booed out of the room but I would recommend .Net (and specifically c#).

php is likely the "standard".  There seems to be more bitcoin web-app code in php than any other language (maybe more than all other languages combined).  I agree that C++ is likely the last choice when it comes to web development.  Maybe for back end processing but even then ... meh.

Top 3 IMHO:
php
java
.net (I know I won't get no love for this one)

As far as how to link the "front end" and the "back end" the simplest as pointed out above is to use the plain ole bitcoind running in server mode and have your web app communicate with it via the JSON API.  If you want to go more complex there are libraries which allow building custom applications which interface with the network.  You should be able to write a simple php application which pulls some data from the bitcoind and displays it on a webpage pretty easy.  Your "hello world" could be something like showing the current block height, and balance of your wallet.  Useless but a good way to get your server setup, write some php code, and figure out how to communicate with the bitcoind.    Everything else is just the same concept on a larger scale/scope.

http://www.webopedia.com/img/app.arch.gif

Throwing a little theory into the discussion.  Wait wait don't do to sleep yet it's not bad.  

A good application should be based on the ntier model.  So at the lowest level you have your datastore.  This could be something as simple as a text file but more likely is a database (MySQL is the most common).  Above that your have your low level plumbing which allows data access.  Luckily you won't be writing this.  Libraries to do that have existed for some time now.  The next level up is your business logic.  This is where bitcoind (or some custom bitcoin processing engine) fits in.  It is the "smarts" of your project.  The presentation layer should have no real "smarts".  It is simply for pre-validating user input (make sure to validate again in the business layer, and watch out for SQL Injection), and displaying the data (looking shiny).

Likely all that made about no sense and your first app will be "1 tier" (no that isn't a real thing) where a single blob of code handles everything from presentation to writing to the database.  You will find it becomes very difficult to maintain the application and even more difficult to keep it secure.  


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: weex on May 23, 2012, 10:40:38 PM
Fuzzy,

At this time I would get familiar with PHP and MySQL. For example you could setup my https://github.com/weex/oscommerce-bitcoin module which would require that you install oscommerce (not exactly cutting edge but useful for learning). With that process, you would have a working web store in a couple days and can modify from there.

Even if don't want oscommerce, there is a useful script in there called script/monitor.py written obviously in python that talks to bitcoind and shows you how to bridge between MySQL(and php which would connect to it) and bitcoind.

Good luck to you.

-weex


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: daybyter on May 24, 2012, 08:26:09 PM
My vote goes to PHP and MySQL. HTML of course, too...


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: Kumala on May 25, 2012, 03:39:54 AM
I use Ruby On Rails.  Web development up and running in no-time with lots of build in security features (SQL injection, etc.), tons of tools (so called GEMS) around that cover almost any topic you can think of. But if you do, I strongly recommend to do the development on OS X or Linux, too many limitations on Windows.
For database, MySQL is the most cost effective solution.



Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: daybyter on May 25, 2012, 11:14:57 AM
Are there cheap Rails hosts now? I studied it a while ago and must admit, that I had quite some problems to install it on a debian box. But the videos are great! (create a blog site in 15mins etc). Good thing is, that there are RAD tools for other languages now, that are practically identical, like CakePHP. Even the method names match.

I usually start with a data model (ArgoUML is the main tool here). Then create some MySQL from it and let the RAD tool create the MVC elements. There's actually not that much difference then whether you use Rails, Cake, Groovy etc.


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: CIYAM on May 26, 2012, 03:41:28 AM
I usually start with a data model (ArgoUML is the main tool here). Then create some MySQL from it and let the RAD tool create the MVC elements. There's actually not that much difference then whether you use Rails, Cake, Groovy etc.

You might be interested to take a quick look at this (59 secs): www.ciyam.com/videos/User.html

The approach I am taking will let you create a Blog or Forum in under 5 minutes without having to write a single line of code. :)


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: weex on May 26, 2012, 05:07:43 AM
So OP are you going to make a decision here or are you just trying to start some sort of webdev technology free-for-all?


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: Fuzzy on May 28, 2012, 01:47:44 AM
The crux of my situation is this: I first heard about BitCoin about a year ago. After deliberating about the best way to "get in on the action" I invested a few grand into mining hardware and started mining.

Since then I've had about a half-dozen BitCoin related ideas that I would've undertaken if I'd had the right programming skills. I feel that running a mining rig is no longer enough, and I'd like to get more involved, because you can only check this forum and the exchanges so often before you get bored.

Now that I have some free time, I'd like to learn how to bring my ideas to fruition. I'm starting with C++ because I'd like a solid foundation, and seeing as how in-depth it is, I'd like to start on it as soon as possible. I also know I'll be looking at developing back-end applications eventually.

I'm interested in BitCoin because it addresses so many of my frustrations revolving around fiat currency, and I know it's going to be a long term interest for me, so I'm prepared to put in the effort.

Making BitCoin related websites is the first thing I'd like to wrap my head around. The second would be integrating BitCoin with mobile devices, as I feel that is where BitCoin is eventually headed.

If this video is any indication (http://www.youtube.com/watch?feature=player_embedded&v=mjmuPqkVwWc), it'll be at least 5 years before BitCoin becomes mainstream, IF it becomes mainstream. I would like to be in good position by then to help meet the needs of the Crypto-Currency economy.


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: Fuzzy on May 28, 2012, 01:49:54 AM
[...]
Likely all that made about no sense

Thanks for the in-depth reply. It made a lot of sense actually, exactly what I'm looking for  :D


PHP + MySQL, Python, HTML + CSS, Javascript + jQuery.

/thread

Any one in particular you'd recommend looking at first?


So OP are you going to make a decision here or are you just trying to start some sort of webdev technology free-for-all?

The latter helps me with the former, so both!  ;D


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: NothinG on May 28, 2012, 01:52:24 AM
I'm surprised the JSON link hasn't been posted yet.

https://en.bitcoin.it/wiki/API_reference_(JSON-RPC)


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: cbeast on May 28, 2012, 06:10:33 PM
I am evaluating web programming languages as well. Ruby on Rails seems very friendly.


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: CIYAM on May 29, 2012, 01:57:51 AM
I am evaluating web programming languages as well. Ruby on Rails seems very friendly.

If you have a chance please checkout the demo video in my previous post - I am pretty confident that the system I have created is even more friendly than Rails (although at first it will seem a bit alien).


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: dogisland on May 29, 2012, 12:28:20 PM
I've been a software developer professionally since 1994 and actually started programming in 1984. I've programmed 6502, Z80, Basic, Pascal, c, c++ and more and now I'm using ruby on rails from Bitcoin projects and Java for my contracting work which is in investment banking.

Without a doubt if you want to build web based software ruby on rails is the way to go.

Without a doubt the learning curve for web applications is steeper than most people think.

A typical web stack looks like the following

HTML
CSS
Javascript
Views
Controllers
Models
Database

You'd need to learn all of these, and then it gets harder as most web stacks end up looking something like.

HTML <- HTML standards bases <- HAML html abstraction language
CSS <- Sass css with variables and mixins
Javascript <- JQuery and all the jquery plugins
View <- Internationalisation support I18N
Controllers
Models
Gems <- numerous libraries with their own learning curves.
Database <- Backup policies, replication.

And the most important thing, the thing that kills so many sites especially some of the Bitcoin sites I've seen. Design.

I mean the way it looks, if you're not willing to learn layout and graphic design techniques your site will look shit and you'll struggle to get users.

Saying that, if you think you have a good idea and you need some help, just let me know.



Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: swissmate on May 29, 2012, 03:22:28 PM
One word,
PHP


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: Fredyy on May 29, 2012, 10:04:58 PM
One word,
PHP
Second word,
MySQL


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: cytokine on May 29, 2012, 11:27:56 PM
I'm probably not the right person ( since I haven't done web programming in years, and the last time was with ASP classic based on pre-.NET VB ), but I'm in love with python. If I ever did any web programming again, I'd try to see if there was a way to do it in python, or a python-based framework.


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: BCB on May 29, 2012, 11:36:45 PM
One word "SECURITY"  (Please for the love of...)


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: Fuzzy on May 30, 2012, 10:20:51 PM
A little exert from "10 Questions with Zhou Tong" (http://coinabul.tumblr.com/post/24022841613/10qs-zhou-tong-bitcoinica)

Quote
I ended up reading books. I bought a few books about PHP, Ruby on Rails, personal finance and startups.

If a 17 year old could make money off of a site with PHP and Ruby on Rails, then why not?


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: nimnul on May 31, 2012, 11:39:21 AM
Haskell, of course! [:trollface:]

Technology matters, but it matters less than your ideas and your ability to deliver a usable product.

"LAMP" (Linux/Apache/MySQL/PHP" is the easiest technology to learn.

Then go Python and Node.JS. Then Erlang and Ruby. Then LISP family (Scheme, CL), ML family (OCAML, F#) and Haskell family (Haskell, Clean).

Learn whatever pleases your mind.


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: daybyter on May 31, 2012, 01:20:06 PM
Problem might be, that it just takes too long for you to get good in any language. So your idea is already implemented by someone else. So I recommend a collaboration (again). And if it's just to get some influence on good design practices.


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: BCB on May 31, 2012, 03:36:40 PM
Some advice to take (or not to take)
http://coinabul.tumblr.com/post/24022841613/10qs-zhou-tong-bitcoinica


Title: Re: What web related programming languages should I learn to make BitCoin Website?
Post by: BCB on May 31, 2012, 03:44:45 PM
And with everyone mentioning PHP I would hope a new user would be aware of security vulnerabilities if there chosen programs.
http://www.kb.cert.org/vuls/id/520827

(I'd be curious to know if anyone finds this on their existing server - there is a simple test).

Please also take a look at this thread as you plan your architecture.

https://bitcointalk.org/index.php?topic=81341.msg895308#msg895308