Monday, July 8, 2019

Fractured Nations Progress

It has been a while. I have decided to make baby steps on Fractured Nations: Tradewars. To do so I have been getting minor functionality out on Fractured Nations via small projects that have the same core dependencies as Tradewars. Thus I have something to show in the mean time of the major project.

The two pre-projects are Tic-Tac-Toe and an Uno variant called "I Got Two"

Check them out: https://www.fracturednations.com

Wednesday, August 17, 2016

Just published my Ajax library. It is very much like jQuery. In fact it is a micro library I built so I would not need to load up jQuery. It comes bundled with FN_Deferred. I admit it is not as full featured as FN_Deferred, but it is very much like jQuery Ajax, and could be the replacement you are looking for.


Go micro, Go Fast.

https://github.com/josephtveter/FN_Ajax

Tuesday, August 16, 2016

I just published my micro Promise A Library. If you are looking for a micro library for your Deferred Objects look no further. This library was built to support Promise A, can easily replace jquery deferred if you are wanting to lighten the load on your site, and unlike window.Promise it can handle multiple arguments to callbacks. All that and it weighs in about 3kb. Give it a try. https://github.com/josephtveter/fn_deferred

Thursday, January 21, 2016

Fractured Nations Common JS Library

After using several Common JS libraries for dependency management I decided that none of them offered me all the things I wanted. I wanted small and fast like Require. I also wanted to load modules like Node and Inject with module.exports. I wanted modules to preload ahead of execution. I also wanted easy path rewrite abilities that Inject offered. And I wanted it easy to understand. So last summer I started building my own. I give you Fractured Nations Common JS. It is a Common JS dependency management library with Deferred Promises, Ajax and custom logging. The Common JS supports require, module.exports, and define. The Deferred Promises support then, done, fail, always, resolve, and reject to be compliant with Promise/A and the Jquery standard if you are in the mood to ditch Jquery. The Ajax library is similar to Jquery but is not very developed. The logging allows you to turn it on and off and set how much logging you desire for certain parts of the code. Give it a spin. There are several examples, including a fully working site that has knockout.js enabled. https://github.com/josephtveter/fn_common

Sunday, October 12, 2014

Alpha Build

I just got my personal framework to Alpha build.  It works... mostly but there is not much to it.

The main focus of it is to make fast and easy web applications that scale.  It will be the base framework for my web games. If your into web applications and want to check out a cool Common JS framework, I am offering the Alpha Build free on my site.www.fracturednations.com

If you want to see it working, its not much, but it works.  Here are two demo sites that I am putting together.

www.fracturednations.info
system.fracturednations.info

Joseph Tveter
www.fracturednations.com


Wednesday, July 30, 2014

Geolocation woes

Apparently HTML5 has an api to get me exactly where I am on the planet.  But it can't tell me what country I am in.  Google will tell me. Google knows all.

    this.getGeoLocation = function()
    {
        var deferred = $.Deferred();
        if(navigator.geolocation)
        {
            navigator.geolocation.getCurrentPosition(function(position)
            {
                deferred.resolve(position);
                //position: {"coords":{"speed":null,"accuracy":65,"altitudeAccuracy":10,"altitude":1410.8349609375,"longitude":-111.72789187811416,"heading":null,"latitude":40.332329714635044},"timestamp":1406740874211}
            });
        }
        else
        {
            deferred.reject({error: "FAIL"});
        }
     return deferred.promise();
    };

Wednesday, July 2, 2014

Wait for it....

Deferred Objects with jquery.  Great for when you are waiting for data to process or servers to reply.

var deferredData = $.Deferred();
deferredData.done(function(result)
{
     //do stuff
}).fail(function(errorObj)
{
     //handel error
}).always(function(result)
{
     //whatever is returned comes here as well.
});

// when the data is done simply call
deferredData.resolve(result);

//or if you want to fail
deferredData.reject(errorObj);