Friday, August 29, 2014

Decisions Decisions

5:03 PM Posted by Unknown No comments
Still having a tough time trying to figure out a good domain name with the team. I'm trying to find something that will be catchy and easy to remember. Something that goes well with the logo as well. I do however have some of the sitemap done and some of the mock ups courtesy of https://moqups.com/.

I've been toying with the idea of VR and Unity as well. There is so much potential out there for VR that it's almost heart breaking not being able to be a part of the wave of the future. I can envision peripherals + kinect + Rift all creating an amazing experience.

Tuesday, August 26, 2014

Project Unity or {x}

6:06 AM Posted by Unknown No comments
I've been working to get the project unity started. I have a designer working with me to create the graphics which I believe is a good way to start. I've already drawn up the wire frames for some of the pages as well as created a sitemap for most of the public facing pages.

I'm really excited about seeing this thing in action, While I was site mapping the "Scrum Room", I felt like this alone can be an incredibly useful tool!

Friday, August 22, 2014

Google Start-up

4:32 AM Posted by Unknown No comments
Greetings!

I received a neat email from Google that stated that my project had been selected to be a part of Google's Startup launch program. This is incredibly exciting as it provides an amazing opportunity for my project to materialize using the provided Google tools and technologies. As of now I'm forming a team to get a good plan going for this site. I'm also considering using the Startup weekend site (http://startupweekend.org/) to network and hopefully create a full team for this project.

I'll keep you guys posted!

Wednesday, August 20, 2014

Unity3d start

8:06 PM Posted by Unknown No comments
Greetings!

Nothing much to post today except for my new found interest in Unity3d and Blender. I'll probably be learning this just so I can have a little bit of modeling experience. It definitely can't hurt right?

Tuesday, August 19, 2014

Ideas, Ideas, Ideas!

8:44 AM Posted by Unknown No comments
Greetings!

I've always been one to think outside the box and think of possible projects that can help the open source community. While driving during one of my long commutes to Ohio from Virginia, I began to think of something I describe as Project {X}.

The idea came to me when I was thinking of creating a game similar to angry birds. I thought to myself that while I can create all of the logic and server side code needed to implement this, I wouldn't be able to create any of the designs as I am not very good at making things "pretty" or "Eye-catching". I then sat and thought.. I wish there was a website where I can post my idea and if others liked it, they too would invest their time in polishing and making the Idea come to life.

Then it hit me that I can create this website! The website can be best described as GIThub for teams (Project Managers, Devs, Designers, DBA's, etc..)  rather than individual projects. A new comer to the site would come in, register and post their idea for everyone to see. A designer would come along and see this idea in which he would "apply" to be a part of the idea. A DBA and a project manager comes in and see the Idea and decide to do the same. Once the Team is formed, the group leader (Or Idea Holder) would assign roles and get cracking on the development of the Idea with tools provided by my site.

I'll add this to the Projects page and hopefully get interest from you guys to help me out!

Monday, August 18, 2014

Check if page is cached using Jquery and .Net

7:36 AM Posted by Unknown No comments
Greetings!


A couple of months ago I hit a brick wall when trying to test if a page being loaded was cached or not. To clarify, if a user were to hit "log Out" and redirected to a log out page (while obviously destroying the sessions of course) but then hit the back button, the page would load successfully as if it had not been logged out in the first place (front-end wise). To many .Net developer this can provide a frustrating experience as the Page_Load event in the code behind does not get called when a page is being loaded from cache. After a couple of days of searching, I found the solution (I take no credit for writing the code, I merely found it and edited it but no longer can find the source) which entales a small amount of .Net and Jquery.

For the codebehind, I created a class called CheckCache with the following sub procedure


Dim CookieName As String = "isCached"

Sub setCache(response As HttpResponse, cookieData As String)
response.SetCookie(New HttpCookie(CookieName, cookieData))
End Sub


To walk this through, the CookieName is used to identify the cookie in which we will be accessing. The sub procedure creates the cookie and receives an httpResponse object as well as a string which will contain the data within our cookie we would create when the sub procedure is called.

I then created a js file called CheckCache with the following code


function getCookie(name) {
    var nameEQ = name + "=";
    var ca = document.cookie.split(';');
    for (var i = 0; i < ca.length; i++) {
        var c = ca[i];
        while (c.charAt(0) == ' ') c = c.substring(1, c.length);
        if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length, c.length);
    }
    return null;
}
function setCookie(name, value, days) {
    if (days) {
        var date = new Date();
        date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
        var expires = "; expires=" + date.toGMTString();
    }
    else var expires = "";
    document.cookie = name + "=" + value + expires + "; path=/";
}
$(function () {
    $.isCached = (getCookie("isCached") == 'true');
    setCookie("isCached", 'true');
})


The getCookie function retrieves the cookie data by the cookie name. The setCookie function sets the cookie with a value we pass in and receives optional parameters for cookie expiration. Lastly, The ready function contains a variable I created that can be called via jquery to check if the page is cached or not while at the same time setting the value of the cookie to true stating it has been cached (which is normal on document load).

Implementation and how it works:

On each page load (generally a static header control) you want to add the following code on page load


Dim BrowserCache As New BrowserCacheCheck
 BrowserCache.setCache(Response, "False")


When ever the codebehind fires the setCache function on pageLoad, we know that the page is not being loaded in by cache because we know that the page load event DOES NOT get called when a page is cached. Because the codeBehind fires first, it creates the cookie and set its status to False as in "the load request that just came in has not been cached.". After this event fires, our JS ready event fires next as soon as the page is finished loading which sets our jquery variable to false (because the code behind page load event fired and set the cookie to false which means false == true returns false) and then opens the cookie back up and marks it to true.

The reason it opens the cookie back up to true is because we know that a page is cached after the document ready event fires, because we know that we change the cookie to true. Whenever the user hits the back button now, the page load command does not get called thus the cookie still remains true meaning that it's being loaded from cache.

Let me know if I can further clarify this!

Documentation

5:32 AM Posted by Unknown No comments
Greetings!

Creating documentation can such a pain sometimes. Specially when the documents deal with web applications and you need to reference every single plugin you've used on a site. Perhaps there should be a push for an automatic documentation writer? Realistically, I can't imagine it would be that hard to implement as we reference plug-ins in a predictable manner such as <script src="etc..etc"></script>. I'll add this to my projects folder and see what I can come up with. Perhaps I can add a data attribute for my project to come in and sweep the application for anything that needs to be documented. Hm.. I'll need a template, this application can be a web app or I can create a console app..

Oh well, for those curious, I'm using the documentation found here

I'll add this as a possible To-Do Project and see if I can get anything created possibly based on this template.

Sunday, August 17, 2014

Greetings!

7:58 PM Posted by Unknown No comments
Greetings!

This is my first post in a long line of posts. This blog is going to be about any code I write and interesting methods I find out on the web. I will even post up snippets and Ideas I come about in hopes that it helps the community.

I will post back soon!