Tuesday, October 15, 2013

Put This Cake in your Face

Wishes App

I think one of the most challenging aspects for new students in C.S.  is the massive amount of tools, languages, and libraries that are accessible at the click of a button.  It is overwhelming and confusing and distracting.  When I started making the functional part of my application in JavaScript, I kept asking myself (and others), "...but why am I doing this in JavaScript?  I know I want my content to be dynamic, but why can't I just use PHP?"  People kept saying, "JS is for client side stuff and PHP is server side".  I'm thinking, yeah I effing know that, but how do I know what side I need to be on!?    

I actually took a semester of PHP last year and when it was over, I never wanted to use it again.  Forms, forms, forms.. all these stupid text fields and buttons and checking variables and sanitizing input - it was so dreadfully boring I just wanted to claw my eyes out.  So I was surprised when I caught myself thinking that PHP would be easier to use than JavaScript.  I assumed it was because I had only been using JavaScript for 2 weeks and it would just take some time to figure it out.  So, I spent another week trying to figure it out.  At the end of the week, I was so frustrated and felt like such an idiot, that I decided to take a week off for my birthday and not think about it at all.  In hindsight, a week might have been a little excessive... but I came back and rewrote everything in PHP.  In a day. Everything works perfectly on mobile too, which is a big relief! 

If you look at the app, you will see there are several more pages than I had before.  I think it gives a better feel for where I am going with this application. (Hopefully it is "fleshed out" enough for my professor...)  It appears as if I have done more work on it than I had before, but in reality, I am pretty much at the same point I was.  First of all, the way I have the pages mocked up, is not how I will actually be creating the cards.  The only way I found to convert a <div> into an image, is by using  html2canvas.js. (Which, by the way, is amazing and works perfectly and the guy who created it is super helpful)  But, for my purposes, it will be more efficient to just draw the cards directly on the canvas and skip the conversion.  Especially since I figured out I can use non-system fonts in the canvas!  I have a basic canvas drawn card working in the application right now.  This week, I will get my canvas saved on the server and decoded back out as an image that the user can email, save, share, or add to their user page.  Once I get that function working, I can concentrate on setting up the card design database.... which is going to be SO fun!!!

How I felt today:  



  

No comments:

Post a Comment