6 ms·
Running a Modern Startup on PHP
- devinfoley 16y agoI've been using Paraglide as well, and it is indeed very cool.
- minouye 16y agoAny documentation out there for Paraglide? Did some searching and only pulled up the GitHub repo.
- jrsmith1279 16y ago+1 It looks pretty easy to figure out, but documentation is always nice.
- bgoldman 16y agoDocumentation is forthcoming. I didn't expect people to find out about this yet :) If you follow the project on Github, I'll release updates in the near future.
- simonhamp 16y agoBrilliant post. These guys are running in a very similar way to us. Some things in there for us to take hints from though. Will be checking Paraglide out!
- lox 16y agoParaglide looks interesting, although looking at the main class doesn't inspire me with a lot of confidence: https://github.com/bgoldman/Paraglide/blob/master/paraglide.php https://github.com/bgoldman/Paraglide/blob/master/paraglide.... The lack of tests somewhat seals the deal.
- bobds 16y agoIf you want something that's nothing like that, you may enjoy this: https://github.com/codeguy/Slim https://github.com/codeguy/Slim
- chrisohara 16y agoor mine: https://github.com/chriso/klein.php https://github.com/chriso/klein.php
- deleted 16y ago[deleted]
- aaronbrethorst 16y agoDespite the author's denigration of Ruby for its "mess of symbols, implied parenthesis (sic), and lack of statement endings," they sure do depend on a lot of Ruby tools and Ruby-based services: Capistrano, Github, Lighthouse, Tender, and Campfire.
- brianbreslin 16y agosomewhat related: anyone know if cakephp is still being actively developed (as a framework)?
- ccorcoran 16y agoI believe it is, I haven't met anyone who's used in a long time though. I think CodeIgniter is the current hot framework for PHP.
- philfreo 16y agoCodeIgniter has a big following, but so does Symfony2 and Kohana.
- randall 16y agoI just built an app on both codeigniter and cake... and I prefer cake by far. Cake gets in your way a little bit, but it's good for me since I wouldn't describe myself as a "classically trained coder".
- AlexMax 16y agoCakePHP is what we swear by at work. Still works for us, and we can't wait for 2.0.
- brianbreslin 16y agowe use it all the time too, but i get questions asking why not codeigniter...
- eropple 16y agoCodeIgniter is still PHP4-friendly. It's not "hot" by any means. CakePHP is still actively developed, but it's pretty miserable. (It's slow, too - so much so that framework devs usually benchmark against it because it's so reliably slower-than-everyone-else.) If you're going to use PHP, I can't really think of a good reason to use anything other than Symfony2.
- josegonzalez 16y agoParaglide and Paragon looks pretty terrible. Honestly, I don't see it as a great PHP5.3 framework. In fact, it looks pretty terrible. Lithium would be a better choice, if you think that you can't do OOP in PHP5 without 5.3, or you think that all other frameworks suck for this/that reason: http://lithify.me/ http://lithify.me/ Personally I use CakePHP for side-projects, and it suits me just fine. But honestly, PHP development isn't that bad, even with a 3 year old version of certain frameworks...
- sidupadhyay 16y agoLithium is a really great option. It forces you into a good set of rules to develop your app rapidly while not sacrificing quality. It integrates really well with both MongoDB and CouchDB out of the box and provides a solid set of testing and analysis tools. As frameworks go, it can do as much or as little as you want it to. The CTO of Totsy gave a talk describing their no-nonsense usage of Lithium and MongoDB http://www.10gen.com/video/mongoboston2010/totsy http://www.10gen.com/video/mongoboston2010/totsy
- breck 16y agoParaglide and Paragon look decent to me. PHP makes the need for a framework minimal. Cake is neat but overkill in a lot of ways unless you happen to be one of the developers of Cake and know it inside and out. Same goes with Kohana, CodeIgniter, etc. If you know PHP well, it's almost as efficient--possibly moreso--to program your own minimal MVC framework. PHP has so much of what you need done for you that only an efficient ORM is a bit tricky. You're not going to have the widespread adoption of your framework that Rails enjoys. This is because Rails increases the utility of Ruby for webapps by a factor of 10x while your PHP framework improves PHP for web apps about 2x. BUT, if you are using PHP you might as well write your own internal framework because it's a fun programming exercise and will take you only a little longer than mastering someone else's. I went down the same path(created my own minimal php framework called uno a while back), though if I'm doing MVC apps nowadays it's almost always using Rails. Rails has the advantage of loads of great devs that know it. Also, once I learnt Rails well I grew to depend on certain features that I just didn't want to emulate in Uno.
- paradox95 16y agoWe use s similar setup to what they are using. We use in house built MVC framework though. Our Model is a lacking but still works. We do still use Memcached and I don't see how they can skip that. I don't know what their user numbers are like for even 1-2k concurrents that many Mongo queries could be deadly.
- SeoxyS 16y agoWe're still at a very early stage and the traffic is definitely not what it's gonna be in the future yet. So far, Mongo has held up beautifully in real-life situations and benchmarking, and we can deploy new boxes infinitely to beef up our replica set with Amazon EC2 when we reach our limits—but Memcached is not out of the picture entirely. So far there's been no need for it (which would not be the case with MySQL) but if future traffic starts to call for it, we'll definitely add that to our setup.
- plasma 16y agoNote that you can only get up to 7 usable members in a RS (then you need to shard), see http://www.mongodb.org/display/DOCS/Replica+Sets+Limits http://www.mongodb.org/display/DOCS/Replica+Sets+Limits I'm curious if you happen to use any monitoring to notice when load on your mongo servers gets too high (eg is about to start swapping to disk instead of using RAM etc)? Cheers
- elliottcarlson 16y agoOne thing to note in my experience with Mongo vs Memcached for certain tasks. Back in the day we used to use MySQL as a shared session storage for load balanced web servers - this is obviously something from the past and since then we moved it to Memcached. Once we started implementing Mongo, it seemed to make perfect sense to just use Mongo instead of Memcached to store that information - but to my surprise (and I love Mongo), Memcache outperformed Mongo as far as overhead and latency goes for managing the sessions. We now keep all session management in Memcached at all times and Mongo for everything else.
- donaq 16y agoOlder technologies don’t get much love, and PHP especially has a bad reputation Actually, Python is older than PHP.
- semerda 16y agoCorrect. Python 1991 (20 years ago) & PHP 1995 (16 years ago).
- tomlin 16y agoAs far as PHP frameworks go, I've been using Yii when I do a PHP project and have found it simple and clean and Yii's documentation is pretty superb.
- drm237 16y agoCodeIgniter is bloated? It doesn't even include an ORM! There are some many things missing from it that other frameworks include that I can't even fathom what the author is talking about. Having switched from PHP to Ruby a year ago, I now find Ruby's syntax beautiful and incredibly powerful. If you don't like the implied parentheses, it turns out, you can go ahead and add them! Edit: because I didn't proofread the first time...
- breck 16y ago> Having switched from PHP to Ruby a year ago, I now find Ruby's syntax beautify and incredibly powerful. If you don't like the implied parentheses, it turns out, you can go ahead and type them add them! I like Ruby's syntax as well and do most web app work in Rails nowadays. However, one thing I love about the PHP syntax is that it's so easy to switch between PHP and C or C++ and vice versa. So if you're doing a lot of C work and only a bit of web work, it's nice to know PHP. Otherwise if you're doing web work full time, Ruby's quite fun.
- ssharp 16y agoLumping CodeIgniter and Symphony together as parallel examples of bloated and get-in-your-way frameworks seems like a stretch. CodeIgniter is modular, so you can just use the MVC capability it provides and leave the rest alone. Symphony seems to require a substantial amount of prep and up-front learning in order to use it. I couldn't see the set up time between the two frameworks being much further apart. I'm curious what aspects of CodeIgniter the author found to be bloated and crippling.
- ricardo_sdl 16y agoWhen I started using CodIgniter the easiness of installing the framework really amazed me. You don't even need the mod_rewrite enabled! Just extract the CodIgniter code into a webserver directory and create the controller code to show some output or load a view and you are done!
- aeontech 16y agoTheir setup doesn't seem extra-ordinary in any great way, and reads more like a justification against a strawman argument. The author sets up with "PHP is regarded as a clumsy and amateurish technology, best left to development newbies". I am not sure who it is that regards PHP in such a way. Sure, it's not as sexy as Clojure, Scala, Ruby or Erlang these days, but I don't think anyone needs to be convinced that PHP is a worthy technology to build a platform on - some of the biggest sites out there are running on PHP just fine. PHP has a bit of a reputation for attracting unskilled programmers, but that's because it is so easy to get started with, which leads to a lot of newbies writing it. All that means is that you may have to filter your candidates more carefully when you hire, and nothing to do with the language itself. In short, the post seems subjective and opinionated, without showing any concrete problems that they overcame with alternative languages or frameworks. "Codeigniter is bloated" vs "Paraglide is awesome" are both so vague as to be useless. "Ruby's syntax sucks" is even worse. Much better to have had a list of specific things that dissuaded them from using one framework or language, and some killer features that convinced them to use the other - if all I see is a personal opinion without any reasoning behind it, I cannot make any useful decisions in my own situation.
- omouse 16y ago"PHP is regarded as a clumsy and amateurish technology, best left to development newbies". I am not sure who it is that regards PHP in such a way. No one likes it but it gets the job done in a clumsy and amateurish way. It's the BASIC of web programming. Those other so-called sexy languages have actually been designed rather than having features bolted on later, those features are designed to fit into the language from the start. some of the biggest sites out there are running on PHP just fine. Popularity != proof of goodness.
- sanswork 16y agoI think he was trying to show capability more than quality.
- aeontech 16y agoPopularity != proof of goodness. I never said it was the greatest language ever. I'll take Ruby or Lisp over PHP any day. I was simply saying that the OP's post is framed as if PHP was generally considered a useless newbie language, and that using it for a startup is somehow noteworthy.
- bgoldman 16y agoAs the author of Paraglide and Paragon, I thought I'd post here. I knew SeoxyS was writing a blog post that may have included Paraglide, but I didn't know when he would publish it. I'm glad that he did, but had I known when, I may have whipped up a simple homepage, did a little bit more polishing, and created some basic documentation. I wasn't quite ready yet to release this to the wild for mass consumption. It's in the cards, but I just didn't expect to push it publicly for a little while longer. Thanks to everyone who followed the github project, and whoever had nice comments to say. For anybody that has criticism of the projects, I'm happy to address them in a separate thread when I officially release the project publicly. I'll make a post here when I'm ready and have proper documentation. Please expect more updates in the very near future, and thanks for the interest.
- aeontech 16y agoGood luck, and look forward to more information :)
- johnkary 16y agoI'd really just like to know why your framework reinvents the wheel for nearly every aspect of the application stack? Looking at the code even thus far, I don't see how Paraglide or Paragon improves on any aspect already offered by the largest frameworks Zend Framework, Symfony and Lithium, which already have documentation, encourage new contributions and follow best practices within their respective paradigms. Why not contribute to an existing framework? Your efforts will be better received and more widely appreciated. The absolute last thing the PHP community needs is another framework.
- bgoldman 16y agoIf this were a brand new framework, then maybe it would be a waste of my time, unless I had more compelling reasons. However, I started building my framework a few years ago and have just been making incremental updates here and there. Friends and coworkers have started to use it over time, and people like it. I've been told to publicize it over the last 3-6 months, but haven't gotten around to it. My framework is minimalist and gets the job done. I'm a big fan of minimalism and I don't like that some modern frameworks are bloated and have something like hundreds of thousands of lines of code, as opposed to just a few thousand, and that includes components outside the core, like helpers. Paragon has more work in it than Paraglide. Paragon can support multiple different backends with the same code, just different drivers. I know this exists in other PHP ORM frameworks now, but not a few years ago (not saying mine was the first, it just wasn't as widespread). Also, Paragon integrates cleanly with Memcache so the developer doesn't have to deal with cache and uncache logic. Hope this clears things up!
- jmspring 16y agoSimply put - if you are a good developer and the language isn't completely out of whack for what you are attempting to do -- for instance, web apps and fortran probably aren't optimal -- the language shouldn't matter in terms of getting things done. I know of a couple of startups doing well that are built using PHP. One doesn't even advertise the fact that they use PHP because they want strong developers regardless of language. Fact is, PHP is pretty darn simple to pick up, not much harder to do things correctly, and has a lot of third party/opensource support. Is it cool? No, but when it comes to language wars, this pretty much sums up my feelings: http://programming-motherfucker.com/ http://programming-motherfucker.com/ Personally, there was a startup about 6 years ago where I wanted to use Python. The IT guy and I got into a discussion about PHP vs. Python. He was more comfortable in securing PHP apps. I was enamored with Python, since I was writing a bunch of stuff with it. After exploring mod-python vs. mod-php, mod-python had bugs and wasn't nearly as mature, so we went with PHP. The language didn't matter, it was about getting things done. There are lots of "cool" languages out there, a good dev will run circles around a mediocre dev who focuses on things that are "cool".
- troels 16y agoIsn't `mod_python` dead?
- zoomzoom 16y agoYes, replaced by mod_wsgi.
- MattBearman 16y ago"web apps and fortran probably aren't optimal" Challenge accepted!
- daakus 16y agoWhy would one use a language where the best you can say is "it gets the job done". There are so many better options in absolutely every single way that the only reason I can fathom for one to start something new using it out of choice is laziness to learn something better.
- weego 16y agoIf the technical founders are most comfortable with PHP then getting to market with code you know you can trust can be far more important than picking the "right" language (and by right I mean a language that startup communities see as being a proper language to work with). More props to them for clearly knowing it has its limitations and downsides... I'd pick a developer who used a language they knew inside and out and were informed and aware of the downsides of the language over a zealot who thinks their language of choice works best in every situation (my most common experience of these types are in the ruby community, by a quirk of coincidence). PHP was the language I used to teach myself how to develop for the server-side when I'd been purely a front end dev many years ago and I still like it (though granted I like Scala more) because it's always felt like a language you can sit down and get shit done with quickly and without fuss, and sometimes that is as important as any other attribute you can attach to any other language choice.
- malux85 16y agoBzzt. Wrong. "It gets the job done" is not the best thing I can say about it, you missed the point of what I was saying. The best thing I can say about it is "I can get things done quickly" I'm not too lazy to learn anything else, I always use the tool that is best for the job at the time. Recently I had to design a web application that outputs MS Word .DOC files in binary form. There's SHIT support for this in PHP, so I wrote the whole web-app in Java, because Java was the right choice given the task at hand and the clients existing platform. PHP is the right choice when I want to get something done quickly ... I can hack a website together in PHP faster than any other language, but it will be exactly that, a hack. PHP's strength is speed of development, and low barrier to entry means lots of developers out there who can help. (High supply of developers also pushes cost down, another bonus for me)
- clu3 16y agoThe framework is one thing, how you use it is more important and I believe once you know any framework ( and in any language) inside out, it's kinda pointless to compare. Anything will do, unless you are writing a new super duper cool Google, Twitter of Fb Also strange, after reading 51 comments, i have not seen anyone mention Zend Framework. It's got a steep learning curve, but it's just awesome. I've been writing a social web app framework based on ZF, Redis, Gearman and lots of other stack and it's awesome.
- mattm 16y agoI also love Zend but you're right about the learning curve. It's a bit steep but is well designed IMO.
- trurl123 16y agoUnfortunately, PHP offers very little in terms of modern and agile MVC frameworks. There are many good MVC frameworks for PHP. Look at Zend Framework (most popular in our region), Kohana, Yii.
- deleted 16y ago[deleted]
- rikthevik 16y agoI'm curious. How poorly designed and cobbled together would a language have to be for you not to use it? I realize there's a sliding scale of practicality vs. purity, but let's be frank, PHP is a mess. I'd use good tools in my work.
- deleted 16y ago[deleted]
- theoj 16y agoSomewhat related... Derek Sivers attempted to port CD Baby to Ruby on Rails, but ended up abandoning the port effort after 2 years and switched back to PHP. See his post on why he came back to PHP and what he learned from Rails (from 2007): http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_switched_back_to_p_1.html http://www.oreillynet.com/ruby/blog/2007/09/7_reasons_i_swit...
- cageface 16y agoThat article is four years old now, but I'd still advise against porting a large, complex legacy PHP app to Rails. Starting from scratch with PHP in 2011 seems like a much more questionable move though. Rails works well if you start with its conventions in mind.
- wikyd 16y agoHoly lord is that a lot of risk to accumulate doing a full rewrite and deploying it all at once. I think the hardest part about rewriting an app is knowing about all the edge cases, kludges, etc. that accumulate over the years. It makes sense that the person who knows the most about the product and its dirty secrets would be much more capable of rewriting the app quickly than a newly hired employee. As a counterpoint, last year I joined a startup as the first technical member. I migrated a PHP application written by an inept contractor (terrible DB layout, SQL queries in the views, most features buggy and incomplete, etc.) to Rails piece-meal. I had very little experience with Rails or PHP prior to this, but was able to rewrite the app in the course of a few months, while adding new features and continuing product development. I simply placed nginx in front of both the PHP and Rails app servers and rewrote the auth system for both apps so that cookies/credentials could be shared. Then it was a matter of migrating sections of the app over one-by-one. There was some hairiness in how the Rails side linked to non-Rails pages, but that code was gradually replaced as the rewrite progressed. Even despite the abominable DB schema from the original PHP app (which, in fairness, had nothing to do with PHP), Rails was flexible enough to allow me to override its conventions and map tables to models with joins, etc. Overall, it was much simpler than I thought it would be and after the rewrite was complete, it was pretty simple to write migrations to start organizing the DB schema into something coherent.
- 16y ago
- malux85 16y agoYeah I agree with most of the comments here. PHP is a clumsy mess, but it gets the job done and I am a firm believer in importance of being first to market. Cite my sources: When I came out of university I had what I thought was a very good grasp of what software should be, and that "elegant" well written software would dominate the market. Totally not true. The best example is the accounting system "Attache" in Australia ... it was the WORST software I have ever used. They only recently (in the last couple of years) got the ability to open more than one window at a time in an mdi windows application !! .. Attache is without a doubt the most successful accounting software in Australia, despite the fact that it's a dog. Why?? Because they were first to market. They were there on Day 1 with a product that met the minimum requirements (e.g. it RAN) I often see people who underestimate the importance of being first to market ... I truly think it's very important