Jump to content

Recommended Posts

Hello everyone,

 

I have started PHP not so long ago and I must admit that this whole world is quite confusing. On the internet, we can find everything... A link saying that we should press A and not B, another saying that A must not be pressed and B shoud etc. When looking on the web to learn about PHP, I often find myself more confused at the end of the day than at the beginning of the day.

 

So I would like to know, with all you've learned in the past years, what would be the best advice you could give to a newbie who's been assigned on a big project and who wants to learn PHP properly ?

 

Would you tell him to use a templating system ?

Would you tell him to use a PHP framework ?

Would you tell him to use a caching system to store some data ?

What else should be taken in consideration ?

 

PS: Flexibility is a must for this project

 

Thanks !

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/
Share on other sites

Not nearly enough info to give a good answer.  Would need to know;

 

What type of project? 

Internet or Intranet? 

Need for stringent security or not so much? 

How many users? 

What kind of data and how much?

What is your experience with Web Building/programing?

 

As to learning php- the PHP and MySQL5 manual is great.  There are numerous tutorials on the net.  VTC.com has a great PHP dvd tutorial that

I have used and it was very inexpensive.

 

 

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295497
Share on other sites

The fact that you have a project to work on is a great start. I would highly recommend you have a look into the Codeigniter PHP framework it has been the best decision i ever made in my quest to learn PHP. Codeigniter has a very extensive user guide within no time you'll get the hang of it. All the best

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295499
Share on other sites

Would you tell him to use a templating system ?

Generally, no. It just adds extra overhead for no reason whatsoever. People make excuses like "well I don't want my designer who sucks at coding to get confused". If the designer can't figure out how to use extremely basic programming structure, then he probably isn't going to understand your weird templating language either. And at least if he needs help with the PHP, he can easily find information about it. Plus the fact that raw PHP is faster.

 

Would you tell him to use a PHP framework ?

It depends on the project. For extremely simplistic projects a framework may be overkill - though at least expansion wouldn't be an issue. For medium to large projects, generally a framework is a good way to go. You can focus more on your specific application instead of trying (and probably failing) to make a bunch of efficient libraries for handling common things like databases, file uploads, security etc.

 

Would you tell him to use a caching system to store some data ?

Again, depends on the project. Are you expecting a decent amount of traffic (a couple thousand hits a day)? If so, then you may want to look into caching. Even very simple caching could help out, especially if your application is chunky.

 

What else should be taken in consideration ?

Before you decide your approach you really need to analyze your project. Ask yourself, what is your app supposed to do? What is the projected target audience? What features should it have? What technologies would you like to incorporate? Are you working alone?

 

These are a few questions to get your started on your application design. Once you know more about what you want, it's easier to find solutions to the problem.

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295553
Share on other sites

Thanks everyone !

 

As for the questions, the project is an Internet website aiming for a very large traffic rate. It is reasonable to plan for dozens of thousands of visitors per day, maybe more. The need for security is probably above average, on one side, no credit transaction will be done. However, a breach in our security would result in a major loss in our users due to the dirt on our reputation and the fact that we will be holding information about them in our database.

 

The project consist mainly of a news website combined to a social community system. This means that there will be a very large amount of data on the database due to our users being able to create groups, comment on news, add articles which can then be commented, etc. The application needs to be very flexible so we can add features over time to add value to the whole website. The target audience is mainly males between 15 and 35 and females between 21 and 34, both close enough to the world of technologies. I am the only developer on the team, however there are people working on design and business plan.

 

About the frameworks, I was told that if someone learn a framework, he basically learns the framework instead of PHP, which is actually a bad thing... What do you think about this statement ? Also, doesn't frameworks usually have template for the MVC?

 

Thanks again !

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295583
Share on other sites

About the frameworks, I was told that if someone learn a framework, he basically learns the framework instead of PHP, which is actually a bad thing... What do you think about this statement ? Also, doesn't frameworks usually have template for the MVC?

 

Yes, you learn the framework (which will be PHP based), some vary slightly from PHP basics, others vary a whole lot.  A bad thing? I don't think so, but I do think that you should have a very good working knowledge of PHP before branching off into frameworks.  This would help you in the long run.

 

Not all frameworks have a template system, or some that call them templates mis-use the term.

 

With a large user base I would suggest a framework.  This will allow your developers to work within a set confine of rules.  This will lead to better code consistency, and ease of migration from one developer to the next.

 

The reason I suggest frameworks:

 

1. The major part of it is written which saves 1,000's of hours on a project like this.

2. The good frameworks are consistently running security checks on their products.

3. Future development of your project will follow the same rules as the current development.

 

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295586
Share on other sites

No offense but you are not capable of building a scalable website at this juncture.  By your own admission you don't even know the php language adequately.  We have a lot of professional php programmers here, and I believe most will tell you that they learn new things on a regular basis.  Building a quality website is difficult.  There is a lot to it, beyond static html and css. 

 

Should you use a framework?  Most definitely, if you want to follow the path that most large websites use.  Several others have provided reasons to do so.  However with most every framework there will come a time when there is something you want to do where you'll need to read code, and you'll be hopelessly lost and frustrated. 

 

This may sound pessimistic, but it's realistic.  People come here nearly every day and post these same questions.  I'd suggest you just jump in and start with a simple website.  If you really want to jump in the deep end, I recommend Symfony2.

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295612
Share on other sites

About the frameworks, I was told that if someone learn a framework, he basically learns the framework instead of PHP, which is actually a bad thing... What do you think about this statement ?

 

I'm not sure what you mean by that. Frameworks are still using PHP code, they just come pre-packed with a ton of functionality that you don't have to worry about creating - you just tie into it.

 

Of course being new to PHP it would be easy to get the wrong idea about how things work, and in that regard I think it is a bad thing. But a framework is still going to require that you know how to code fluently in PHP.

 

 

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295655
Share on other sites

About the frameworks, I was told that if someone learn a framework, he basically learns the framework instead of PHP, which is actually a bad thing... What do you think about this statement ?

I agree :)

 

And you see, it's funny... At russian PHP forums the same question is discussed very often. Some people say that they like frameworks and they like to use frameworks only. Other people say (and me also) that frameworks are not bad things. But if you like to be "PHP programmer" and not "framework user" you would better learn PHP first of all. I'm programmer :) That's why I say that it's better to learn PHP.

 

I'd recommend to split any task into small tasks, like any program is splitted into functions and procedures. Then you are learning how to solve one task, from the beginning to the end. Then you take other task and so on. Once upon a time.... You would be surprised that you solve a very complex task :)

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295674
Share on other sites

No offense but you are not capable of building a scalable website at this juncture.  By your own admission you don't even know the php language adequately.

This is kind of why I am asking for advices on how I should start, so that eventually I can fulfill the project...

 

About frameworks, what would happen if I started using one and it died ? (Discontinued...)

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295761
Share on other sites

No offense but you are not capable of building a scalable website at this juncture.  By your own admission you don't even know the php language adequately.

This is kind of why I am asking for advices on how I should start, so that eventually I can fulfill the project...

 

About frameworks, what would happen if I started using one and it died ? (Discontinued...)

 

What you're asking for is the type of information that people have written entire books on.  We can't adequately cover the topic here in a few bullet points.  Search for "scalable website development".

 

All these frameworks are open source. There is no particular worry if one of them is abandoned -- you have the source code and if you want to fix bugs, or enhance it, you can. 

Link to comment
https://forums.phpfreaks.com/topic/252704-the-best-php-start/#findComment-1295908
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.