Jump to content

What is the design process behind a PHP script ?


oriental_express

Recommended Posts

Hi there everyone. I think I need to create a php script of some sort which requires me to install a mysql database using " enter your dbname, dbpassword , usname, userpassword " using a type and click kinda of installation. An install feature that you find with most common php scripts.

 

How do I go about designing an application that has some sort of internal admin page that with some configuration ie typing in questions, for a user to answer, based on the reply it will "give" a page or results.

 

I have been reading up some php books I still dont know where to start. I hope you can understand what I'm trying to ask.

 

I already have Wamp installed equivalent of Xampp I know a bit of mysql php but not enough to get the design process. What would you advise ?

 

 

Michael

Link to comment
Share on other sites

Translation:  How does one make something somehow do something with some sort stuff somehow resulting in some sort of something?

 

Like corbin said, you start with the basics.  Go buy a beginner php/mysql book and do not copy+paste scripts, nobody learns that way.

Link to comment
Share on other sites

  • 2 weeks later...

LOL... I was gonna ask the same kinda stuff :)

So, I'm going to high-jack this thread :P

I have read two PHP/MySQL books, I know some PHP and SQL language, and I have written down notes, so at this point, I have enough knowledge to do some stuff but I don't know how to start creating my script. I mean, when my script is done, there is going to be tens of files, folders and subfolders, but the question is...Where to start. The example in the books (shopping cart, university, company employees) are clear to understand, but for a brand new project with a white sheet of paper in front, I'm stuck :(

Are there books that help dividing a project into small pieces and getting organized to know which part need to be done this or that way?

Thanks!

Link to comment
Share on other sites

Start with login script, and then add functionality to that.

 

Thing is: it is your first project, so you will be learning a lot while you do it. It is almost certain that at some point you will decide to scrap all you've done, and start anew.

Link to comment
Share on other sites

Start with login script, and then add functionality to that.

 

Thing is: it is your first project, so you will be learning a lot while you do it. It is almost certain that at some point you will decide to scrap all you've done, and start anew.

 

I want to re-echo this.  This is without a doubt the best route to take for beginners.  I think the toughest leap for new beginners that will help make the learning curve smoother is to understand how exactly things like MySQL work, or how the database is structured.  Upon first examining the concepts of a database, all one can assume is that it is a program that runs somewhere and holds something, somehow.  To understand that MySQL works in un-ordered rows of "textual" data is a huge leap in understanding how one would utilize it.  Much like OOP, if you don't understand the concepts behind how it works, in a general (not syntax necessarily) sense, you may want to start with the basics of concepts, and then start learning syntax, and how to script with it.

 

Your application that you are describing is a great start in all reality, the functionality is basic, and as Mchl stated, you are going to learn a lot by doing it yourself for this first time, and once you learn everything, you are going to want to start over (guaranteed, I'm in the middle of re-doing some of my older projects because of how much I learned while developing them).  Use this as a prime opportunity to learn as much as you can, and you'll find out just how easy it is to accomplish what you want.

Link to comment
Share on other sites

Thanks for the comment. I agree with you. Database design and the SQL language are essential. I had not realized it until I read the book "Beginning database design - From novice to professional". PHP/MySQL books are weak on database principles. The next books I read will alternate between PHP-specific language and database-specific readings.

Link to comment
Share on other sites

Once you have a decent knowledge of PHP's functions I would recommend browsing through some of the free apps from somewhere like http://www.hotscripts.com/

Most apps will have features that you will use in your own projects such as user authentication, shopping carts, image manipulation, etc

 

Download & start tearing the code apart to see how parts work and you will get a better understanding of how to implement in your own projects. You will always find nice functions and bits that you can re-use.

 

I personally think that this is the best way to learn (after reading the books). Years ago I got a ton of help by ripping osCommerce to pieces http://www.oscommerce.com

Link to comment
Share on other sites

Yes, I suppose reading the inside of opensource software such as free ecommerce or free webmail applications developed in PHP can help, although I have already had great problems understanding a chat application developed entirely using OOP with MVC. I gave up on that specific application :(

Link to comment
Share on other sites

Well to start I always think to myself. What is the first thing the user will be doing

 

INSTALLATION

 

set up a page for the values to be entered in then write that to a file then delete that folder.

 

Then the rest of your page.

 

Well thats how I would start off at least

Link to comment
Share on other sites

I wouldn't :P

Not all scripts are meant to be publicly available, so they don't need installer scripts... just installing instructions :)

Besides It's a bit tough to create such an installer, before you know what steps it takes to install your script. Sure, there are database credentials, admin account and password... But what then... Script specific feature are likely to change a lot during development, so the installer would need to be updated as often. If I was working on publicly available script, I would create an installer when I would already have some beta version of it.

Link to comment
Share on other sites

Hey guys, I was browsing Amazon and saw that O'Reilly has a collection of books called "Head First", and three of them are about design patterns and software development. The description looks good, but I'm afraid it's a little too advanced...Do you know this kind of books about design patterns? Are these books good? Are they aimed at advanced users? Thanks.

Link to comment
Share on other sites

These are probably good books, but I'd advise you do some basic coding, before going Head First into OOP and design patterns. This way you will better understand what are the benefits of this approach (and of course will gain some experience that will allow you to feel more confident ;P )

Link to comment
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.