Friday, November 9, 2007
CSS studies going well
When it became pretty, I went ahead and created some java script for it as well. The old page would show a date and time of when it was last displayed in the browser. It is important to the functionality of the page. But now I have a js file that will help show how old the page is. I am not calculating hours/days etc, because after an hour the page is useless anyway and the contents need to be refreshed.
Here is the code from the js file.
// elapsed time calculator. Calculates the elapsed time in minutes.
// note that in js, a declaration with var is for a local, no var is global. in this case starttime is global.
function startTimer() {
starttime = new Date();
}
function updateAge() {
var now = new Date();
var elapsedtime = Math.abs(Math.round((starttime-now)/60000))
document.getElementById("elapsedtime").firstChild.nodeValue = elapsedtime;
}
In the generated html, I included the js in the section like this
<script language="JavaScript" src="elapsedtimecalculator.js"></script>
Then I modified the <body> tag to
<body onload="startTimer(); setInterval('updateAge()', 1000 )">
At the position where the updated time should show, I created a span element as a place holder for the updateAge function to refresh every minute. Like so:
<div id="ageofpage">Updated <span id="elapsedtime">0</span> minutes ago. </div>
That's not bad for a start. I will continue to read the CSS book, then brush up on some JS, then dive into PHP. I noticed that google pages are using strict html and not transitional. I will use strict too.
Tuesday, November 6, 2007
Next steps. Learning the infrastructure.
So far, figured out that I there is transitional and strict xhtml. I will try to use Strict (and validate it that way with a validator) but then specify the pages to be transitional xhtml.
I have learned that CSS has a selector, declaration and values if memory serves me right. I am trying to read two books at the same time.
Friday, November 2, 2007
Should I even try the temporary file storage website?
Of course, Google is not the only competition out there. Every month Google is buying companies who they could not compete against. I am scaling down my business to see if I can figure out how to use php successfully. I will still continue to use this business concept as the basis for my learning.
Some of the Google products I like are Trends and iGoogle (especially the feeling lucky part of "add new tab")
Thursday, November 1, 2007
Follow your heart says Steve Jobs. Everything else is secondary.
He shows why getting fired from apple was one of the best things that happened to him. This led to the most creative period of his life when he met his wife, started pixar, and started NeXT. Apple later bought Next, bringing him back to apple. He says don't settle - keep looking.
He also talks about living each day as though it was his last day. He says follow your heart and intuition.
"Stay hungry, stay foolish."
Monday, October 29, 2007
Starting with minimal functionality and html
Later on I will add CSS and more HTML to make the site look neat. I still have not signed up with blue host. I have my own little webserver on which I can try out the basics. I tried to check out the free ad-free hosting at x10hosting. But there are too many ads whenever I try to do anything. And as soon as I install a simple CMS with fantastico, there is not enough space or memory for it to run. What a rip off!
Wednesday, October 24, 2007
Starting to learn php
Now that I have a handle on what kind of web hosting service to use, and a rough idea of the page flow, I need to figure out how to code it. While stumbling I ran into an attractive form builder called MachForm. I am not sure if I will use that. It allows you to pretty quickly build forms and store info in mysql.
From there I found that they use shareit to manage their payments. I will probably use pay pal initially if needed and later switch to credit cards if the volume demands it. I also found that the bbpress software they use is amazing in the cleanliness of its interface. I downloaded bbpress and checked out the php code.
Essentially this is what I have concluded. Most web pages are just html. The PHP tags in the html can be used to generate html dynamically. The php program can be independently complete.
Tuesday, October 23, 2007
How the temporary storage web site will work
For the sake of convenience let’s call my future website amujo.com. Amujo does not mean anything. It is just a name I have chosen for convenience.
Many web hosts provide the facility to have unlimited sub-domains on my domain. This prompted me to initially consider dynamically creating a sub-domain for each user who registers. So if the user fcr logged in and uploaded files, they would go to fcr.amujo.com. His family and friends could navigate to fcr.amujo.com and simply download the files. I later found that on Linux based web hosts, it is not possible to programmatically create a sub-domain. It is possible on Windows based web hosts, ironically. I would have to go through control panel. Obviously, I will be unable to do this for all users who login to my site.
In a way that saved me some time. I don’t have to worry about getting that working now at least. So basically if there is a public_html folder, I suppose each user’s files will be stored in www.amujo.com/public_html/storage/username. The storage directory will be aliased as upload.amujo.com as well as download.amujo.com. In order to upload files, the user will have to be registered and logged in. Once logged in, the user will be able to see
My upload history
Upload files now
Upgrade to premium account
etc.
Upon selecting the “Upload files now” option the user will be taken to a file upload page. Here the user will be asked to click on browse buttons to select files to upload. I think that I should have a file uploader program that will take care of uploading the files in the background. That leads me to ask, why doesn’t Firefox come up with a standards based background uploader that includes the ability to resume broken uploads?
Once the user has uploaded his files to his slice of my website, he can get a link to send to his friends. He can also get this link from his upload history in case he loses it. I am debating whether amujo will send email because of the limit my web host might have. On the one hand, it is a simple matter for the user to copy and paste a url to send an email. On the other hand, it is far more convenient to receive an email which he can simply forward. I guess I will go with the email option and see how it turns out.
Anyway, when the family gets the email, they will just click on the link that says download.amujo.com/username/file1. This begs the question, what if multiple files were uploaded. I could have the email have multiple links to file1, file2, file3 etc. Or I could have the link in the email be download.amujo.com/username/IALDJ33-AVJAER039, a key that will display only the files that were uploaded with one submit session.
What if the user who uploaded is a premium service member and wants his files organized in folders? This means I have to provide the ability to manage uploaded files in an explorer like interface (only for premium users, I would imagine, although I need to see if everyone should have this ability).
And if this premium user wants to distribute a specific subset of his files, then should the downloader be allowed to view and download all his files? Obviously that should not be allowed. So the interface should allow the uploading user to drag and drop a bunch of files into a sharing bucket. This bucket will provide visibility to the files in this bucket only. This bucket is what will be sent to the family and friends. When they click on their link they will see the bucket called “Google acquisition presentation” or “Trick or treat photos” with only the files that belong to that buck.
This bucket feature need not be restricted to premium users. All users should be able to create buckets of files, the link to which is what they will send to their friends. The downloader can then have access to the bucket he needs to access. Access to view the contents of the bucket will be via the complicated key in the link. I am yet to consider if the downloader needs to be a logged-in member. The advantage of having the downloader log in is that the uploader can choose who will see the contents of his shared bucket. Perhaps it can be a combination. You could either have the key in the link, or be authorized to view the bucket.