So I know what I want my site to do, and am already familiar with several types of web technologies as well as scripting languages. Now it’s time to figure out what to use.
My first choice would probably be Django - a framework written in Python. But since there’s no mod_python support, the only other way to use it (I think) would be fastCGI, which means a process must keep running at all times… so even if I do manage to figure out how to install/configure it, I’m afraid I’ll hit a CPU or RAM limit if the site ever becomes semi-popular (hey, it could happen, at least for a short amount of time; it could get dugg, say).
Is Django feasible? If not, I think my only choices are Ruby on Rails (rather good, but there are a couple things about it I don’t care for) or one of the many PHP frameworks (PHP on trax, symfony, zoop, solar, seagull, cakePHP, etc). I’m really not crazy about PHP but if one of these frameworks is really much better I could go with it.
Or is there even a better way to create a dynamic site I haven’t even considered?
I’ve been a ColdFusion developer for 10 years mainly because that’s where opportunities lead me. I’ve worked with a number of MVC frameworks, and have been teaching myself PHP. This is interesting to me because I have yet to make the leap to MVC with PHP. You said you have figured out what you want your site to do, and that’s an important subject to address in order to get a decent answer.
Do you envision a site with lots of varied, specialized functionality. Do you see something with a lot of content, but not dramatically differing functionality? Will there be many authors, such as the entire userbase, or just a few who you select? Is it a social networking community? A news and tutorial resource, with bookmarks and user comments? Is it a true web application, targeted at corporate users with unique business logic for the various components?
This topic seems like one that is very relevent, so I hope we get some input on it. Here’s my take on this from a 50,000’ view. Some web projects truly need to rely on a cpu intensive, persistent application server. Typically those are corporate targeted things dealing with real dollars. When money is on the line, people want to see realtime reports aggregated any way they can dream up. For something with varying degrees of static content, like articles and resources, caching is a viable alternative.
While I think that isolating business logic, data, and presentation from one another is pretty crucial, it’s a methodology that can be realized numerous ways. I think that an efficiently designed MVC architecture can usually perform plenty fast, even when implemented with conventional web scripting languages. It seems a risky endeavor to invest too heavily in a technology that requires so much specialization. One thing I like least about Ruby, and I am not real well versed on it yet, is that you are restricted to a couple particular IDEs. That’s a HUGE issue for me. I can pack up my entire PHP site in moments, and transport it to a virtually unlimited number of hosts with few issues anywhere. Including my home machine which already seems to have enough application servers running on it. Once there, or at any random computer using notepad, I can make code changes to the files on my flashdrive.
In my limited research I am so far pretty interested in Symfony, Studs and CakePHP. I guess that’s more than enough for now. Sorry to ramble on for so long, but like I said this is interesting to me.
In response to your post, just to try and keep this as on-topic as possible:
How do you interpret “support” for mod_python? I am not sure if you mean to say that Django doesn’t support mod_python, or that mod_python has been abandoned in terms of support. From my perspective it’s not a critical question, because as far as I know, both assumptions are a little refutable.
I think the original poster probably meant that mod_python is not available with his DH account.
I’m suspicious of the claim that Python under FastCGI performs better than mod_python. I’m not familar with either, or with Python at all, but if this is true it’s the only language it’s true for and indicates some pretty severe problems with mod_python. In my experience, Apache modules will always out-perform CGI applications, even using FastCGI (at least FastCGI with Apache).
Hi, thank you for answering in such details. Alright then…
My site is rather simple; the database should only have about 5 tables, and probably the same amount of views, so no request would generate a lot of queries or any complex queries. In fact, if I didn’t want people to be able to comment on web pages (and maybe submit content pending approval later on), it would almost be better to have a script generate a few hundred (later, maybe a few thousand?) .html files out of the database (caching, except more so). But one of the nicest things about Django (and most other frameworks) is that it lets you change your mind very quickly, and Django specifically has a great template mechanism.
There’s no money on the line - this is a hobby site. At some point in the future, I may experiment with non-obtrusive, text-only ads - but nothing that would degrade the experience, and I certainly don’t expect it to do anything more than maybe cover the hosting fee. I really don’t care about it right now.
I’m looking at CakePHP too - in fact, check out the framework list at http://www.phpwact.org/php/mvc_frameworks - but it doesn’t seem yet to be as nice as Django, though of course everything gets the job done eventually (including straight .cgi).
Ruby source files are just text files - why are you restricted? Do you mean that not many editors are aware of Ruby yet and so don’t have syntax highlighting and such?
And yes, what I meant by “support” is that mod_perl is available on dreamhost and mod_python is not (can it be enabled?)
I think I’ll try to install Django again, but I’m worried some limitation (using more CPU, etc, like I said) will come back to haunt me later.
(delete the space in the www - I don’t want any links anywhere to the site until it goes live)
I’m not sure I can figure out what it means… which makes me want to give the PHP frameworks another look. sigh. I keep jumping back and forth between those two plans, and haven’t even picked the “right” framework.
Again, I don’t claim to be an expert about this stuff. It just seems to me that learning open source technologies like these, and contributing back to their communities, is the right way to go from here. Most of my experience has been in Wintel environments, and I never knew what else was out there.
I had my Dreamhost account but had never used Apache, PHP, or MySQL. Yeah, I realize how funny that sounds. Now I can’t get enough of this stuff.
When I saw the article quoted below, I presumed that Ruby needed a specialized IDE in order to work with it. Similar to how .Net source files are just text, but you’ve got a long climb without the right editor. Guess I stand corrected about that.
[quote]In order to have a fully working development environment, you can use your PC. You will need to install:
Scite or FreeRIDE - IDE for Ruby[/quote]
This same line of reasoning made me imagine a specially configured server environment, much the way you need for .Net hosting. After a little reflection I suppose LAMP development is just as specialized, I am just more familiar with it.
Regarding cgi vs fastCGI vs modules, and based entirely on my gut, I think modules are the only way to go. In my mind, if they can’t outperform the alternatives, it’s just a matter of time. The spawning of individual processes versus feeding a waiting application server just seems counterintuitive to me. Again, this is not based on a solid knowledge of design patterns or anything, just my feel.
Ruby is exactly like Python, PHP, or Perl in that you’re much better off using an IDE or editor that has built-in support for it, but you can also write it in a plain text editor if you want. Like these other languages, Ruby applications are just a collection of files uploaded to the server and interpreted by either an Apache module (in the case of mod_ruby) or the Ruby binary itself via CGI/FastCGI. Ruby and Rails are both open source as well.
Thankfully I’ve never used .Net so I can’t make any comparisons there.