Wednesday, February 11th, 2009

Making the most of the time we’ve got.

I wanted to write a post today that is kind of reflecting a rather serious one I read a couple of days ago, what would you do if you had a short time to live , but about friendships in general. I began to think about what our time actually means to us HERE on this earth, and how we spend it developing ourselves and our relationships.I recently had an opportunity to go camping with a two of my best friends. One of them lives in Huntsville, as do I–while the other one lives in Florence, AL.

Aaron and I

We rarley get to spend as much time with each other because of work schedules, but It always ends up being memorable when we officially get to hang out. Both nights ended around a campfire, nostalgically reminiscing about good times. It’s funny how you meet your best friends, looking back. People who seemed to be coincidental aquaintences in the beginning, turn out to be some of the greatest gifts God has ever given you. And while these two are not my only best friends (i’ve got quite a few),I don’t know how I’d live without these two.

Daniel and I

When you feel like your days are spent in the service of other people’s requirements, then you should always be able to look to your friends to JUST BE YOURSELF.  I know alot of my time is spent in the service of people who want to shape me; molding me into something that THEY want from me, or taking some resource from me to attend to their personal or professional needs. Isn’t it nice to have an entourage of people who give to you; accept and love you for who you are, and what YOU want to become?

Our time here is temporary. In fact, our TIME = our LIFE. Soon, our time will run out. We will expire, and so will our chances to form long-lasting bonds and healthy relationships with people. While every worldy device our society clings to will pass away, the people we meet on this earth help shape our personality and very importantly, our perspective.

Have you made room for the people in your life that matter to you?

bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in Blogarooni | 2 Comments »

Tuesday, November 25th, 2008

PHP…Will Work for MVC’s

So I’m studying up new ways to re-use my code (instead of having to re-write it), and quickly falling in love with the MVC (Model View Controller). It’s basically a way of developing applications that includes multiple tiers for separating the logic/rules code from the presentation code. It’s basically cleaner and more organized that way. Since my first exposure to this was Smarty for PHP ( coworkers Brent and Ellen introduced me to them, thanks!) I have kept it in the PHP family and am totally digging frameworks CakePHP and Symfony.

While I’m studying up on my .NET stuff (I’ve still got a secret love affair w/ Namespaces!), I’m tempted to explore Ruby. I went to a Ruby Hoedown a few months ago and everybody was going crazy over rules engines ruleby, communications apps built with asterisk and best practices in general.  I guess you could call me a late bloomer when it comes to making the switch. If the idea behind Ruby on Rails (the popular Ruby MVC) is to prevent bottle-necking the app with “spaghetti-code”. Why couldn’t a PHP MVC serve the same purpose? I’m not one for re-inventing the wheel. Somehow, I keep getting the idea that the Ruby programmers think that PHP programmers do the majority of their work in their Mom’s basement and write sloppy code. Again, maybe I’m just not seeing the other side of the totem pole. If Ruby is truly a more stand-alone and robust language, I probably would do well to give it a shot. Does anyone else have some experiences to share about either? I’m interested in hearing your thoughts…

bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in | 2 Comments »

Thursday, November 6th, 2008

Top Ten reasons to switch to Linux

I pulled this from tuxmagazine, and totally lurve it. Makes me wonder why my other car is a dodge stratus.. heheh.


Top 10 Reasons to Switch to Linux


1. It Doesn’t Crash

Linux has been time-proven to be a reliable operating system. Although the desktop is not a new place for Linux, most Linux-based systems have been used as servers and embedded systems. High-visibility Web sites such as Google use Linux-based systems, but you also can find Linux inside the TiVo set-top box in many livingrooms.

Linux has proved to be so reliable and secure that it is commonly found in dedicated firewall and router systems used by high-profile companies to secure their networks. For more than ten years, it has not been uncommon for Linux systems to run for months or years without needing a single reboot.

2. Viruses Are Few and Far Between

Although it is possible to create a virus to target Linux systems, the design of the system itself makes it very difficult to become infected. A single user could cause local damage to his or her files by running a virus on his or her system; however, this would be an isolated instance rather than something could spread out of control.

In addition, virtually all Linux vendors offer free on-line security updates. The general philosophy of the Linux community has been to address possible security issues before they become a problem rather than hoping the susceptibility will go unnoticed.

3. Virtually Hardware-Independent

Linux was designed and written to be easily portable to different hardware. For the desktop user, this means that Linux has been and likely always will be the first operating system to take advantage of advances in hardware technology such as AMD’s 64-bit processor chips.

4. Freedom of Choice

Linux offers freedom of choice as far as which manufacturer you purchase the software from as well as which application programs you wish to use. Being able to pick the manufacturer means you have a real choice as far as type of support you receive. Being open-source software, new manufacturers can enter the market to address customer needs.

Choice of application programs means that you can select the tools that best address your needs. For example, three popular word processors are available. All three are free and interoperate with Microsoft Word, but each offers unique advantages and disadvantages. The same is true of Web browsers.

5. Standards

Linux itself and many common applications follow open standards. This means an update on one system will not make other systems obsolete.

6. Applications, Applications, Applications

Each Linux distribution comes with hundreds and possibly thousands of application programs included. This alone can save you thousands of dollars for each desktop system you configure. Although this is a very small subset, consider that the OpenOffice.org office suite is included as well as the GIMP, a program similar to (and many people say more capable than Adobe Photoshop); Scribus, a document layout program similar to Quark Xpress; Evolution, an e-mail system equivalent to Microsoft’s Outlook Express; and hundreds more.

For the more technically inclined, development tools, such as compilers for the C, C++, Ada, Fortran, Pascal and other languages, are included as well as Perl, PHP and Python interpreters. Editors and versioning tools also are included in this category.

Whether you are looking for Instant Messaging clients, backup tools or Web site development packages, they likely are all included within your base Linux distribution.

7. Interoperability

More and more computers are being connected to networks. No system would be complete if it did not include tools to allow it to interoperate with computers running other operating systems. Once again, Linux is very strong in this area.

Linux includes Samba, software that allows Linux to act as a client on a Microsoft Windows-based network. In fact, Samba includes server facilities such that you could run a Linux system as the server for a group of Linux and Windows-based client systems.

In addition, Linux includes software to network with Apple networks and Novell’s Netware. NFS, the networking technology developed on UNIX systems also is included.

8. It’s a Community Relationship, Not a Customer Relationship

Other operating systems are the products of single vendors. Linux, on the other hand, is openly developed, and this technology is shared among vendors. This means you become part of a community rather than a customer of a single manufacturer. Also, the supplier community easily can adjust to the needs of various user communities rather than spouting a “one size fits all” philosophy.

This means you can select a Linux vendor that appears to best address your needs and feel confident that you could switch vendors at a later time without losing your investment–both in terms of costs and learning.

9. It’s Not How Big Your Processor Is…

Because of a combination of the internal design of Linux and development contributions from a diverse community, Linux tends to be more frugal in the use of computer resources. This may manifest itself in a single desktop system running faster with Linux than with another operating system, but the advantages go far beyond that. It is possible, for example, to configure a single Linux system to act as a terminal server and then use outdated hardware as what are called thin clients.

This server/thin client configuration makes it possible for older, less powerful hardware to share the resources of a single powerful system thus extending the life of older machines.

10. Linux Is Configurable

Linux is a true multi-user operating system. Each user can have his or her own individual configuration all on one computer. This includes the look of the desktop, what icons are displayed, what programs are started automatically when the user logs in and even what language the desktop is in.

bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in Blogarooni | 1 Comment »

Wednesday, August 13th, 2008

I just installed Jott…

I just installed Jott on my brand new iPhone and it works supercalifragilisticexpialidociously. You guys can be expecting some more updates, so keep reading along and have a wonderful day. listen

Powered by Jott

bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in Blogarooni | Comment now »

Friday, July 25th, 2008

You CAN succeed at life. Don’t give in to mediocrity!


You can do it! Just Persevere!

You can do it! Just Persevere!

I’m in my late twenties and have a lot of friends whom are settling down with families and working on professional degrees and some who are still working on what they want to do. There’s nothing wrong with ANY of these. To some degree, I still don’t know EXACTLY what I’m supposed to do. I have an idea, and I know what I don’t like to do, so this helps. What I have a disgust with is irking through life and never excelling at anything–just maintaining and serving as an eyesore for the general population. Nobody is perfect, and everyone makes mistakes–how you choose to react to them makes all the difference in the world. If you are complacent with your relationships, career, spiritual life, finances or emotions, they will be vague and you will be ultimately unsatisfied with your life. Here are a few tips you can use to get back on track with your life:

Exercise Regularly

There’s something that happens to our bodies when we exercise–promoting great cardiovascular health, getting rid of harmful toxins, replenishing our cells, organs and immune functions, Endorphins to make us feel great, etc. Besides the obvious health benefits, there are things that happen to our bodies when we get in shape–they LOOK better, and we know that they do, so we feel confident about ourselves. This self confidence could be the boost in going on a date with that hot girl/guy you’ve always wanted, blowing away a job interview or even speaking in public with ease. When we exercise we’re ready to take on the world!

Get school done first, then start a career

If you are already settled and have a job, a family and other responsibilities, there is absolutely NOTHING wrong with going to school–as long as you make room for those other responsibilities. It’s nasty when two people conceive a child, and both of them have to work/go to school during the day/night and the child is caught in the middle, only for the parents to discover what a great responsibility the child is. The same is true of a career. Think it through before taking action, if possible. Go back to school NOW, Get certified, get specialized before taking that job, and you’ll be glad you did later on. If you can’t go back to school, ask your supervisor about tuition reimbursement programs or any type of on the job training–anything to make you more marketable.

Balance your Checkbook

Your parents used to have to do this, before we had internet banking. Get some type of ledger, if you can still get ahold of one (they come with your checks, or you might have to ask the bank) and use it. It’s easy. Doing so after every transaction will teach you self-discipline, self-reliance and you’ll actually know where your money is going. There is something wrong with Internet Banking. It encourages laziness. You’ll feel better in general about your spending habits when you keep track of them-by manually balancing your transactions.

Develop relationships with real people

Today we live in an information age where it is easier to contact someone by email rather than telephone them. Some people prefer it as the standard means of communication because it allows them to keep a safe distance away from someone while talking “at” them rather than talking “to” them. This is unacceptable. In fact most of our kids are abandoning e-mail for a crude type of L33T-speak, as done in instant messaging. Have we gotten DUMBER? Nope, just really, really lazy. Here’s a challenge for us: Can we go one week without communicating via email, instant messaging or internet social ? That’s why we’re scared to death and so standoffish.  If we’re afraid of communicating face to face or by telephone, we should make an effort to make ourselves accountable to real people. Start by having a meetup, and use the internet to get off the internet!

Do, “something” don’t do “nothing”

For any of these things, you have the power to change yourself for the better. Go look in the mirror. You are the only person who cares most about getting a better job, going back to school, spending time with your spouse or family or getting organized in your finances. If you don’t do something about it, who on earth will? If you do nothing, you will turn around 10, 20 30 or 40 years later wishing you would have done something. What’s the difference between failing and succeeding? It’s simple really. Succeeding means you won because you knew how to win and didn’t learn anything. Failing means you lost and learned something about how to win next time, and the next time, and the next time, etc.




bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in Blogarooni | 3 Comments »

Monday, July 21st, 2008

Does your Software cost too much? Mine doesn’t.

John’s Top 7 Open Source Software Sites

Are you breaking the bank on your commercial software costs? Tired of all the activation keys and hidden software service costs? Check out these directories of my favorite open source software applications–and save yourself lots of time and money.


Souceforge

You knew it was coming, eh? Still the best resource IMO. SourceForge is the global technology community’s hub for information exchange, open source software distribution and services, and goods for geeks all over the world. I’d recommend looking for projects here before anywhere else.

Freshmeat

contains thousands of applications, which are preferably released under an open source license, are meticulously cataloged in the freshmeat database, and links to new applications are added daily. Each entry provides a description of the software, links to download it and to obtain more information, and a history of the project’s releases, so readers can keep up-to-date on the latest developments. Highly Recommended!

Mohawke’s Best of the Best Free and Open Source Software Collection

This list contains hundreds of OSS for Windows, Mac Linux and Internet. Sortable by Title, description, license and type. Great section on games too, if you want to check them out.

Free and Open Source Software Directory (FLOSS/FOSS)

Nice directory of links with categories to match. Good OSS listings on ftp, e-Commerce, Security and CMS. I like this one especially because for the more popular results, they show you screenshots of the interfaces. If you don’t find what you’re looking for however, I’d try sourceforge as the list of their apps is kind of slim.

OSDir

contains thousands of developing open source projects! The directory website includes categorized links for platforms, a full-text search feature, user submission and news updates (requires free account creation) and ranking system for stable applications. Definitely go check this one out if you’re into new and developing projects.

Osalt

I freaking love this site! Apart from having a newsletter and great search features, they are committed to helping users find an open source alternative to their current commercial one. Find open source alternatives to your favorite commercial products. Browse through software categories and compare pros and cons of both commercial products as well as open source software.

Free Software Directory

This website is sponsored by the Free Software Foundation and proves to be a viable resource for all types of open source software and furthering the GNU cause. Please go read up on open source initiatives and check out their software list as well!

I enjoyed writing this article for you! for more like these, go visit my blog at the Web Guru Wannabe.

bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in Blogarooni | 2 Comments »

Friday, July 18th, 2008

How to create a Dynamic Website using PHP, Mac OSX, MAMP and Dreamweaver CS3


After scouring the web looking for tutorials on dreamweaver, I was very disappointed with the lack of content available to beginners on setting up their very own dynamic website in PHP.

PHP is growing and while the business community is devoted to mostly .NET and ASP, they are forgetting to make accommodations for this incredibly versatile programming interface

This tutorial is aimed at beginners who are looking to understand the basics of creating dynamic pages in PHP that talk to a MySQL database using Dreamweaver MX or Later. I have also decided to post the tutorial using Mac OSX, but will be prepared to answer any questions on the Windows platform setups as well. You will need the following software for this tutorial:

  1. Mac OSX 10.4.x Tiger or later
  2. Some type of Web-Server software, complete with PHP and MySQL configurations. I have chosen to use MAMP (For the newer users this stands for Mac, Apache, MySQL and PHP). You may download it here. The setup is relatively easy–if you are a Mac user, we will be building the website from a folder created by the MAMP installation called htdocs. If you are working Windows, I would suggest WAMP (Windows, Apache, MySQL and PHP). Some Linux distributions come equipped with a similar version, called LAMP.
  3. Dreamweaver MX or Later, installed on the host PC or Mac. I will be using screenshots from Dreamweaver CS3, but the application interface hasn’t changed that much since MX


Note: You may click on a picture thumbnail to enlarge it on your web browser

First things first. We’ll install MAMP and set up the website database before we use Dreamweaver to connect to it. Go download MAMP and go through the installation instructions for Mac. Once it’s installed, you’ll be able to access your local root folder from
/Applications/MAMP/htdoc
mamp-app-start.png

just start the application, it will probably want you to login to it with your username and password. Once you are logged in, it will start the MySQL service, the Apache Server and the Zend PHP Engine

click the “Start Servers” button, and then wait for the MAMP Start Page, which looks like this

mamp-start-page.png


Now that we have installed MAMP, the next step is to create the database that will be displaying our dynamic records of data on our website. From the MAMP start page, click phpMyAdmin to go to the administration page for your MySQL databases.
this is what it should look like. php-admin.png
for this exercise, we are going to create a new database user to talk to the database. Other tutorials will explain why it is important NOT to access database records with the default (AKA root) user, but they will be more informative and I encourage you to read up about it. For now, click the “Privileges” link.
On the privileges page, click the add new user link

add-new-user.png

This is the new user screen. Make sure to fill out all the appropriate info like so. The user name is used every time a connection is made (in this case, since we are running a database on our MAMP server, we can use “localhost” which is the name of the internal server that is running our PHP engine as well!).For the password, use “password” and confirm it in the field below.

user-credentials.png

Next, we’ll have to specify permissions for the user and give them the ability to do basic things in the database (i.e. add, delete, update records).Scroll down to the lower half of the new user screen to see a series of checkboxes.

For this exercise, we will cut some corners and just give them all permissions, so click the check all link to grant all permissions to the user

user-permissions.png

then click “go” to create your user.

create-user-final.png
After your new user has been created, you’ll see the web page refresh and show you the result in SQL code. Now you have a new user! Click on the home link (house button on the left) to go back to the main page.
new-user-confirm.png
On the phpMyAdmin homepage, enter in “test” as the name of a new database, then click the create button. As soon as you create a new MySQL database, you will be able to see the name of it followed by a number in parentheses of how many tables are in the particular database. Click on the name of the database on the left to start creating a table. create-new-database.png
Create a new table called “tblCustomer” and add 4 fields to the table. Then click the “Go” button to create the table.
create-tblcustomer.png
Here are the fields I used for this exercise, as well as their specific attributes.
  • custID - INT (type); AUTO-INCREMENT (extra) ;PRIMARY KEY (use the key radio button)
  • fname - VARCHAR(type); 50(length/values)
  • lname - VARCHAR(type); 50(length/values)
  • email - VARCHAR(type); 150(length/values)
tblcustomer-fields.png
After setting the fields’ properties for your table, click the “save” button to continue. After creating the table, you may see a confirmation screen that looks something like this.
tblcustomer-create-success.png
Congratulations! You are ready to start adding records now. To go to the next step, click on tblCustomer hyperlink on the left, to see your table’s structure. Once you can see your table fields, look at the top of the web page to a series of administrative “tabbed” links. We are going to insert a record to the table next, so this means clicking on the “insert” link to go to the next page.
On the record insertion page, you will see two blocks of form fields. We will focus on the set a the top, so fill in some dummy information into all of the fields except for the custID field. The reason we don’t want to add anything to custID is because we set an attribute called “AUTO-INCREMENT” upon creating the fields, which basically keeps the custID counting without our doing anything. For now, just fill in the fname, lname and email fields and then make sure the “ignore” checkbox over the second block of fields is checked, then click go.
fill-out-insert-record-form.png
After creating a record, it will once again show you the SQL command confirmation screen, that looks something like above. If you would like to insert additional records for this exercise, you may have as many as you wish, just repeat the same steps on inserting to do so.
insert-record-confirm.png
For this tutorial, I have added two more records for a total of 3 records in my tblCustomer (See pic to right for sample). Now that we’ve added a few customers to the database, we’re ready to get started in Dreamweaver in building the actual site!
browse-insert-confirm.png

As I mentioned before, I will be working with Dreamweaver CS3. No matter if you’re using the Dreamweaver MX, Dreamweaver 8 or Windows version, the elements should be the same with the panels and options. Go ahead and open the application now.

in order to build a new site in Dreamweaver, click on the site menu on the menu toolbar at the top and select “new site“.
This is the New Site Menu, or as I like to call it, the Site Definition Menu. Make sure the “basic” button or tab is pressed in, because it presents the site definition menu as a wizard or walk-through, for easy setup.
The first screen is asking you to name the site. I have named our site “My PHP Site” for this tutorial, which you may use if you’d like to.
site-def-pt-1.png
The purpose behind naming your site is so Dreamweaver can differentiate between sites. The second field is asking for the URL for our website. Because we are working with a web server that we’ve installed on our own computers, we’ll skip this part, so leave it blank. Click the “next” button to move on to step 2 of the Site Definition Wizard.
In step two, we are asked if we want to use a server technology. We will select PHP and MySQL and click the “next” button.
site-def-pt-2.png
In step 3, titled “Editing files” Dreamweaver would like to know how you intend to publish the files once they are saved to the site. Since we have installed our very own webserver (MAMP), our intention is to work on them entirely on our hard drive, so we will select the first option, “Edit and Test Locally“.
site-def-pt-3.png

Further down this screen, it will ask where on your computer you will want to store your files, give it the following path.

MacintoshHD:Applications:MAMP:htdocs

site-def-pt-3-path.png
This is what is called your document root, and is specific to your local computer. You are basically telling Dreamweaver which folder on your computer to save the files that you work on for this website. For some Mac users, your hard drive may not be called “Macintosh HD” so the correct path can be found by substituting the name of your HD at the beginning of the path, but dreamweaver should detect this anyways. For Windows users who are using WAMP, a similar example might look like this:
c:\wamp\www
After entering in a path correctly, click on the “next” button to continue the site definition wizard.
on the next step, titled “Testing Files”, confirm the url is
http://localhost/
then click “Test URL“.
UPDATED Jan. 24th, 2009:
After several people writing to me with errors at this point, I have discovered a gotcha with MAMP-in order to connect to localhost you will need to append the port number for mamp to the localhost URL, so the updated URL would look like this–
http://localhost:8888/
try the first one, and if it does not work, try the URL with port # and see if you get different results.
site-def-test-url.png
By doing this step, you have confirmed that your computer is thinking like a webserver. Dreamweaver will save the files to your “document root” (that long filepath in the previous step) on your local side. On the other hand, if you were to open up a browser, and type in http://localhost/ it will show the pages that have been saved in the htdocs folder as if it were a web directory. Click on the “OK” button to acknowledge the confirmation, and then click “next” to go to the next step. site-def-url-confirm.png
when the wizard asks you if you would like to copy files to a different machine, select “no” and then click “next“.
site-def-pt-4.png
This is the last step of the wizard, and it basically reads off all of the options you have selected in the wizard, so look it over carefully before continuing, and then click “done“.
site-def-summary.png
When you click the “done” button, you will notice a pop-up menu saying something about updating the site cache.
site-def-done.png
After this menu finishes loading, you will see the files panel in a full screen window, listing your site folder and other website files.
site-folder-preview.png
Next, click on this button, which is found in the upper right hand corner of the panel, to collapse it. min-fullscrn-site-folder.png
We just finished defining the website and are ready to work “hands-on” with our database! After collapsing the files panel, let’s create a PHP page by going to the file menu in Dreamweaver,and then selecting “New
create-new-php.png
On the New Document Menu, select PHP as the page type, layout as none, and then click “create php-new-document.png
When it loads the PHP page and shows you a blank document window, add some header text for presentation. I added “My Dynamic PHP Website“. add-new-content-to-php.png
Next, go to the file menu and select “Save As save-as-php.png
In the save as field, name the page whatever you would like. I have named mine “test.php“. It doesn’t really matter what the name of the page is, just that you save it as a php file, so check to make sure your extension is .php save-php-as-testphp.png
Now that we have a test page ready, and a website that can talk to our MySQL database, we’re ready to get things rolling. If you are totally new to database webs, there are a couple of things that are standard procedure and creating a connection to the database is one of them. Recordsets are another, but we will get to those later. For now, we’ll create a connection, so lets go to the application panel. If you can’t find the panel, you will be able to select it from the window menu in the menu toolbar.
this is what it looks like. There are a few tabs that are part of the application panel, we will be starting on the databases tab to create a connection. If you have defined the website correctly, you’ll notice a set of steps with check-marks next to them–the last step is intentionally left unchecked “Create a Connection”.
apps-panel-db-tab.png
We will create a new one by clicking on the “+” button underneath the databases tab and selecting “MySQL Connection“. apps-panel-db-tab-new-conn.png
In the MySQL connection menu, fill out the following information:
  • Connection Name: connPHP
  • MySQL server: localhost
  • user name: user01
  • password: “password
apps-panel-new-conn-info.png
Next, you will select the name of the database that you are connecting to. You may type it into the field if you happen to know the name of it, but it is easier to just click on the “select” button.
Okay, this is what you should be seeing. Be careful, though–if any part of your testing or server environment was NOT set up correctly, you will get an error message at this step. The most common errors are that there is something wrong with a connection string, or that a MM_Connection or MM_String wasn’t found. Go back through your site definition wizard (Site->Manage Sites->Edit button) and make sure the website folder is configured to htdocs, and make sure your http://localhost/ path will test successfully. apps-panel-new-conn-select-db.png
If you are seeing this menu, select your test database, and click the “test” button to test the connection. Then click on “OK” to close the window. apps-panel-new-conn-test-conn.png
In using Dreamweaver to make dynamic web pages, the process can be summarized in 4 steps:
  • Create a connection to the database (we just did it).
  • Create a Recordset to hold the raw fields of data.
  • Add the dynamic fields of data to the web page.
  • Use Server Behaviors to show, hide or repeat specific data.

after you have successfully connected to the MySQL database, your Applications panel should look like the picture to the right. You are ready to start adding your dynamic data via recordset.

apps-panel-view-conn.png
Next, add a new recordset by selecting the bindings tab on the applications panel. apps-panel-bindings-tab.png
on the bindings tab, click on the “+” button and select “recordset(query) apps-panel-bindings-tab-new-rset.png

On the new recordset menu fill in the fields as follows:

  • Name: rsData
  • connection: connPHP
  • table: tblCustomer
  • columns: all
  • filter: none
  • sort: none

then click “ok” to save the recordset

new-recordset-data.png
after the recordset has been completed, look at the applications panel. On the bindings tab, the recordset shows up as a cylinder, which can be expanded to show the dynamic fields as “lightning bolts”. We’ll use these in a moment to make the data show in our test PHP page. apps-panel-bindings-tab-preview-recordset.png
This is the fun part–select the first dynamic field from your recordset, and in one motion, drag recordset-drag-data-to-page.png
and drop the field under the heading text “My Dynamic PHP Website” on your test.php page. It will not show your data just yet, but will replace the name of the field with something like “rsData.custID” with a turquoise back-color. Don’t worry, it won’t always look this way! recordset-drop-data-on-page.png
add the fname, lname and email fields the same way until your page looks like this. drop-all-dynamic-fields-on-page.png
there is a little button that looks like this on the document toolbar, to the left of a field for title. This is what’s called the “live data” button. Basically, it lets your preview what your web page looks like at application run-time (i.e. database application interacting with your HTML) inside of Dreamweaver. Click on it! click-on-live-data-view-to-preview.png

If things are working correctly, you should be able to see the first 4 fields of the first database record show up on the page, instead of the turquoise placeholder text. If you get an error message, try to turn the “live data” button on and off a few times, and it it still doesn’t work, try the direct approach by typing in

http://localhost/test.php

in your web browser. Assuming MAMP is running, you should see your test page displaying just fine.

preview-first-record-of-live-data.png
Congratulations! You now have a dynamic web page! But this is only one record. If you want to list all the records in the database table customers, you’ve got to create a repeat region server behavior for the fields, as I will show you.
create a new paragraph (press enter after dynamic fields) and place a horizontal line under the live fields of data. This can be done by going to the Insert menu in Dreamweaver CS3, to HTML, to horizontal rule. Another way to do this is to switch to code view and on the line under the fields, type in the text “<hr> add-horizontal-rule-under-live-data.png
After you have added the horizontal line-very carefully, select the dynamic fields and the horizontal line at the same time by dragging over them with your mouse (do NOT select the heading text, as we do NOT want to repeat it!). select-live-data-and-h-rule.png
After selecting the data you’ll want to repeat, go back to the applications panel and click on the server behaviors tab. apps-panel-server-beh-tab.png
on the server behaviors tab, create a new server behavior by clicking on the “+” button and select “repeat region”. apps-panel-serv-beh-new-serv-bah.png
on the repeat region menu, select the rsData recordset from the drop-down list, and select the radio button that says “all records“. We want to repeat the selected region on the page for the remainder of the recordset (or as long as there are still records in the database table). Click Ok. repeat-region-sb-data.png
After the repeat region behavior has been added, you’ll be able to see a gray tabbed box surrounding the region that you want to repeat on your test.php page. repeat-region-sb-preview.png
And now for the finishing touch! Go back and click on the “live data” view button to show not only the first records, but all the records that are showing up in the tblCustomer(Assuming you added more than one record in the previous steps)! If you want to see the dynamic page in action, try opening up the phpAdmin interface as you did earlier and add a few new records to the tblCustomer. Then go back and “refresh” your test page. finished-live-data-view.png
If you want to make it look a little better, try organizing the fields in a table, and try to add a repeat region behavior to the entire row (remember to not include the table header!) and try to play with the design. This was just a simple tutorial on how to get started with PHP, MySQL and Dreamweaver on Mac OSX. In later tutorials, I’ll show you how to work with forms, logins, sessions and secure web pages. If you have any questions or comments, please feel free to leave them and I hope this has helped you! Have lots of fun making dynamic webs!



bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in Tutorials | 8 Comments »

Thursday, July 17th, 2008

What is your “programmed” response?

There is life on mars. Life is but a dream...
There is life on mars. Life is but a dream…

Have you ever been shopping for something and you have to go to the store to get it? It simply amazes me how many people today are actually scared to interact with a real person. Imagine that–having to conduct business with actual human beings–not an automated website or database shopping cart. Don’t get me wrong, I don’t like having to heckle my way down to the “amazon pricetag” whenever I deal with sales people, but come on folks–where did our social conventions run off to?

It makes me think of the last time I went to a video store, looking for a movie to rent. I know what you’re thinking (thank God for NetFlix!); I don’t even know what I was looking for–I just knew I was obstinateley opposed to getting help from a salesperson. I was literally afraid of having to deal with the spill, the pitch, the programmed response of the person whom was probably only trying to help me get out of the store more quickly.

Focus--just--Focus. It can wait.

Focus--just--Focus. It can wait.

It seems that people are less likely to want to do business with actual people–maybe they have had a few bad experiences, or maybe customer satisfaction simply isn’t what it used to be. Nonetheless, it is very easy to respond to the salesman with what I’d call a conditioned or “programmed” response. Simply put, a programmed response is something we give to people that is rehearsed, and often to keep from having to disclose more pertinent information. We give them all the time, we just don’t realize it–”No thanks”…”I’m just Looking”….”I’ll call you later”….”Let’s catch up sometime”…”You’ll have to take that up with so-and-so”…”Let me think about it and call you back”. The list goes on and on.


I used to teach a class in interpersonal communications and one of the topics was “how to talk to customers and vendors”. There is an impregnable wall of programmed responses to deal with in the business world. Third-party vendors of Third-parties, contractors for contractors–who is actually doing the real work here? More importantly, how do we cut through the beauracracy and cut to the “chase”? The answer rests in being sincere, and knowing how to deal with people. These people who give these conditioned responses are people just like you and I. They work, pay taxes, have families and yes, they shop for goods and services. My point is this–until we are able to restore our social graces, learn how to treat our customers and employees as ourselves instead of continually trying to take advantage of them and build more “soft skills” around the charts, things are only going to get worse. Yep. Get ready for more computers taking your orders, more cold shouldered calls and rude salespeople.

Are you a victim of your programmed responses?

Stop it.


bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in Blogarooni | 3 Comments »

Tuesday, June 17th, 2008

Destined for Greatness.

bruce-lee-torso-image.gifSomebody wise once said to me, “The minute you make plans to do something important, be prepared to have them re-arranged by others.” Lennon said, “Life is what happens while you are busy making other plans.” They were too right. I have decided to move on from my current position as an instructor and into where my heart lies, in development. This decision was made in a very short amount of time, though I’m sure it was the right one. How do I know? I can’t explain it. It’s as if I feel so aware of where I’m going–and at the same time unaware of what to expect. All I know is it’s happening–and I’ve got a lot of work to do.

bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in Blogarooni | Comment now »

Friday, May 2nd, 2008

The future of web interface…?

I seems like only yesterday that i sat down on my laptop, opened a web browser, and grokked over rich web interfaces in flash. Gosh it was what every developer coveted! They wanted to show off their skills on rich media objects, futuristic menus and active content with actionscript. Nobody cared if the content was stale, if the product was sleazy or if the sound was annoying–it was lifelike. It seemed almost organic–and so real and so natural.

Apple had post-poned their decision to release flash for the iPhone. And there was much rejoicing. Well, not by the hard core X-Box 360 fans out there who had to have scaled vectors, CAD and teamspeak. Frankly, I’m glad the geeked-up gaming community isn’t getting their way. We were here first. JavaScript was here first. OOP was here first. The web is maturing into rich-desktop clients, open platform apps, and unlimited remote web services. What more could we ask for? Maybe a bottle of single malt scotch–and a plane ticket to wherever this crazy train ride is going. Fasten your seatbelts kids–it’s going to get bumpy.

bookmark bookmark bookmark bookmark

Posted by johnmaster208 | Filed in Blogarooni | Comment now »

Error in my_thread_global_end(): 1 threads didn't exit