Posts tagged PHP

Web Coding: I’m lost, but I’m enjoying it.

3

For the past couple of weeks, I’ve been rewriting my company’s Intranet site.  During that time, I’ve discovered that several things have changed since I originally wrote the code nearly 6 years ago.  In that time, I’ve basically forgotten everything I did and I’ve had to relearn PHP, MySQL and HTML.

I’ve basically left the heavy hitting of the HTML and CSS to the “Skeleton” framework that I’ve been using, so there’s not much of a learning curve there.

When it comes to PHP, I’ve switched gears – or tried to – from procedural to Object Oriented Programming (OOP).  Every query to the database that I have written in the new code is done with OOP methods.  I’m liking it, mainly because of the inherent security that comes along with the new methods of communicating with the database.

I’m sure that MySQL has evolved in the past 6 years, but for my needs, it really hasn’t.  The SQL statements that I’m writing now are pretty much unchanged from the originals.

There hasn’t been a day go by since I started this that I haven’t hit a brick wall on something.  Yes I’ve gotten frustrated, but I’ve enjoyed solving the problem.

Which brings me to where I left off coding yesterday.  I ran into a problem involving Javascript/JQuery and what I wanted to have happen (PHP functions).  What I didn’t realize is that Javascript is client side processing.  PHP is server-side and I can’t figure out a way to make them talk to each other in a pleasing manner.  (I’m wanting to use a AJAXy type page refresh to pass data to PHP which requires a normal page refresh.)  I’m still working on that, but I’m finding precious little information.

And that brings me to my complaint:  IRC based support.

When I first wrote the Intranet, I was active in a local group of Linux users – LPLug.  That group has basically disbanded and all of the people have moved on to other locations.  The sad part about that is that I can’t call on them for help anymore.  What’s worse is that the groups that I can call on have basically become “pass-the-buck” kind of groups.

I have a problem, like this Javascript issue.  It involves, Javascript, HTML, PHP and in the end MySQL.  Since I’m writing the function in PHP, I ask the question to the PHP folks.  They discover that the problem is triggered because of the Javascript interaction and they say “Go talk to the #Javascript people.”  I go over there and tell them about my problem and they say “Well that’s a PHP problem, go to ##PHP and ask them.”

Really?  I’m certain that BOTH groups know the solution to my problem – because they both have experience with each other’s processes.  So why do I have to spend so much time explaining my problem – to multiple groups – just to get told to go somewhere else.

I know the main issue here is the lack of my knowledge and experience, but seriously, why is it that these groups have become so polarized that neither of them are helping me.  You’d think they work for the US government or something, Geez.

Enhanced by Zemanta

Updating Code

0

For that past couple of days I’ve been trying my best to understand what I did in the old version of the NEI Intranet and then look for the proper way of doing the same things in the latest version of PHP and MySQL.  So far the biggest hurdle I’ve had to jump is to drop the use of the “mysql_” series of commands and move them to the PDO format.  I think I’ve gotten to a point where I semi-understand how to use the various tools that PDO provides and I like them.  The make for cleaner, more read-able code too.

As far as pure progress on the revisions though, it’s slow going.  I’ve basically gotten the layout of the pages done.  I’ve gotten access to the database and pulled information so that I can use it for authentication and permission levels.  I’ve began to look and weed out the unused navigation bits and functions.

There is an inherent problem with look at all of this existing code…the more I look, the more I find things that need to be fixed or changed.  That’s going to lead, in the end, to me basically re-writing 95% of the site and not gaining much additional functionality.  I’ll end up with a better site, but no one will notice because it’s only better behind the scenes.

Oh well, I’ll know, right?

Enhanced by Zemanta

NEI Intranet v3

0

So now that I have my laptop setup for development, I’ve duplicated the NEI Intranet.  In looking at the existing code, the changes in PHP and the some of the APIs that I used back in 2005, and the requirements put in front of me for the new version, it has become apparent that a complete rewrite is in order.

The first question on my plate is whether or not I should create a new MySQL database and re-organize things there too.  There really isn’t a need to keep any historical information, but I could probably copy the data from the old database into a new one without too much trouble.

I need to think about this for a while before I move forward.

Enhanced by Zemanta

Learning Programming

1

So I’ve been thinking that I want to learn programming.  I have for a long time, but I’ve only really dabbled.  I know just enough PHP to be dangerous.  I have no proper training, and I’m not sure where I should really begin.

I would like for it to be useful at work – so I’m thinking either Visual Basic or C++, so I can create in house apps and extend our Sharepoint server.  I’m also thinking that I would like to program for the web – and I do have a bit of PHP experience.  But I know that any PHP that I learn will only be use for non-NEI projects.

So to all my developer type friends – where should I start?  Are there any places in town where I can take just C++ or VB classes?

Go to Top