GSoC proposal: Migrate from YUI2 to YUI3

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

GSoC proposal: Migrate from YUI2 to YUI3

Lalit Khattar
Hi all,

I have prepared a draft for GSoC project- 'Migrate from YUI2 to YUI3'. Kindly review it. Any suggestions are welcomed.

Thanks,
Lalit


Personal Details
  • Name: Lalit Khattar
  • Email: [hidden email]
  • IRC nick on irc.mozilla.org: dne0
  • Telephone: +918979890064
  • Other contact methods: gtalk
  • Country of residence: India
  • Timezone: India Time Zone(UTC+05:30)
  • Primary language: English and Hindi

Project Proposal

To migrate from YUI2 to YUI3.



Why is migration required?

Bugzilla JS code uses an external library(YUI2) for DOM manipulation and other client side interactions. In September 2009, YUI3 was released which is completely different from YUI2. Also, YUI2 version is no longer maintained so the code is now kind of obsolete. Yahoo started the work in 2012 however the progress has stalled. Therefore, migration to YUI3 is a high priority issue.


Why not use jQuery instead of YUI3?
  • As stated by Evan, jQuery is great for DOM manipulation, AJAX etc, but it does not factor code into modules like YUI3 does.
  • Also, I have looked into the previous work done by Evan and I believe that it can still be used without any major changes in his code and will give a head start on the project.

Code Analysis

A simple grep showed which directories/files uses YUI2 code:-
  • js/
  • template/
  • extensions/Voting/template

Obviously, majority of YUI2 code lies in js directory. Next on the target is Template directory code and last is Voting extension template code.


JS code

As mentioned earlier, I looked into Evan's code and found following JS files(plus, some inline JS) were already migrated into new modules:-

  1. global.js => bz-base/js/login.js, bz-base/js/intl.js
  2. comments.js => bz-comments/js/comments.js
  3. attachments.js => bz-attachments/js/attachments.js (Partial migration done)
  4. change-columns.js => bz-columns/js/columns.js, bz-select/js/select.js
  5. params.js => bz-parms/js/params.js
  6. productform.js => bz-products/js/products.js
  7. custom-search.js => bz-search/js/search.js (Partial migration done)

YUI3 version used by Evan is 3.7.3(found here). It should be upgraded to 3.14(or whatever newer version is available). Things might break due to this, therefore manual testing will be required.

So, my first task will be to upgrade YUI 3.7.3 to >=3.14, test the migrated code and complete the migration of attachments.js and custom-search.js.

Now, the following js files will be left to migrate and below I have proposed to which module each file might go:-

  1. comment-tagging.js => bz-comments/js/comment-tagging.js
  2. expanding-tree.js => bz-tree/js/expanding-tree.js
  3. flag.js => bz-flag/js/flag.js
  4. bug.js => bz-bug/js/bug.js
  5. util.js => bz-util/js/util.js
  6. field.js => bz-util/js/field.js
  7. TUI.js => bz-util/js/TUI.js

This is just my initial thought on how JS directory structure should be further extended. I will finalize the structure with mentor/community, if my proposal gets accepted.

So, my next task will be to migrate the above js files.


Template Code(inline js)

I will be looking side by side into the template files that has the js files included in it that are currently being migrated and check for any YUI2 code in those template files. This approach might not cover all the templates but it will make sure that all the linked js and template files are covered.

Last, I will look for any remaining YUI2 code using grep.

 

Voting Extension Template Code

A simple grep showed this doesn't have much YUI2 code, so this one will be the easiest to migrate.

 

Schedule of Deliverables

I will be able to spend full time only till mid term evaluation(approximately 7-8 hours each day). After that, I might get busy with job, so contribution will reduce to approximately 4-5 hours on weekdays. But, I am willing to spend more time on weekends, if the project is behind schedule.

Average time per week = 40 hours

Before 28 April

  • Exam period from April 21 - April 27
  • Will be available on irc all the time
 

April 29 – May 5: (1 week)

  • Learning YUI3, template toolkit and bzr.
  • Already familiar with jQuery and git. Won't take much time to learn YUI3 and bzr.
 

May 5 – May 18: (2 weeks)

  • Get good idea of what each JS file does, study YUI2 code.
  • Talk with mentor/community about migration steps like module structure, code structure etc.
  • Get a head start.

 

May 19 – June 10: (3 weeks)

  • Upgrade YUI 3.7.3 to >=3.14
  • Manually test the migration done by Evan.
  • Complete the migration of custom-search.js and attachments.js.

 

June 11 – June 25: (2 weeks)

  • Migrate bug.js, flag.js and related template files.
  • Test the migration manually.
  • Note: These are small files so they might take less than 2 weeks.
 
Mid term deliverables:
  • 50-60% of the code(including inline js) will be migrated and tested.

 

June 26 – July 17: (3 weeks)

  • Migrate field.js, util.js, TUI.js and related template files.
  • Test the migration manually.

 

July 18 – Aug 3: (2 weeks)

  • Migrate comment-tagging.js, expanding-tree.js and related template files.
  • Test the migration manually.

 

Aug 4 – Aug 18: (2 weeks)

  • Finishing up the work left due to unexpected delays.
  • Check for any unmigrated code in templates.
 
Post GSoC or if time permits:
  • Move inline js to external files.
  • Write tests.

 

Open Source Development Experience

I recently started contributing to Mozilla and submitted few patches:-

I also did some benchmarking of this bug to test whether the JS performance issue in current code is still there or not.

I regularly use open source libraries, frameworks for my projects. My other open source contributions can be found on my GitHub profile. I developed a chat application using AJAX polling in front-end and open sourced it on GitHub.

 

Work/Internship Experience

I did internship in a startup, HackerEarth and projects I worked on over the summer and winter internship period are listed below:-

 

Academic Experience

I am an undergraduate student at Indian Institute of Technology(IIT), Roorkee. I am in final year and studying Metallurgical and Materials Engineering.

 

Why Me

I have got decent experience working with web technologies- HTML, CSS, Javascript, Python(Django) and PHP(Yii). I like playing with Javascript in my spare time.

I am a part of Information Management Group(IMG), in IIT Roorkee, which is a student body responsible for developing and managing all Internet and Intranet applications in IIT Roorkee, including the institute website. I have done two projects under IMG:-

Also, I would like to mention that the CodePlayer work which I did during my internship required good knowledge of Javascript. I was able to build play, pause, forward functionality in a short span.


Why Mozilla

All Mozilla open source projects and their respective community are amazing. My first open source contribution was in Mozilla. The team has been really helpful and friendly to me. I would like to contribute to Mozilla through GSoC program and further plans to continue doing that.
Reply | Threaded
Open this post in threaded view
|

Re: GSoC proposal: Migrate from YUI2 to YUI3

Michiel Beijen
Hi,

On Thu, Mar 13, 2014 at 10:23 AM, Lalit Khattar <[hidden email]> wrote:

> I have prepared a draft for GSoC project- 'Migrate from YUI2 to YUI3'.
> Kindly review it. Any suggestions are welcomed.

Please understand I do not have much actual experience with Bugzilla's YUI code.
But I do have experience with YUI and jQuery, and I'd like to point
out that YUI3 does not have a lot of traction and the last release was
in june of 2013, which is kind of a long period in Internet time.

So with the proposal to upgrade from YUI2 to YUI3 Bugzilla's frontend
code will get a little less out of date, but in maybe one or two years
you'll have a similar problem again. Have you considered how much
effort it would be to port from YUI2 to jQuery, or to another
framework; or even to vanilla JS?

Also, I think, moving to something more popular than YUI[23] will have
the added benefit of being able to use more available plugins, and
maybe even making it easier for possible contributors to send patches.
--
Mike
-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists+s6506n84121h51@...>
Reply | Threaded
Open this post in threaded view
|

Re: GSoC proposal: Migrate from YUI2 to YUI3

David Marshall-5

On Mar 13, 2014, at 1:17 PM, Michiel Beijen <[hidden email]> wrote:

> Hi,
>
> On Thu, Mar 13, 2014 at 10:23 AM, Lalit Khattar <[hidden email]> wrote:
>
>> I have prepared a draft for GSoC project- 'Migrate from YUI2 to YUI3'.
>> Kindly review it. Any suggestions are welcomed.
>
> Please understand I do not have much actual experience with Bugzilla's YUI code.
> But I do have experience with YUI and jQuery, and I'd like to point
> out that YUI3 does not have a lot of traction and the last release was
> in june of 2013, which is kind of a long period in Internet time.

I don’t really understand that remark, because there was a release less than a month ago:

http://www.yuiblog.com/blog/2014/02/26/yui-3-15-0-released/


>
> So with the proposal to upgrade from YUI2 to YUI3 Bugzilla's frontend
> code will get a little less out of date, but in maybe one or two years
> you'll have a similar problem again. Have you considered how much
> effort it would be to port from YUI2 to jQuery, or to another
> framework; or even to vanilla JS?
>


When I compare the activity between YUI and jQuery:

https://github.com/jquery/jquery/graphs/commit-activity

https://github.com/yui/yui3/graphs/commit-activity

it looks as though YUI is more active than jQuery.-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists+s6506n84121h51@...>
Reply | Threaded
Open this post in threaded view
|

Re: GSoC proposal: Migrate from YUI2 to YUI3

Michiel Beijen
Hi David,

On Thu, Mar 13, 2014 at 9:40 PM, David Marshall <[hidden email]> wrote:

>
> On Mar 13, 2014, at 1:17 PM, Michiel Beijen <[hidden email]> wrote:
>>
>> Please understand I do not have much actual experience with Bugzilla's YUI code.
>> But I do have experience with YUI and jQuery, and I'd like to point
>> out that YUI3 does not have a lot of traction and the last release was
>> in june of 2013, which is kind of a long period in Internet time.
>
> I don’t really understand that remark, because there was a release less than a month ago:
>
> http://www.yuiblog.com/blog/2014/02/26/yui-3-15-0-released/

Ah really? I'm sorry in that case, I got the information from the YUI3
web page at http://yuilibrary.com/projects/yui3/ which is out of date
then, I suppose.

>> So with the proposal to upgrade from YUI2 to YUI3 Bugzilla's frontend
>> code will get a little less out of date, but in maybe one or two years
>> you'll have a similar problem again. Have you considered how much
>> effort it would be to port from YUI2 to jQuery, or to another
>> framework; or even to vanilla JS?
>
> When I compare the activity between YUI and jQuery:
>
> https://github.com/jquery/jquery/graphs/commit-activity
>
> https://github.com/yui/yui3/graphs/commit-activity
>
> it looks as though YUI is more active than jQuery.-

Well, I think it is true that jQuery has not had activity very
recently, but for instance, jQuery has more 'stars'  in Github and
there are more books for instance on the topic. But of course there
are multiple ways you can measure activity. And YUI turns out to be
more active than I thought it was, so that's nice.

Anyway, I started responding because I wanted to ask if it had been
considered moving to something else than YUI. If it has been
considered and there are good reasons to make the move to YUI3, that's
great.
--
Mike
-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists+s6506n84121h51@...>
Reply | Threaded
Open this post in threaded view
|

Re: GSoC proposal: Migrate from YUI2 to YUI3

David Marshall-5

On Mar 13, 2014, at 2:51 PM, Michiel Beijen <[hidden email]> wrote:

>
> Well, I think it is true that jQuery has not had activity very
> recently, but for instance, jQuery has more 'stars'  in Github and
> there are more books for instance on the topic. But of course there
> are multiple ways you can measure activity. And YUI turns out to be
> more active than I thought it was, so that's nice.
>

If we are counting books, wouldn’t that suggest that PHP is the greatest computer language ever? :)

> Anyway, I started responding because I wanted to ask if it had been
> considered moving to something else than YUI. If it has been
> considered and there are good reasons to make the move to YUI3, that's
> great.

I think it’s very reasonable to ask whether it is sensible to move to something other than YUI. It probably all comes down to who is willing to implement what. I interested Evan Goer in upgrading from YUI 2 to YUI 3 exactly because someone had been asking about going to jQuery. Evan works at Apple now, so I doubt he’s doing much of anything in that regard anymore. If someone shows up with a patch that replaces YUI with jQuery, more power to them!

I can tell you that YUI development continues, perhaps at an even greater pace than ever before. At Yahoo we have been making great strides in our productivity and innovation. I wish I could tell you more about how we are doing that, but I cannot.

I myself have been doing so much node.js that maybe all the YUI stuff will become sufficiently less incomprehensible that I can offer meaningful contributions!


-
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=lists+s6506n84121h51@...>
Reply | Threaded
Open this post in threaded view
|

Re: GSoC proposal: Migrate from YUI2 to YUI3

Marc Schumann
Fwiw: There's a very early (read: very incomplete and buggy) Bugzilla installation at https://landfill.bugzilla.org/bootstrap/, which aims to replace YUI by JQuery Bootstrap (http://getbootstrap.com/2.3.2/). The plan was to tell of this here only as soon as index.cgi and show_bug.cgi worked agreeably, but maybe this is rather the time.

Marc