tricer — 2013-08-16T23:02:33-04:00 — #1
I am looking to get into PHP/MySQL coding and I am wondering for someone that has zero experience is it best to start with a framework such as Yii or CakePHP, instead of straight PHP coding. I figured the framework could help build the CRUD request easier for me.
Also is Yii or CakePHP a better framework for beginners? I would like a framework that I can build a customer DB and then turn it into a ticket system for a local service shop.
Thanks in advance
hall_of_famer — 2013-08-16T23:27:41-04:00 — #2
What do you mean by zero experience? I mean, no experience at programming at all or just PHP language itself? If the former is true, you'll have to start with a newbie book/tutorial to actually learn the language first. These frameworks will be way too complicated for you to use if you aint familiar with OOP. If you have programming experience with other languages such as Java or C# though, it may as well be fine for you to start with a framework. Id actually say Yii or Codeigniter are more newbie-friendly frameworks, while Symfony, Zend and CakePHP are designed for professionals.
tricer — 2013-08-16T23:42:09-04:00 — #3
I have never written a program myself I have made changes to current ones, just as add a row or table and then add a field in a form but never really wrote anything from scratch, so I would call myself a hack or hunt or peak coder, so I would go with zero experience. I am very quicker learn and I understand logical stuff very quickly, not sure if this matter and I am sure it does but I very good with the cisco cli and understand routing very well as it logical.
So with that said and from that your saying I think its best I start with a beginners books such as
http://www.larryullman.com/books/php-6-and-mysql-5-for-dynamic-web-sites-visual-quickpro-guide-3rd-edition/ - not sure if I need to worry about PHP6
force — 2013-08-17T00:21:55-04:00 — #4
It is still best to start with the basics. PHP syntax, functions, and methods are different. Since Java, C# and PHP are all based on C, there are some similarities, and that will give you a leg up when jumping between those languages. However, you have to learn to walk before you can run.
Networking and entering commands via a CLI is vastly different than application programming or web development. A different method of logical thought is needed.
So with that said and from that your saying I think its best I start with a beginners books
Yes, but I'd recommend some of the books and courses that sitepoint offers:
as well as:
(Granted, this book is based on PHP 5.3, but it does a good job at introducing you to the language.)
not sure if I need to worry about PHP6
At this point, no. PHP 5.3 and MySQL 5.0.3 are the lowest common denominators these days. I've been seeing PHP 5.4 and MySQL 5.5 slowly roll out to different web hosting providers over the past few months. PHP 5.5 is out, but I haven't seen it in the wild yet. PHP 5.6 and PHP 6 are under development, but have no planned release dates, so it could be months or years before they see the light of day.
ahundiak — 2013-08-17T13:49:19-04:00 — #5
Consider trying to work your way through this: http://symfony.com/doc/current/book/from_flat_php_to_symfony2.html
If you can get to the end then great. If not then at least you know what you will need to know.
And while not directly related to programming, this: http://symfony.com/doc/current/book/http_fundamentals.html
is a useful introduction to how web apps should work. Once again, consider it a guide to what you eventually need to understand.
Sort of like a grass hopper and a stone.
tricer — 2013-08-17T14:15:24-04:00 — #6
I have look at basic tutorials and I get bored quick I am more of a person that likes a challenge to keep my brain in it, I don't give up if its challenging to me.
I really think yii is the framework for me not sure why I just get the warm feelings for it, no not like my wife but I keep going back to the site.
ahundiak — 2013-08-17T14:32:05-04:00 — #7
Not sure if this was directed to me but the two links I gave you are not tutorials. Instead they attempt to explain frameworks work.
If you can skim through them in 5 minutes and not be challenged than you will be more than qualified to pick a framework. But I suspect you may find some of it challenging.
drummin — 2013-08-17T15:02:02-04:00 — #8
Though this might not directly address your question, here my two cents. When I first learned php I had a specific project in mind and I knew nothing but html but was motivated. I knew I needed a database so I searched the web for how to do this and made a basic table with a few fields. I knew I needed to connect to this database and access data so I searched how to do that. Once I figured these simple steps out and ran a few tests updating and inserting records it opened a whole new world to me. My point being, you can get bored working through examples in a book, but if you are creating a new project and working on learning things one step at a time, it can be really fun and rewarding. If you go with some ready-made program and just tweak things, but you may not understand or be able to modify things when needed, whereas you would know every line of a code you’ve created. When you get stuck on how to do something a quick search on the web or question to this forum should get you an answer and you move forward.
tricer — 2013-08-17T15:15:51-04:00 — #9
This my exact purpose is build an app, I have applications I would like to build sure their is apps out there is could use but its not exactly what I want on either one of them.
I think I am just going to dive in and go to work
Did you go with a framework or stayed with straight php?
drummin — 2013-08-17T15:40:08-04:00 — #10
I did straight php. As you learn you will pick up many great ideas for example creating a function if your application might need a query more than once. Let's say you want to list "Tickets". By wrapping the query inside a function named list_tickets() you can call on it any time you need it. You "functions" might be listed on a page called includes.php that you include() on every page. But just take things one step at a time.
Think of it this way, just as you link to a common style.css style sheet so you don't need to rewrite css on every page, your php can do the same and much more for you.
tricer — 2013-08-19T15:18:16-04:00 — #11
I think I am going to start with straight PHP coding and go from there, Drummin you sound like me I know enough html to get in trouble, lol.
I need to find a good tutorial and work with it. I need to have a vision in place for me to stay focused.
system — 2013-08-20T11:31:40-04:00 — #12
This site will serve you well: http://www.phptherightway.com/