Clock In: Top Down Design

One of the major components that made my old site special was my clockin service. What it offered was for me to be able to clockin to any of my projects, this saved a start time. That started a listener (Imagine a machine that waits for something to happen before it does what it does) for any new file being created to see what work I did. Then On clock out, stop the listener and save a stop time.

Pseudo Code

Now Overall here is the Way it works
1) As a User, I choose from a variety of projects or have the ability to start my own
2) I then clock into that project
2a) The start time is saved
2b) A listener to see what work I’ve done is created
3) Once I’m done I clock out
3a) The stop time is saved
3b) The listener is stopped

On top of that other people can go through the various projects and users to see their start and stop times as charts
1) Daily
2) Weekly
3) Monthly

UI

For UI, this is something basic to go off of
UI (2)UI (1)UI

 

FlowChart

For Flow Charting This is what I’m Looking At

UI (3)UI (4)

Objects

User
-ID-Integer (Auto Increment)
-Projects they can edit-Array[ProjectID] (If a project is deleted, this needs to be updated)

Project
-ID-Integer (Auto Increment)
-String-Path/URL/Location to start listener (must be real)

ClockIn
-ID-Integer (Auto Increment)
-User-UserID
-Project-ProjectID
-StartTime-Date
-EndTime-Date

Work
-Id-Integer(Auto Increment)
-Clockin-ClockIn ID (Dependent, if its Clockin is deleted, its deleted)
-Time-Date
-Type-Create, Save, Delete (Research may also be included)

Technology

Now this is all pretty straight forward, lets take a look at what technology we want to use

  1. User-Whatevers convenient, Preferably WordPress considering that’s my cms
  2. Project-Github Github and Github
    -Github is the standard of version control. As a Result, we want people to use good things, the best of things in addition to user our clockin service.
  3. ClockIn
    -This is something I realized is a bit of an issue. I can have hundreds of Clockins which isn’t necessarilly a problem. But what Is a problem is when I lose my data when my server goes down. Or even when I transfer servers like I’m doing now. Though I don’t want to use a third party service I fear I may have to.

    I generally like to use technologies I will most likely use later so…

    So I have 3 choices…

    1. Google Spreadsheets
    2. MongoDB
    3. Google Calander
  4. Work
    -Though My old system was based off of the servers file system, the system I want to create is more likely to be based off of Github. As such I need to be able to grab from github whatever they do. That means pull requests, pushes, etc. I need to tell my people, push often 😉

So…
User-GIthub
Project-Github
Clockin-Google Calander for now (as it is the most reusable technology)
Work-Github

Transfering My Old Stuff

One of the things I’m going to have to do is be able to look at my old project in order to incorperate things I especially liked into WordPress. Among them are my Clock In system, Fractals. Now This isn’t just a two step process since most of my experimental work is on the server (which is bad mkay [your [production site should never be your experimental area {but for every rule there are exceptions}]) as a result I have to do a few things….

  1. Setup a local server
  2. Import all my files into the server
  3. Import my SQL database into the server
  4. Do little things to make sure everything is in proper working condition

Setting Up my Local Server

Setting up a local server can be done in a few ways. As I’m on windows, things become like cake. I’ve also done this on linux, and for what its worth, there is plenty of documentation out there to do it. For my purposes, I like to avoid ISS. The reason for this is I found it previously to have a bad user interface. What I’ve enjoyed in the past is Xampp.

xampp

 

Its a simple Install, It works, and Easily accessible. Theres not much else you can ask for from a service, or anything really.

Now, I don’t want to turn this into a tutorial but more of a general description of my experience. Nonetheless, Due to the nature of this, Its going to be one and I’m aware of that.

Importing All My Files

Now, I already have Filezilla installed because its near the best ftp (file transfer protocol) experience I’ve had. but just for giggles I’ll show you another cute little trick

windows ftp

 

Whenever you have any folder open in windows, you can change the path to be “ftp://your-web-server” and you will have an easy to use method of accessing your webservers files. Now I am using filezilla currently, but I should be using a revision control system such as Mecurial, tortoise or even Github. I’ll definitely say I learned my lesson about version control over the last couple months.

If your going to be installing FileZilla like I’m using, remember to install the client version. The Server is quite literally for servers (I’ll go over that on another topic), its meant to be able to receive FTP calls, not make them. Servers are listeners not talkers.

After you’ve installed, got Xampp and FileZilla installed, We want to do a few things….

  1. Figure out what our hosts ip address is
  2. Create an FTP user so we can access our files
  3. Login

Our Ip address will be localhost.
There are other ways to figure it out like understanding what our ip address is to ourselves. but when it comes down to it, localhost is the clean and simple way.

Creating an FTP user
On the Xampp Panel, you want to click “admin” for the FileZilla Section

admin

From there we open up our admin menu and go to user accounts

fzadminThen we add our user

fzuseraccountsSimple as that

Back to our Filezilla client
filezilla

 

Up top, we want Localhost, Username, Password, Go!
You can also save, but I don’t need to worry about that right now.

From there I connected to my old server, dropped all my stuff in the htdocs folder of my local server, which is located directly under your xampp root.

Import my SQL database into the server

This is a pretty simple process. You’re going to want to go to your original sites SQL admin page. Go to export, save the text file. Then go to your local page go to import and choose the text file.

SQL Export

The File

import

Making Sure Things are working Properly

This changes from system to system. For me This is completely custom and as much as I’d love to show how the system works. More importantly I’d just like to get it overwith. see you tomarrow! 🙂

A ReEntry to WordPress

I build wordpress for clients mostly, but had big plans for my own website. However, after a month of work and a lot of research I’ve come to understand what it really means to… create a content management system. There are many things to keep in mind, access to your database, providing a nice looking interface. Making things simple yet also allowing complete customization. The User Object. Which should be static methods, which should be instance? There is a lot too it, and I finally had decided that getting my website up and running is far more important than spending years on a website that (no offense to websites) is not very high on my priority list.

What I will say though is
1) CMS’ are meant to be easy to install, easy to begin and easy to use
-Wordpress is absolutely adorable compared to what I had been working on so hard for most of my workday.
2) CMS’s data are meant to be transportable
-Now wordpress isn’t necessarilly transportable, however you can definitely export your data as a solid XML file and due to its popularity importable as well
-for my own work, its definitely obvious I won’t be accessing the data quite so soon. Exporting to XML is the easy part, importing is a completely seperate beast
3) If your going to make a user interface make you can use it again
-for me I wanted to use XSL badly, and I still do. But the complexity in automation turned an interesting idea into a beast of its own. I’ll talk about it later when I get back into it. However, the important parts isn’t the XSL but rather the HTML. css and javascript
4) Routing is one if not the most important part of a CMS
-User Permissions are based off what is asked for
-Automation is very very important when dealing with an unknown amount of objects with unknown methods
-These are two things that held me back the most

Now I can’t say I want to use wordpress, but I definitely prefer it currently over slaving away for hours inorder to give myself more hurdles. Having the requirements change, introducing new technology mid project, these are things I’ll have to deal regardless. However, to me, finishing something is far more important than making it perfect.