Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

add posts from ghost

  • Loading branch information...
commit f1c12905428c7bc067fa48f12fb73d03ee2dba8b 1 parent 37356c5
Cory Gackenheimer authored
14 source/_posts/2014-08-10-book-review-principles-of-object-oriented-javascript.markdown
View
@@ -0,0 +1,14 @@
+---
+layout: post
+title: "Book Review: Principles of Object-Oriented JavaScript"
+date: 2014-02-24 12:25
+comments: true
+categories:
+---
+oI just finished reading another fantastic resource for JavaScript developers ["Principles of Object-Oriented JavaScript"](http://www.nostarch.com/oojs) written by Nicholas C. Zakas.
+
+Nicholas C. Zakas is an excellent Front-End developer, and what I have always enjoyed about his work, is his ability to clearly articulate his knowledge to developers of all skill levels. Because of this I had high expectations for reading this book. I'm happy to say that this book did not disappoint.
+
+The book, to me, is an reference I will keep with me throughout my JavaScript career, and I'll recommend it to any developer interested in JavaScript. Targeted toward JavaScript beginners, this book highlights areas that many who are new to JavaScript will likely have to learn the hard way, or discover after they have reached a level of frustration that makes them decide to hate JavaScript forever.
+
+Now, this does not mean that this book contains some secret recipe to JavaScript Zen, but it does provide all the necessary tools for the reader (Seasoned JavaScripter or one who is new JS) to understand how to build great applications with JavaScript. The topics - functions, objects, prototypes, inheritance - are all covered thoroughly through well though out examples which are not too complex for even a new developer to follow. These examples and explanations are accompanied with wonderful notes and snippets that signal the voice of the seasoned JavaScript professional that Nicholas C. Zakas is. As I wrote above, I definitely recommend this book.
26 source/_posts/2014-08-10-browser-sniffing.markdown
View
@@ -0,0 +1,26 @@
+---
+layout: post
+title: "Browser Sniffing"
+date: 2013-11-27 12:23
+comments: true
+categories:
+---
+
+Microsoft does many things decent, but browser detection in ASP.Net is not one of them.
+
+###The issue
+In ASP.Net Microsoft heavily relies upon the use of browser sniffing to detect what browser you are using and throttles the features of the underlying ASP.Net web page accordingly. This normally isn't too much of a big deal even though it goes against the best practice of allowing for feature detection and providing an experience that is best suited for each browser. The issue that I am discussing in this post happened after Microsoft altered the User Agent string of Internet Explorer 11 in such a way that it is not supposed to look like Internet Explorer to those who sniff browsers. This causes and issue with Microsoft's own ASP.Net browser sniffing causing ASP.Net to disallow certain methods and postback handlers.
+
+###The fix?
+Microsoft knew about this and provided several "Future Proof" hotfixes to address this issue, but in my experience with sites that don't fully support ASP.Net 4.5 (limited in some cases by older Windows Server machines) these fixes don't work in all cases of IE11.
+
+There are others on the web that have seen these issues and have tried to rectify by altering the ie.browser file (which is file that defines the regular expressions used to detect IE browsers). Most of these versions do not account for some Windows 8 and Windows 8.1 devices that have touch enabled. Now, one could totally account for these scenarios but it just adds to the natural fragility of browser sniffing and I personally opted for another method.
+
+###Stop sniffing
+The fix that works across the board is to just tell your ASP.Net application to treat everybrowser the same, then you can utilize feature detection to create the best experience for each browser. This can be down by doing something like:
+
+`Page.ClientTarget = "uplevel";`
+
+within the code behind of your page. Alternatively you could add this page directive directly into your aspx pages.
+
+The moral here is that browser sniffing perpetuates headaches that could be better addressed in other places and it is way to fragile to always be "Future Proof".
19 source/_posts/2014-08-10-busy-times.markdown
View
@@ -0,0 +1,19 @@
+---
+layout: post
+title: "Busy Times"
+date: 2013-08-28 12:17
+comments: true
+categories:
+---
+
+
+I have had a busy time over that last few months. Firstly, I have been engaged in a very ambitious and exciting project for my day job.
+
+Aside from this keeping me busy, I also had a talk accepted for the jQuery Conference in Portland in June. This was my first talk at a big technology conference but I think it went well and I hope to do it again.
+
+<iframe width="560" height="315" src="//www.youtube.com/embed/u4whslyzUEw" frameborder="0" allowfullscreen></iframe>
+
+If you listened to at least the beginning of that talk, you may have heard me mention that I’ve been writing a book. This book has been a great deal of fun, but has also been challenging. Between research, writing code, writing text, editing, and following up with the technical reviewer it has kept me busy. It should be published this fall so stay tuned…
+
+http://www.apress.com/9781430260585
+
14 source/_posts/2014-08-10-firefoxos-apps.markdown
View
@@ -0,0 +1,14 @@
+---
+layout: post
+title: "FirefoxOS Apps"
+date: 2013-09-24 12:20
+comments: true
+categories:
+---
+
+
+A few weeks ago Mozilla [announced](https://hacks.mozilla.org/2013/09/calling-all-app-ports/) another initiative to get some more applications into the FirefoxOS Marketplace.
+
+I had submitted a simple compass application early on in the Marketplace's life, but thought that this opportunity would be perfect to get an PhoneGap wrapped HTML application that I created for Android onto the marketplace, so I applied for a phone for app port deal. Within a couple days I recieved confirmation that I would be getting a developer preview phone from Mozilla, in exchange for my app port.
+
+Now, I could have waited around until I received the phone to get started working, but with the FirefoxOS simulator available as a Firefox Add-On I set to work right away. I had previously submitted an application so I knew the general Firefox manifest format which is probably helpful. Once I had a Firefox app manifest being served (with the proper MIME type) from AppEngine I was ready to submit. I did however wait until I had a physical device to test and ensure it appeared and functioned as I expected.
72 source/_posts/2014-08-10-getting-started-with-hapi.markdown
View
@@ -0,0 +1,72 @@
+---
+layout: post
+title: "Getting Started with Hapi"
+date: 2014-05-04 12:27
+comments: true
+categories:
+---
+
+If I were to alter the content of my book _[Node.js Recipes](www.amazon.com/Node-js-Recipes-A-Problem-Solution-Approach/dp/1430260580)_ I would add more great examples of web frameworks. I've recently targeted several which I would love to use in upcoming projects. The first one I want to talk about is Hapi.
+
+Hapi is a Node.js web framework that was developed by WalmartLabs/Spumko.
+
+First you need to create a package.json file - `npm init` can help with this if you do not wish to configure your own.
+
+ $> npm init
+ you will then be walked through the process to generate your package.json file.
+
+ {
+ "name": "myHapiApp",
+ "version": "0.0.0",
+ "description": "Hapi",
+ "main": "index.js",
+ "scripts": {
+ "test": ""
+ },
+ "author": "Cory Gackenheimer <c@cgack.com>",
+ "license": "MIT"
+ }
+
+ Is this ok? (yes)
+
+next you'll need it get Hapi this is done with the command:
+
+ npm install hapi --save
+
+Now you have `hapi` in your `node_modules` directory. You now need to create your server.
+
+ var Hapi = require('hapi');
+
+ var server = Hapi.createServer('localhost', 8080);
+
+ server.start();
+
+If you are to start this server `node .` or `node index.js` and navigate to `http://localhost:8080` at this point you would get `{"statusCode":404,"error":"Not Found"}` because you have not set up any routing in your server. To add routes you need to use the `server.route` method. Here I'll add a route we could use to simulate an API GET request, and the we'll also see serving files from a static directory.
+
+ var Hapi = require('hapi');
+
+ var server = Hapi.createServer('localhost', 8080);
+
+ server.route({
+ method: 'GET',
+ path: '/api/{path*}',
+ handler: function(request, reply) {
+ reply('API request ' + request.url.path);
+ }
+ });
+ server.route({
+ method: 'GET',
+ path: '/{path*}',
+ handler: {
+ directory: {
+ path: './static',
+ index: true
+ }
+ }
+ });
+
+ server.start();
+
+Now if you navigate to `http://localhost:8080/api/foo` you will get a response with that path. If you instead try to hit a static page, i.e. `http://localhsot:8080/` -> `./static/index.html` you have set up in your local `./static` directory you will get that file returned to your web browser .
+
+That is the quick getting started for Hapi if you want to use it to build a web server. I have enjoyed using it and the freedom it allows me to build my applications. I look forward to utilizing it more in future projects.
19 source/_posts/2014-08-10-jquery-conference-talks.markdown
View
@@ -0,0 +1,19 @@
+---
+layout: post
+title: "jQuery Conference Talks"
+date: 2014-05-04 12:26
+comments: true
+categories:
+---
+
+This winter I was fortunate enough to be able to speak at two jQuery events - First in jQuery Conference in San Diego, then in Vienna for jQuery Europe. &nbsp;The traveling is always great, and these events were top notch as far as organization, content, and attendees. I have finally added links to the slides and the video here on my blog.
+
+While I always enjoy attending conferences, these two seemed to be extra engaging in that the attendees I talked with all brought a great deal of encouragement and excitement to continue to share what they know and learn.
+
+I was also able to spend more time with a few of the folks I have met from the jQuery team and really see the vision of where some of the projects are headed. From this, I have even started to spend some time trying to triage and/or fix issues on the jQuery Mobile project.
+
+In any case, here are the <a href="http://presentboldly.com/cgack/unified-widget-theory-jquery-europe">slides</a> and video for my presentations about building $.Widgets for both UI and Mobile.
+
+<div class="blazon-iframe-wrapper" style="position: relative; padding-bottom: 58.59375%; padding-top: 40px;"><iframe src="http://presentboldly.com/cgack/unified-widget-theory-jquery-europe/embed" style="position: absolute; left: 0; right: 0; bottom: 0; top: 0; width: 100%; height: 100%;" frameborder="0" allowfullscreen><a href="http://presentboldly.com/cgack/unified-widget-theory-jquery-europe">View this presentation on Blazon</a></iframe></div>
+
+
21 source/_posts/2014-08-10-node-dot-js-recipes-screencast-edition.markdown
View
@@ -0,0 +1,21 @@
+---
+layout: post
+title: "Node.js Recipes - Screencast Edition"
+date: 2014-07-09 13:37
+comments: true
+categories:
+---
+
+
+
+Last year, I wrote [Node.js Recipes](http://www.amazon.com/Node-js-Recipes-Problem-Solution-Approach-Development/dp/1430260580) in a relatively short time span. It was accomplished in something like 120 days, or about 10 days per chapter. This was exhausting and I vowed to my wife that I would not write another book at that pace again.
+
+Then I was tempted. My publisher asked me if I had interest in several titles, and man did I, but after a couple days of deliberating over each one - I could not commit to the time frame.
+
+Then came an introduction from someone within the publisher's organization that proposed I create a screencast series based upon the book which I had already written. This was something I could get on board with because the material was already written (right?).
+
+So I created a sample video for evaluation and we decided to move forward with another aggressive schedule to record ~6 hours of screencast based upon material in my book.
+
+It turns out this was a pretty agressive and time consuming undertaking as well. Sure the material was already written, but it needed to be reworked into a standard Powerpoint format and of course I would need to be coding most of the stuff I'd already written again. All of this (with the exception of creating some of the powerpoints) was a great time and I enjoyed being able to revisit my book from an angle of a user or reader, rather than an author.
+
+In the end I recorded nearly 12 hours of raw footage for the video which is being post-processed currently and should see release in the near future (no official date that I know of yet - stay tuned for that). The team at Apress has done a fantastic job with the final editing and composition, from what I have seen and I look forward to everyone getting the opportunity to check out the finished product when it is available.
23 source/_posts/2014-08-10-node-dot-js-recipes.markdown
View
@@ -0,0 +1,23 @@
+---
+layout: post
+title: "Node.js Recipes"
+date: 2013-09-24 12:21
+comments: true
+categories:
+---
+
+It started when I favorited a [tweet](https://twitter.com/LouiseEditor/status/303800949057675265) in February in which a request was being made for some help updating a JavaScript book. I had recently spent some time contributing to a jQuery Mobile book and wanted to continue writing. Shortly after I contacted Louise (my editor) and it turns out that they had already found someone to update the book.....
+
+It turns out that Louise had some plans for a Node.js Recipes book, which I thought would be spectacular so I set to work writing an outline and proposal for the book.
+
+After a few weeks I had the proposal in hand, sent it to the publisher and it was approved. This is where things get crazy, because I now had to write the twelve chapters I'd outlined and I had less than two weeks to write each one if I was to make my deadline.
+
+This crazy schedule, while good at keeping me on task, was not great at keeping me rested and stress free. There were many late nights and long weekends where I was not able to spend quality time with my family or friends. I am grateful that they allowed me time to research and write, because I was able to create a book which I feel will be a useful tool for any developer who wants to learn more about Node.js. It will give readers a glimpse of what goes on in Node.js not only in the Core, but also in the third-party modules that have helped to create the robust Node.js ecosystem.
+
+If you are interested in getting to know Node.js better, or if you would just like to buy an amazing book for your coffee table or library, please buy the book.
+
+http://www.amazon.com/Node-js-Recipes-A-Problem-Solution-Approach/dp/1430260580/
+
+http://www.apress.com/9781430260585
+
+{<1>}![Node.js Recipes](http://ecx.images-amazon.com/images/I/81ohl3uB31L._SL1500_.jpg)
19 source/_posts/2014-08-10-screencast-debugging-in-chrome.markdown
View
@@ -0,0 +1,19 @@
+---
+layout: post
+title: "Screencast Debugging in Chrome"
+date: 2013-11-27 12:24
+comments: true
+categories:
+---
+Remote debugging a few years ago was just a fledgling idea for most. WEINRE was leading the way with its remote access to mobile devices and worked well enough. In recent posts I have mentioned some improvements across various browsers and new tools that work well for developing and debugging on a mobile device. This area of developer tooling is continually improving and is becoming a more natural fit into a developers workflow.
+
+One of the most recent advancements in remote debugging was announced in early October of this year, but I do not think that until the Chrome Dev Summit in November was it really noticed by a larger audience. This new tool allows you to connect your Android device running Chrome to your computer, Inspect it in dev tools and the chrome experience from the mobile device will be mirrored within the dev tools itself.
+
+To do this, ensure USB debugging is enabled on your device and connect it to your computer. Then on a dev-tools experiments enabled computer navigate to chrome://inspect. You will see your device with any open Chrome tabs listed on this page.
+{<1>}![](/content/images/2013/Nov/Screen_Shot_2013_11_29_at_8_20_27_AM-1.png)
+now you will see the inspect link. You should click this and you will get your dev tools open. From here there is a little image that looks like a mobile device (blue in the image below) which will toggle the screencast.
+{<2>}![Little Blue Phone](/content/images/2013/Nov/Screen_Shot_2013_11_29_at_8_28_10_AM.png)
+Click that and you can now see the screencast of your mobile Chrome experience.
+{<3>}![Fixie Image](/content/images/2013/Nov/Screen_Shot_2013_11_29_at_8_24_19_AM.png)
+
+Happy Debugging.
Please sign in to comment.
Something went wrong with that request. Please try again.