Page 1 of 2

Design Approach - PHP, ASP, Rails???

Posted: Wed May 16, 2007 10:19 pm
by rukus206
Hi Folks -

I'm new to the forum, but I've been to countless other forums and I know how off-putting newbies can be. So, I'll try yo avoid that. :D

My background is in data warehousing/business intelligence, so I'm pretty comfortable with SQL. However, I don't know web programming. I'm trying to put together a site that is very organic (social networking, web 2.0, etc). Conceptually, I know exactly what I want the site to do and the functionality I'd like to incorporate. And, it's a website with a lot of socially redeeming value, so I'm extremely passionate about it.

For the last few months, I've been trying to decide which technologies to learn/use. I've evaluated WYSIWYG apps like Dreamweaver and Expression Web, HTML editors, and the like. But, like any other application, it's only as good as the underlying code. I've been comparing server-side scripting like PHP/MySQL, Ruby on Rails, ASP, AJAX. I'm partial to the PHP/MySQL combo since it's open-source and free. The problem is that I've never worked with any of these languages. I'm all for taking the initiative and learning it yourself. However, I know there's a pretty steep learning curve trying to pick up any of the aforementioned langauges. I was hoping to get some advice from experienced web programmers before I go wandering off aimlessly and create sloppy or inefficient code. Part of me is considering hiring someone locally to help out as well, but I'd like to decide on the technology I'd like to use first.

Hope that was clear. And, thanks in advance for any constructive advice you can offer.

Cheers,
JR[/syntax][/quote]

Posted: Thu May 17, 2007 12:28 am
by feyd
The underlying technology isn't all that important actually. Provided the pages are engineered well (both client-side and server-side) things will generally run smoothly unless the underlying technology doesn't scale well. Honestly, of the ones you've listed, only MySQL (by itself) scales well. Everything else creates bottlenecks when scaled. Sure, massive sites can be run on them, but that usually requires beefy hardware or extremely efficient code. There are certain things each of the technologies provides that help in scaling.

As with everything else in life, there are drawbacks to all choices.

If I were planning a huge site, I would likely go with Java and/or JSP.

Posted: Thu May 17, 2007 3:33 am
by Kieran Huggins
feyd wrote:If I were planning a huge site, I would likely go with Java and/or JSP.
8O

If I were planning a huge site I would still use PHP. I'd eventually address the bottlenecks with compiled C daemons and/or clustering, if and when the need arises.

PHP's biggest advantage is the incredibly large userbase, followed closely by the excellent manual. The fact that it's just plain ubiquitous doesn't hurt, either.

@feyd(ot): what's so long about your spider?

Posted: Thu May 17, 2007 5:35 am
by kyberfabrikken
Kieran Huggins wrote:If I were planning a huge site I would still use PHP.
As would I. The nice thing about PHP (And it's open source siblings, such as Perl and Python), is that it's very close to the metal.

I agree that the technology isn't that important. All of the major platforms work -- else people wouldn't use them. What matters is, whether they match to your way of doing things. I think you should experiment a bit with two or three candidates, to see which you like the best. One thing to pay attention to, is the communities. PHP and Java both have very good communities, but they are quite different. This is perhaps even more important, than the technological differences of the language.

Posted: Thu May 17, 2007 7:06 am
by Chris Corbyn
kyberfabrikken wrote:PHP and Java both have very good communities, but they are quite different.
I agree with this, but I have yet to find a Java forum that's:

a) Active/Busy
b) Easy to navigate

I've tried Sitepoint's (Java) forum and it's not busy. I've used Sun's own forum most frequently and have always gotten good responses, but the forum software bugs me. I've also used Java Ranch. PHP seems to have a better choice of busy forums.

I'd say in terms of a learning curve PHP is easy, but the problem with starting in a language like PHP which is so incredibly forgiving is that you run the risk of thinking that bad practices are good. You'll see a lot of PHP tutorials and other code which is badly written and when you're new to the language you won't identify badly written code too easily. This can of course happen in any language, but I suspect that if you started with Java you'd be forced into better programming conventions/practices. You would have a significantly steeper learning curve in the early stages though.

Posted: Thu May 17, 2007 8:21 am
by rukus206
Thanks for all your responses, and honest feedback. Scalability is something I definitely considered, but neglected to put in the post. I like the fact that PHP has an entrenched user community...I'll prolly need a lot of help!!! I just wanted to make sure that I leave no stone unturned. But, it sounds like most folks are just partial to clean, efficient, scalable code...regardless of the technology. Therein lies the rub. I'm sure experience is what creates that lean code. Experience is where I'm lacking.

What books/online resources would you recommend for someone who has no knowledge of PHP (or and server-side languages, for that matter)?
Regarding scalability, are there specific hardware requirements you'd recommend?

Thanks...JR

Re: Design Approach - PHP, ASP, Rails???

Posted: Thu May 17, 2007 8:53 am
by stereofrog
rukus206 wrote:I've been comparing server-side scripting like PHP/MySQL, Ruby on Rails, ASP, AJAX. I'm partial to the PHP/MySQL combo since it's open-source and free. The problem is that I've never worked with any of these languages.
Well, if you're starting with a fresh background and don't have any lasting legacy you have to support, I'd recommend Rails or Django. Both are mature and actively developed webdev frameworks, written in modern programming languages, with excellent documentation and community support.

http://rubyonrails.com/
http://www.djangoproject.com/

Re: Design Approach - PHP, ASP, Rails???

Posted: Thu May 17, 2007 9:21 am
by rukus206
stereofrog wrote:
rukus206 wrote:I've been comparing server-side scripting like PHP/MySQL, Ruby on Rails, ASP, AJAX. I'm partial to the PHP/MySQL combo since it's open-source and free. The problem is that I've never worked with any of these languages.
Well, if you're starting with a fresh background and don't have any lasting legacy you have to support, I'd recommend Rails or Django. Both are mature and actively developed webdev frameworks, written in modern programming languages, with excellent documentation and community support.

http://rubyonrails.com/
http://www.djangoproject.com/

Stereofrog - I've read that comparing Rails and PHP is like comparing apples to oranges since Rails is a framework and PHP is a language. I've heard a lot buzz about Rails. As a matter of fact, I have a web programmer friend who suggested Rails for what I want to do. I'd have him help me but, he's tied up on a big project. So, from a functionality perspective, what's the advantage of going with Rails?

Posted: Thu May 17, 2007 9:35 am
by Jenk
Smalltalk (Squeak + Seaside) scales beautifully, too Image

Re: Design Approach - PHP, ASP, Rails???

Posted: Thu May 17, 2007 10:46 am
by stereofrog
rukus206 wrote: I've read that comparing Rails and PHP is like comparing apples to oranges since Rails is a framework and PHP is a language.
That's true, but you don't program "in a language X", you always use a framework of predefined functions and classes. In php you have a choice between its standard library (which is overblown, buggy and inconsistent) and one of 2-3 frameworks, that, ironically do nothing but imitate Rails.
I've heard a lot buzz about Rails.
For you as a project manager buzz is rather a good thing. More buzz means more community and paid support, more good professionals, more choices.
So, from a functionality perspective, what's the advantage of going with Rails?
That's simple. 1 line of Rails code = 10 lines of php (with framework) = 100 lines of php (with standard library).

Posted: Thu May 17, 2007 11:27 am
by Begby
The limitation of rails is that it doesn't integrate all that well so I don't think its ready for enterprise or really large apps. Its great if all you are doing is making a web site and can take advantage of the rails model. But what if you had to integrate your data with a C# app? You would not be able to reuse your Ruby models, all your business logic would have to be rewritten and would now be in two places. This would not be an issue with Java or .NET.

As with any framework, you have to give up some flexibility / integration in order to get rapid development.

Re: Design Approach - PHP, ASP, Rails???

Posted: Thu May 17, 2007 1:26 pm
by rukus206

That's simple. 1 line of Rails code = 10 lines of php (with framework) = 100 lines of php (with standard library).
That's what I kinda figured. I'll prolly be doing most of the initial programming myself since this is going to start off as a personal site. And, it's very different from my area of expertise (data warehousing/business intelligence). So, it's def a labor of love from that stanpoint. It may turn commercial if I can recruit a good programmer to help out, however. So, with that in mind, can you recommend books/online resources for Rails? PHP?

Posted: Thu May 17, 2007 1:49 pm
by stereofrog
Programming Ruby
http://www.pragmaticprogrammer.com/titl ... index.html

Agile Web Development with Rails
http://www.pragmaticprogrammer.com/titl ... index.html

are two "official" books about ruby language and Rails.

http://rubyonrails.com/docs is the primary source for online tutorials and documentation.

Posted: Thu May 17, 2007 2:32 pm
by rukus206
stereofrog wrote:Programming Ruby
http://www.pragmaticprogrammer.com/titl ... index.html

Agile Web Development with Rails
http://www.pragmaticprogrammer.com/titl ... index.html

are two "official" books about ruby language and Rails.

http://rubyonrails.com/docs is the primary source for online tutorials and documentation.
Thanks...

Re: Design Approach - PHP, ASP, Rails???

Posted: Thu May 17, 2007 3:29 pm
by Christopher
stereofrog wrote:That's simple. 1 line of Rails code = 10 lines of php (with framework) = 100 lines of php (with standard library).
But what about the other 999 lines in you application that aren't like that. ;)

Honestly, I think Rails is a great framework and have done a couple of sites with it. But you don't do it any service to boast a order of magnitude in code reduction. That is deceptive at best. Do you have, for example, a Rails based app that has the identical functionality in 10-100 times fewer lines? I checked Mephisto and Wordpress -- the both have around 500k of code...