views:

112

answers:

5

Hi everyone,

Apologies if this is not the right place to ask but here goes...

What should I use to create a simple web application for our website?

I'm the IT guy for a small non-profit. On our website we have a page with a large form in which users can fill out information on an application form. The information gets sent to a MySQL db. This data can then be accessed and edited by a couple of members of staff behind a logged-in part of the website. There's only two dbs being used: the main one with all the data and the one used for login details for the web app. It's all done with PHP and functionally is fairly simple - just a form with lots of fields to collect data and a basic secure "manager" page to do a bit of stuff with that data.

The problem is that we need to make changes to the app, and to extend its functionality quite a lot. I have a little bit of experience playing around with PHP but I've taken one look at the code used and decided it'll take too long to decipher it and see what's happening where. The code is uncommented and a bit of a mess.

I'm starting to think that rather than investing time to relearn what little I knew about PHP and untangle all the code, I might invest the time in learning another language and/or framework to get this done. I want the resulting web app to be a lot easier to maintain in future by me or anyone else who comes along and has to make a change.

Would you recommend using Django/Python for a project like this? Zend/PHP? Just PHP and notepad? I want the app to be done fairly quickly so the less steep the learning curve the better. Many thanks for you time.

+2  A: 

I would recommend a PHP framework, such as CakePHP. Spend 20 minutes of your time and follow their blog tutorial.

Using PHP alone can be tricky, especially when you will have to deal with security issues.

Anax
Cakephp is certainly the right answer for a simple CRUD interface. +1
gnud
+3  A: 

Another good PHP framework is CodeIgniter.

They also have a good webcast that outlines how to begin with the framework as well as create a simple blog [tutorial].

statikfx
I also second CodeIgniter, having had a taste of cakephp, I liked CodeIgniter a lot more.
Jakub
Indeed, Codeigniter is the simplest to learn and the most practical in my experience. There are a few CRUD (Create/Read/Update/Delete) libraries you can add to it to make a simple site even easier to create. Their user guide is second to none and you are bound to learn a lot of *good* php coding techniques. Good luck with your project!
KyleFarris
I completely agree as well. I found CodeIgniter to be easier to learn than CakePHP.
statikfx
A: 

As Anax states, I'd suggest that you look to use PHP. If code is already implemented then you have a start.

PHP isn't hard to re/learn. I know some don't like it, others like it but simple fact, either way it isn't hard to learn. But, more importantly consider the following:

You obviously have access to the hardware stack required to use PHP and MySQL. Introducing a new language/technology may cause unforeseen issues with getting a production site set up.

Now this doesn't mean that you can't write certain components in other languages. You could, if you were so inclined. But you probably shouldn't be so fast to get rid of PHP just to learn another language. Do you have important (technical) compelling reasons to use something other than PHP?

If you are mostly concerned about the spaghetti code in place, you can get that anywhere -- even new development. Better to re-factor the code and fix and add to what you have than start from scratch.

Frank V
+2  A: 

From what I can see you have asked 2 questions. 1. Should you maintain and extend the current code base or do a rewrite?

Rewrites always take longer than you think. And even if you do the rewrite to avoid learning the codebase you would still need to learn the current codebase to ensure you capture the current functionality before adding any new features in the rewritten codebase. I would keep the current codebase and maybe do some refactoring as you add features.

  1. What should language and frameworks should you use?

I would stick with PHP, CakePHP is a solid framework and so is Zend. I would read up on both and do a couple of tutorials and make your decision.

bkoch
A: 

I can offer some general considerations:

  • Whatever language you choose, get a good IDE for it. Having automatic syntax validation and code completion helps a lot if you're a beginner. Don't use plain text editors.
  • Teaching yourself how to code well will make for a very frustrating experience unless you have a lot of patience. This generally comes from being really sure that you want to do it.
  • Be very conservative in your time estimates. Having many setbacks is guaranteed if you're a beginner.
  • Start out by focusing on reading about writing code, not focusing on writing code. If you're learning Python, read the official tutorial first. The same goes for PHP.
Reinis I.