6 ms·
Ask HN: I can't stand PHP anymore. What else can I choose?
All my clients use shared hosting such as iWeb.com (which does'nt have Shell access). Mainly because they don't want to pay a lot for a _reliable_ webhost.
My problem is : As a language-snob (i know, it's sad), i'm immensely bored about PHP. I want to learn another back-end language that i can use on my freelance web jobs.
I'm considering learning Perl. But Perl needs modules to extends it's possibilities, this i cannot do without Shell access. And it's also better to run it as fastcgi or mod_perl, things that shared hosting does not always support.
I know Ruby, but hosting Ruby is not cheap enough, or accessible enough for my clients.
Do you guys have any idea of a web stack or shared host that does the job?
What do you do when you can't stand PHP anymore?
- vyrotek 17y agoAsp.net MVC
- RossM 17y agoIn my experience Windows hosting (I'm aware of a Linux-compatible version of ASP.net, don't know how good it is might even be for classic ASP) is a bit more expensive than Linux hosting (which is typically used for PHP - for compatibility and cost reasonings).
- keefe 17y agoWhat is the motivation for locking yourself into the micro$oft stack? Why not use Java with a javascript (jquery/yui/ext etc) front end or even (shudder) JSPs? Spring framework? Anything but .net lock in...
- johns 17y agoCan we grow up and stop using $ when referring to Microsoft?Most of us here are in business to make money, but no one is calling this site Hacker New$. Now in regards to lock in. How is it different from any other stack? If I build something with ASP.NET MVC (which has the source available under the MS permissive license) I can run it on Windows or any machine running Mono.
- keefe 17y agoThe difference is that microsoft deliberately enacted a monopoly and did dozens of highly questionable things just for the sake of profit. Just think about a company where the policy is, write code that is as inefficient as you like because hardware will catch up oh and btw we are in bed with intel...
- jasonkester 17y agoThe tools. Spend a week writing C# in Visual Studio.NET with ReSharper installed, then try to go back to your old language and IDE. You'll understand.
- greggraham 17y agoI spent a year writing C# in Visual Studio and ReSharper, and it is nice, but I'm happier now doing Python with Emacs and the command line.
- Longhorn213 17y agoYou are the exception rather than the rule. I love VS even without ReSharper. I haven't found a better IDE than VS.
- keefe 17y agoI've never used those but how can it be so much better than eclipse + all the commercial plugins? Closed source can never beat open source in the end...
- jasonkester 17y agoI spend more time than I'd like in Eclipse these days, and am consistently underwhelmed. It just can't hang with the intellisense features of VS.NET. I spend entirely too much time in Eclipse hitting ctrl+space and getting nothing back. Often even when the thing I'm looking for is in the same file, let alone included thru an import. ReSharper will find references for things I haven't even imported. It really is that much better. Oh, and VS.NET does have open source and commercial plugins (of which ReSharper is a good example.) It's every bit as open as Eclipse as far as extensibility is concerned. In general, I find it's best when offering comparisons of two products to have actually used both products. That is the basis by which I consider VS.NET to be superior to Eclipse. I'd suggest you try them both before making up your mind for good.
- keefe 17y ago
- abyssknight 17y agoYou started a flame war over vendor lock in? What about language lock in? DBMS lock in? Or even the forbidden OS lock in? I don't care what you use, it has lock in of some kind. Get over it. VS2008, C#/VB.NET, ASP,NET, MSSQL are great tools. That's all these things are: tools. The end product is always the same. If you build something with Ruby you can't go back and fix it with PHP. Lock in? Yep.
- keefe 17y agoThe point is you are locking yourself into a brand that has explicitly anti-competitive business practices, charges exorbitant rates for their licenses and not only shuns public standards but actively works to sabotage them! (ecmascript3 being the example I am thinking of the last) VS2008 is a tool, C# is a language. Locking yourself to C# (for all intents and purposes) locks you to development on a windows box using VS2008 and commits you to serious trouble deploying under linux or mac, most times. Is that the same as choosing Java or Ruby and vi vs emacs? No, no it is not.
- abyssknight 17y agoTo each their own. I just think that you should use the right tool for the job, not the most popular one. If your opinion comes into play when selecting a tool, you're doing it wrong. Sure, there's lock in and perhaps Microsoft is engaged in anti-competitive practices. They are a business, after all. But what is wrong with the tools? Visual Studio, C#, VB.NET, IIS? Point out some real issues like the current state of ASP.NET's AJAX toolkit or linq2sql's inability to do perform joins efficiently without an associated view. I might be playing devil's advocate here, so please don't take me the wrong way. I just want people to look at their tool box more closely and make decisions on real, measurable things. Disclaimer: I work on everything from ColdFusion, PHP and ASP.NET to Perl, cmd and shell scripts. I have no zealotry in me except for an extreme love of Adobe Flex, Adobe AIR, Macs and the opposite sex.
- keefe 17y agoThat IS a real issue, vs the (relatively) open nature of Java and the absolute openness of tomcat, apache? I personally think that open source tools are inherently superior because it of the additional eyes on the code reducing screwups and deliberately bad code. One very serious issue is that their anti-competitive acts make them opposed to standards (e.g. their work on the EcmaScript3 standard and what would have been a great harmonization of AS4 and JS2!) and it's better to work with standards for obvious reasons... Being involved with open source, standards compliant tools gives you an awful lot of advantages.
- RossM 17y agoI don't know whether you'd need shell access for Python (I'm only just starting to learn it myself) but that could be an idea to consider.
- mooism2 17y agoUsing Python would have the same problems as using Perl, wouldn't it?
- j_baker 17y agoNot necessarily. You just need to put whatever libraries somewhere on your python path.
- SwellJoe 17y agoThat's identical to Perl or pretty much any other dynamic language. Just as in Python, you can even modify your library path within the code itself, and use relative paths (so you can distribute apps in a directory and not require the end user to modify their webserver CGI shell execution environment). e.g. something like: BEGIN { push(@INC, "./lib"); };
- pkeane 17y agoPython + Google App Engine
- bemmu 17y agoAfter switching to this combo, I find myself reluctant to continue work on my apps still using PHP & MySQL. They feel somehow... fragile now. Before I used to check on my servers all the time, now I feel peace of mind that my app is still running, even though I haven't checked on it for a while. I feel like I might even be able to enjoy my coming vacation.
- mannicken 17y agoIs Ruby hosting that expensive? I've seen hosters that do it under five bucks a month (like http://www.hostingrails.com/ http://www.hostingrails.com/ ).
- juliend2 17y agoThanks for the info. I did not know about hostingrails.
- nanexcool 17y agohttp://www.bluehost.com http://www.bluehost.com I personally use it for PHP, but it supports Ruby/RoR, it's cheap, and I've never had any problems with it.
- Skeuomorph 17y agohttp://railsplayground.com/ http://railsplayground.com/ Developer hosting from $5/month. Much better uptime than others in this price range. Have had some small sites with them for several years.
- radu_floricica 17y agoI don't think you should dismiss a language so fast for hosting reasons. Yes, they are a thing to consider, but "The Thing"? We offer all our clients hosting on our slicehost server, for at least a year free (so far we haven't bothered to ask after a year either). It's clean, fast, cheap, and lets you do development and updates much faster. No system administration to speak of (long live apt-get).
- Zak 17y agoYou might want to have a look at haXe - a language that compiles to multiple backends including PHP, Javascript and Flash. It's not my favorite language by a long shot, but it's not PHP.
- juliend2 17y agoI think that it's Exactly what i was looking for! Thanks a lot. I will definitely look at it! :)
- tptacek 17y agoDelivering work for paying clients in a vanity language because you're bored of PHP sounds pretty close to malpractice.
- juliend2 17y agoYou're absolutely right. Something may be wrong with me but i still do find it interesting.
- jcapote 17y agoNot really. If you don't like working with a particular tool, any work that you do with that tool will be fundamentally substandard. So if the same results could be achieved with a better tool, then your work should also be better.
- tptacek 17y agoFirst, the difference between professionals and amateurs is that professionals stand behind their work even when they don't enjoy doing it. But that's neither here nor there. If you can't stand behind doing work in a mainstream language, don't take those jobs, and accept that you're going to earn a fraction of what your peers do. However, when you deliver product to people in a language nobody else uses, and implicitly recommend they deploy code in that language, and you do it because you're bored with PHP, and you pick the language you move to deliberately to mask the costs of using a less popular language by compiling it down to PHP, you're coming pretty close to screwing over your clients. Happy to be wrong about this, though. I'll stop here.
- juliusdavies 17y agoDreamhost is cheap and has shell, perl, ruby, and php.
- juliend2 17y agoYes i tried them. That's why i mentioned "_reliable_ webhost" ;) . But yes, some websites could be hosted with them, it's just not good enough when we need something to be 100% uptime.
- j_baker 17y agoPlus, using things other than PHP is still pretty difficult with dreamhost.
- juliusdavies 17y agoIt is? Here's a python CGI script: http://juliusdavies.ca/svn/viewvc.cgi/not-yet-commons-ssl/ http://juliusdavies.ca/svn/viewvc.cgi/not-yet-commons-ssl/ The viewvc.cgi starts with: #!/usr/bin/env python I just dropped the script into my ~/juliusdavies.ca/svn/ dreamhost directory. Didn't seem hard to me.
- j_baker 17y agoWell yeah. For a plain old CGI script it's not terribly difficult. But that just doesn't scale well nor is the script easy to write. Consider the instructions for setting up django on the other hand: http://wiki.dreamhost.com/Django http://wiki.dreamhost.com/Django This is much more complicated than it needs to be. Especially when I can just log into my account with webfaction, click "install django application" and be done with it.
- j_baker 17y agoLook for webfaction as a hosting provider. It's cheap and you have lots more options than just PHP. Plus you get shell access. You can even set up your own apache instance. Other than that, don't worry too much about the language. Find something you like and stick to it. Just remember to always learn new things and don't get set in your ways.
- juliend2 17y agoJust remember to always learn new things and don't get set in your ways I Totally Agree. This is the other reason why i want to change the language in which i code for my day to day jobs. Learning new things. I read a lot about functional programming and other cool stuff on HN but in my work i'm mostly stuck with PHP... This must change.
- iamelgringo 17y ago++ for web faction. They're really inexpensive, straight forward to use, and you can use Rails, Django, Merb, Pylons, etc... Plus, you get shell access, and you don't have to do a lot of the server admin stuff if you don't want to.
- zackola 17y ago+1 for webfaction. they are the cat's pajamas. whatever that means.
- pmikal 17y agoperl: You do not need shell access to install modules locally. Anything you can do from the shell, you can do from Perl with system(), backticks, or piped open(), but really... no shell access? You want hosting that is reliable, supports shell access, rails, and 100% uptime, but your not willing to pay more than $5/month ?
- juliend2 17y agoi completely get your point. unfortunately i dont choose my webhosts. my clients does. but when i can, i tell them to take a linode slice.
- edw519 17y ago"What do you do when you can't stand PHP anymore?" Reevaluate what's really important to you. I love to program, but it's NEVER about the language. I know many of them, and AFAIC they all have their pros and cons. I suppose that if I was a "language-snob", I'd be "immensely bored" too, no matter which language I was using. So if it's not about the language, then what is it about? You already answered your own question with the first 3 words of your post. It's about your clients. Always. They have needs far beyond their ability to express them. And they need you. Stop being a "language-snob" and start being a "solutions-snob". You'll never be bored again. Promise.
- juliend2 17y agoWhat do you mean by being "solution-snob"? Looking for the appropriate tool(language) for the given task? Thanks in advance.
- tptacek 17y agoI'm guessing no, that instead he means thinking more about what you're going to write than about what you're going to write it in.
- edw519 17y agoJust a silly word I made up to fit in with your writing style (which I really like, by the way). I guess what I'm really trying to say in a general sort of way: as soon as you stop worrying about your problems and focus on your client's problems, you both win.
- jrockway 17y agoHe's not being a language snob. It's just plain hard to write good code in languages like Java and PHP. You spend so much time fighting the language and tools that you barely have time to think about solving your client's problems. That gets boring and tedious, so I can understand why the OP is bored. (The fact that some people have tolerance for this stupidity is not worth arguing about. Some people enjoy digging ditches, too, but the OP is probably not one of them.) Edit: Ah yes, let the downmods begin. "He said something bad about your favorite language!!"
- keefe 17y agoJava! I may be in the distinct minority here and particularly prejudiced since I started with Java in 98.... Java has the best IDE (eclipse), a slew of open source libraries, Groovy if you have it up for dynamic language syntax and with JIT etc. innovations it's pretty much as fast as C++. I think Java is the perfect OOP trapped inside some slightly ugly, easy to compensate for syntax. Also, easy to deploy dynamic apps with Tomcat, great user community, stable API...
- wooby 17y agoIf you're comfortable with Linux, an option for you is running a Linode or Slicehost ($20/month) and hosting your clients on it. This will give you total control of the hosting environment, and a residual income. You'll have plenty of horsepower for Rails or whatever else you want to use, and as you grow, you can buy more nodes. Beware, though: when you put on a system administration hat you're taking on a lot of new responsibilities, including backups and security. It's also a good idea to bring your friends in on it, so if something goes wrong they can look into it for your client if you're away. So, it really depends on your level of comfort with sys admin stuff, and the kind of relationship you have with your clients. Good luck!
- juliend2 17y agoYes, this is something i thought about also. It can be good when they dont already have their own server already set up with their email, etc. I have tried both slicehost and linode. Its nice to have such control when its possible.
- jrockway 17y agoA basic $20/month Slicehost or Linode is probably going to be good enough for 2 "real" applications and maybe a few CGI pages, but not much more. The limiting factor is memory -- modern languages like to use a lot of it.
- radu_floricica 17y agoRemember the 80/20 rule. Most of the sites only have a couple of clicks per day. Right now we have around 15 sites and two rather heavy apps on a 512 slice. We always intended to upgrade it, but it turned out not to be the case. On a 256 slice we had all the sites confortably. As for the few sites which get a lot of traffic... they should also generate a bit more income and an upgraded slice.
- octane 17y agoBecome a real solutions provider and lease a colocated server and move your clients to it by offering them competitive pricing. You might even make a profit.
- ropiku 17y agohttp://heroku.com http://heroku.com isn't that expensive and it's easy to scale as needed.
- tracy 17y agoLearn python. It's an excellent all-round language, you can also create desktop stuff later. Hosts like webfaction just cost $10 a month, surely your clients can afford that.
- siong1987 17y agoTry Google App Engine if you want to use python.
- warhammerkid 17y agoWhat framework are you using for your PHP work? If you aren't using a framework (because your work doesn't need one), then switching languages probably isn't going to change much, but if you are, there are several good, fun PHP frameworks out there. The best PHP framework I've used is Symfony (http://www.symfony-project.org/ http://www.symfony-project.org/), which is actively developed, fun to work with, and really powerful.
- juliend2 17y agoI use mainly CodeIgniter. I tried CakePHP. I heard about symfony, though. If it's fun then i will take a look. Thanks.
- gchucky 17y agoI've worked in CodeIgniter, but these days I find myself using the Zend Framework (http://framework.zend.com/ http://framework.zend.com/). They're actively developing it, and it has so much built-in functionality that I've been able to get stuff done much faster than before.
- skwiddor 17y agoCGI, then use what you like. A few of my friends are building http://werc.cat-v.org/ http://werc.cat-v.org/ but it's teaching me CGI still has a lot to offer.
- hs 17y agoi use newlisp for my web apps
- mtarnovan 17y agoPrices for hosting Ruby should fall once mod_rails sees more widespread usage.
- kajecounterhack 17y agoPython and Django!
- peterbraden 17y agoseriously - this. Django allows you to do far more with less code, and python is the finest language in which to code ( :) ). I've advised loads of people to switch from php to django - and have had no complaints yet.
- SwellJoe 17y agoUnfortunately, the reality is that PHP is dramatically easier to ship out to crappy shared hosting providers than any other language. Perl, Python, and Ruby are easy if you just use CGI...but they are increasing degrees of slow (with Perl generally being the fastest of the lot and Ruby being the slowest, when used in a pure CGI configuration). Perl is definitely the second most deploy-able language after PHP, due to its historic popularity, but it is still way behind when it comes to "untar the directory and everything just works" style deployment. And it isn't necessarily going to be fast in the types of Perl deployments many shared hosts allow. Someone suggested Java, which is way out at the farthest end of the "hard to deploy on shared hosting" scale. In fact, I doubt you can find any way to host Java effectively for less than $25/month, and probably more if your app is at all popular. It's just a horrible choice if deployment is a big factor in your decision-making process. FastCGI is getting easier and easier to get in shared hosting environments, and all of the major web app frameworks in all of the major languages support it (including Catalyst in Perl, Ruby on Rails in Ruby, and Django in Python). Since FastCGI is a better way to run PHP in a shared hosting environment (mod_php has serious security implications), as well, I'd recommend you start insisting on FastCGI support from your host, no matter what language you use for development. So, I think what folks ought to be recommending is that you go with a host that provides FastCGI and shell access. And then you can decide which language(s) you want to experiment with.
- zealog 17y agoHeroku is great (and free) for building and trying Ruby on Rails apps.
- wenbert 17y agoWhy not setup your own hosting for your clients? Problems always arise when you give the client options on the server. They do not know these things. Usually they always opt to have the cheaper plan -- they are not technical people. I have been using PHP for years now - no problems so far. Especially when Zend Framework came.
- santacruz 17y agoWith such approach you will hate your next lang in no time.
- abalashov 17y agoJava?
- abyssknight 17y agoYour options are limitless, really but here are a few: 1. Pick a framework to make your PHP work less boring (CakePHP, CodeIgniter, Symfony) 2. Ruby on Rails or Python & Django 3. Slicehost ftw. These days you can find a cheap host for just about anything except the Microsoft stack and even that you can get for a reasonable price. If your clients are that cheap, get new clients.