Posted January 7th, 2011 by John
To much of the delight of numerous small to medium sized event planners and coordinators, we have recently released a new version of our web-based Conference and Event Registration System, RegEvent. RegEvent™ provides a simple, secure and affordable solution to reduce the workload and time investment to accept event registrations alongside a customizable reporting suite for analysis and tracking.
Our opinion that each conference and event is unique has led to the development of this software. Many competitors out there use templates that just can't and don't always work. So, with RegEvent, you get a completely customizable software solutions. From altering entire registration forms to customizing the charts and graphs displaying your event or conference data. You can customize it. We found customizing reports is essential for event planners and coordinators to view the data they want in the form they want it in. We will work with you to make your event or conference a success this time and for years to come! To find out more information, visit RegEvent.
Tags: regevent
Posted December 7th, 2010 by John
This Christmas season I am happy to announce that a colleague and I are volunteering our services to assist 3 parishes/churches in Hastings County re-design their outdated website with a cleaner more modern website. The new site architecture will provide visitors to the website with great usability while maintaining a simplistic backend system for our client to update the site. We are looking forward to working alongside the 3 parishes and know this project will be a huge success for their communities!
Posted December 2nd, 2010 by John
I have found that ExtJS is very useful in many of my web application projects, so I thought about posting some samples relating to overcoming specific obstacles that I have successfully overcome. The first problem I encountered pertained to the rigidity of declaring a GridPanel’s column model. For this instance I needed the column model to vary depending on what was returned from the database to the store through Json. So if I wanted to declare a column model for the Grid, I would need numerous Grids for essentially the same functionality.
But, I discovered a way to overcome this by taking advantage of the Store’s metachange listener. The example code below shows how I extended the GridPanel class to achieve this:
DynamicGrid = Ext.extend(Ext.grid.GridPanel, {
storeUrl: '',
enableColumnHide:true,
initComponent: function(){
var store = new Ext.data.Store({
url: this.storeUrl,
reader: new Ext.data.JsonReader(),
autoLoad: true,
scope: this,
listeners: {
scope: this,
metachange: function(store, meta) {
if(typeof(store.reader.jsonData.columns) === 'object') {
var columns = [];
/**
* Adding RowNumberer or setting selection model as CheckboxSelectionModel
* We need to add them before other columns to display first
*/
if(this.rowNumberer) { columns.push(new Ext.grid.RowNumberer()); }
if(this.checkboxSelModel) { columns.push(new Ext.grid.CheckboxSelectionModel()); } Ext.each(store.reader.jsonData.columns, function(column){
columns.push(column);
}); // Set column model configuration this.getColumnModel().setConfig(columns); this.reconfigure(store, this.getColumnModel());
}
}
}
});
var config = {
title: 'Dynamic Columns',
viewConfig:{
emptyText:'No rows to display'
},
loadMask: true,
border: false,
stripeRows: true,
store: store,
columns: [],
]
}
Ext.apply(this, config); Ext.apply(this.initialConfig, config); DynamicGrid.superclass.initComponent.apply(this, arguments);
},
onRender: function(ct, position){
this.colModel.defaultSortable = true; DynamicGrid.superclass.onRender.call(this, ct, position);
}
});
Ext.reg('dynamicgrid', DynamicGrid);
And now the JSON that is returned should follow this structure:
{
'metaData': {
'totalProperty': 'total',
'root': 'records',
'id': 'id',
'fields': [
{
'name': 'id',
'type': 'int'
},
{
'name': 'firstname',
'type': 'string'
},
{
'name': 'lastname',
'type': 'string'
}
]
},
'success': true,
'total': 2,
'records': [
{
'id': '1',
'firstname': 'Jane',
'lastname': 'Doe'
},
{
'id': '2',
'firstname': 'John',
'lastname': 'Doe'
}
],
'columns': [
{
'header': 'ID',
'dataIndex': 'id'
},
{
'header': 'Firstname',
'dataIndex': 'firstname'
},
{
'header': 'Lastname',
'dataIndex': 'lastname'
}
]
}
Tags: extjs, grids
Posted June 6th, 2010 by John
MySQL has a relatively new feature very similar to a crontab job (Unix/Linux) or task scheduler (Windows) for scheduling and executing tasks. Ever since the release of MySQL version 5.1.6 MySQL “Events” or “temporal triggers” have been included. So what are they? Well you can now say: "I want the MySQL server to execute this SQL statement every day at 8:30am, until the end of the year" or anything similar that involves any number of SQL statements, and a schedule. How great is that.
Here's a simple example:
CREATE EVENT
e /* Event name */
ON SCHEDULE
EVERY 1 WEEK /* Interval */
DO
INSERT INTO t VALUES (0); /* SQL statement */
The MySQL event scheduler is a thread that runs in the background looking for events to execute. It spends a lot of time sleeping — and won't do anything unless the new global variable "event_scheduler" is set to ON (1). So if you want to take advantage of this feature, do the following:
SET GLOBAL event_scheduler = 1;
To turn the feature off, do:
SET GLOBAL event_scheduler = 0;
I find MySQL Events extremely useful for creating and maintaining 'cache' tables with data integrity for very specific time intervals. This technique avoids having to query the large log tables to find data state at a specific time and date.
For instance, let's say you are administering a forum database and your client, the forum owner, has informed you that they want to begin monitoring a specific attribute of their forum and they have provided you with 3 monitoring time intervals; initialDate, midDate, finalDate. At these date and time intervals they want to know how many registered users last post date was on that day. Well, you could always query against the large 'post' table, however this forum is too large, and that query will bring the database to a crawl. So, a great option is to create a new table and use MySQL Events. You will need to create an 'event' with each date that will run the same query. Very easy.
Now, your client wants to further analyze their forum and has asked to be able to choose dates at their own will. Most solutions to the initial problem would entail your involvement each time your client wants to add a new date in this second problem. Well, by using Events and php, if you create an html form for your client to choose the group of dates and then utilize php and MySQL's integration, your form can create events on the fly for your client, satisfying their needs. Very easy again.
Tags: events, mysql
Posted March 16th, 2010 by John
So you are looking for a simple way to log a history of changes to a table. There is a common practice for that, and it involves creating a logging function in your source code (maybe php) that will require you to connect to the database, and then write the values into the log table. However, I prefer using MySQL triggers for logging table changes for efficiency and simplicity.
CREATE TABLE data (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
timestamp TIMESTAMP,
data1 VARCHAR(255) NOT NULL,
data2 DECIMAL(5,2) NOT NULL
);
CREATE TABLE data_log (
action ENUM('insert','update','delete'),
id INT UNSIGNED NOT NULL INDEX,
timestamp TIMESTAMP,
data1 VARCHAR(255) NOT NULL,
data2 DECIMAL(5,2) NOT NULL
);
The data table contains all the information pertaining to the current data values. When an action occurs (such as an insert, update, or delete) to that table we want it logged to the log table, data_log.
You will notice 2 differences between the tables.
- The id field has the nonunique index rather than being a primary key. This allows multiple rows per id value as primary keys are required to be unique values.
- It contains an action field to indicate which type of MySQL statement was executed.
To ensure that changes to the data table are logged to the data_log table, we need to create a set of triggers. The triggers need to adhere to the following rules:
-
For inserts, log an insert operation showing the values in the new row.
- For updates, log an update operation showing the new values in the updated row.
- For deletes, log a removal operation showing the values in the deleted row.
For this example we will specify AFTER triggers because we only want the log table to track successful changes to the data table (BEFORE triggers will activate even if row-change operation fails).
CREATE TRIGGER ai_data AFTER INSERT ON data
FOR EACH ROW
BEGIN
INSERT INTO data_log (action,id,timestamp,data1,data2)
VALUES('insert',NEW.id,NOW(),NEW.data1,NEW.data2);
END;
CREATE TRIGGER au_data AFTER INSERT ON data
FOR EACH ROW
BEGIN
INSERT INTO data_log (action,id,timestamp,data1,data2)
VALUES('update,NEW.id,NOW(),NEW.data1,NEW.data2);
END;
CREATE TRIGGER ad_data AFTER INSERT ON data
FOR EACH ROW
BEGIN
INSERT INTO data_log (action,id,timestamp,data1,data2)
VALUES('delete',OLD.id,NOW(),OLD.data1,OLD.data2);
END;
NOTE: If you are performing this via phpMyAdmin the you will need to modify the above trigger creation code. The reason being that the semicolon causes an issue as it is usually defaulted to the Delimiter. Therefore, change 'END;' to 'END$$' for each trigger, and you will need to also change the Delimiter of phpMyAdmin to '$$'. The Delimiter field in phpMyAdmin will be located just below the SQL box in the browser.
Tags: mysql, triggers
Posted June 8th, 2008 by John
When SEO was in its infancy, on-page factors such as keyword density and meta tags were the end all and be all of ranking. However, once search engines overcame that hurdle they focused on incoming links, well at least Google did and everybody else soon followed. Now all it took was buying links from any website as the engines had not realized about weighting links yet. So with a fist full of money you could buy all the links required to place at the top.
But recently, buying links to obtain better search engine placement has been frowned upon and even forbidden. Why would seach engines frown upon purchased incoming links to a website you may ask? Well, it’s because purchased links unnaturally affect their organic listings. But are purchased links that bad? I tend to say they are not for everybody.
Google and other search engines have even taken preventive measures aginst purchased links. Rumour is they have been manually graphing paid link networks and devaluing link sellers by not allowing those links to pass Pagerank. However, when buying a link it’s always beneficial to examine the traffic that comes along with the link. It is almost always worthwhile to buy a link from a web page that is relevant to what your website is about.
On that note, one of the most immediate risks to buying links is your competitors. They are looking at what you are doing too and may report your purchased links to search engines. So my recommendation is to examine the link you are interested in, looking at value of site, reputation of site, ranking of site, domain tld and make sure to diversify your link portfolio. Paid links are huge business and it’s only going to grow. So don’t limit your link building efforts because paid links may be an important part of your niche.
Posted June 2nd, 2008 by John
I just read a great article detailing how classic SEO is dead. Personally I agree and disagree with the statement. Classic SEO, involving on-page factors, crawling, as well as link campaigns are still highly relevant in search rankings, however they are not the end all and be all anymore. Search engines have integrated image search, news search, video search and even local listings in the SERPs. A good example is Yahoo Glue (http://in.search.yahoo.com/). Try it out and see what the SERPs look like. Are the results more useful or relevant that a page of links? Maybe.
However classic SEO is never going to be dead. SEO tactics are used to rank a website at the top of the SERPS. When would a client not want that to happen?
Why do I agree with the statement that SEO is dead. First off, local listings don’t necessarily require crawling. These listings can and sometimes are taken directly from local directories, and videos from sites like Youtube rank without being crawled in the old sense of crawling. The new web and ranking systems have pushed much trust on to end users with tagging, ratings, and bookmarking.
So, I believe that SEO is still alive and kicking for assisting in ranking sites in SERPs, however, there are many means to rank sites/pages without using classic SEO tactics, especially in high traffic social websites. Now as SEOs we must provide our clients with new and innovative strategies to overcome the end user’s change in behaviour.