Posts Tagged ‘Web Design & Development’

Small Business Marketing Strategy - Website Structure

Thursday, July 9th, 2009

You’ll probably be relieved to know that this article is not all about the technical structure of your website. I could go on about that for days on end, but fortunately, structure for you is non-technical and pretty easy to understand. So here goes…

Getting Rid Of The Brochure Mentality
Most small business owners and entrepreneurs build a website without understanding the fundamental reasons for doing so. As such, they create what I call a ‘brochure’ website. You may have done this already. 

Well don’t be upset, it’s a pretty natural thing to do. For some reason we decide to follow the lead of the majority, thinking if everybody is doing it, it must be the right thing to do… WRONG!

So, going against  all conventional wisdom, why do we put up a website? What is the best way to use it?

(more…)

Integrate Google Calendar in your web design

Monday, July 7th, 2008

I’ve been asked by a couple people recently about option for coding a calendar function into their websites. While I do like to earn good money and make a handsome profit I feel that coding for the sake of it is not an option. There are so many services and online systems available these days that you can just plug into, why not just use whats available?

Many an anal retentive will explete ‘but it doesn’t look like my website’ or ‘I don’t want to drive traffic away from my site’. Fair enough, Ar’s (you know who you are).

Here’s a nice solution from Google, master of the internet, soon to be master of the world (when he’s finished photographing it at street level) and finally master of the universe (AKA God!).

You can plug in a Google calendar with but a few clicks of the mouse using my easy to use but pricey content management system!

Voila!

 

ASP.NET Machine Generated Code

Saturday, March 15th, 2008

I just started working with a new client in Port Charlotte. They have had a website built by a company in Tampa and how now parted company with that company, so to speak. So I pick up this system and start to go through the coding and it’s build etc, trying to get up to speed as quickly as possible. But something is not right. It’s a struggle, confusing, big, messy. I don’t know why…

 Well I eventually figure out that this website system, asp.net code, classes and modules, forms, and by golly the database and stored procedures have, for the most part be generated by a …. MACHINE! ARGHHHH.

Yes, thats right, the original developers are working with a software tool that allows them to work in plain english (I guess) with a client to spec out the system. They do their high level analysis etc, enter data into the software, press a button and voila! Here is your website sir!

This doesn’t include the design of the site aesthetically, the way it looks etc, which is actually quite nice…

So, what’s my point. Here it is… A machine generated system (i’m going back to database design days years ago when I used software tools to design databases) tends to be broken down into a very low level. What I mean by that is the mathematics and algorithms that do the analysis and create the design tend to go WAY TOO FAR! This means that you end up with a system that is very complex. It explains one reason why my new client decided to jump ship from the pervious developer. The initial development costs where quite low compared to the cost of ongoing development and support. The original developer ended up in the same position as I did. After producing the system with a software tool, they were left looking at it, pondering its complexity and wondering how it all works exaclty.

Asynchronus Socket Programming

Monday, February 18th, 2008

I’ve recently done some TCP/IP socket programming. The .Net framework provides a some nice features for making asynchronus program calls. One of the most robust is TCP/IP Sockets.

It can be quite confusing at first to understand the way an asynchronous call and callback mechanism works. I find it easier to understand when I look at the flow of the call first. So here is an outline of the flow.

The basic framework of an asynchronus call is:

  1. Declare the socket
  2. Socket.BeginConnect with ConnectCallback address
  3. ConnectCallback.EndConnect
  4. Socket.BeginSend with SendCallback address
  5. SendCallback.EndSend
  6. Socket.BeginRecieve with RecieveCallback address
  7. RecieveCallback.EndRecieve

And these are the actual function prototypes for an asynchronous TCP/IP socket. This is the outline, I’ll post some real code in another post later.

Dim state As New StateObject 

‘ Create a TCP/IP socket.
Dim client As New Socket(AddressFamily.InterNetwork, SocketType.Stream, ProtocolType.Tcp)
‘ Connect to the remote endpoint.
client.BeginConnect(remoteEP, New AsyncCallback(AddressOf ConnectCallback), state)

Private Sub ConnectCallback(ByVal ar As IAsyncResult)
‘ Retrieve the socket from the state object.
Dim state As StateObject = CType(ar.AsyncState, StateObject)

Try
‘ Complete the connection.
state.workSocket.EndConnect(ar)
Catch ex As Exception
End Try
‘now do the send
‘ Begin sending the data to the remote device.
state.workSocket.BeginSend(byteData, 0, byteData.Length, 0, New AsyncCallback(AddressOf SendCallback), state)End Sub ‘ConnectCallback

Private Sub SendCallback(ByVal ar As IAsyncResult)
‘ Retrieve the socket from the state object.
Dim state As StateObject = CType(ar.AsyncState, StateObject)

Try
‘ Complete sending the data to the remote endpoint.
Dim bytesSent As Integer = state.workSocket.EndSend(ar)

Catch ex As Exception
End Try

 ‘now recieve the response
‘ Begin receiving the data from the remote device.
state.workSocket.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0, New AsyncCallback(AddressOf ReceiveCallback), state)
End Sub ‘SendCallback 

Private Sub ReceiveCallback(ByVal ar As IAsyncResult)

‘ Retrieve the state object and the client socket
‘ from the asynchronous state object.

Dim state As StateObject = CType(ar.AsyncState, StateObject)
Dim client As Socket = state.workSocket

‘ Read data from the remote device.
Dim bytesRead As Integer = client.EndReceive(ar)
Try If bytesRead > 0 Then
‘ There might be more data, so store the data received so far.
state.sb.Append(Encoding.ASCII.GetString(state.buffer, 0, bytesRead))
‘ Get the rest of the data.
client.BeginReceive(state.buffer, 0, StateObject.BufferSize, 0, New AsyncCallback(AddressOf ReceiveCallback), state)
Else ‘ All the data has arrived; put it in response.
 
If state.sb.Length > 1 Then response = state.sb.ToString()End If 

 

End IfCatch ex As ExceptionEnd Try
End Sub ‘ReceiveCallback  

I’ll post the state object class and in another post. I found the easiest way to maintain the connection and shut it down was to have the worksocket in the stateobject.

Visual Studio 2008

Saturday, January 26th, 2008

I’ve recently installed Visual Studio 2008 and related software. I was hoping to upgrade and start developing in it as soon as possible.

I’ve generally always been an early adopter, but didn’t move to Visual Studio 2005 until quite late in it’s life cycle. I’ve since decided that was a mistake. It’s far better to be on the curve early than to come in late, or even miss a version and come in a versiion behind. Not a good idea.

Now, I know that Microsoft, God bless them, have had a really hectic schedule with the release of Vista and now Server 2008 and SQL 2008 coming soon. But, for heavens sake, I have a problem with using Visual Studio 2008 in my development environment and it’s a show stopper.

I always develop against a remote Windows server using IIS etc. That is so that I’m effectively running up against an environment that is pretty close to production. I haven’t had any problems with this for the last 4 years.

 I installed Visual Studio 2008 and tried to convert an existing project and VS couldn’t seem to access the development share. I then tried to create a new web application project with the same results.

 I’ve posted a thread on the ASP.NET forum. No replies to that yet…

And I’ve posted a bug report with Microsoft. I know that all environments may be configured slightly differently but if it’s working in Visual Studio 2003 and 2005 I certainly expect it to work in Visual Studio 2008. What a bloody pain!

siteBOSS Website Content Management System

Tuesday, January 15th, 2008

I’m putting the finishing touches to my upgraded Content Managment System. It’s called siteBOSS and is made up of several different components that are designed to help the small business owner and entrepreneur do business online.

I’ve upgraded the core of the system with a new rich text editor from Telerik. This puppy is fabulous! I’ll be releasing some video tutorials soon. It is of course all AJAX enabled, so the user experience is very nice.

The other components in siteBOSS are;

  1. Customer Manager
  2. Newsletter Manager
  3. Portfolio Manager
  4. Keyword Editor
  5. Web Monitor

The portfolio manager went down pretty well at my last mastermind group meeting. I need to write some copy for that soon. I’ve put up a demo site for sales associates to demo the systems capabilities to prospective clients. Take a look, this is one of the ‘templates’ I designed for the layout, plus the color scheme is quite nice too…

Auto Insurance Affiliate Website

Saturday, December 15th, 2007

I’ve just put up an Auto Insurance affiliate website, working with some partners of mine. We’ve decided to see if we can get enough low cost traffic using Google Adwords PPC. We are in the conversion testing phase at the moment. The cost per click for US based Google traffic is rising quite sharply, so we’ll have to see what we end up paying to get a decent amount of traffic and how well the two sites we are testing convert.

There are two urls that we are using;
http://www.cheaperautoinsurancequotes.com
http://www.cheaperautoinsurancerates.com

And the landing pages are at;
http://www.cheaperautoinsurancequotes.com/online/auto-insurance/quotes/cheap-auto-insurance-quotes.aspx
http://www.cheaperautoinsurancequotes.com/online/auto-insurance/quotes/auto-insurance-quotes-online.aspx

http://www.cheaperautoinsurancerates.com/auto-insurance/rates/best-auto-insurance-rates.aspx

http://www.cheaperautoinsurancerates.com/auto-insurance/rates/auto-insurance-rates-online.aspx

We are split testing the landing pages and also the two affiliate site to see which is the best converting.

Parsing Google Maps HTML

Friday, November 30th, 2007

If you cannot afford 10 grand for an enterprise version of the Google Maps API, then you might be stuck having to parse the html form the clunky old maps.google.com website. If that is the case, here’s a snippet of code that seems to work consistently to parse out the lat and lon from the html.

 If HTML.Length > 0 Then
‘we have something back so
‘get important part of string
Dim s1 As String = geo.Substring(geo.IndexOf(“viewport:{center:{”), 200)
Dim intStartPos As Integer = s1.IndexOf(“{lat:”, 0) + 5
Dim intEndPos As Integer = s1.IndexOf(“}”, intStartPos)
Dim intCommaPos As Integer = s1.IndexOf(“,”, intStartPos)

‘now assign the strings to lat/ lon vars
_lat = s1.Substring(intStartPos, intCommaPos - intStartPos)
_lon = s1.Substring(intCommaPos + 5, intEndPos - (intCommaPos + 5))

End If

Google API

Tuesday, November 20th, 2007

Well Google doesn’t like you to use their maps api unless you pay them 10 grand for enterprise use, so we decided to go a slightly different route. The problem was that G blocked the service to our IP address for 24 hours after repeatedly using the service. Thanks G!

 Instead of using the API we used the Google maps online service, passing the address as part of a query string and then parsing the results. Although this is a pain to have to parse the resulting html from the maps.com service, it still works and the results ate consistent, although, be aware, the lat and long results from the API are different than from maps.com!

Here’s how to do it in .NET

‘first we create a request
Dim req As HttpWebRequest = CType(WebRequest.Create(“http://maps.google.com/maps?oi=map&output=js&q=” + paddress), HttpWebRequest)
req.Method =
“POST”
’set the content length of the string being posted
‘create the stream amd write it and close
req.ContentLength = 0
req.ContentType =
“text/xml”
‘now get the response
Dim res As HttpWebResponse = CType(req.GetResponse(), HttpWebResponse)

‘read it into a stream and close
Dim sr As New System.IO.StreamReader(res.GetResponseStream)
PostGEOOut = sr.ReadToEnd

Once you have the resulting html you will need to parse it to get the results. I will post that code soon

 

Geocoding with Google

Saturday, October 20th, 2007

I’ve been working on a project using the Google maps API recently. I’ve been using it to return the latitude and longtitude of an address and then comparing it against a geo-coded file in a database.

The Google maps API is pretty extensive and fairly easy to use. However, there are some things that you need to be aware of. The first thing is that Google does not want you to use the GClientGeocoder object to geo-code large files. If you want to do that, they want you to sign-up for an enterprise version of the geo-coder, and the cost is an astounding $10,000!

More on that in a later post. For now, here’s a map to play with…

As, you can see, it’s pretty easy to insert a map. You need to get an API key from here. Once you have that, you’re pretty much up and running.

I’ll post some more on the API later and show you some AJAX code that returns the latitude and longtitude results back to the server side for processing.

Telerik RadGrid for ASP.NET

Wednesday, September 5th, 2007

I was lucky enough to get a great deal on the RadControls for ASP.NET by Telerik recently.

I’d been looking at their RADEditor offering as a replacement for my Content Management System rich text editor. The editor looks awesome and supports lots of browser versions, whereas my editor only works in Internet Explorer (its quite old now(the editor not IE)).

Anyway, I leaped into the RADGrid and began to put it into a project but stumbled upon a problem where I couldn’t get an event to fire. This has been quite a pain in the butt! I finally worked out the problem a few days ago and wanted to share it here in case anyone has a similar issue.

The RADGrid is fantastic and very powerful. It is in fact, huge in terms of it’s functionality and capabilities. After I’d got the grid loaded with data, I wanted to edit a row and save that data or add a new row. At this point I had a problem where I couldn’t get the some of the grid editor events to fire. Specifically the Update and Cancel events of the edit form.

You can find the full post and responses at the telerik forum.

I had thought it was maybe a ViewState problem, which it turned out to be. Even though I had enabled viewstate in properties I found I had to explicitly enable viewstate in the asp.net tags of each form, usercontrol and control that was in the loaded control hierarchy.

It works like a charm and I’m very happy with the results. I’ve only just scratched the surface and I’m looking forward to developing more solutions with this control.

Essential Objects - Treeview

Tuesday, August 21st, 2007

I’ve just finished a web project that I used the Essential Objects TreeView control.

I had thought initially that it would be relatively easy to configure. I’ve used a number of Essential Objects controls before and always found them fairly intuitive to use.

However, the TreeView was anything but intuitive. At the designer level it looks pretty straightforward. Just like the Tabstrip I thought. And initially all seemed well. But I had a real problem making sense of the data binding. Of course, its data driven so that would be a problem.

I thought I’d got it sorted out fairly early on, and then I realized that the data binding of each node was not what I expected.

The programming examples for the Treeview are, unfortunately non-existent on the essential objects website. Instead, they refer you to the menu control examples. This was pretty frustrating, as I was on a tight deadline and just wanted a Treeview example, nice and straight forward like. Please feel free to post this if you want.

So, this is how I bound the Treeview and got the correct itemID’s established.

Private Sub tvCookClass_ItemDataBound(ByVal sender As Object, ByVal e As EO.Web.NavigationItemEventArgs) Handles tvCookClass.ItemDataBoundTry
’set the itemid based on the dataset array index
e.NavigationItem.ItemID = CType(e.NavigationItem.DataItem, DataRow).ItemArray(0).ToString
If e.NavigationItem.Level.Equals(1) Then
‘this is the student level data
‘position 4 is the class data for each payment
e.NavigationItem.Value = CType(e.NavigationItem.DataItem, DataRow).ItemArray(4).ToString
End If
Catch ex As Exception
End Try
End Sub 

One really neat feature is the customItem control. This allowed me to quite easily embed an editor feature inside the Treeview. This was a relief after the problems I had binding the thing in the first place.

This is what the maintenance list looks like;
cookschool1.gif

This is what the editor looks like. You just click on the row to display the editor.
cookschool2.gif

So eventually I got a pretty neat solution using this control. It will require some work to get the thing looking a little better. I might even look at changing the editor so it goes below the selected node, rather than right next to / over it. But it’s nice to be able to update or edit the data with a couple of mouse clicks, without posting to a different form.

I would definitely use it for other projects. I didn’t have time to put it into an AJAX wrapper but next update I’ll try that too.

Visual Studio 2005 Upgrade

Sunday, August 12th, 2007

When I first installed VS 2005 I did so with a version prior to SP1. This created a problem for me when I tried to upgrade a project from VS2003 to VS2005.

I didn’t know that Microsoft had created a new “website” project template, which had replaced the 2003 web application.

The first point to note here is that there must have been hundreds of thousands of web applications already in existence and no doubt many thousands of developers waiting for the new release and eager to upgrade. It must have been very disappointing; well actually, very frustrating to try and upgrade and find out that your good old reliable web application was superseded by a “website” project.

This is one of the things that really annoys me about Microsoft. They are so eager to make the tools available to anyone with half a brain and an inkling that they might be able to program or develop systems. What they end up doing is trying to hide any levels of complexity to make the tools easier to use. This is not always a bad thing, hell, I don’t want to go too low level, I’m not that smart! But, they created a new website project template, trying to make the tool easier to use and at the same time, seem to have thrown the old web application model away?

Anyway, the web application model was provided by a plug-in (snicker) and in VS2005 SP1 it’s actually a template.

So, after an initial attempt and then looking at the ensuing mess (web application upgraded to website project; believe me, that isn’t a pretty sight!), I was able to upgrade fairly well after installing VS 2005 SP1.

I really had few problems after that. Quite a few warnings about obsolete syntax errors, which I updated in short order.

One interesting problem that did arise was trying to debug the project after conversion. I obviously changed the web server settings to use .NET 2.0 instead of 1.1. I then couldn’t debug the project until I had setup a separate application pool for the wp3.exe process. It seems you can’t run the old .NET 1.1 and .NET 2.0 processes side by side in the same application pool.

So I’ve been developing a new system in VS 2005 and have immediately found the new master page addition to be extremely useful. I’ll explain that in a future post.

Bulletin Boards / Membership Site Systems

Wednesday, July 18th, 2007

I’ve been looking at some bulletin board systems recently. I want something that I can easily integrate into existing sites and new sites that I’m putting up.

I looked at phpBB which has been around for a while and seems to be well liked. It’s also free, which is nice… I was toying with the idea of that and then looked at vBulletin, which is another that is highly regarded, Mark Joyner uses it so it’s good enough for me! It costs $180 for a site license, so it’s not too bad price wise…

Both of these are PHP systems with mySQL on the backend. Then I looked as some ASP systems. Web Wiz Forums looks pretty good and megaBBS gets a lot of good reviews too.

There’s also a Wordpress plugin called bbPress that looks OK. Seems like it might be in fairly early stage of development though.

Anyway, I’ve got a number of systems running PHP on Windows 2003 with mySQL on the backend. No problems there, but PHP isn’t a language that I develop in, so I’m really looking for ASP or ASP.NET.

If you have any recommendations or experience of these products, or others that you know of, please let me know…

Thanks
Steve

Oh, look what I found here at Wikipedia  for ASP Forums and PHP Forums and this is a review site I was looking at earlier.

The Joys Of XML

Tuesday, June 5th, 2007

I’m currently working on a project that requires posting and reading response online using XML. I’m not talking about web services here, it’s a plain old POST of an XML file, response is returned as copious amounts of XML, read that and build a web form based on the contents (yawn), have website user make selections and POST that back as plain old XML, get another response back as, yep you guessed correctly, XML and read that, make a decision based on the contents and voila, we’re done.

 I’m a little bit surprised that the company that runs this service, the bowels of which I am groping around in, has not developed a SOAP API or Web Services API that can be programmed against without the raw manipulation of XML (i.e. text) data. I’ve used the Amazon, PayPal and EBay API’s and while there is a hefty learning curve it is far more intuitive, in my humble opinion, to code against an API than against raw XML.

Whenever I start having to parse text files, I don’t care if we have XSD files and a schema, yada yada ya, I feel like I’m using old technology that is cumbersome, although it does the job, right. I know that the legacy of XML and the use of text goes back a long way, when it was far more difficult, time consuming etc to open up a port and configure a firewall, so passing text through was an easy solution.

I can only guess that this company has so much legacy code and systems that the move to a SOAP API and web services infrustructure is still in the pipeline. Just as there are still tons of companies that still use EDI right?

Web Money Magnets

Wednesday, April 11th, 2007

I’ve developed a system that plugs into my sites to provide adsense revenue. The system forms part of my overall strategy for Web Money Magnets, which I will be releasing later this year (if I ever get the time due to my hectic workload).

The system is, as always, brain dead simple to use and will allow my customers to take pretty much any document, convert it with an easy-to-use tool and voila! You have (n) pages with a couple of adsense blocks and search built in! I’ve already had some good results and a pretty high click through rate on the ads, and I haven’t even really got it setup for testing yet as I’ve been so busy.

Here are a few examples though, so you can get the idea;

900 Pound Gorilla
Bum Marketing Method
How To Get Top Rankings in Goooooogle
Flipping Content For Profits

I could slap content up all day long and build an adsense empire! Now there’s an idea! Wehey!