mysql php pdo html form element book
Moderator: General Moderators
mysql php pdo html form element book
Hello all,
Does anyone know of a really great book about the ins and outs of building html forms while using php pdo mysql with some ajax maybe? I'm new at web programing and looking for a good foundation that would allow me to use the same system throughout my website. I've picked up tutorials here and there, bits and pieces from one book or another.... but nothing really work together.
Does anyone know of a really great book about the ins and outs of building html forms while using php pdo mysql with some ajax maybe? I'm new at web programing and looking for a good foundation that would allow me to use the same system throughout my website. I've picked up tutorials here and there, bits and pieces from one book or another.... but nothing really work together.
Re: mysql php pdo html form element book
Which of those aren't you clear on? If you understand how each work, making them work together shouldn't be too challenging. Is there something specific you're trying to accomplish? Where are you getting stuck?
Re: mysql php pdo html form element book
I am looking for a book that would allow me to work with form elements while using one style: PHP PDO. And add-on to it with other types of scripts when needed. I am tired of picking up bits and pieces here and there by hundreds of different people and have to adapt the codes one way or another to build my application. I read somewhere it's called "Spaghetti coding." I would love to pick up a book that would teach me one way of interacting with form elements while using the same type of script system. 95% of my website will be page after pages of forms. I would love to find a book that would help me be consistent.
An example would be three things: validating and exploding a value into three different input box(time spent on it over 60 hours- result=null - gave up), bringing back value from mysql to a group of checkboxes(time spent on it 40 hours - result=null- gave up) and now I am trying to get a a combination of dynamic select boxes populated ( time spent on it so far 6 hours - result= null - reflection: time for me to stop wasting my time and learn one method of doing all that and other task while utilizing script that will be reusable, thus PDO)
once I learned how to work with each element at least once, then I am set. I will be able to reproduce every element on my website just by modifying a solid foundation of codes that works well together.
An example would be three things: validating and exploding a value into three different input box(time spent on it over 60 hours- result=null - gave up), bringing back value from mysql to a group of checkboxes(time spent on it 40 hours - result=null- gave up) and now I am trying to get a a combination of dynamic select boxes populated ( time spent on it so far 6 hours - result= null - reflection: time for me to stop wasting my time and learn one method of doing all that and other task while utilizing script that will be reusable, thus PDO)
once I learned how to work with each element at least once, then I am set. I will be able to reproduce every element on my website just by modifying a solid foundation of codes that works well together.
Re: mysql php pdo html form element book
One doesn't really have anything to do with the other, though. How you interact with forms is (and should be!) entirely separate from how you interact with your database. The term 'spaghetti code' typically refers to the mixing of concerns, the mixing of presentation with business logic. Your use of object-oriented code is a good step in avoiding that. You will ultimately want to move toward an MVC (Model-View-Controller) setup, and most modern frameworks (Fuel, Cake, Laravel, etc) can help you with that.jaad wrote:I am looking for a book that would allow me to work with form elements while using one style: PHP PDO.
Re: mysql php pdo html form element book
YES! that's what I mean. A framework that will be consistent throughout the application. I have found that PDO makes sense to me; it's easy to understand; easy to organize; flexible; reusable; works on many platforms - it's the way to go as far as I am concerned
). Procedural coding is not something I want to use for my application. I have read a litle about PEAR and ZEND frameworks but always though this was too advance for me to even get into at this time. What are frameworks in a nut shell?
Re: mysql php pdo html form element book
Frameworks, in a nut shell, are a collection of boilerplate code that you'd end up having to write over and over for every application, as well as the glue that binds them together. These typically include: front controller, router, MVC, database abstraction often including ORM, and a handful of useful helper functions. Which is to say that they'll route all requests to a single entry point, allow you to define routes (mapping URIs to controller actions) and giving you pretty URLs in the process, separating out your business and presentation logic, allowing you to pass information between these layers, and allowing you to interact with database rows as PHP objects without all the minutiae of having to worry about escaping queries, etc.
PEAR isn't a framework, it's more of a software module repository. Zend Framework does all I listed above and much more, though you're right that it can be both heavy and complex. There are many frameworks out there -- I named a few in my previous post -- all of which have their pros and cons. I wouldn't bother trying to find the perfect framework; there's no such thing. Just try finding one that's comfortable to work with. Once you understand how they work, switching among them becomes trivial. We mostly use CakePHP at work -- so I have sort of a love/hate relationship with it -- and I have also worked with Kohana (dead), Fuel, Lithium, Laravel, and probably a few others I've forgotten.
PEAR isn't a framework, it's more of a software module repository. Zend Framework does all I listed above and much more, though you're right that it can be both heavy and complex. There are many frameworks out there -- I named a few in my previous post -- all of which have their pros and cons. I wouldn't bother trying to find the perfect framework; there's no such thing. Just try finding one that's comfortable to work with. Once you understand how they work, switching among them becomes trivial. We mostly use CakePHP at work -- so I have sort of a love/hate relationship with it -- and I have also worked with Kohana (dead), Fuel, Lithium, Laravel, and probably a few others I've forgotten.
Re: mysql php pdo html form element book
sounds great.... now let me ask you... this can't be open source? whats the cost? I made the mistake of signing up with Adobe Dreamweaver CC for a year because everyone told me that s the program you want to use to build a website. I went along with it and now.... I never use it. I always use notepad++ is there anything I should know before I invest into a framework?
Re: mysql php pdo html form element book
Absolutely they're Open Source. Every framework I mentioned is 100% free. Notepad++ isn't bad for making small edits or quick changes, but I'd recommend getting yourself an IDE. PHP Storm is my IDE of choice, though it is not free. $100 for a personal license, which isn't too bad. NetBeans isn't quite as refined IMO, but is still quite good and is leaps and bounds more capable than Notepad++. As for simple editors, not full-blown IDEs, I can't recommend Sublime Text enough. $50 for the license, if memory serves, but has an essentially unlimited trial period.
Re: mysql php pdo html form element book
thanks a whole bunch for the info, this is great stuff. I've taken leave of absence for a week to get myself organized and stop fiddling around. this is very useful information and will look it up. one more quick question: you said you had a love.hate relationship with Cakephp.... do you care to elaborate a bit on that?
Re: mysql php pdo html form element book
Cake has a lot of 'magic', so you get a lot for free provided you do things their way. When you don't, or can't, you end up fighting against its conventions to achieve the results you want. This is really a < 1% of the time edge case, but it's a frustrating, often infuriating 1%. Also, Cake's ORM is terrible. That has been the focus of much attention in their upcoming 3.0 release, where they're taking a more Active Record type approach, so hopefully that problem will become a thing of the past. Cake is also quite heavy and has been criticized for being slow, though I suppose that depends on where you're deploying and what kind of traffic you're looking at. We've dealt with 20,000+ concurrent requests and it stood up fine.
Re: mysql php pdo html form element book
awesome! thank you very much for your time, I appreciate the feed back