views:

200

answers:

3

Firstly hello as my first question.

Looking for guidance rather than coding fix. The final flicker of Informix 4gl contracting extingiushed for me in 2004. To cut a long story short I am looking to code again by creating a website. I will be using PHP v5 and MySQL.

Spent about a year (in spare time) doing all data analysis and DB design for a generic classical music events database. This meant looking through event brochures of major arts centres. I originally studied music so I am combining my two main interests here. Prototyped in MS Access but will export to MySQL.

So, it is decision time. I have come to the conclusion that I need to code in PHP first BEFORE using a framework e.g. CodeIgniter (had a look) as this is my first PHP project. This means that I will know what's going on behind the scenes before moving on. I will code a portion of the project for about 6 months and maybe then think of using a framework, even if it means re-writing my initial code.

Any thoughts much appreciated.

A: 

no matter in what you start, you will learn will doing it, and in the end you will find better ways to do it, and wish to start with your new knowledge from the start.

but imho its better to start with a framework (a real framework) it helps you with the more basic things, like separating code and design, and logic and data.

Rufinus
+7  A: 

Hi,

If you choose using a framework, Not depending on which one you'll chose, the first thing you have to know is that :

  • it'll take some time for you to know it
  • you'll do crapping things, during that time ^^
  • so, take into account the fact it'll take some time before you are fully operational :-)

I think those points are the most under-estimated points : using a framework takes not much time... Using it well and to the full extend of its abilities takes... Well, a couple of months, maybe... Which means, when you are at the end of your project you'll say "I should rewrite that with all the stuff I learned while re-writing it the first time" :-D

What it means is : learn what the framework can do, learn how to use it, and use it for a while on small applications, before starting rewriting your big one !

(Disclaimer : this previous paragraph was a re-post of a part of an answer I did to this question)


On the other side, if you don't use a framework :

  • it will still take time to know PHP well enough to develop your application
  • you will still do crapy things during that time ^^
  • and you should still spend some time on "little projects/applications" before starting programming the big one, to get familiar with the language.

So, actually, using a framework or not, the same stuff is still true : using a framework only gets you some boundaries, help, and pointers -- and a lot of already existing great code !


Finally, about the question of "using a framework" vs "not using a framework"... Well, it's 2009, and considering the amount of things/code/best-practices/guides/whatever a framework brings, I'd definitly go with a framework : I work in a company that develops websites, and we don't ever ask ourselves the question "should we go with a framework" -- we still go with the question "which framework is the best for this project", though.

Plus, if you are willing to work (ie, professionnally speaking) in PHP development, having used a "big" framework would be a plus on your resume (well, I don't know about the country where you're from, but, in France, it is definitly a plus)

(Added as an edit, to be more clear about what I meant)
Still, while I'd say "use a framework" for your application, that definitly doesn't prevent you from first spending/investing some time learning at least the basics of PHP, it's syntax, and some of it's gotchas -- but that could be on smaller "example applications", I believe.


And, if you are curious about "which framework should I choose"... Well, that's quite a debate ^^
About that, instead of debating all over again, here are a few pointers to other questions/answers :

(Well, how strange is that : some of those might also help you answer your own question ;-) )

Pascal MARTIN
As you say I will need to start with an "example application". I will rewrite an existing Frontpage "mess" in PHP. After this point I will use a framework with my major project. Thx
Jonathan
That's probably a good way to start :-) Have fun!
Pascal MARTIN
+2  A: 

I'm on the 'learn the basics of the particular language first and THEN find yourself a (good) framework to get stuff done quickly' - side.

You'll feel very lost (and dependent on the framework) if you don't get programming fundamentals (and language characteristics) first. Including (but surely not limited to): datatypes, conditionals, variables, common structures / idioms, ...

I would only go for the "pick your framework"- route when you already know the basics of programming (and then some php - this being the particular language in this case).

ChristopheD
Re my comment above. Will start with small PHP app and use MySQL.
Jonathan