B.A.S. wrote:
Hi Everyone,

I'm trying to move from being a rank beginner to an intermediate level of programming PHP. While practicing & trying to learn something new every day, I'm also reading up on security (Essential PHP Security by O'Reilly & Pro PHP Security by Apress).

That is never bad.


Unfortunately, I still have a really tough time trying to work out the logic of what I want a script to do, and my code is pretty primitive & verbose because of that (I have to painstakingly step through each little bit of logic in order to wrap my head around anything).

Welcome to my world, you are not alone.

What I should be doing to get to the next level? Should I read up on web application design? OOP? Just keep plugging away? What do you guys use when working out the logic of an application you're building? I'm guessing that would be some kind of flow chart?

What I do is write the commentary first. I write down each step that I know or think needs to be done in the respective sequence. It isn't as formal as a flow chart, but it does the same job: first think about what you need to do and then do it. Of course there will be changes while writing the code and when testing and fixing bugs, but that will happen no matter what you do. If you rather make a flow chart, go ahead, but you do want to add plenty of commentary anyway.

What about IDEs? Because of my HTML coding & graphic design background, I'm still using Dreamweaver--would I perhaps learn faster or be more productive using Zend Studio (or even something less expensive like phpDesigner)?

Well, I went through the odysee of IDEs and still plan on finishing my review of all the ones that I tested out. My three recommendations are LuckaSoft's EnginSite Editor for PHP, Waterproof's PHP Editor, and NuSphere's PHPEd. I use PHPEd as it has the best debugger implementation, not surprisingly as Dmitri ???, the creator of dbg, works for NuSphere. NuSpehere costs money and they do show that they are a business quite drastically. You buy a license and get support and updates until the next version comes out, which is typically 6 months later, so your benefits fade quickly. I find that a bit asanine, but they do put out a product that I think is work the money. See if they have some introductory deal. I got the smallest package for under 60 bucks. I used LuckaSoft's IDE before and think it is a great IDE and even as good or better than PHPEd if it wasn't for the debugger. It uses dbg as well, but in debug mode you have to stop at the beginning of each script and that turns old very quickly. I got a free license for EnginSite PHP because I did the German GUI translation for them. SO if you know a second language and they don't have that as GUI language then spend the two days translating and get a nice IDE in return. Waterproof's IDE has less features, but for the general development work it is on par with EnginSite. If you write to Waterproof and tell them that you do PHP as a hobby and that your projects are for yourself as well as friends and family to look at then they will give you a free private license. They are really nice about that. Uh, one more thing about Luckasoft, see that you get their MySQL client with the IDE if you decide to use Enginsite. It is the best MySQL client that I have seen so far. They also sell it as a standalone tool and it really is nicely done.

I'd get the Standard package from NuSphere and the Luckasoft MySQL client. NuSphere's Pro package has a MySQL client built in, but I haven't had a chance to check it out.

Now, some may recommend the Eclipse based IDEs. I found them to be horrible and truely not designed for PHP. Just syntax highlighting doesn't cut it. I also found those bolted on packages difficult to install and lacking a lot of features. I also tried Numega, but that didn't do it for me. I also tried Zend and I think that IDE was designed by a bunch of drunken monkeys. It is among the worst pieces of crapware that I ever came across. Unbelievable that they charge money for that. I guess some people like it, otherwise it wouldn't be so popular.


Please forgive the numerous questions, but I'm 40+ years old and want to approach this professionally, not just be some hack who writes sloppy code for for beer & pizza money and doesn't care about the client.

Don't underestimate beer and pizza! I think the best approach is to schedule a lot of time and come up with a few projects that you are interested in. Then pick one, write specs for it, establish milestones, create the outline (either as comments or as flow chart), then star coding, and finally do a lot of testing. When you are done, take the project and put it somewhere in the corner of your hard drive and start over again. You will be amazed how much better you are now and how much better your code is. I work on a project now for three years and found myself in the position to write code for a task that I coded before in a different context. I didn't use the old code, but created new scripts. Turns out that the new ones are half the size, run more stable, use less variables and flags, require less db queries, and are just much much better designed and written. I ditched the old code and used the new code. And don't get hung up on creating something that isn't there yet. I work on a picture and video archiver/viewer and there are tons available that are probably much better than mine. But with that approach you will quickly find out that everything was already coded before. Other than that, I completed an MP3 archiving/player system, started a bug tracking and CRM tool (was too big of a task for me), and spend some time writing a custom CMS for eLearning, but quit the job due to budget cuts (the feds needed the money for the useless wars rather than for social services for children and families).

And by all means ask as many questions as you can. Ask tons of questions. The answers that you will get will propel you to the next level. I don't think I'd be on the level I am at now if it wasn't for relentless asking on NYPHP Talk.


David
_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php

Reply via email to