Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

What IDE, What VCS, Working copy content v. Website content?


mpalasis

Recommended Posts

I need some help figuring out a good way to manage the development and customization of our osc site.

 

What I would eventually like:

  • An IDE that is helpful.
    • Applying a change to the development website should be as easy as editing a php file and hitting save in the IDE.

    [*]To use version control (managed from within the IDE).

    [*]Some sort of public or private web-based repo for the project code.

    • If private repo is used, things are easy (no leak concerns).
    • If a public repo is used (so others can also look at my code) some files/info need to be held back. (ie API keys, DB info, any other 'sensitive' info ...)

    [*]A project shouldn't chug along files not needed for the development, ie. product images, sql backups.

    [*]Pick a version control software that is easy to use and self-explanatory, without cryptic error messages that leave me wondering what I did wrong!

QUESTION: What do YOU use for editing the working copy of oscommerce that you actually run on live websites?

  • What IDE do you use?
  • What VCS?
  • Do you carry allong all the contens of the website in your working copy or do you have some sort of method of separating the files only relevant to the website from it?

Cheers.

 


 

(my own incohherent ramblings below here, might confuse you... read with caution, lol.... the important part of this post is the part above here.)

 

My story so far:

 

I've been using osCommerce for ~4 years now.

 

Initially I was keeping things simple and just copying the full directory structure of the site (including everything, ie catalog/images/, admin/backups/ and whatnot) and using a simple editor like scite or editpad... This obviously is too crude. After a certain level of need for customization it's a hurdle to manage things this way. Just think of trying to manually roll back a contribution you installed to test... it's a pain, really.

 

In the past year or so I've started using NetBeans as an IDE. Made a development project that is tied to a development website (not the live store site).

 

But the project is still a full copy of all the files on the webserver, including images, sql backups, all the configs and even some config stuff that I would much rather not have in the 'project', like some sensitive API keys, DB login information, webserver paths (even the .htaccess files themselves may have some info in them that could/should be considered sensitive..). Further than that, appart from the 'sensitive' info matter there's also some stuff that's impertinent to the project itself and only relevant to a specific installed/live instance of a website (ie. file system paths..)

 

Why? Even though I'm the only one editing our store's code and it shouldn't really matter?...

Well, I would like to use a web-based public repo (and make my -few- modifications public).

Plus the IDE's "project" would be lightweight, as in: just the actual source code needed, without ~200+MBs of product images. (Also important: those images don't belong in a 'public' repo!).

The use of a web-based repo is also because I would like to have a secondary (remote) repo of the project as an extra failsafe in case of hdd failure/data loss/etc.

 

On another note, the images folder on the website is important enough to have its own separate automated backup and/or version control (non-public), but that's another matter altogether.

 

I have so far tried git as version control software for the project from inside Netbeans, and found it lacking. Especially in the cryptic error messages area. (When I wanted to roll-back something, then found out how to do it, then continued making changes, and ehtne everything was broken in the git repository cause nothing was going into 'master' any more, Netbeans did not tell me I was neglecting to do something! ..like merge the roll-back back into master, or whatever it is I did not do...)

 

The end result of that was that I have disconnected my 'project' from the git repo because it's somewhat broken, and lost the change history of the past ~2 months

 

I was using a network share on a secondary machine (NAS fileserver) as the 'remote' repo target, and pushed to it after every commit.

 

I'm currently testing out Mercurial and bitbucket.org which allows free private repos (git or mercurial).

 

The obvious idea that came to mind is to form github.com/osCommerce/oscommerce2 somewhere (either github or somewhere else) and start applying my customizations on top of that again (shouldn't take too long, maybe 2-3 days) but again I'm unsure about how to handle sensitive config info and images.

 

Towards that goal I've modified my configure.php to be somethign like:

<?php
require_once ($_SERVER["DOCUMENT_ROOT"] . '/../private/websitesConfig/' . $_SERVER["HTTP_HOST"] . '.osc.catalog.config.php');
?>

notice that it uses HTTP_HOST in the filename so that I could have both /var/www/UserName/private/websitesConfig/www.example.com.osc.catalog.config.php and /var/www/UserName/private/websitesConfig/dev.example.com.osc.catalog.config.php on the same location...

But this still leaves a lot of other information in other, non-php, places (ie .js files and .htaccess files) , stuff that IS relevant to the live website but not relevant to the 'project'...

Link to comment
Share on other sites

IDE: Eclipse.

 

VCS. A second hard drive in my development box. Also backups on a NAS box. I pull backups any time I have a change worth saving. If I ever manage a more formal system with real version control, it will have to be running somewhere on my own network. I don't trust third party solutions that far.

 

Working copy: All of it. If it's on the live site, I need to be able to tell it works the same on my dev site. I've found that server settings can make a difference as well,, and I need to be able to show things to clients, so I usually have a dev site on the same server as the main site, preferably in a subdomain. Small projects don't need this, so I make do with my local copy.

 

If I'm reading your question correctly, you are leaving database backups on the server. I hope you have a backup of that locally as well. I've had clients ask me to recover their site after the server crashed, and the only backups were on that server. They're never happy with the answer.

 

Regards

Jim

See my profile for a list of my addons and ways to get support.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...