Will be getting into PHP development

airbornflghtairbornflght Houston, TX Icrontian
edited December 2008 in Internet & Media
So I'm going to start development on a rush management system (first of its kind?) Anyway, I don't think it is going to be a very complicated system (I'm at 6 tables right now) But I'm going to obviously doing quite a bit of PHP coding and I was interested to hear what my fellow programmer's development environments looked like.

Right now I'm using wamp server locally (that is fine) with Dreamweaver (this is what I have a question about) I've had a few people tell me they dislike dreamweaver for PHP development. Is there a better alternative?

Comments

  • LincLinc Owner Detroit Icrontian
    edited November 2008
    Personally, I use Dreamweaver. I question its size for what I'm doing, but the sites and get/put functionality are pretty sweet. I've been using it for years, I used to do training in it, and it's typically been free for me. Kinda kills the enthusiasm to look around :-/ I've definitely found a few bugs, but oh well.

    I don't use a web server on my main system anymore because A) it adds a lot of setup time to reformat your system and B) you almost never end up developing on a WAMP server

    I have (nearly) identical live and dev servers for both Icrontic and my work. You'd be surprised at the arcane shit that can go wrong from testing on a server that isn't identical to your live box. :-/ I recommend setting up a second box for your test server, at least.

    //edit: Of course, I can't miss an opportunity to recommend a book :) (my list)

    //edit2:
    I don't think it is going to be a very complicated system
    Famous last words! :D
  • airbornflghtairbornflght Houston, TX Icrontian
    edited November 2008
    I get what you're saying, but I was under the impression PHP was portable. What could go wrong? Does it come down to different Apache modules being available?

    edit/

    I had another question. Is PHP OOP or structural? I have 0 experience when it comes to structural programming. I've read that you can code php in an oop style, but it looked like it was missing a lot of the features such as overloading methods and the such. Is it better just to program structurally? What is the standard?
  • edited December 2008
    I'm not a PHP whiz, but from my understanding if you're coding from scratch and off the top of your head you could technically use any word processor to accomplish it of course that would be rather lame due to it looking just like pure text. I'd recommend Notepad++ assuming DW is just serving as a fancy notepad as it distinguishes the syntax just like DW does - minus the bulk and it's free.
  • LincLinc Owner Detroit Icrontian
    edited December 2008
    Ah, sorry Airborn, I have poor recollection of what threads I'm active in.

    PHP is indeed portable, but there are features that require PHP extensions and Apache modules. For instance, cURL functions require that the cURL extension be compiled into PHP when its installed. When looking for a host, ALWAYS review what extensions they have for PHP (Apache is relevant but not as much so).

    PHP began as a structural language and has steadily (if not exactly swiftly) moved towards OOP. You'll find many OOP features available, but probably not all. Having started with structural and only changing to OOP this past year, I'm not much an authority on what it has/is missing, but the book I linked above will address most of that. Also, each release of PHP typically adds more OOP features, so keep you ear to the ground.

    //edit: For your own reference/investigation, here's a list of PHP extensions that are either currently installed on the Icrontic server and/or at my work, or which I will need to be installed the next time we upgrade PHP (with the reason noted after each):
    • zlib (zip/unzip files)
    • pdflib (PDF generation - requires license to use commercially)
    • gdlib (image manipulation, TrueType)
    • mbstring (PHPmyadmin)
    • libmcrypt (PHPmyadmin)
    • libpng (PNG)
    • t1lib (Postscript fonts)
    • FreeType (TrueType)
    • OpenSSL (SSL)
    • libssh2 (SFTP, SCP)
    • cURL (Wordpress plugins)
    • memcached (Wordpress and upcoming vBulletin 4 - performance)
    • APC (vBulletin 4)
  • airbornflghtairbornflght Houston, TX Icrontian
    edited December 2008
    Thanks for the detailed reply keebs. For the main site I'm thinking of going with ExpressionEngine because of how awesome and extensible it looks. I nearly asked the templating system to marry me once I saw it.

    I've been using Joomla for that past year and while it works it has had trouble overcoming the inertia of its past and it seems like when I ask a question on their forums nearly every time I get a reply along the lines of "RTFM N00B OMG DIAF".. And their templating is archaic. It throws tables into the mix and everything seems ass backwards. ExpressionEngine just seems designed for my general purposes. And then I have a three pronged approach to my system I've dubbed 'influence' which will include test files/academics, rush management, and member management.

    I'm planning on diving into this over my Christmas break between semesters, which is a full month nearly, so I'm hoping I can have a working prototype of the system done by then.

    On a scale of 1-10 how hard is it going to be to code an image uploader that will take the image and resize/compress it for webview? Also, how do you store files into a MySQL database? Or do you store the files in a folder and reference the link in the database? I have a feeling I'm going to be asking you a lot of questions in the coming weeks so I hope you don't mind :D
  • LincLinc Owner Detroit Icrontian
    edited December 2008
    A quick look at its requirements makes it look like all you'll need to worry about is the GD library, which should be on any competent host's webserver.
  • jaredjared College Station, TX Icrontian
    edited December 2008
    Screw Expression Engine, just use Wordpress. Or if you really want more power look into Drupal.

    Everyone that I know who got into Expression Engine ended up regretting it.
  • KhaosKhaos New Hampshire
    edited December 2008
    Just out of curiosity, what in the world is 'rush management'?
    You'd be surprised at the arcane shit that can go wrong from testing on a server that isn't identical to your live box.
    This is so true. I usually do web development using a private test image of the website on the actual web server. That way I'm guaranteed that my execution environment is the same as the live one, and whenever things change in the web server configuration, it becomes plainly apparent.

    Depending on your host, it's usually pretty trivial to get them to enable PHP and other browser extensions in a non-public directory if they do not already; e.g. create a private_www directory in your root/~user.

    Locally, I usually create a Subversion repository and check it out to a working folder which also serves as the sync folder between my private_www working image on the web server and my local development box. This way, you get versioning as well as remote testing and most of the work of keeping everything synced and versioned is done automatically as you work. All you have to do to maintain this arrangement is commit your changes to the Subversion repository whenever you make significant changes.

    If you don't use Subversion or don't know what it is, I recommend checking out TortoiseSVN. The Tortoise provides a simple GUI for SVN repositories that integrates nicely with Windows Explorer.

    The other nice thing about using SVN with remote synchronization is that rolling back changes that don't work (Hey, it happens to the best of us) is as easy as getting a previous revision of your code/site from the repository locally and then running your synch application to FTP it all to the test image. From there, you can execute a local copy command on your web server to completely overwrite the current live site with the previous working revision. This is infinitely easier in practice than trying to dig up a backup CD, or manually replacing this file or that file, etc. It is also very fast to execute because usually your synch tool is going to be smart enough to only upload files that are actually different... So you basically get a RoboCopy style transfer of a previous revision to the web server with two simple steps and zero thought put into it!
  • RyderRyder Kalamazoo, Mi Icrontian
    edited December 2008
    Khaos wrote:
    Just out of curiosity, what in the world is 'rush management'?
    ABF is the WebDev for his fraternity. You rush the pledges, of course :D
  • airbornflghtairbornflght Houston, TX Icrontian
    edited December 2008
    Yeh, the rush management will operate in a similar manner as some companies HR systems do. The system will maintain profiles for rushees (the kids who either we are interested in or who are interested in us) that we are rushing (getting to know them). The profiles will contain contact information, notes about the individual, picture, status, as well as actions taken with the individual.

    This system is just a way to better manage our efforts and to help ensure greater productivity and efficiency as it will bring all the communication to a centralized, boundary less plane. (Is it evident I'm an MIS major?) We want to ensure everyone is on the same page and also be able to hold each other accountable to make sure we don't neglect any rushee or give any rushee too much attention.

    If I had a scanner I would upload a scan of my database structure I have jotted down. In a nutshell, the system should allow us to spend more time rushing and less time doing paper work.

    Right now I have an excel file from the university containing 2007 names not counting incoming freshman so as you can see an automated system has the potential to save vast amounts of data entry time.
  • KhaosKhaos New Hampshire
    edited December 2008
    On the matter of OOP, PHP supports many OO concepts at this point. Of course, it does this in the context of PHP. Many, if not most, advanced OOP concepts involve object lifetime, portability, accessibility and/or usability. Since PHP objects only exist for the lifetime of the script execution and cannot be shared between multiple script execution threads, most of this goes out the window. Some of these concepts can be mimicked using object serialization, but realistically, the OOP characteristics of PHP are inherently limited.

    ASP.NET is a much more OO web development platform as it supports both run-time-only objects that are internal to a particular execution thread, as well as persistent-state objects that execute in a dedicated process space on the web server and can be shared amongst individual client execution threads. It's been a few years since I last worked with PHP, but in so much as I'm aware, PHP still does not support any sort of shared objects in a dedicated, global process space.

    I used to be a PHP nut... But after working with the latest iterations of C# and the .NET framework, I'm inclined to say that ASP.NET is the superior platform these days. There is a lot more flexibility and power there than with PHP. Plus, C# is FAST. Compiled MSIL (CLR and by extension .NET) code is pretty much second to only C++ in terms of execution speed of a high-level programming language, if you even want to call C++ high-level.
  • KhaosKhaos New Hampshire
    edited December 2008
    RyderOCZ wrote:
    ABF is the WebDev for his fraternity. You rush the pledges, of course :D
    Ohhh, I see. Interesting.

    I had a contract last year to fix St. Anselm's cohort management software. It was an SQLServer/VB GUI arrangement, but clearly whoever designed it did not know anything about SQL or VB. Most of the data manipulation was done using VB code and it took literally hours to compile reports. lmao
  • airbornflghtairbornflght Houston, TX Icrontian
    edited December 2008
    Well. PHP isn't nearly as difficult as I had expected. I checked out seven books from the university library (2 over php/mysql and 5 over ajax) and I'm on chapter 6 of the php book which I am mowing through with ease. And chapter 2 of the ajax book, which is taking a considerable amount of time to get through as I have little (read: 0) experience with js so it's all new material and concepts to me but I'm getting the idea behind it all.

    I'm pretty excited to get into database manipulation as I think my application is going to be pretty simple in the grand scheme of things. we'll see. Everything just seems so much like Java except for a few differences (like having to put $ in front of all the vars.. how ****ing stupid....) and I'm not sure if I like the fact of how loosely it is coded or not but we'll see.
  • LincLinc Owner Detroit Icrontian
    edited December 2008
    how ****ing stupid....
    Until you start echoing variables in the middle of strings :)

    Yes, it is a very forgiving and easy language. It gives you more than enough rope to hang yourself.
  • airbornflghtairbornflght Houston, TX Icrontian
    edited December 2008
    I guess that makes sense. I don't know if I'll be echo variables inside strings just out of habit from doing so much work with java. I did it some last night just brushing up my skills and it felt sloppy.
  • KhaosKhaos New Hampshire
    edited December 2008
    Most interpreted languages are fairly loose since they just aren't as robust as compiled languages. If you dislike that aspect of PHP, as many do, I suggest using a good IDE (Like Eclipse) that has plug-ins that can enforce code style and do a lot of design-time syntax/error checking for you. Most PHP errors are either logical or syntactic in nature, and debugging scripts is a huge PITA... So a good syntax checker is a must. ;)
Sign In or Register to comment.