QueryPath Update to D7

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
eabrand's picture

I am proposing to update the QueryPath module to D7. I will also, by extension, update the database extension in QueryPath to use the new database API, add new features to QueryPath to bring it up to date with jQuery 1.4, and update the QueryPath example modules. All of the above changes will continue the awesomeness of the QueryPath module. I have been talking to Matt Butcher and have his full support on this proposal.

Any suggestions would be appreciated!

Comments

I'm a little biased having

gdd's picture

I'm a little biased having worked with both student and mentor, but I think this is a good project. It will result in a nice port for D7 and almost certainly will fill three months. Definitely need to fill in the deliverables and timeline a little more, its pretty light right now.

ebrand++

Reading the text, I'm not

bojanz's picture

Reading the text, I'm not sure what exactly would take three months (or two months, or five days), so a proposal with a timeframe and more details would be good.

Cheers,
Bojan

What would be in-scope for a project like this

mbutcher's picture

Ebrand and I talked at length about this proposal, and the brevity of her summary above may make it sound like a quick project, but here are some of the tasks that actually fall into scope:

  1. Parser/traversal internals: QueryPath uses an event-based recursive descent parser for the CSS selector parsing. From here, it fires off events that result in top-down traversal of the DOM. This is rather inefficient. A better approach would be to follow the new jQuery model and go from the bottom up (which involves a sort of inversion of the CSS processing strategy).

In and of itself, that is a substantial project.

  1. jQuery 1.4 added several new DOM traversal and modification methods. Since QueryPath advertises API compatibility with jQuery's DOM methods, support is needed.

  2. The QueryPath module has various submodules. All of them need updating for D7, and some of these updates will require pretty major overhauls. The QP Cache module may need a complete rewrite.

  3. The DB API in the current QueryPath module is designed to work with the old DB API. The new DB API, being object oriented, will require a different approach. In particular, it will need to know how to interact with database query objects, instead of SQL statements. There is real potential here to make a cool DB->XML/XHTML subsystem.

  4. QueryPath is primarily a developer tool, hence there is little UX work (sorry, Bojan -- I'm sure this will not be appealing to you). However, as such, a real need for the module is top-notch developer documentation. I think it is a good task to add to a SOC project because it is part of any good development project.

I hope this answers some of Bojan's concerns. I'm sure ebrand can incorporate more text into her proposal to make it more robust and detailed if that's the main worry.

Finally, here's one suggestion for a modest addition to the project: The QPServices module uses QueryPath to provide interaction with a wide variety of web services. It, too, could be included here in the project, and since that module is open-ended, additional web service support could be added, as well.

Matt

P.S. And in case it's not evident... I would definitely want to mentor this project, given that I am the maintainer of the module and have a past record of mentoring in Drupal GSOC.

QueryPath Proposal Update

eabrand's picture

Here is the proposal in its entirety

Overview:

I am proposing to update the QueryPath module to D7. I will also, by extension, update the database extension in QueryPath to use the new database API, and add new features to QueryPath to bring it up to date with jQuery 1.4. I will also update the QueryPath example modules. All of the above changes will continue the awesomeness of the QueryPath module. I have been talking to Matt Butcher and have his full support on this proposal.

Description:

QueryPath is an easy-to-use XML parser between SAX and DOM. It uses a jQuery approach to make traversing XML/HTML documents easy and fast. At the moment, it uses a top-down traversal approach and I am proposing to use the current jQuery approach which is bottom-up. I am planning on this taking 4 weeks and will be the first hurdle I tackle.

The next hurdle is upgrading QueryPath to jQuery 1.4's added capabilities to keep the parser in-line with jQuery. New features will include: .first(), .last(), .toArray(), .unwrap(), .has(), .nextUntil(), .prevUntil(), .parentsUntil(). I will also remove some of the backwards-incompatible changes from QueryPath, which will also enable it to be up-to-date with jQuery. My main reference for this topic is: http://jquery14.com/day-01/jquery-14 My timeline for this part of the project is around 3 weeks.

Updating the QueryPath Drupal module is the next necessary step. I will update it, QP Cache and the example modules to work with the most recent version of QueryPath and Drupal 7. I am planning on about 2 weeks for this.

QueryPath's use of the old Database API needs to be updated to the most recent DB API as well. I will develop, or make it possible to develop a neat DB->XML subsystem. This will take about 3 weeks.

Throughout all of this work I will be updating the documentation of QueryPath and the QueryPath module which is why I have tried to give myself some extra time in each project to make sure I have enough fudge room for developing and updating the documentation.

If I do end up having extra time, which it doesn't really seem like I will, I will update the QP Services module and add extra features.

Overall Timeline:

Weeks 1-4: Enable QueryPath to be bottom-up traversal versus top-down which it is currently.
Weeks 5-7: Update QueryPath to jQuery 1.4
Weeks 8-9: Update QueryPath Module
Weeks 10-12: Update QueryPath to use the new DB API
Weeks 13-14: Test, Debug, Edit Documentation

QueryPath is an awesome framework for PHP that could be used in a variety of Web Services applications. I am very excited for the potential of the project and hope I will be able to improve and update it through the Google Summer of Code.

Difficulty: Medium to Hard

+1

Crell's picture

I am also biased, as I used to sit between mbutcher and ebrand at the office. However, I'm also +1 on this proposal.

I doubt I'll have time or energy this summer to co-mentor anything, but as DB maintainer for D7 I'm happy to advise and assist on the DB-integration portions mentioned above. A clean and easy to use SQL<-->XML system would be hot on several levels. It may help the application with Google to emphasize that, as it would be new functionality rather than just updating and maintaining existing functionality.

Hey, don't get me wrong, I

bojanz's picture

Hey, don't get me wrong, I didn't say that it looked like a quick project, my point was that the proposal was unclear ;)

Frankly, it seems exciting, I wish you the best of luck on it.

Google Summer of Code 2010

Group organizers

Group categories

Important Announcement

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

Hot content this week