5 ms·
Ask HN: Web programming for a C++ server developer?
I've been programming low-latency, high throughput C++ systems for more than 5 years now, but I wanted to try my hand at some simple web development. Compared to 5-10 years ago (I'm 26 and haven't programmed for the web in a while), the sheer number of frameworks and add-ons to those frameworks is a bit overwhelming.
I've started to implement my site using Django as I'm a moderately proficient Python programmer but would be open to switching to another framework for a compelling reason. Also, where can I find resources to learn the more client facing stuff (AJAX, CSS, basic layout and design, etc)?
As an aside, has anyone else been through this before (i.e. much more comfortable with back end work but want to implement an idea you've had)? What did you do in that situation?
- wheels 17y agoI went through that jump about a year back, so here are some of the things that I've gleaned: - You'll be doing a lot of JS. Just use jQuery. It's the most popular of the JS / AJAX frameworks, so even if you decide not to use it later on, it's a good starting point. - I dig Ruby / Sinatra. Never really got into Rails or Django. You can learn how to use Sinatra + Haml + Sass in a few minutes. I've also learned that, somewhat to my surprise given my previous perception of their fan-bases that I don't really like Python and much prefer Ruby. - For novelty there's Wt (http://www.webtoolkit.eu/wt http://www.webtoolkit.eu/wt), haven't brought myself to actually use it for anything though. - CSS grid layout "frameworks" make things easier. I used (http://code.google.com/p/blueprintcss/ http://code.google.com/p/blueprintcss/) for our new site, but can't say that I had much love for it -- though still much better than doing all of the layout by hand.
- jknupp 17y agoWhat specifically about Ruby leads you to prefer it over Python? Are there better/more modules or is the language itself more expressive or powerful in some way? Also, was there a specific reason you chose Sinatra over Rails? I'm not familiar enough with either to make an informed decision so it would be interesting to hear others opinions.
- jrockway 17y agoI think you will basically have the same programming experience with any one of Perl, Python, or Ruby. It is a matter of personal taste, really.
- gte910h 17y agoUh no. Perl is horrible. It basically showed us that python/ruby languages were possible, but is horrible, and lots of legacy code it in is often horrible.
- jrockway 17y agoHorrible code is horrible. That has nothing to do with Perl. There is indeed a lot of terrible Perl in existence. But new Perl code is quite nice I can use two modules and reasonably assume that they don't both make conflicting changes to the global class hierarchy. In Ruby... not so much, at least if you are using Rails. Did you know that Perl 5 looks like this now? http://blog.jrock.us/articles/Multimethods.pod http://blog.jrock.us/articles/Multimethods.pod
- jrockway 17y agoBlah, bad editing. Insert a period between "quite nice" and "I can".
- gte910h 17y agoVisual basic CAN look nice. Its just the vast quantity of it doesn't. You are picking the people you're programming with when you pick a language. Lots of people do very dirty dirty things in perl, and while those exist in Ruby and Python as well, proportionately they are much fewer in number there.
- gte910h 17y agoRuby is cooler, python is cleaner. Rails is the bomb, except when you need to scale, or something is wrong. Python by far has more modules, and ties into C easiler (and C++ via weave).
- jknupp 17y agoAre there any books or tutorials on jQuery you've found especially useful?
- huhtenberg 17y ago> I've been programming low-latency, high throughput C++ systems for more than 5 years now You will cringe at the web stuff then. Lots and lots of CPU cycles are wasted to shorten the development cycle and simplify (dumb down) the life of the developers. Layers upon layers of abstraction. Using PHP to generate a static HTML page is not a big deal. This sort of thing. It certainly makes a lot of business sense as the hardware is cheap, and the labor is not. But if you are used to squeezing every last drop of performance from you code, it will be painful to look at some of the web stuff.
- nwatson 17y agoI'm in the same situation. I've never really written a DB-backed web-based application, so I'm starting down that road. Been working mostly on C++ distributed multi-threaded servers with lots of asynchronous network communication. I'm a big Perl fan and am comfortable with its object-oriented model so I've chosen to use it. Here's the environment/tools I've settled on so far: Apache on Linux (primary platform, might try to make sure works on Windows too); mod_perl 2 in Apache pre-fork; PostgreSQL 8.x for back-end; Rose::DB for DB persistence layer (apparently easy-to-use ORM, allows many-to-many relations unlike various other Perl-based DB layers); Template-Toolkit 2 for web template environment; going to layer on JavaScript later ... not sure which library to use yet. To some this may not be the ideal environment or the most current or most up-to-date set of tools. For me though it seems the quickest way to seriously explore and understand web issues. I have a big hole in my software experience where several web apps should be, and I need to fill it with something. Might try Django or some other Python tool later. I'd actually like to try Twisted some time (asynch Python network engine, not web-specific).
- laurent_b 17y agoComing from C++, if you do not want to become crazy using untyped languages you might be interested by the haxe programming language. A nice inference typed language which can be compiled down to neko bytecode (much like java bytecode), JavaScript (for the client side), Flash movies (idem), and even C++ Plus, haxe has a mod_neko for apache and lot of libraries to manipulate databases and templates. http://www.haxe.org http://www.haxe.org