Posts

Null Response Headers

Image
Background HTTP Request and Response Header are very cool components of the web. They allow for transmission of some intricate information concerning how the a particular request should be handled. Sometimes however, developers "abuse" the system and hijack this feature for transmitting small amounts of data to and from the webserver. I am one of these system abusers, lol. It just happens that sometimes, our software solutions give us little choice than to do some awkward things. Before you start castigating yourself, its not really a bad practice, so far you only send little amount of text data. Issue Most of my web apps now run on Javascript front-ends, and this comes with its own challenges. I developed a software that sends data to the server to generate a PDF file and the server responds with the filename of the file generated for the client to download. As you could rightly guess, things worked quite perfectly until I migrated to production. The frontend now res...

Consume ASP.NET Web API Using PHP and JQuery

Image
Background Whether it is shortage of required skills, platform unavailability or even laziness, anything could make you want to cut some corners in development. And please get me right, by cutting corners I do not mean writing code that is cumbersome and difficult to maintain or leaving out important possible outcomes to favour low turnaround times. There's this popular quote that drives this best practice home: Always code as if the person who ends up maintaining your code is a violent psychopath who knows where you live. Issue We had this project I was working on with a team. Its kind of like a payment aggregator, functioning in similar manner as your regular payment gateways like Paypal, UPL, Interswitch. You can find the project here ( a1pay.net ). I was the front-end guy, which meant that I was basically responsible for presentation. However, in a twist of events, I was also saddled with handling the POST request from our 3rd party payment gateways, consume an alrea...

ASP.NET Postback Problems

Image
Background First, I hope everyone knows that the form element in HTML is not a presentation tag but a functionality tag. I had to spell that out just so we are all clear. I've found that many web developers, me inclusive, often find ourselves entangled in usage of multiple redundant form elements on a page. Rather than clean out this clog, we simply leave it because " it after-all causes no one harm ". I was soon to to learn otherwise ... I was redesigning the interface for a legacy ASP.NET 3.5 webforms application ( only God knows how we survived the ages when this technology was the de-facto. I so much hate the tight coupling between then presentation and logic layers ). In order to jump-start the work, I quickly pasted the HTML from a previous project into the master page and updated the CSS and JavaScript references, then I copied the form tag including all the Content Placeholders from the old master page into the content area. After this, I noticed I ...

Exception from HRESULT: 0x80131040

Image
Background: I just recently upgraded to Windows 10, and I must confess, the overall experience immediately got me. I love the fact that our good old start menu was back and better. The tile one was much of a controversy although I have been indifferent about it all the while. I particularly love Cortana, the search assistant who made me remember the office assistants that used to come with the office suite back then. The euphoria I experience was a perfect disguise, however, for the ambush that was ahead. Issue: I went ahead to open VisualStudio and launched the project I was currently working on. I pressed F5 to launch it, only to ram into a jam! The project I still successfully tested only a day before now threw an exception. From my experience, and this situation hasn't proved me wrong, every Microsoft upgrade always has a catch somewhere. This particular one forced me to begin to rectify a fault in an application that was initially 'bug-free' before my u...

Collapsible Widgets

Image
Small Feature, Excellent Idea Collapsible Widgets are a simple feature that can easily make a site or application exciting. It could just be the simple thing that adds that wow effect to your project. You can hardly find any of my work where this isn't implemented. All these projects; asset.bz , a1school.net , buysellairtime.com and many others proudly fly the banners of this wonderful feature. Collapsible widgets also provide an avenue for front-end flexibility and space management Implementation I won't bore you with any more rants, lets get down to how you can get this implemented. First you add two html elements, an header and a div  like we have below <div class="panel"> <header class="panel-heading"> Widget Header Text </header> <div class="panel-body"> </div> </div> In order to make things a little more exciting, you may also want to include the following...

Get Creative With Data Tables: Row Click Events

Image
Introduction Datatables from datatables.net are so lovely, especially with the responsive extension that you can enable by including dataTables.responsive.js in your project. I particularly find fascinating the combination of search / filtering, pagination, ordering and exporting features which are available right 'out-of-the-box'. Issue Well, as great as datatables are, you will find it difficult if not impossible to develop a system with acceptable user-experience using bare-bone datatables implementation. In my own case, because I was porting my superb Asset and Inventory Management Application found at asset.bz to the mobile platforms using PhoneGap, I needed the user to be able to tap on any record in order to perform some pre-define operations like editing, approvals etc. Solution Apparently, the solution isn't far fetched. The sample code below would do the job nicely: // HTMLTableData is your array of records to be displayed in the data table ...

Asset.bz Asset / Inventory Management Project

Image
I have found out through my own experiences and that of others, how difficult it is to get ‘sincere’ applause at the end of demo of any beta version software. Yes, you would always get some form of applause, but rarely the ‘sincere’ ones. Software demo for new products in my organization usually has in attendance several employees from different units and departments. Many attend on the basis of obligation while others are just too busy in their heads to give the session the attention it would require in order to appreciate the product being presented. I had to send out reminders to get invitees to leave their seats for the demo of a new product my team just developed. It’s a team of 2, and while I worked at the Front-end with design, branding and development along with the accompanying Mobile App, my partner was in charge of the web services and SQL Server database development. We would be anchoring the demo together, and I was to start the session. We were to receive an ap...