Should I implement a framework in an existing project?

OK. Let me qualify a pretty rigid scope to start out because of the fact that there’s probably a bajillion threads debating various frameworks and whether or not to use frameworks. I’ve got a specific question.

At work, I sort of walked into a situation where the website was older than dirt, poorly constructed, out of date, had been thoroughly hacked by some radical religious group, or someone who claimed to be… anyway the entire thing was a mess. Out of date, useless to customers and employees, etc. So I created something new, on a VPS that was entirely isolated from company servers, and got it up and running fast. The page structure and such is relatively similar to what they had before, but I used a responsive theme to get it started quickly and it looks much nicer, is current in its contents, contact info, product links. Right now it’s all separate PHP files, for each page, class files, etc. Just a bunch of loose files and scripts and whatnot, no framework, no MVC.

Now the quick and dirty (and possibly irresponsible) is done, and we’re at the point where people are OK with it. They’re forming a committee that I’m to co-chair to discuss design ideas and work on the “real” site - which may be this one, added to, or it may be a third, fresh version with input from other people (the last one was basically me, in a hurry). So.

Assuming I end up using what I have and converting it… I’m wanting to at least get some MVC in there. I could use a basic framework like PHP-MVC “Mini” or my own derivation, or I could recreate it in an actual framework (Laravel, etc).

So, TL;DR:
Is it worth implementing a full framework for this project in particular, in your opinion, and if so or if not, why?

Technical details:

  • Site currently has about 12 top level pages, plans to be no more than
    20 in total (unless products, see below).
    • Site currently has no blog/news features, but will probably have one within the next six months
    • Site is PHP/HTML/CSS/MySQL/JS
    • Site will soon be integrating on some level with an e-commerce storefront software which I think is a C# thing but really have no fricking idea - the developer doesn’t need to know such details :wink: - it may just be a link to start with, but I may have to create a slew of product info pages, etc. Right now our product library is a giant unordered list of MixItUp images/descriptions, but they may all need their own “pages” before e-comm enters the scene, vastly increasing the number of “pages” in the site.
    • Site has a basic backend for administration, but employees will not be logging into it.
    • Working on a company internal site, which may or may not be an entirely different platform - with a redevelopment of both, they could be tied together on the same framework if so desired - which would of course have authentication and employee profiles and such.

Let me know what other information might be informative.
I’ve worked some with various frameworks before, but that was always on my own time. I’m struggling with a recommendation to this committee that I’m co-chairing - they’ll accept whatever I say, and I’m not sure what the “right” answer is. I want to be the most time efficient as possible, while also giving them the best platform I can.

Also, if it helps, HR has given me a carte blanche type deal here - director claims if I need funds or hardware or resources, or time, or whatever, she’ll make it happen. They want to be “the best web presence in the local area in this industry, even if it’s not practically useful”

Hi Jeff,

I’d say definitely go with some sort of framework, (my inclination would be to go with something like Laravel) for a couple of reasons:

  • There will likely be future expansion of the site: starting with a framework is giving you a structure to build off. Picking a framework that favors convention over configuration (assuming you’re happy with those conventions) will save you time as you continue development.
  • There is the possibility of other developers being involved: Laravel’s popularity means it’s more likely to be familiar to other devs, and there is a wealth of documentation and tutorials out there for anyone who needs to get up to speed. With something completely custom-built, you don’t have these advantages.

Also, no disrespect to you as a developer, but the more pairs of eyes there are looking over a codebase, the more likely bugs and security holes will be found and patched quickly.

1 Like

Also, no disrespect to you as a developer, but the more pairs of eyes there are looking over a codebase, the more likely bugs and security holes will be found and patched quickly.

None taken, that absolutely makes sense.

Another thing is that I can’t guarantee how long I’ll be here… there’s an increasing chance that I may be relocating within a year or two due to personal reasons - so I’d also like to ensure that it’s a bit easier of a handoff to the next person if that happens. If I do stay, it may be because they’ve offered me a promotion (which is a pretty decent possibility) I can’t refuse because of the income - which again, would mean handing off this website primarily to another developer - one that might be answering to me at that point. Either way, it’s a valid point that it’ll be far easier, and less hassle for everyone, to hand off a (Laravel or w/e) based site than a “jeffreylees’ special concoction” site :smiley:

And I suppose I still don’t know if it’s worth the time involved… but they have told me that I can within reason write a timeline for this… so… idk

Required reading for anyone in your situation.

Skimming this article immediately brings to mind a (former? not sure) freelancing subclient of mine. They refuse to pay enough to actually do anything of value on the site, so they just have a contractor add the bare minimum content or style updates. The site is filled with tons of unused files, graphics. The pages are displayed in tables. There’s a hodgepodge mix of scripts, styles, etc. Different versions of the site are stuffed in folders, naming convention is nonexistent. It’s just such a terrible mess for being such a relatively small site. I almost rebuilt the damned thing for free just to not have to touch it anymore. :smiley:

Anyway, valid point.

I’m very familiar with Drupal and since there is nothing unique in those requirements that is probably what I would throw it on. Not saying you should do that but I would definitely run it on Drupal 8 (beta release candidate nearing). Most of the work at that point would be theme development and perhaps some custom module development but the admin would be all taken care of. From the sounds of it I don’t think this project really warrants it’s own custom admin and what not built on a lower level framework. However, that comes from someone who is fairly familiar with an alternative for someone new to such a system as Drupal it might be a little overwhelming. Besides Drupal already has a lot of things that will probably be asked for later and/or are easy to model in the admin using nodes,fields, and views. Also, Drupal Commerce for 8 is being developed as we speak. So if/when the time does come to sell products on the website it is likely that will be available.

Thanks for the insight. I’ve only dabbled in Drupal, but it’s a fair suggestion as an alternative to an entire framework. I hadn’t really considered that - or something like WordPress, either - I guess. The ecommerce available to either won’t matter, since the company purchased that ecommerce/storefront software that ties into their ERP before I worked here. They won’t let that go to waste, I’m sure. Unless they tied into each other somehow. Also makes sense to have a pretty easily extendable platform that’s already got a lot of community plugins, modules, etc.

Good points all around. Thanks guys.

I’d just like to chime in saying that if you’re really into the option of keeping what you’ve written so far and doing a piece by piece upgrade to proper modern practices, maybe start building a basic framework under and around the thing, like so. This will add the basics of MVC into the mix, letting you decouple the three aspects slowly but surely. Introducing Composer and some essentials from battle-tested frameworks should make all future upgrades much easier.

So today was a slow day, and I took the time to begin a migration into Laravel. I’m using a copy of my database and files and just hacking up everything and scouring each page to make it work as a view… replacing custom functionality with Laravel methods… so far so good, no insurmountable problems - but I suspect it’ll be awhile before I have something I’m willing to trust to release. I’ll be spending some time getting more familiar with the intracacies of the framework that I haven’t encountered before in my use of it, since it’s going to be the home for my “main” project (is work ever our main project? I guess so… :wink: ).

Thanks again for the ideas. I’ll let you know if I change my mind :smile:

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.