Archive for June, 2012

Making Adobe Acrobat Forms shine

June 25th, 2012

You may or may not know about Abobe Acrobat fillable forms, so this will either be a eye opening post or just a re-hash of something you already knew about. Recently I was asked if I could create a fillable acrobat form and then have that form emailed to somebody that you designate. At first I thought that *should* be possible but I wasn’t sure exactly how it could be accomplished, I know that one can create an acrobat form that the end user can fill out, that part is doable with acrobat forms but I wasn’t sure about the second part.

It turns out that acrobat forms have the ability to have a button placed on them with available actions that can be performed on them, including posting to a website that you hard-code into those actions. It has the ability to send the entire PDF to a recipient but the problem with that solution is that there are so many out there that use Hotmail or Gmail or any number of web-based email clients that abobe just gives you ability to save the filled out form to your system and then attach it later, so that wasn’t really an option for me.

One solution is to have the form button submit the FDF data to a php script on the server that knows how to interpret the FDF data and then parse that data and populate the same pdf file on the server. Here is a link with the basic run-down of what you need to do to make this happen: Acrobat Fillable Forms This approach is quite feasible if you have full access to your server and can create builds on it. In my situation as in most I am using a shared hosting provider so I don’t have full access, but if you did you can use the free library called Pdftk, found here: PdfTk Toolkit, I will go into my end solution for shared hosting in my next post.

Make use of the “tagName” in Backbone!!

June 19th, 2012

If you are writing javascript apps and haven’t heard of Backbone, you need to start reading up, BackboneJS. It makes heavy use of underscore.js UnderscoreJS which provides a decent templating structure to lay our your html pages.

What I am trying to stress in this blog post is to make use of the tagName in the backbone view, you can read more about it here: Backbone View. This allows you to have very simple templates and let backbone do all the rendering of the html for you.

Github for Windows

June 13th, 2012

I have been using github for a while to help with my source code management and I just found this nice little tool that you Windows developers can now use that greatly simplifies development and code submission to Git. Here is the link: GitHub For Windows

Building CouchApps (My latest adventure)

June 7th, 2012

I have been working with CouchDB for quite some time as you may have seen in my past blog posts and after a lot of research I came across the idea of a CouchApp as described here: CouchApps The idea is simple, communicate with your database straight instead of using an application server like Rails or ASP.net MVC, let the database be your storage and application server. So far so good, what I especially love about how they function is the deployment aspect of it, you can deploy your site as easy as opening up your command line and typing in “couchapp push http://yourserver.com/yourdbname”, it really is that easy. If you couple this with Backbone.js like with this connector: Backbone-Couch Connector you have a very clean and efficient webapp. I will make more posts about this in weeks to come as I am very excited about the things I am learning about it.

Create Comma delimited string from multiple tables in SQL

June 1st, 2012

I recently had to create a string of values from a multi table join in sql and I wasn’t sure how to accomplish this so I did some research and came across the SUBSTRING function in SQL server. This function takes a select statement and then the length to begin with and the max length of the string you want to return. I used 1000 just to be safe but my string wouldn’t ever be larger than that. I also used the FOR XML to return the data as xml and pass that to the SUBSTRING fuction for parsing. I have posted the code below, enjoy.

select SUBSTRING((
  SELECT (',' + Table1.Name)
  FROM Table1 join
  Table2 on Table2.SomeID = Table1.SomeID
  FOR XML PATH('')
  ), 2, 1000)