Saturday 7 May 2016

Migrating Volunteer Management System to Class based views- [GSoC-16 Project]

Volunteer Management System
Systers has many volunteers that offer their skills, time and commitment to accomplish their vision- Women in Computing. The community has implemented a Volunteer Management System to manage their volunteer contact information, track hours and events they worked, and provide reporting functionality at the least.
Django 1.3 introduced class-based views and also added a range of generic class-based views. From then, function-based views have been marked as deprecated. Most of the function-based views in the Systers VMS portal violates DRY.  Class-based generic views helps to streamline common use cases, saving development time and effort.

Migrating FBV to CBV
A view is a callable which takes a request and returns a response. This can be more than just a function in Django. Class-based views allows to structure our views and reuse code by harnessing inheritance and mixins.
One of the advantages of CBV is Inheritance. For instance, large projects like VMS has a lot of redundant code due the repetition of similar views. By migrating to CBV, views could be inherited and thus avoid code redundancy.

Few advantages, which VMS can achieve by migrating to Django’s class based views are :
  1. Django offers various generic views like CreateView, UpdateView, FormView, ListView and DetailView to handle views easily. For eg: Allow users to Create, Update and Delete events and shifts of volunteers with or without authorization, without violating DRY.
  1. Better code readability, reducing the number of lines of code, easing the code review process.
  2. Replacing the decorators by mixins instead, makes them more flexible, extensible and DRYer, just like the move from FBVs to CBVs.  
  3. Better handling of form data, which is handled in a traditional way in FBVs.
  4. Better support from the Django development community as the recent developments are CBV based.




Friday 6 May 2016

Systers- A sisterhood

Systers is a forum for women who love computing. It's open for women of all ages who are into technical world. It was founded by Anita Borg with 12 other women as small mailing list. Then it grew up into a big team with the support and cooperation of other women.
The motto of the community is “increase the number of women in computer science and make the environments in which women work more conducive to their continued participation in the field.”


My experience with Systers
As an organization that take effort to bring more women into the world of computing, I am very proud to be a part of it. My relationship with Systers started as a GSoC-2016 intern. The community has always been so active with instant replies on Slack channel and showed keen interest in solving issues. They value even our small contribution very much.


I started with small bug fixes in Volunteer Management Sytem- a Django application that developed to manage the volunteers in Systers community. To get done with my first bug wasn’t easy. Struggled to understand the code base and documentation. Eventually, when the patch was merged and when I got to see the trivial contribution that I made, it was pure joy. And that’s how I started contributing to Systers.