Jump to content

Recommended Posts

I'm working on a eBay listing template system (more on that later) and I would like some advice and input from you all before I get neck deep in unusable code.

 

My client runs his own business which utilizes eBay frequently (albeit not exclusively) for some of his sales. He hired another programmer and myself to design a standalone UI (using eBay's API) for him to streamline some of his more repetitive listings. The lead programmer (and myself) would later like to release what we come up with under the GPL so we're aiming to keep this as modular as possible. We've already discussed writing it in strict OO, (interestingly enough, I was the one pulling for OO -- its usually the opposite) and settled on using more of a 'globals.php' (file with a bunch of reused functions and variables) include approach instead. Here's a quick run down of the current features we're planning:

  • FTP 'redirect' of uploaded pictures -- Upload pictures to the webserver and redirect them to another server via FTP
  • Image resizing
  • Template engine -- Allowing certain parts of the listing to be saved to a template to cut down on the 'copy-paste' portion of a similar listing.

We'd like to keep it modular so that anyone in the future could come in and add another module and use it.

 

We ran into a few differences in opinion during our first couple of design meetings (aside from the OO issue) that I'd like to hear everyone's input on.

 

Basically, we'd like to make the UI as fluid as possible, reacting both to the loaded template (or the default) and to the modules that the template employs.

  • So far we've decided on generating a 'configuration' file that we can just write config variables (FTP server address, username, etc.) to and just require in the main UI page. Usually I've seen this done using variables ($var1, $var2, etc.), however the issue came up that we could define them as constants and in doing so protect them from being overwritten. Is this a good way to do this?
  • Some of the configuration settings need to be aware of what template is being used (to get the required information for global variables from the user). I had initially thought of writing a module parser to identify both the modules and it's required globals (and their type), but the more I write of it, the more it seems like there's a better way (I don't have access to a DB, one of the constraints of this project). How can I more easily make the configuration file aware of the current template's module and variable requirements? (We did discuss caching this in a session variable.)

 

It really boils down to the fact that I need to incorporate two different sets of data: the 'behind the scenes' information and the listing template data. The problem we're running into is that it's definately turning into a cyclic reference. The template defines something that needs to be in the configuration file but the configuration file has to know what the template needs.

 

So far we've proposed two solutions.

  • Parse the modules, and define everything in the configuration file (even if its not needed).
  • Separate (read: add another step for the user) the basic configuration and the module configuration.

 

Any thoughts (or links with helpful articles) would be much appreciated.

 

Thanks in advance!

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.