Ask HN: How do I begin web development without local files?
So, for the moment and for the forseeable future, I'm stuck on an iPad and library computers. I know html and CSS relatively well, but I would like to learn how to build a fairly simple web app and database.
Am I stuck? I am primarily using cpanel to write html. It's kind of a bummer, but it works, slowly.
I've begun learning python on codeacademy, but I'm definately not at the point of writing an app with it. I don't even know how to install the thing on a server.
Sorry for the totally clueless post, but even a couple of web apps to google or something would help me out a lot! Thanks.
21 comments
[ 2.0 ms ] story [ 71.9 ms ] threadBonus point is that you will earn experience in Linux shell usage.
Also, leave your fingers off Python for web. It sucks already enough for commandline, and it's a nightmare for web stuff. Use PHP if you want to do web development, just as everyone other does (okay, Java and ASP.net exist, too, but these are enterprise-level solutions, not available at usual hosters).
I can't believe you just recommended PHP to a newbie. This is like recommending Fortran to someone asking about modern scientific analysis software.
In any case, the OP should probably start by learning static HTML design, before moving on to various automation methods. But PHP -- wow. It's like recommending BASIC instruction to a programming student.
PHP has the widest adoption among hosters and user-bases, also there exist lots of proven OpenSource projects where you can borrow code from (e.g. Wordpress, MediaWiki). The lack of user-base is what discredits Python and Ruby for me, they're just too exotic.
There are a bunch of PaaS providers that have free hosting for Ruby and Python projects if infrastructure and cost are a problematic for sroerick. They are both fairly mainstream too, the tiobe index[1] ranks PHP at 4.8%, Python at 4.4% and Ruby at 2.2%. This isn't a perfect measure, but I think it puts PHP, Python, and Ruby in the same ballpark.
[1] http://www.tiobe.com/index.php/content/paperinfo/tpci/index....
Now PHP ranks second behind Java (though I'd guess if you made a strictly web-focused index, PHP would outrank Java!).
For the "Python/Ruby sucks vs PHP" part:
* the user-base is damn small compared to PHP. Go into any web-development agency and ask if someone uses PHP for web-dev and if someone uses Ruby/Python for web dev. The percentage of shops using PHP will be significantly higher.
* Ruby and Python do not originate from web development, but from "normal" programming. Web capability got "bolted on" onto them with CGI and various frameworks, while PHP originated from the Web and only recently acquired usability as a scripting language.
Ruby and Python were not originally made for web development, but they have been extremely successful and popular in that role. Twitter, Github, Stripe, and Hulu have significant Ruby components, and Instagram, Dropbox, Mixpanel, Pinterest, and Yelp use Python. There are smart people choosing these languages to build their companies with for a reason.
My random clicks indicate that they support Ruby, PHP, and Perl, as well as apache, which I think? means I can install whatever I want? I tried following an apache guide once but was in pretty deep over my head.
And I posted my remarks only because the OP is a student, new to the world of programming.
That's not really germane. PHP is perfectly awful -- it's a security disaster, like BASIC it's a terrible language for students (because student programmers "imprint" on their first languages), and there are many alternatives.
http://www.conigliaro.org/2011/07/22/php-considered-harmful/
http://furiouspurpose.blogspot.com/2009/06/php-considered-ha...
So, my plan is to try and weild PHP, mySQL, CSS, HTML and, (ugh) some Javascript. Does this seem like a good goal to shoot for?
I'm using a dedicated server (about 60USD from Ubiquity Servers), but I also have a couple of VPSs, including a 5 USD one from 2host.
I'm using tmux and vi over ssh from the built in SSH client on ChromeOS, editing PHP and HTML/JS, and previewing changes directly in Chrome.
For database access I've been using ChiveDB which is like a really good Ajax-driven phpmyadmin with good support for editing stored procedures.
The only really annoying problem doing this from Chromebook (and likely the same from iPad) is editing the hosts file to acess multiple virtual hosts remotely.
If I use the mySQL database/webclient that my webhost (bluehost) offers on cpanel, do you think I can install Chive at a later date and make the switch fairly seamlessly.
and pardon my french but WTF HOW DO I NOT KNOW ABOUT HOST FILES? That's awesome.. Can I maybe do something similar to that using router hoodoo?