December 12th, 2011 — 6:50pm
When I first started coding PHP, my source files looked like an aggregate of languages. I had inline CSS wrapped with PHP and a crude mixture of XHTML and HTML bouncing around the file like a bilingual child with ADHD. I took a little hiatus from coding for the past 8 months and returned to find an old website in shambles. Everything still functioned perfectly fine, aside from a score of permission problems, but the code was impossible to read. I began the immense task of “porting” the code over to a more readable, functional, and modular layout. I didn’t just code. I sat there and looked at it, examining every single class, function, and echo that produced the web app. I realized how easy it would have been to do this from the start, and I’m pretty disappointed with myself (considering I’m so concerned with having a solid set of standards to abide by).
This is what I’ve started doing, hopefully it will become habitual soon:
- All classes are organized with a clear nomenclature and file location. For instance, all classes are as follows: /public_html/site_root/includes/classes/class.core.php It’s important to not use custom extensions (.inc, .whatever) as it could create huge security problems.
- Without losing a significant amount of performance due to the heaviness of a framework (I still prefer to write all of my classes) I chose to avoid templating systems by this: I have your standard page.php file (right in the site root) with the necessary JavaScript and CSS (see below) file calls in the head. I write the layout using HTML5 and style it exclusively with a stylesheet. ZERO inline styles. The necessary programatic logic (that cannot be simply included) is written into the file (with heavy comments). The main logic of the page is included in a separate file, stored like the following: public_html/site_root/includes/page_name.descriptor.php
- All CSS and JavaScript are in their own respective directories, such as /public_html/site_root/includes/css etc.
It’s also important to remember that you should be doing all of your session and database calls from a secure, single file. Don’t be opening new SQL connections in the middle of a random file, don’t store your database connection details in variables, etc. It’s amazing how easily beginners can forget this stuff.
Comment » | Internet
August 5th, 2011 — 8:19am
For the first couple weeks of running OS X Lion, I hated Mission Control with a passion. Couldn’t stand it. I’m a hardcore multitasker. When I’m not writing research papers for school, I’m running Coda in one space, Chrome in another, iTunes in another, Calendar, Mail, etc. I like to have them all in different spaces. But I suddenly realized the flaw with Spaces in Snow Leopard. I couldn’t have different workflows. For instance, when I’m making vinyl signs I like to have illustrator to the space next to Chrome, but when I’m in dev mode I prefer to have it down next to photoshop. That way I can switch right over.
Mission control came along and I about shit a brick. Nothing worked. I hated it. Then miraculously, I discovered you could four finger swipe between all the mini-expose’s of each space. Suddenly I can rearrange all my windows with ease, get to any space with minimal effort, and easily see EVERY window open at once. Absolutely amazing.
Comment » | Internet
November 18th, 2010 — 9:28am
So you’ve spent hours on end (or thousands of dollars) developing your e-commerce website to sell your killer products, but you just can’t seem to get the amount of traffic you want! What do you do? Buying traffic doesn’t help you out at all and is just a bad idea in general. Well throughout my research I’ve developed a solid list of tips and tricks to getting your site noticed.
- Niche Forums: Go ahead and register on all of the forums that are in your niche. Put your website link in the signature of each post and go through answering questions people have. The more links you have out there, the more chances someone will click it. Do this on a regular basis.
- Site blog: This one may seem obscure for many people. Create a blog and regularly post to it. The posts can be anything from product tips and reviews to promo-codes for your store. If you post promo-codes, be sure to post them around the forums as well!
- Yahoo Answers: Post answers to questions on Yahoo Answers and Google Answers with your link as the source. It’ll help curious people click their way to your products.
- Facebook Page: If you haven’t already, try creating a facebook page for your business. Invite all your friends and offer promo-codes and do a giveaway every now and then. Use status updates and facebook ads to promote your page. *It should be noted that facebook’s newsfeed algorithm doesn’t display pages if the user isn’t engaged or if it doesn’t think it’s relevant. I’ve noticed solid traffic increases though.
- Product Manuals: Upload all of the product manuals to your website in HTML format. This will help will long keywords and give users another reason to visit your website.
- Review Section: Let users write and upload reviews about your products.
- Post Reviews Elsewhere: Write reviews about your products on other review websites. If you have a webcam, videotape yourself reviewing your products. Post all over!
- Create a place page: If you’re marketing to a specific geographic region, you can create a free Google Place page, which will help with negative results.
- Froogle/Base: Add your products… it can’t hurt.
- AdWords: This is a no-brainer, but often skipped because of the prices. It’s worth it to advertise with AdWords, especially if you choose to have results on the Google Search Results pages. Suck it up and spend the money.
And that’s all for now!
Comment » | Business, Internet
November 14th, 2010 — 8:35pm
So I wanted to make something similar to the Macbook Air Splash Page on Apple.com
I found the result to be super simple!
Before your content you simply need a div like the following:
<div id="overlay">
<!-- Your content goes in here -->
</div>
The CSS is as follows:
div#overlay {
background-color:#1f5a84; /* can be whatever you want */
z-index:1000;
position:absolute;
top:0;
left:0;
}
And for the JQuery, you simply do this:
$(function() {
var width = $(window).width()
var height = $(document).height();
$(“#overlay”).width(width);
$(“#overlay”).height(height);
$(“#overlay”).delay(2000).fadeOut();
});
Feel free to expand on this or refine it… but so far I’ve found it’s a pretty simple solution to do the trick!
2 comments » | Internet
October 8th, 2010 — 1:19pm
When it comes to running a successful business having a comprevensive business plan is crucial. It outlines every single aspect of your company in an easy to navigate format that is almost universal throughout the business world. It will also help when it comes time to talk to banks or other businesses. However, something that is often overlooked during the planning and execution periods, is your company image.
Continue reading »
Comment » | Business, Internet