Live data from Hacker News

DNC just open-sourced their voter registration platform

democrats.github.com

21–30 of 33 posts

Re: DNC just open-sourced their voter registration platform

#22
post #10
post #2

The first part of the software license looks to be BSD/MIT-like with the to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,... sentence, but then there's this paragraph: This permission does not include: (a) any use of the Software other than for its intended purpose; or (b) any use of t…

In particular this means that this is anything but open source (at least if you go by the OSI definition, which I do).

In particular this means that this is anything but open source (at least if you go by the OSI definition, which I do).

Yeah, I was thinking the same thing. I know some pedants argue that OSI don't have a registered trademark on "Open Source" and that they "don't get to decide what is or isn't open source." But in practice, many (most?) of us do acknowledge the OSI definition as being the de-facto definition of "Open Source."

Re: DNC just open-sourced their voter registration platform

#23
I worked as a Rails dev at the DNC in 2010-2011. I pushed for open-sourcing our fully-featured voter reg. Rails app back then, but didn't find much support for the idea. The political world is pretty wary of "giving code away" because the opposition will use it, etc. So, progress?

We were allowed to open-source some infrastructure code back then: https://github.com/dnclabs

Hopefully they'll continue working on this tool and make it something worth using and contributing to. I've tried to convince several political orgs. I worked for in the past to do this, but so far none have bitten.

Re: DNC just open-sourced their voter registration platform

#24
post #5

This application is very, very simple; it's a practically the starting skeleton of a modern Rails/Devise application. One useful reason to bookmark it: it's a pretty good how-to for "any web application whose purpose is to spit out PDF files that need to follow a specific format". There are a LOT of business processes that work like that.

I used Apache Fop (http://xmlgraphics.apache.org/fop/) to convert XML to PDF at a previous job. It was extremely painstaking work. On the other hand, it gives you a lot of fine-grained control over the appearance of your PDF.

Re: DNC just open-sourced their voter registration platform

#25
post #5

This application is very, very simple; it's a practically the starting skeleton of a modern Rails/Devise application. One useful reason to bookmark it: it's a pretty good how-to for "any web application whose purpose is to spit out PDF files that need to follow a specific format". There are a LOT of business processes that work like that.

Yeah, it changes the game when you need to fill out a pre-existing PDF form with user-supplied data (as opposed to free form PDF generation). In my experience, you pretty much have to use a Java library (such as iText) for this. So for a Rails app, that means JRuby, queue to a Java daemon processor, or something along those lines.

Though I see they're using the prawn gem to do it here: https://github.com/democrats/voter-registration/blob/master/...

Last time I checked, prawn wasn't quite powerful enough for this use case. I'll have to revisit that approach.

Re: DNC just open-sourced their voter registration platform

#27
post #13
post #5

This application is very, very simple; it's a practically the starting skeleton of a modern Rails/Devise application. One useful reason to bookmark it: it's a pretty good how-to for "any web application whose purpose is to spit out PDF files that need to follow a specific format". There are a LOT of business processes that work like that.

> One useful reason to bookmark it: it's a pretty good how-to for "any web application whose purpose is to spit out PDF files that need to follow a specific format". As others have pointed out, the (not really open source) license doesn't allow any uses for other purposes.

I don't think so, it isn't clear from the legalese what the intended purpose of the software is.

It could also be argued that because they have not warranted the product as fit for any purpose that there is no intended purpose.

Re: DNC just open-sourced their voter registration platform

#28
post #14

I like how the registration form shows the form validation errors inline: http://i.imgur.com/U5QL1.png Looking at the source view( https://github.com/democrats/voter-registration/blob/master/... ) it doesn't seems there is some extra markup, unless I am missing something. So, How can I implement the same in my rails app?

That's simple_form at work. Great little gem.

Thanks for pointing that out :)

Re: DNC just open-sourced their voter registration platform

#29
post #24
post #5

This application is very, very simple; it's a practically the starting skeleton of a modern Rails/Devise application. One useful reason to bookmark it: it's a pretty good how-to for "any web application whose purpose is to spit out PDF files that need to follow a specific format". There are a LOT of business processes that work like that.

I used Apache Fop ( http://xmlgraphics.apache.org/fop/ ) to convert XML to PDF at a previous job. It was extremely painstaking work. On the other hand, it gives you a lot of fine-grained control over the appearance of your PDF.

I too used Fop at my last $job to generate PDF files. As you said, the source was extremely tedious to write but you can't beat FOP for the precise control. I would first look to other solutions, since they can be faster, but FOP will always come through.

Re: DNC just open-sourced their voter registration platform

#30
post #24
post #5

This application is very, very simple; it's a practically the starting skeleton of a modern Rails/Devise application. One useful reason to bookmark it: it's a pretty good how-to for "any web application whose purpose is to spit out PDF files that need to follow a specific format". There are a LOT of business processes that work like that.

I used Apache Fop ( http://xmlgraphics.apache.org/fop/ ) to convert XML to PDF at a previous job. It was extremely painstaking work. On the other hand, it gives you a lot of fine-grained control over the appearance of your PDF.

I’ve found ODF is a very convenient format for generating documents. It has a little bit of a learning curve, but you can edit your templates in Libre Office and fill it using any kind of simple templating solution.

It really is quite neat — if you define all your styles declaratively then the markup you touch is very clean and simple, e.g. something like this:

    
      
        
          Bar
        
      
    
I’m sure OOXML can be used in a similar manner, but I don’t know that format very well.
Post reply on HN