[PHP] Frequent Mode Switching

2003-08-10 Thread Derrick Fogle
Thoughts on frequent switching in and out of PHP mode:

Switch out, static HTML
Switch out, more static HTML
I've found that I prefer programming this way, for the most part, 
putting most of the heavy PHP programming at the top, and then using 
static HTML interspersed mostly with quick  statements 
for what users see.

I'm sure there's more than one viewpoint out there, so I'd like to hear 
a couple of them. Is this frequent mode switching good, bad, or 
indifferent? Is there a point at which the mode switching starts to 
seriously degrade performance and reliability?

-Derrick

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Images in MySQL vs directory/file?

2003-12-10 Thread Derrick Fogle
Slightly OT, but I'm hoping for a few opinions about handling JPG/MOV 
files with PHP/MySQL.

I've read that, given the choice, you should never store images in a 
database because it makes the database dog slow. But I've got some 
parameters and issues that might make a difference:

1. The only way I can store the files in a directory on the server is 
to make that directory "wide open" as in chmod 777. I don't have quite 
enough control of the server to make that a better situation.

2. The images will only be stored temporarily - I'm looking at a 
maximum of 100Mb worth of JPG and MOV files (up to 80 1Mb JPG, up to 10 
2Mb MOV files) being stored at any one time.

So, am I going to run into performance issues with that amount of blob 
data in the database? The probability of a hack on my images directory 
is extremely low, but it *does* exist of course.

Comments?

Thanks,

-Derrick

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Images in MySQL vs directory/file?

2003-12-11 Thread Derrick Fogle
Thanks for the feedback. Just to clear up a couple questions regarding 
my particular needs...

1. server has *plenty* of capacity
2. traffic is *very* low; max load would be 20 visitors looking at 4 
images apiece over a 4-hour period
3. images will only be retrieved once or twice by one or two different 
browsers, over the period of a week (then they will be deleted).
4. I *don't* need, or want, the files to be backed up

It seems to me that I can get more/better control over the tracking and 
use of the images if I store them in the DB. On the other hand, the 
'simple' solution to the open directory problem is to put it outside 
the www root and fread the file from there to spit out to the browsers.

I'm going to go with the database option for now, despite the fact that 
it will include the stuff in backups if I do, for a couple of selfish 
reasons: I've already got the code written and working, while moving 
the directory around and having to fread and then puke out the data 
will be more work, and I *do* have more control/access over database 
records than I do server directories.

Thanks for everyone's help!

-Derrick

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[PHP] Coding productivity benchmarks?

2004-06-07 Thread Derrick fogle
I've been searching around for productivity benchmarks for PHP 
programming. The only references I can find for it are in for-pay 
publications.

I've ended up becoming a PHP developer more out of happenstance than 
anything. I've been doing it for a couple of years now, but... I don't 
really know how 'good' I am at it. The place I work has always had 
extremely unreasonable expectations for worker productivity, and I'm 
trying to fight that.

I've recently been called into another job interview, and part of the 
interview is a coding assignment. Some of the documentation suggests 
that this assignment should take about 40 minutes.  A rough overview of 
the 'assignment' - a simple Document Management System - is:
 * new user registration and existing user login
 * admin-level user management
 * document upload and download
 * review and suggestion
 * a conditional matrix of 5 document conditions vs 3 user levels
 * 6 input forms
 * 2 listing layouts with fix sorting
 * conditional access to changing document conditions based on user 
levels

It took me about 4 hours to completely satisfy and debug the assignment 
specs with an OK interface. This was with plenty of code 
copy/modification from other web apps I've done before, or other online 
resources. I ended up spending nearly 4 more hours futzing around with 
the interface to get something really nice.

So, am I just a pretender? Are there people out there that can really 
bust out a basic DMS in 40 minutes?

If anyone does have some basic PHP programmer productivity benchmarks, 
or knows where I can get ahold of them, I'd sure appreciate it. This 
issue of productivity expectations has really gotten under my skin, and 
I need to know whether or not I should be doing this for a living.

Thanks,
-Derrick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP] Coding productivity benchmarks?

2004-06-07 Thread Derrick fogle
On Jun 7, 2004, at 11:39 AM, Tyler Replogle wrote:
I just did all of that and it took me 1 hour and 35 mins
Just for grins and giggles, why don't I post the exact assignment specs?
FYI, I've never really had to deal with file uploads and downloads 
before. It probably took me to an hour to research PHP file 
upload/download/MySQL storage, and get that part working. I could do it 
much faster next time ;-)

As for the layout issue, I suppose that's my big 'weak point' as a 
developer. The templates I started from have a basic interface 
structure already, so I went ahead and developed the code and the basic 
interface together. That took extra time beyond just puking out the 
bare minimum. I've spent so many years doing database development for 
customers that I view the real functionality of an application by how 
the interface looks and acts more than how the underlying code is 
written. I just can't see the forest for the trees, and I can't see a 
functional web app without an interface that matches the workflow.

Anyway, here's the actual assignment specs:

XXX Company is publishing an on-line journal and needs to provide a 
system for electronic manuscript management with the following 
features:
1. All submitted documents should be able to be uploaded and downloaded 
in word format.
2. There should be 3 user roles: Author, Reviewer and Editor
3. There should be a way for a new user to register as either one of 
the 3 roles. During registration, the new user should be able to enter 
first and last name, e-mail address and what kind of user he wishes to 
be (author, reviewer or editor).
4. When a user logs in to the system, he should be presented with a 
screen, depending on what role he has in the system.
  a. As an editor, the user should be able to delete a user, change 
registration information of any user, view the status of each submitted 
article, view reviewer suggestions, accept or decline an article for 
publication, or assign it to a reviewer for review.
  b. As a reviewer, the user should be able to download a submitted 
article to review and recommend the article for publication or not.
  c. As an author, the user should be able to submit a file.
5. An article can have one of these states:
  a. Submitted (after submission)
  b. In review (after reviewers are assigned)
  c. Accepted (if accepted by the editor)
  d. Declined (if declined by the editor)
6. A typical workflow should consist of the following states:
  a. An author submits an article. The article status becomes 
“submitted”. The editor may view the article (by downloading it) or 
assign it to a reviewer.
  b. An editor assigns an article to a reviewer. The article status 
becomes “in review”. The reviewer may now download the article and he 
may also suggest accepting it or declining it.
  c. A reviewer makes a suggestion. The article status remains “in 
review”. The editor may now view the suggestion of the reviewer and he 
may also accept or decline the article.
  d. An editor accepts or declines an article. The article status 
becomes “accepted” or “declined” accordingly.


Thanks,
-Derrick
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php