Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Are there advantages to Ruby on Rails over a good PHP Framework?

Posted on 2010-11-16
6
Medium Priority
?
965 Views
Last Modified: 2012-06-22
I have a need to find a lower cost development and deployment solution and I have been reading about PHP and Ruby. I am such a newbie to either of these frameworks I don't have a good perspective on which might have an advantage over the other. I mostly have basic needs for my web applications:

Good Authentication Capabilities
Session Control
Data Layer Access (CRUD)
Well documented and tested Script Libraries

My first application will need to handle online PDF forms. I will design the form so that on submit it will the send the data to the server in XML format for further processing. It would be great if one of these frameworks already had a library to handle this.


Thanks,

Frank  
0
Comment
Question by:Fgriffin
  • 3
  • 3
6 Comments
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 34151135
A few years ago I looked at Ruby and decided it wasn't worth the effort to learn it. There is a lot of mystique around Ruby but at the end of the day it is just another programming language - just like PHP. The big deciders for me were

a) PHP is sufficiently similar to C / C++ / Java / Pascal that my past experiences with those languages meant I got off to a very fast start in PHP

b) At the time, almost no servers using Ruby were available. It was very niche and it was easier getting servers that used PHP rather than Ruby although I expect that will change over time.

PHP's libraries have nearly tool you'll ever need and the OOP capabilities of PHP are perfectly sufficient.

Looking at your requirements

Good Authentication Capabilities - depends what you are authenicating. If you mean "user login" then it is trivially simple in PHP

Session Control - PHP has very good session control

Data Layer Access (CRUD) - PHP supplies database abstraction layers via mechanisms like PDO or MySQLi. Whilst these are not CRUD they allow the data access to be placed in classes so that you gain abstraction from the messy details of what happens at DB level. Implementing MVC is quite straightforward.

Well documented and tested Script Libraries - To be honest, PHP has too many script libraries out there and many of the functions are in the PHP core anyway.


More important than any Framework (IMO!!) is a good editor and programming environment to support that editor and Eclipse with the PDT plugin works well. If you combine this with a CVS or SVN server then you will find PHP very productive.

0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34151252
Thanks, Bportlock.

Is this the PDT plugin you are talking about? http://www.eclipse.org/pdt/

I see they have resources and tutorials on that site but do you have other tutorials and resources that you found helpful?


0
 
LVL 34

Accepted Solution

by:
Beverley Portlock earned 2000 total points
ID: 34153180
Yes - that is PDT. It syntax highlights java, javascript, PHP XML, HTML and PHPdoc. It comes with CVS built in which, unless you simply must have Subverson, performs well enough to let you code multiple versions for multiple programmers at multiple locations (but you do need access to a CVS server to act as the repository).

As far as tutorials and other stuff go I think that this book http://www.amazon.com/PHP-MySQL-Dynamic-Web-Sites/dp/032152599X/ref=sr_1_1?ie=UTF8&qid=1289983901&sr=8-1 covers the basics and is a good introduction. Then move to Ray Paseur's favourite - the sitepoint series which covers things in considerably more depth (see http://articles.sitepoint.com/category/php-tutorials ). Get the introductory one from your local library service and don't be put off by the title of PHP6. PHP6 was renamed PHP5.3.3 and is alive and well.

Most framworks try to be all things to all people for al tasks and the result in that for many jobs you wind up doing the programming equivalent of using a lorry when a bicycle would have done the job. Just design a regular structure that can be easily extended, for instance...

/ (site root contains index.php)
 /images
    /images/constant  (images that never change - buttons, etc)
    /images/user   (images the user can change)
 /documents
 /styles
 /classes

and then create a rough skeleton layout for your code and you are ready to go with your own framework designed specifically to meet *your* requirements. Then when you start a new project just copy the framework to a new folder and off you go. It is also worth creating a folder OUTSIDE the normal webroot so that PHP has access to it via the file system but Apache (or IIS) has no access.  In this folder put common functions, classes and connection scripts.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 1

Author Closing Comment

by:Fgriffin
ID: 34155542
Thank you so much! This is great information.
0
 
LVL 34

Expert Comment

by:Beverley Portlock
ID: 34155655
Don't forget to come back and ask if you have any difficulties or questions.

Another advantage of PHP over Ruby is the level of support. Just using Experts Exchange as an example, there are 11 questions in progress whereas in PHP there are 589. In my view that means that you will find it easier getting support for PHP.

When you use PHP, do as much as possible using the library functions and classes. It will save you a lot of time.
0
 
LVL 1

Author Comment

by:Fgriffin
ID: 34156126
Yes, support is a very big component, you make a very good point. I understand about functions and classes - I started learning FLEX some time ago but got pulled off on to anther project.

You have been very helpful and I appreciate your time!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question