Javascript Fundamentals

Javascript Fundamentals

Whoa that title, yeah it made me cringe a little don’t ask me why. Perhaps it’s because I’ve seen it over countless times but I couldn’t think of a better title. I was gonna go with “Vanilla Javascript” but we all know that deserves it’s own space.

Javascript fundamentals is like going back in time, sort of like when the earth was formed. Were not going to get into the details of lexical environments or function scope or objects, well maybe a little on objects. Were going to just simply define a few javascript constructs.

Continue reading “Javascript Fundamentals”

CSS3 Transitions

CSS3 Transitions

CSS3 has settled in quite nicely into the development playground for me at least but for businesses, this property alone provides some serious value. If you’ve been programming since the early 90s, you’ll see that we’ve gone a long way with interactive elements – javascript not included. In this post I’m talking about CSS3 Transitions, as mentioned on another post CSS alone is a major powerhouse.

So let’s go back in time a bit when we had to use images to indicate user feedback – a scenario would be a visitor hovers a link and then it changes color or is underlined after you hover it. This is a good thing – it lets the visitor know the element does something, presumably a link that goes somewhere. But designers and developers stepped it up a notch by adding image rollovers, we kinda needed the help of Javascript.

Continue reading “CSS3 Transitions”

Creating a custom modal with just jQuery and CSS

Custom Modals using Jquery

I was working on a site, it’s your standard WordPress site. I’ve worked with WordPress a long time and seen a lot of different scenarios. The client had this important image on their site that needed to be enlarged in a lightbox or modal, visitors just had a hard time reading small text. Of course you would think hey just use a bootstrap modal component. Well they didn’t have bootstrap installed – well they did but they were just parts of it based on another plugin they had installed. This would even further complicate things.

Modal from scratch

My second solution was to see if they had jquery installed – well of course they did. But is it in the header? In the footer? Some weird spot, yeah I’ve see that before. If it was in the footer where it ideally ought to be then we should be good right? Oh yeah by the way I haven’t even talked about writing the script – I’m looking for a good place to put the script first. Yeah, that’s this is just the first part. So I was thinking maybe I should just use a plugin for this – easy and get it over with. But why when I could write it all myself, so that’s what I did .
Continue reading “Creating a custom modal with just jQuery and CSS”

Google Page Speed Console

Google Page Speed Console

I get a lot of consulting gigs having to do with Google Page Speed – basically an assessment on how fast a website loads on a browser. You might be curious why this is important if you haven’t worked with SEO or Web Development. The thing is you don’t even need to be a techie to know why this is so crucial in almost every aspect of running an online business.

Google Page Speed Insights

I remember working for a start up back in the 90s and being part of a meeting having to do with this subject. I barely knew how to write some HTML back in those days, I was such a noob. Anyway, back in those days SEO was still really finding its place in terms of job title.

Continue reading “Google Page Speed Console”

PHP’s is_numeric function

PHP is_numeric function

I’ve been wanting to write about PHP’s is_numeric() built-in function partly because I forgot all about it one day while validating one of my forms.

I get super anal about form validation because if it’s anything that’ll make or break your web application it’s security. Something dirty gets through your form it’s game over – or just bad data, bad quality. This means bad user experience – see how this kind of thing can trickle down through your application you worked so hard on?

Continue reading “PHP’s is_numeric function”

Expandable / Collapsible Text using jQuery

Expandable / Collapsible Text using jQuery

I’d like to first talk about my relationship with Javascript before I get into jQuery. I’ve known Javascript since the 90s, back when I was a young lad, Javascript freaked me out – I’ll admit I was really intimidated by Javascript more than I was with PHP. I mean they even have a modern looking official site for Javascript now that’s not so daunting.

Continue reading “Expandable / Collapsible Text using jQuery”

The PHP 7 Story

The PHP 7 Story - Rasmus Lerdorf

I’ve been craving me some PHP lately, not PHP code per se – I code in PHP on the daily. PHP was my first programming language – I fell for PHP the moment I saw it’s power, its force.

So this post is titled “The PHP 7 Story”, it sounded so cool. I’d like to give ALL the credit to Zeev Suraski for inspiring me to write this post. Yeah I didn’t know who this dude was either. I mean you probably know who “Rasmus Lerdorf” is if you’ve been programming in PHP a long while. So if Rasmus is the god of PHP, Zeev would be the demi god of PHP. Zeev gave a speech in Barcelona back in 2015 – yeah I’m so late to the conference attending game. My friends tell me I should get out and travel, makes me feel like a sheltered programmer but being a programmer is unlike any other profession or craft. Programming is within itself a traveling experience – yeah even time travel, anything is possible in the virtual world. Whoa I just felt like Neo from the matrix.

Continue reading “The PHP 7 Story”

React Fundamentals – ReactJS

React Fundamentals – ReactJS

I didn’t know what to title this post – I’ve got tons of thoughts about ReactJS. At the time of this post, ReactJS has taken single page apps to another level, well I shouldn’t say another level – it just sounded cool. Yeah there are others out there – I actually like Vue.js, it’s a much lighter version compared to react. And Angular(what version is out now) – I make mention of this framework with a little snark because I’ve wrestled with it many times in the past. At the moment I’m not really a big fan of Angular, sorry Angular but there’s just way too much stuff going on with you. Maybe things will change.

I wanted to make another post dedicated to just my thoughts on ReactJS but then I’ll be overthinking it and then I’ll end up going in circles. So let’s just get on with it.

Continue reading “React Fundamentals – ReactJS”

Using jQuery to automatically download a PDF file

Window Location Href in Javascript

I’ve been working through one of those client requests that isn’t use too often. They wanted a PDF be automatically downloaded after submitting their email (the only field on the form).

I started thinking about different scenarios, particularly this one:

If a visitor successfully completes the form and hits submit, should the PDF open on a new window tab or should it be automatically be downloaded?

Continue reading “Using jQuery to automatically download a PDF file”