Forward porting Ubercart 2.0 to D7

My thoughts are divided. On the one hand, I see this as a "Good thing." (TM) It provides some level of continuity for users who will want to migrate to Drupal 7 as soon as it comes out, and it will align us with the broader D7CX movement. It also safeguards us against unexpected delays in Ubercore development.

Therein lies my main beef, though, in that porting and maintaining Ubercart 2.x on D7 will become the biggest delay in Ubercore development. Those in the know will remember that UC2 was itself supposed to "just be a forward port" of UC1 to D6 with the only major changes being the cutting of dependencies and replacement of Workflow-ng. 16 months later... need I say more?

Any time we spend on this will be time that could've been spent on Ubercore itself. We already have a history of underestimating the time such an effort would take, and there's just a lot of brokenness in the code that will make such an effort difficult to achieve.

I'd much rather see that developer time spent on getting an Ubercore ready by the end of March that people can begin upgrading to. Jody mentioned in the sprint that perhaps if enough people want this to happen, we could have the community fund a sprint that brought developers together (my vote was Louisville) for the express purpose of a quick UC 2.x port to D7. I can see this working, but that still doesn't consider the maintenance cost.

The way I see it... if the Ubercore Initiative is successful, UC 2.x on D7 won't be necessary. We'll have Ubercore 1.0 by March 31, 2010 with an upgrade path and with active maintainers on all the essential non-core modules. If it's not successful, well, there's no real benefit for people using Ubercart in updating their sites to Drupal 7... i.e. we'd be providing no real value and leaving people with having to migrate their sites once again when Ubercore 1.0 is released. Oof, not to mention the nightmare of providing support for updates from both UC 2.x on D6 and D7.

Those issues actually just came to me, so I think I'm actually more against a forward port now than I was at the start of typing this thread. ; )

Ryan Szrama
Posted: Oct 22, 2009


alpritt on October 22, 2009

My worry is that you are underestimating the development time for Ubercore. Remember what happened with the Ecommerce module when they tried to do a complete rewrite for version 4 (it is still in RC). Remember how long Views 2 took to rewrite. I also don't think it is much of a stretch to compare this with the Windows Longhorn/Vista development albeit on a much smaller scale.

An open scrum development process may guarantee that we get a solid release out at a certain date, but it doesn't guarantee that release will be useful to the majority of Ubercart users. Perhaps I am unclear on the scope of Ubercore 1.0, but at the moment I'm worried that ambitions won't meet the deadline and Drupal 7 will be without Ubercart for months on end.

"If it's not successful, well, there's no real benefit for people using Ubercart in updating their sites to Drupal 7... i.e. we'd be providing no real value and leaving people with having to migrate their sites once again when Ubercore 1.0 is released."

The value is that they get to use Drupal 7 and all it has to offer. The strength of Ubercart is that it is fully integrated with Drupal. If you disrespect that strength, alternatives like Magento start to seem more appealing.

It's worth pointing out that the 16 months it took to get Ubercart 2.0 out began with a less solid release; began (if I remember right) half a year after D6 came out; and removing those dependencies meant it wasn't a straight port. Even with that time delay and the RC status, people still stuck with Ubercart because it worked. It hasn't been perfect, but it worked.

If I understand correctly, the first major task is modularising Ubercart properly. It seems to me that there are two possible routes to achieve that. 1. Port Ubercart to D7 and then start rewriting sections of it and gradually introducing dependencies to Ubercore; all without breaking the main branch of Ubercart. That's the evolutionary and Drupal Core approach. 2. Start from scratch, and go an extended amount of time with a broken project (the Views 2 approach). If you follow the first approach, the port has to happen anyway. The second approach does make sense when you intend to do a complete rewrite, but it tends to cut out developers coming in late because it is really hard to see what the code is meant to do when nothing really works yet. That was my experience with trying to help with Ecommerce module and with helping with versions of Drupal Core prior to the current test driven development cycle. You just give up straight away because you can't see a route in.

What scared me away from the Ecommerce project and towards Ubercart was that Ubercart had energy behind it and people were starting to use it; whilst Ecommerce was caught up in a lengthy rewrite which stopped users of the module from upgrading and scared developers away.

I don't want Ubercart to make the same mistake.

Garrett Albright on October 22, 2009

When I think of what Ubercore on D7 could be - a cleaner, better-documented API, a leaner code base, stuff like Attributes being done via proper D7 fields, etc - then just UC 2 on D7 seems incredibly weak in comparison. I personally would prefer to not see the Uberteam wasting their time on this a straight D7 port and instead going ahead with giving the code base some much-needed rewriting/refactoring. Yes, this means we'll go some time without a D7 release of Ubercart, just as we did with D6. Somehow, I think we'll survive, just as we did last time.

japerry on October 22, 2009

I agree with Alpritt on this one. If the past is any indication, ubercore will either 1) take way longer than March 31st to complete or 2) the standards of whats in ubercore on March 31st will be lacking such that it won't be useful.

Ubercart 2, now that its out, should be ported to D7. Why? because its stable and it works. Yah it can be annoying at times, but it works. The main effort of #D7CX is to get people over to drupal 7 as soon as possible. Ubercart is becoming an integral part of drupal sites, and should be ready on day one.

Once you have a port, its easy to start incorporating ubercore into the old UC2 code. Take for example: Credit Card processing. This should be universal, able to work on its own (simple workflow of just making a payment w/o a cart), integrate with the Ecommerce module, or integrate into Ubercart. This can all be done while having a strong stable core that people will use.

One other thing that hasn't been mentioned here. People are not going to wait until April 1st to have ecommerce working on their D7 sites. With all the other major modules working on release date (est Jan), people will either port ubercart themselves, or create a new ecommerce package, or make drupal work better with a 3rd party cart.

The porting process also isn't that difficult. In one weekend, views was pretty much ported. If there was a sprint involving a half-dozen or so volunteers, UC2 should be working great on D7.

j0rd on October 22, 2009

With the code freeze at hand, I'm really looking for the jump into the Drupal 7 arena myself.

With that said, I personally would like to see a direct port of Ubercart 2.x to Drupal 7 with out rethinking too much stuff. This is inline with the D7CX initative which I believe will help with the adoption to D7. This way everyone can port their UC contrib modules to D7 with out too much thinking. I'd even be happy with a feature freeze on D6+UC2 and D7+UC2 and focus on bug fixes.

Another thing we're forgetting is that since people are already familiar with Ubercart 2.x and if this is a straight port, we can assist with the port. I'd be interested in taking a module and doing it myself as a thanks for all your hard work.

Once we're more familiar with Drupal 7 from the port of Ubercart 2.x, we can leverage that knowledge into Ubercore + UC3.x.

After that, I'm a big fan of rethinking and creating this Ubercore you speak of. UC 3.x branch.

Anonymous (not verified) on October 22, 2009

I'm for a direct port of Ubercart 2.x to Drupal 7. Nearly all of our Drupal sites are ecommerce sites. I've been reading about some of the D7 changes and I'm really excited about it, but if UC2 doesn't get ported we can't really use D7 at all. Ubercart is to us and D7 what Views and CCK was to D6 adopters. D7CX!

I for one would be willing to take part in this direct port. Not just take part, but as a start, I'll commit running 4000 lines worth of UC components through coder. Do we have 11 more people? I've ported a few D5 modules to D6, and it wasn't that difficult. I haven't yet done any D7 porting, so I don't know the extent of changes necessary, but I'm hopeful it's not too much.

Anonymous (not verified) on October 23, 2009

I'm also clearly in favor of straight D7 port! As already mentioned above, even with feature freeze for Ubercart we will benefit from D7 and probably also have increased stability from day 1.

Open source development has a great track record of successful evolutionary software projects. You can investigate revolutionary software projects of the governmental and commercial sector and you will find great stories of failure...

I believe there is added value in having a vision of how Ubercart (Ubercore if you like) shall look and work like in the long run. But to me it is clear the path towards this vision is evolution and not revolution. It might feel like that's the slow road, still I believe we reach the destination faster.

- xibun

Ryan Ryan Szrama on October 23, 2009

It doesn't "feel" like the slow road... it is the slow road. 16 months for Ubercart 2.0. That's dangerously close to irrelevant. ; )

At this point, I'm not sure there's a clear end to the ball of yarn that you could start to pull to sort it all out.

liberatr on October 24, 2009


I am in full support of a direct port to D7, a la D7CX - the reason it was created was to just get people going. You talk about the large number of sites running Ubercart, and in particular some of the high-profile sites that are out there. I've got a lot off eggs in the Ubercart basket, and I'll have more soon.

I only updated my last Drupal 5 site a few weeks ago, just in time for D7 code freeze. In this case, it was Organic Groups that was slowing me down. Not OG core, but all of the contrib dependencies - I couldn't get the same functionality (when I had free time) in D6.

Now think about the people who maintain contrib modules that build on Ubercart. If you guys wait to update, then the speed of contrib will be slow, and adoption will be slow, and so on...

One of the real benefits to working inside the Drupal community is the distributed workflow of contrib... I agree with @univate that perhaps one way of getting UC to D7 faster would be to spin out any non-essential code into separate projects in contrib. Many many sites would have an upgrade path, and those who do not could offer bounties, work on code sprints, and upgrade just the contrib parts they needed - because this is all GPL, that means when they finish, now everybody benefits from their selfishness.

I have registered for the site here. Is that the best way to get involved with D7UC? Do you guys have Notifications installed here? Personally, I find it's much easier to contribute when I get emailed several times a week. I really like that about GDO, and I have copied it on a community site of my own.

I'll even volunteer to set up Notifications for you, so we can get subscriptions going. Let's kick this Drupal 7 thing!

univate on October 24, 2009

Firstly I support the idea to build a better ecommerce system with cleaner API's.

But I'm not sure re-writing everything is the best way to achieve this. The main reason I current support ubercart over the ecommerce project is because of the community around ubercart. And while this is probably not really a fork of ubercart it is going to divide the community into those that are interested in the underlying systems/API's and those that are just users and just need a ecommerce system for drupal.

I think its good to focus on the core (and I'm assuming by core we are talking about the database layer and API's)

I think a better strategy for getting to a D7 version and a better core:
* Separate out all the non-core modules from ubercart into their own projects (e.g. all the payment gateways & things like uc_roles don't really need to be in the core ubercart module and there are other things like tax, shipping, reports that could be removed for the moment) - there might be people willing to offer to upgrade and maintain these components.
* Then port everything thats left to D7 (running through coder & deadwood would probably get it 80% of the way).
* Then go back and look at each individually component of ubercart to refactor that component (and as this is being done upgrade functions should be written to provide as best an upgrade path as possible)
* The new tools that are being talked about for creating packaged installation profiles/distribution should allow the single download even if there are ubercart project is split up into different modules/projects.

dbabbage on October 25, 2009

I am 100% behind a straight port of UC to D7.

In my view, module developers should never use a Drupal version port as an opportunity to add new functionality. I'd support a movement where developers undertake to do a straight upgrade that includes absolutely no new improvements, no matter how small. We all experienced the huge delays involved in having key modules in D6 due to major revisions being tied to migration of the module to D6. There may be a small subset of cases where the absolute central functioning of a module that worked under a previous version of Drupal simply could not work in a new version without a re-write from the ground up, but I suspect these cases are actually only a small percentage. While it may seem like a good idea to pursue major feature improvements with the move to a new version of Drupal, this always creates delays.

If it's not successful, well, there's no real benefit for people using Ubercart in updating their sites to Drupal 7...
I cannot emphasize more strongly that this fundamentally misses the point from my perspective as a developer building sites that include Ubercart. Ubercart is an important part of the sites that I deploy it on, but it is far from being the whole site. I am more interested in Ubercart no longer being a barrier to deploying a D7 site, than I am in the proposed developments in Ubercore. Sure, Ubercore will make Ubercart better, but D7 makes the whole site better in many other ways. There is no good reason why a whole site should have to wait for D7 until Ubercart 3.0 is ready, when Ubercart 2.0 might be perfectly adequate for the job.

Ryan Ryan Szrama on October 25, 2009

I'm pretty sure I understand your points, especially since we all experienced lag time between D5 and D6 because of Views (and some other major contrib modules). However, at the moment, I'm feeling a little more like Earl, and I'm not sure the arguments for a straight port adequately consider the cost of "simply" porting and maintaining a module on a new version of Drupal while still having to be forward thinking. One only needs to look at the history of Ubercart on D6 for some basic evidence, though shoring up our development process could surely cut down the release time.

The main thing staring me down right now is the next generation database layer. Ubercart contains hundreds of queries, and many of these would have to be updated for a port. This will invariably break things, but we won't know about it until we get enough people using the software in enough different ways to dig up the bugs. By that point we're at beta-5 again and stuck fending off for months more feature requests, API fixes, etc. Just as there is a lot of pressure from site builders, there's a lot of pressure from developers who have to work with the limitations of the current system.

So, my statement isn't "a straight port shouldn't happen", but "a straight port can potentially delay for many months the work that could be spent creating a much better system for customers, administrators, site builders, and developers alike. In fact, such a delay could edge us all the way up against the Drupal 8 code freeze, and the process would repeat itself..." That, to me, is the end of Ubercart, a lot more than lag in uptake on the new version of Drupal. After all... how many people abandoned ship because they didn't have Views for some months? How many people can't get over how awesome the module is now? Would we have preferred Earl forward-port and maintain Views 1 on D6, forcing him to maintain two drastically different systems and stretching out the development cycle of Views 2?

Progress is painful for all parties, and I'm not convinced simply pointing to the goals of D7CX is enough to make it all happen smoothly. I honestly think I'll need to be convinced by someone who demonstrates to me a full knowledge of the costs of maintaining a forward port while spearheading a parallel development effort and has a plan to address those costs and the long term needs of the project.

Ryan Ryan Szrama on October 25, 2009

Oh, and for what it's worth, that's definitely not to say I can't be convinced. I find the near unanimous response here to be at least cause to seriously consider a UC 7.x-2.x. ; )

univate on October 25, 2009

I'm not sure about the comparison between views and ubercart?

Views really just does one thing "builds an sql query and outputs the result to html", and it doesn't depend on other other modules or services.

Ubercart attempts to do so many things and depends on other modules and third party system (payment gateways etc..) and as you state it often requires lots of testers to find obscurer bugs. And my concern is that you are going to lose all your testers (ie: ubercart users) because you will require a new community to build up around ubercore.

I see the process of re-writting the sql queries as a great opportunity to consolidate all that sql into solid API functions. That is replace them with load and save type functions and then writing the sql once. It also then makes sense to go back and look at that database structure and refactor it (e.g. convert to using fields) and if its done in these steps then update function should get written at the same time and you will possibly have a reasonable upgrade path.

I would support the re-write idea under either of the following circumstances:

  • There was major architectural/performance issues
  • Someone willing to sponsor a couple of developers to focus full time on this - if you also have to work on other projects its just going to drag on.

Otherwise I think the incremental development process is better, work on one problem at a time (1) upgrade to D7 then (2) refactor to support better API's etc...

Ryan Ryan Szrama on October 26, 2009

The comparison wasn't regarding the nature of the project but the nature of the rewrite. Views 1 to Views 2 was a monumental change that affected not only the UI but also the underlying data model and structure of the code. In so doing it, Earl ardently opposed a Views 1 forward port and stuck to it more strongly than I am right now in relation to Ubercart. I do see merits in having a port, and Lyle and I have talked at length about this.

However, if I understood your post correctly, this is exactly my fear when we talk about a "straight port":

"I see the process of re-writing the sql queries as a great opportunity to consolidate all that sql into solid API functions. That is replace them with load and save type functions and then writing the sql once."

If we simply try to accommodate DB:TNG, we will have to work with all the places Ubercart is currently performing queries improperly or simply out of place (not to mention poorly). If we reorganize any code, we have a very high chance of introducing regressions since we don't have any regression testing. This has proven to be the case with even minor feature patches and API adjustments in UC 2.0, especially some of those clean-up patches. :-/

I'm assuming this comment was in regards to a second version and not the same round of development?

"It also then makes sense to go back and look at that database structure and refactor it (e.g. convert to using fields) and if its done in these steps then update function should get written at the same time and you will possibly have a reasonable upgrade path."

Garrett Albright on October 26, 2009

I'm reading you loud and clear, Ryan. I don't think most of the people in this thread understand that a "simple port" of UC2 really isn't going to be that simple at all. To me, reaching for UC's future instead of mucking about in its past seems like a much better investment of time and effort. I guess I'm in the minority there, though.

harrisben on October 27, 2009

I had a sleep on whether or not I think this is a good idea and I'm not a developer so please take my opinion however you'd like.

I see merit in both points of view, but ultimately I would prefer porting UC 2.0 to D7. The reason I see it as the better idea is because UC 2.0 is a known quantity but a rewrite would mean everything is unknown, so it would be more difficult to set and meet a reasonable time-line for the latter.

The only drawback as I see it would be sheer exhaustion after the port is complete and as a result, a lack of interest in further development. Once people have Ubercart working on Drupal 7 there won't be as much interest in moving it forward.

liberatr on October 27, 2009


Now that I have seen the vision for where to take the Ubercore, and I know that you guys have been putting your noodles together on this since at least March at DrupalConDC, I am going to switch sides.

There is some wisdom in knowing when the seemingly "easy" path will end up being more of a headache later. However, this comes with a big responsibility to perform.

Creating this site and getting people involved several months before the D7 release, and setting a sensible goal for the landing date of D7UC all show your collective vision.

Thanks for hooking me up with admin privelages, I am playing with notifications / subscriptions now.

Splash112 (not verified) on November 1, 2009

Just my 2 cents

Biggest drawback of a straight port, as far as I have read now, would be the development time "spent" by core maintainers not being used for the more exciting Ubercore initiative.

So why would that be necessary? There are many developers just eager to help coding, but might feel a little overwhelmed by the knowledge of the now core maintainers. Why not tap into that resource, ask somebody else to start the most straightforward port (to keep upgrading to 3.x as easy as possible) of 6.x to 7.x as possible with the help of other Uber enthusiasts and keep the now core maintainers working on the Ubercore.

A new and shiny Ubercart release for 7.x as quickly as possible
New coders for core
Quick way to tap into new possibilities of 7.x

Psy on November 1, 2009

Is my preferred option.

And released the day D7 hits the streets.

Im sure you could fit in a fair bit of D7 goodness without writing a whole new Ubercart/core (Uberc...?).

There might be a bit of extra bloatage but surely a v3 could support older APIs with a graceful path of depreciation through to v4, while at the same time providing an expanding range of sexy new D7 based APIs.

This would allow existing modules to keep working with Uberc... and also further the D7 uptake with immediate support from Uberc...

Having a written a few modules for Uberc... I would expect this sort of development path. Provide backward compatibility and a forward roadmap.

Keep up the good work peoples :)

Ryan Ryan Szrama on November 2, 2009

"Im sure you could fit in a fair bit of D7 goodness without writing a whole new Ubercart/core."

Psy, this is exactly what we were hoping would happen on D6, so I'd check your certainty at the 2.0 release cycle. : P

I think Splash112 is hitting on a more pertinent thread. Basically, everyone who seems to think this isn't going to be that much work or that it can be done quickly is misguided / misinformed. However, the answer doesn't have to be, "Either the core devs do it or it doesn't happen." We could in fact crowd source a D7 update of Ubercart 2.0, although I don't see that as foolproof either.

In response to Splash112 (forgive me for mixing my threads here ;), I'd say the problem then becomes one of code verification and maintenance. We'll still have the same commit access model a la Drupal, but now we'll be responsible for the code the update produces. We can't be totally hands off, because we'll have to be doing code review and then support and maintenance for any issues that slip through. I definitely think it's something to consider, though.

cedarm on November 2, 2009

I was thinking it but didn't manage to say it. Crowd sourcing the D7 port is probably the only way it could/should happen. The argument is core devs shouldn't spending their time on it, but in all fairness, as you point out Ryan, they will be. There are only two issues I see:
1. Logistics of source control management during the port.
2. Ongoing maintenance of this (yet another) code branch.

Am I missing anything? How acceptable is this? How would this landscape change if someone volunteered to be the UC2 D7 maintainer?

Island Usurper on November 23, 2009

My employer has said that he thinks porting Ubercart 2.x to D7 is a good idea and that he wants me to make sure it happens. While I will appreciate any help from the community in this, I have a tendency to be a cowboy coder hacking away in my own cave like a hermit. So, if you really do want to be involved, you have to make sure to get my attention.

I'm not planning on starting immediately, though. Deadwood is being merged into Coder for D7, and I want it to do as much of the work as possible. However, I understand that one of its dependent modules is going through a restructuring so development and testing for it is rather difficult. If I run out of other things to do (Ha! I made a funny!), I may see if there's any development work I can do to help speed it up.

Once that gets settled, I'll open up a forum post on ubercart.org for volunteer sign-ups and progress reports.

Stomper on January 15, 2011

You made my day! Thank you. As an earlier poster stated, I too have one big old egg in the UberCart basket.

Will the port be called UberCart 3 or will that initiative (UC2 to UC3) be abandoned?