Jump to content

New to Php - where to start with a new application?


Cheeseslice

Recommended Posts

Hi,

 

I've made the decision to learn php (and javascript) in the hope of expanding my skillset and changing career paths a bit.  I have been asked to create an application that will support a few hundred users, the general idea behind it is that each user will have their own work area containing a number of different forms.  These forms are based on templates created by a supervisor and as each form is finished it will be printed as a pdf.  A supervisor is responsible for around 50 users, they need to be able to see the progress of each user that they are responsible for.  In addition to this I need to allow for this application to expand to different locations with their own supervisors, users and forms.

 

I think I can get my head around the database and planning the relationships between each table but I don't know how you go about starting to plan for an application to be developed in php.  I have looked at quite a few jobs over the past number of weeks and all of them want experience in using frameworks.  Is it best to start from scratch or do most companies stick to using the likes of cakephp to speed up developement?  Once I have created a map of the pages I require and the tables that I need do I start with the security aspect of the application or do I just design each page and worry about how the pages are secured at the end.

 

I know I'm a bit vague so what I'm really asking is for examples of how someone would tackle a project like this.  Or if anyone could provide me with links that would cover the design process I would be very grateful.

 

Many thanks

Link to comment
Share on other sites

This is a big leap, especially if you've never programmed before.

 

Frameworks are nice because they do all of the common, low-level tasks for you.  That said, unless you actually understand what they do for you, and how they tie into the language itself, you're not going to get the full benefit.  You'll also be required to write regular PHP code regardless (frameworks are nice, but they don't do all the work for you).  So, learn the language, try to learn best practices (there's definitely a right way and a wrong way to write PHP), and go from there.

 

As for the actual design process, I like to start with the domain - that is, what the site is supposed to do - and work from there.  How is your data going to interact with each other?  What rules govern those relationships?  How will a user be able to use the data?

 

The rest - HTML, JavaScript, etc. - is really just a skin layered on top of the actual domain.  Figure out the important stuff first, and the rest will follow.

 

I also tend to address security last.  It makes more sense to get things working correctly, then to layer security on top of it all.

 

Hope this helps.

Link to comment
Share on other sites

Thanks for the reply.

 

Originally (many years ago) I did my degree in applications development, java, vb, coldfusion, oracle and a few other things I can't remember.  Unfortunately I ended up going down the hardware support route and only dabbled in web development when someone asked me for a favour.  I will be the first to admit that I don't really remember anything from that long ago but I think with a bit of effort I should be able to start picking up things again quite quickly.  I have been doing a bit of research this past few weeks, looking at the sort of jobs I might be interested in, and from what I can see the main contenders for well paid work are php, javascript, c#, asp.net and maybe some python.  Most positions that I saw involving php do ask for experience developing in a framework environment which is why I would consider doing this project in something like cakephp to learn how it all works.

 

I suppose my real issue is learning how to code fast, generally I can work out a problem if I can't find a similar piece of code using google I end up spending a few hours wading through the php manual only to discover there is a function that already does what I need.

 

Would you recommend learning different frameworks from the start?

 

 

Link to comment
Share on other sites

Like I said before, without being competent in PHP itself, frameworks aren't going to help you much.  The very worst thing a new developer can do is try to rush through things.  You'll only wind up learning bad habits and write shit code.

 

Get decent at PHP, learn some OOP, then look to frameworks like Zend and Symfony2.

Link to comment
Share on other sites

If you are new to PHP (or frameworks) I would suggest starting with CodeIgniter. It is extremely easy to pick up and get started with, plus the documentation is second to none.

 

I find I learn things faster by just jumping right in, making a huge mess, and then figuring out how to clean it up. I can't pick up new languages by reading 500 page books first, it's just too boring. I would much rather pick a project and start going at it and learn how to do specific things as I go.

 

So therefore, as long as it won't be used in production until it is cleaned up, I encourage you to get your hands dirty! Don't rely too much on the framework though, try to understand what it's actually doing. Otherwise you'll only know how to use a framework but not really know how to use PHP. Frameworks teach good practices though, such as code separation and DRY (Don't-Repeat-Yourself) techniques.

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.