Deciding to Go Native over Hybrid App Development

This is a subject that is somewhat dear to my heart. I was introduced to application development on a fluke. I knew nothing besides the fact that Hybrid Development was the way to go, with frameworks popping up like wild fires, the process had been simplified. 

In fact, my assumptions we true. This form of development was the seam between learning native languages like Objective-C/Swift an Java. I couldn’t wait to dive in an boy did I… My first hybrid application was data intense. I learned Cordova/Phonegap quickly and build an app faster than I could believe. Little that I knew, device capabilities, signal quality, OS and payload would play a key role in my dismay later on.

The app utilized the upload of files as well as synchronous xhttp requests. Something you should always plan for especially if you expect to send large amounts of data. In my case, I was carrying a base64 signature image along with several photos and approximately 200 fields of form data. The server side scripts would process the data then stamp a PDF and email it to a selected recipient.

Most of our users were able to install successfully and use the app with no issue on and offline. The app was developed brilliantly (if I may toot my own horn) however, device capabilities would eventually make my life a living hell. Some users on old devices would complain about app crashes and weird behavior when submitting form data. Something I, an inexperienced app developer at that time had no clue why.

Before I knew it, I was debugging like hell with my QA and trying to narrow down the inconsistent issues. Long story short, it was not long after that I realized my fancy solution had outgrown its intent. The functionality was too intense for older devices and the payload was way to large for the JavaScript manipulated post requests. That was the reason for the inconsistent issues certain users on older devices were having when using the app. I honestly felt bad I didn’t catch the issue before the release but I now chalk it up as experience.

I make the claim to new app developers considering Hybrid development, ask yourself 3 things:

1. Will my app be data heavy?

2. Will I send or receive data to and from my app?

3. What type of devices will my app be used on?

These 3 things are critical. If your app is processing heavy data, sending and receiving data objects and used on specific older devices, Go Native!!! I will stress, if you answered yes to both 2 and 3, save yourself time and headache and choose to develop your app in Objective-C or Swift if targeting iOS or Java if targeting Android devices. 

Looking around the web there are many articles floating around about the beauties of Hybrid development, and I am a big fan, but there are very few resources online that point you toward decisive measures to take to determine if this method will work for the life of your app. Save yourself time an headache by doing your research and probing your clients needs and use cases. Hope this helps someone in the near future.

I did end up rebuilding the same application in native iOS Swift and I must say, the reliability has increased by 5x’s. It’s important to keep in mind that the limitations in HTML5 and JavaScript don’t always play nice with applications, especially when you are sending a large payload of data. This type of functionality is best achieved with a strong and robust native programming language.



AngularJS and Beyond the API

At my current organization we are making use of AngularJS on the client side and using it with .net classes which bind a pretty seamless and robust api pulling in data from sources like MSSQL an PostGres. Because we need gis data in huge payloads, we are making use of the GeoJson PostGres is alloting to use. Our PostGres db is linked an talking to our Esri software which is already data intense being it contains points associated with gis coords and even kml renderings.

In this manner, AngularJS has proven to be as powerful as it can be. Utilizing resources and services with the build, we have erected a pretty strong data layer that is completely seperated from the front-end of our app. Therefore, the client side of the app can live anywhere on the web and utilize simple connection strings in our case housed in our web.config file to connect over a secure connection.

Im excited to see where and what else I can do in AngularJS in terms of big data and resource utilization. Stay tuned for more angular goodness here at my blog.

Why does WordPress Request FTP Info when you Upload a File or Theme?

I fell into this issue and found a bunch of articles… None of which solved my issue of wordpress asking for ftp.

Screen Shot 2015-04-14 at 9.51.57 AM

Here’s the answer!

If you are on a private host (private or dedicated server) all you have to do is add the following line of code to your root config.php page (below all other scripts):

define(‘FS_METHOD’, ‘direct’);

If you are on a shared host, you will need to edit config.php with your server settings in order for it to work:

define( ‘FTP_USER’, ‘yourusername’ );
define( ‘FTP_PASS’, ‘yourpassword’ );
define( ‘FTP_HOST’, ‘localhost or your host ip’ );

If this doesn’t work check into permission settings on your wp-content directory and make sure to set everything in that folder to chmod 777.

Tagged , , , , , , ,

My Journey thru OOP (Object Orientated Programming) – Day 1-2

I am by far no expert programmer, however, over the years I have worked to learn just enough principles to carry me through a world wind of scenarios. Though most of my learning has been on the fly, thanks to my previous employers ;-), my perception of the web and applications are beginning to change over all. For a while I looked at Software Applications as a whole other beast, but these days I see the development community working hard to sew the seams in web and software technology. HTML5 I can say has made this possible…

My employer is notorious for development projects on the fly. My dev team can literally be working on a project involving big data that is supposed to span into a completion date, but because our field of work is so key to our clients, there are times (like every other day) where we need to stop the big important project and begin another big important project. The catch is usually, the new rush project is usually due in 2-days, fully tested and deployed to the client before the deadline.

This type of demand had me thinking of ways I could modularize my various development needs. One main process I see we utilize a lot is a Login feature. Mostly every project we work with, requires us to define a Login security feature allowing user to access secure content. For months, my team would reuse content and modify were needed. I’ll be honest with you, though copying-and-pasting code is easy to implement and mod, it gets messy. Especially if a team member accidentally copy’s over or edits the example docs instead. Been there, done that!

My thought process begin to change when it came to code reuse and modular architecture. We (My org) are a Apache/Linux environment but do also support and work in Windows which has a far more structured framework that handles the heavy lifting of object orientated programming. I am most comfortable in a .net, asp/C# environment when working in Windows so I am familiar with Class, Methods, Constructors and so on. I wanted to alternative in my Apache environment so I begin looking how to construct this same process in PHP.

Day: 1-2

My first step into my implementation is to create a Login class. This class will hold the connection strings we can add to and utilize anywhere where our script needs to execute various SQL statements. Long story short, I’ve spent the last few days defining classes for my new Login class. The classes contain our various SQL environments, my first being our MySQL connections, then our MSSQL connections, as well as Oracle. We utilize PDO in our environment so we defined all the MS connections to connect using the latest PDO security standards.

I spent a good day just doing my research on the principles. I wanted to make sure I understood as a whole how OOP in PHP worked compared to .NET. Honestly, I see no differenced besides the different syntax. The principles seem to be the same when delegating tasks and calling methods thru functions. It’s just more spelled out in .NET and more straight forward in PHP. My next couple of days I will be completing all the configurations for our other connections and defining them into classes.

My next post will be about the next module I’ll create in my quest to modularize some of our development features using object-orientated programming. Here’s a screenshot of my login-class. There is a separate file called db-mysql.php and db-mssql.php which holds the variables with db values.

Screen Shot 2014-11-09 at 10.37.11 AM

Tagged , , , ,

The Beauty of Client Side editing

Boy I’ve been indulging in client-side editing more than ever. I can see it becoming an important development tool for me and other developers. A friend of mine introduced me to ShiftEdit, which allows for remote connection over ftp. Source code editing, has never been easier. Theirs even an option to link a db, I wouldn’t suggest it, but the option is there.

Microsoft’s Sharepoint is another good one. It has enough punch to make any backend application seem incredible. It’s client-side editing at its finest and it’s taking over. I can see more cloud based dev tools come fourth in the coming years as the cloud continues to prove positive. HTML5 is making these features readily available for those even the smallest devices. I’m excited to see where it all goes and how I can participate in all of it.

HTML5 Datalist control

HTML5 Web Development

HTML5 Datalist control is more alike Google Suggest. Before HTML5 presence even for a known list to be suggested, developers go for AJAX request to hit on the database and populate the suggestion list. For every keystroke, an AJAX request is fired. HTML5 ‘Datalist’ could be useful when the form is to be loaded with known list. For example, a form has to be chosen with month. I will explain down with the code how it could be achieved through Datalist HTML5 control.


<!DOCTYPE html>
<title>HTML5 Datalist Demo</title>
<form action="LoginPageSuccess.jsp" method="get">
<input type="text" placeholder="Month Name" id="MonthText" list="getMonthList" required>
<datalist id="getMonthList">
<option value="January"/>
<option value="February"/>
<option value="March"/>
<option value="April"/>
<option value="May"/>
<option value="June"/>
<option value="July"/>
<option value="August"/>
<option value="September"/>
<option value="October"/>
<option value="November"/>
<option value="December"/>


Screenshot of how it works:


View original post

Send attachments with email in PHP

My Blog

Add below function in your PHP file.

Use this function like,

View original post

MVC 4 – Using HTML5 “data-” attributes with Jquery

a developer's notes - a semi-technical web development BLOG

You can create data- HTML attributes with your controls using this technique.

Define a new HTML Attributes anonymous object with your Html helpers. Below, I create a text box with some additional properties I want to be able to access with jQuery. Using properties that start with “data_”, you will be able to access the property with jquery’s data() method. Note: using property names that start with “data-” will result in a compilation error.

This is the HTML that gets rendered

Here is what jquery’s data() method converts property names to. Interestingly, the underscores are removed and camel casing is applied to the name.


Here is another good article on the subject.

View original post

%d bloggers like this: