Best Practice Informed IT Architect / Designer / Developer Services

Highly Trained and Best Practice Coding

July 22, 2018 01:00:30 PM

 
forgotPassword | register Welcome back! login

Web Software: Architect / DBA / Designer / Developer

Sample Code

I enjoy all of the pieces of the puzzle so in regards to the web and software... the View, the middle tier and the back end, preferring some form of MVC architecture. I've worked heavily with 3D Modeling (Lightwave) along with Photoshop and Flash/Flex, and regularly use pretty much all of the tools in the Adobe Master Collection Creative Suite (currently using CS6). In regards to IDE's, I've used tons but seem to always prefer Dreamweaver. I use Premiere Pro CS6 for video and Cakewalk Sonar Platinum and Adobe's Audition and Soundbooth for audio. I employ Adobe's Media Encoder for size, format and filetype compliance. In regards to the browser and javascript libraries, I'd say my strengths are in this order: jQuery, Ext JS, Spry, Prototype, Angular... but I have used them all. In regards to the middle tier, I'd say my strengths are in this order - ColdFusion, .NET C#, PHP, Java... but I have used them all. In regards to the back end, I'd say my strengths are in this order: MS SQL Server, mySQL, Oracle... but I have used them all (SSMS, Navicat Premium, mySQL Console). When I was teaching for Adobe/Macromedia, I got pretty strong with ActionScript (1,2,3) (Flash/Flex) but obviously the focus has changed in recent years with mobile and HTML 5 and CSS 3 and these assets tend to get migrated over... particularly video (flv/f4v). I recall how Flash/Flex loved mp3's and flv's and later f4v's when H264 became available in this format. Now with HTML 5 audio and video tags and all 5 of the major browsers supporting different mime types, HandBrake (and FireFogg in the past) become needed tools.

In regards to how I code in any language, I think it's a good idea to think through the process, whiteboard it as needed, then layout your file with comments identifying all the forks in the road as they say. The things going through my head as I code are: consistent, specific, native, KISS (Keep It Simple Stupid), DRY (Don't Repeat Yourself) so nothing twice, never ask a question you already know the answer to, everything has a natural home, just because you can doesn't mean you should, less is more. I tend to think very OO. Is a, has a. A Registrant is a User ya da ya da ya da. Implements. Extends. Abstract. Everything is a component or module, basically a little black box, and all that matters is what does it expect in, and what is it returning... and most importantly that it NEVER EVER breaks. There is no such thing as user error. It is always our fault. A file of code should essentially reflect a sheet of music. There should be no question what it is meant to do, so well commented for the next person reading it. As for variable naming syntax, call it what it IS lower camel case: aSomething, bSomething, oSomething, qSomething, xSomething and scope it! Classes (blueprints) start with an UPPER case, static constants all UPPER case, etc. etc. in an overall effort to avoid spaghetti code, encouraging some form of team wide homogenized uniform coding syntax that in the end will inevitably increase ROI. I tend to also alphabetize my methods in objects such as application.oController, and the method verbs for basic CRUD operations would be add, edit, get, remove emulating the SQL actions INSERT, UPDATE, SELECT, DELETE and the arguments would also be in alpha within 2 groups - required and not required, hence parammed with a default value. Even if something is loosely typed like CF or PHP, one should treat it as if it is strongly typed like java or actionscript. Similarly, even if a language is not case sensitive, one should treat it as if it is. SOMEVAR vs somevar to me is not acceptable. Ultra bad actually. While some languages would accept that, some obviously would not. Everytime, one is too lazy to be specific, you are essentially asking the server to do more work.... in my humble opinion.

The impossible takes a little longer...

Here's a few random code examples of my work:

Access

ManageTeam.info Database Relationships

 
Air

Presentation Creator Air App For Desktop

 
ASP

Hello World Comparison

 
ASP.NET

Hello World Comparison

LeeMVC 5.0 KISS Framework for .NET 4.6+ (considering)

 
Cakewalk

Over The Rainbow recording

Project Structure

 
ColdFusion

AMS CF 11 Controller from LeeMVC 4.1 05/01/2017 All View calls go through this conduit

CFUG Presentation Re: Harvard Architecture - 12/05/12 @ Vertex Pharma Boston, MA

Hello World Comparison

Import Large

Lee MVC For Harvard Manual

LeeMVC 1.0 KISS Framework For ColdFusion 8+

LeeMVC 2.0 KISS Framework For ColdFusion 9+

LeeMVC 4.0 KISS Framework For ColdFusion 10+ WIP to 20141108

LeeMVC 4.1 KISS Framework For ColdFusion 11+ to 20170508

LeeMVC 5.0 KISS Framework for ColdFusion 11+ (inc bootstrap & jQuery)

LeeMVC 6.0 KISS Framework for ColdFusion 11+ (inc React)

LeeMVC 7.0 KISS Framework for ColdFusion 11+ (inc MS SQL Server & jQuery)

Load Data From File (CF & mySQL)

Migrate Old Data (CF & MS SQL Server)

sample API_cfc

sample Application_nested_cfc

sample Application_webroot_cfc

sample ApplicationProxy_cfc

sample Controller_cfc

sample DataManager_cfc

sample main_abstractClass_cfc

sample Service_cfc

sample thread_cfm 1

sample thread_cfm 2

sample thread_cfm 3

sample Utility_cfc

 
Flash

France School Trip

High School Graduation

College Sports Team Season Review

Project Structure

 
Flex

Audio App

 
HTML 5

HTML 5 Audio Video Example

HTML 5 Harvard Site (CF) live 20140215

 
Java

Hello World Comparison

LeeMVC n.0 KISS Framework For Java (inc)

Load Data From File (CF/java)

 
jQuery

Upload

 
Lightwave

Asher Benjamin Virtual Furniture Image

 
Perl

Hello World Comparison

 
Photoshop

CollageMusic.net Admin Layout

 
PHP

Application include Object

Controller Object

DataManager Object

Hello World Comparison

LeeMVC 3.0 KISS Framework For PHP 5.4.12+ (WIP)

Utility Object

 
Premiere

Green Screen / Keying (duo)

Green Screen / Keying (solo)

 
SQL

Create DB

Levenschtein UDF

Maximum UDF

Minimum UDF

Remove Punctuation UDF

String Matching UDF

When it has to be perfect... and robust... consider Brad Lee. You'll be glad you did.