Welcome Guest, Not a member yet? Register   Sign In
Using a PHP Framework
#1

[eluser]JPrieto[/eluser]
Hello everyone,

I have been busy creating a project using CI. Each day I learn more from the User Guide, this forum, and other sites.

But some time ago I read a thread somewhere, cant remember where, by a poster who felt that using a PHP framework is considered cheating "in a formal workplace". He felt that using a framework (he never mentioned any in paticular) prevents a person from learning pure PHP. I have never been employed as a PHP programmer so I really do not know how to react to that statement.

But, just now I realized that what was bothering me about that thread is that nobody responded against what he had said. And there were many PHP programmers there.

I really want to be very good at PHP.

Do you recommend that I "first" learn to program fully in straight PHP -- or do you feel that learning PHP and using a framework (such as CI) is appropriate and that potential clients will not mind, or care how it was written (as long as PHP was used).

Personally, I already made up my mind to master CI ... no matter what.
I just did and sold a very simple project, and the client never asked how I wrote it.

But what if a client wants his project written in PHP in case someone else takes over in the future? Would using a framework then be acceptable? Should a client" first" be asked for authorization for a framework to be used?

I really would appreciate your feedback on this matter.

Thanks
#2

[eluser]xwero[/eluser]
A framework doesn't prevent you from learning the language it's been build on but i've seen a lot examples where developers clinch to the way the framework does things. It's the developer who is wrong there.

You have to compare a framework with what you know of the language to pick one that makes you write less code yourself. A recurring question is; why CI and not Rails or Django, who posed the question is not aware what a world of difference there is between the frameworks, not only the language but also the availability of the framework on the shared server.

A client doesn't need to know if you use a framework. Lets say a client says you have to use drupal. It's a great CMS product but if you need to make changes you first have to learn how to make changes, meaning it takes longer and the client has to spend more money for something you could do faster with the tools you know.
Using a framework is even beneficial if in the future another developer takes over because then he/she can deduct which changes are made in the frameworks code where custom code can seem like a bunch of gibberish even for expert developers.
#3

[eluser]Mareshal[/eluser]
In my opinion, when you make a script you have to ask client: do you want clean PHP(can contain bugs, less security) or you want me to use a php framework(you explain him what's a php framework) which is highly secured and updated, bug fixes, etc.

I bet he will choose php framework.

A simple client which only wants a site, and has nothing to do with PHP, will tell you "what you think is best". Hope was a good answer
#4

[eluser]Dam1an[/eluser]
The only time I can see use a framework being a problem for the client is if they're huge (like in my case) and everything needs to be authorized by the legal department before it can be used. So not only would they check there are no conflict of interest with the licensing (they're very strict about OSS in my company as if we then build something similar, they don't want to get into a lawsuit where we just ripped something else off) and they check the source code line by line to make sure it's no malicious.

Of course that's all irrelevant, as at that size, they have their own in house team and framework, so you wouldn't really deal with clients at that scale
#5

[eluser]JPrieto[/eluser]
Thanks all of you
I think I get the picture now


1- learn pure php and sql
2- also learn ci well
3- for clients familiar with php, ask if ok to use ci
4- else strive for ci for faster results

all replies have been very helpful

cool

thanks
#6

[eluser]Mareshal[/eluser]
Quote:1- learn pure php and sql

This is the main. Otherwise if you work for 1-2 years only in CodeIgniter, trust me, you will forget how to use clasic mysql queries, simple php scripts etc.

I don't agree with those who say in CI use only CI. No, you have to combine pure php and CI. Maybe a function created by me is faster than a function which does same thing from CI. There are several scenarios for this.
#7

[eluser]JPrieto[/eluser]
[quote author="Mareshal" date="1245504955"]
Quote:1- learn pure php and sql

... you have to combine pure php and CI....[/quote]

So true

But how can you accomplish this while "constantly" writing in ci to learn it well?
#8

[eluser]lszanto[/eluser]
I agree with what has been said. Also the rule I usually go by is if I can do it without a framework and understand how everything is working then I am ready to use a framework. As using a framework is alot faster and gives you shortcuts having the background knowledge helps along the way aswell. For example with jQuery I made sure I understood how raw Ajax works before I use a simple, shortcut framework instead.
#9

[eluser]Mareshal[/eluser]
yep, true. as an example from CI, you have to know first what result from this: $this->dg->get('table') before using it.
#10

[eluser]Colin Williams[/eluser]
Quote:learn pure php and sql

Ha! Because the PHP and SQL you use in CI is so damn tainted! But I get what you mean. I'll leave the other asinine remarks you alluded to alone. Bottom line: Using a good framework is a good idea. I think certain people just have an inherent distrust or fear of good things, so they grasp for opinions against the mainstream and end up with only over-reaching, shallow, short-sided arguments.




Theme © iAndrew 2016 - Forum software by © MyBB