Showing posts with label Google. Show all posts
Showing posts with label Google. Show all posts

Saturday, 28 March 2009

Google SiteMap Generator + Input validation failed Error

Since Google release their Google Site Map Generator I have been using it on my web server for the sites that I manage. Setting it up and getting it running was fine and I haven't had a problem, that was until this week.


This week I noticed that as I was only letting the generator update the sitemap from actual URL hits quite often a few of my sites aren't hit for a day at a time which was resulting in empty sitemaps. This then causes Google WebMaster Tools to whinge at you which isn't a good thing. So I decided to update my settings to include parsing my IIS Log Files in the hope it would use previous days ones and not generate blank files.


This is where I hit a road block. When ever I changed a setting and clicked save the generator would be really useful and tell me that "Input Validation Failed" and to basically sort myself out. I was confused to say the least as everything was fine, no field was highlighted as being erroneous so I ended up giving up and leaving it.


Today I came back to it and tried again but the same error occurred. So I started to poke around and decided to manually update the sitesetttings xml file, usually located: C:\Program Files (x86)\Google\Google Sitemap Generator\sitesettings.xml. And this is when I noticed the issue that was affecting me.


Each site within your IIS setup has a node in the sitesettings xml file, here it has information about it's host name, whether it's setup for sitemaps etc. But it also contains the location of the IIS log files regardless of whether you are parsing them or not.


Now a few weeks ago I decided to move all my sites log files from the default location of C:\WINDOWS\system32\LogFiles\{site} to a more convenient location, for this example lets say E:\LogFiles\{site}, now this was all well and good for IIS etc but upon creation of sites the Google SiteMap Generator is logging these locations. So when I had moved the log files the generator was still looking at the old location, a bit of guessing / how I would do it lead me to believe that upon saying parse log files for sitemaps the generator checks to see if it can read the log files, but as they have moved it cant find them and errors.


Now all I did to fix this was manually do a find and replace on the log file locations within sitesettings.xml saved the file and restarted the generator to find it was finally happy and working OK. Hopefully Google in the next release of this generator will remove this issue / make it clearer what is wrong. Ideally upon startup or even when you choose to use log file parsing it should look at IIS to see if the path to the log files is the same as it has, if not update it before it validates. This would save heartache for a few people at least.


So I'm now happy again with the generator, the problem wasn't that hard to fix and upon spotting it made alot of sense, it just shows what a little bit of investigating can do.

Tuesday, 16 September 2008

Welcome to Google Developer Day 2008

OK, I'm here, I have my shiny Google pass and a coffee I'm ready ;)


It all looks preety good so far, we strangly have a small wrapped up box which is for a session later.. I want to open it now but much like Christmas I'm thinking it may spoil it, apart from that upon arrival we are being showered in free coffee and pastries, if only I could eat the pastries I wouldn't be hungry, very good none the least.


Wembley Stadium is gorgeuos, it may have been over time and budget but it is beautiful, a nice venue to hold such an event in. I'll try to put some pictures online of the stadium later.


I have taken a few quick shots so far and will upload them to Flickr shortly, sadly I forgot my SLR and then Chris Alcock's small camera so alas it's LG "Viewty" quality only, I'll post later with more thoughts and ramblings about the day, given last night's performance though I'm thinking I need to scout out power sources soon!

Update
Google's WiFi has fallen over already and there's only 50 people here, I've switched to my 3G connection, it may be more reliable, although it will suck my battery quicker! Doh!

Pictures so Far

Sunday, 14 September 2008

Google Developer Day 2008 London

Tuesday is the UK's Google Developer Day, this year its taking place at Wembley Stadium and I'm lucky enough to be attending


I have to say I'm quite looking forward to it, a chance to get see Google Speakers and to catch up with other developers that utilise the Google API's will be awesome.


So far I have used the Google Calendar API and started to write a .Net wrapper for the YouTube API, so learning about others will be good. The sessions I have pencilled in to attend so far are: State of AJAX: Dion Almaer, YouTube API: Build YOUR YouTube: Jean Laurent Wotton, Mashing up Google Data APIs: Ryan Boyd and probably but not fully sure V8 - the Chrome engine Kevin Millikin.

As you can see it's going to be a jam packed day, but the sessions look top and I look forward to sharing and learning.


Due to travelling I'm heading down Monday night, and coming back on Tuesday Evening. If you are in London on Monday night, and fancy catching a pre dev day pint or even food, drop me a DM on twitter (mjjames)


After the day I plan on doing a summary writeup on here and hopefully sharing some cool info

Tuesday, 2 September 2008

Going Chrome

So today Google Launched Google Chrome, and like any good geek I got on it straight away.


Installation was quick and painless, and it fired up blistering quick. It was then the magic started. Now I won't focus on how nice the interface is to use, the new home page, etc I want to concentrate on the features I have used tonight whilst using it and whilst coding.


HTML & CSS Features

The first thing I did whilst playing was to view some page source, this as you would expect is on the context menu, nothing overly special here, however I did like the nice syntax highlighting, +1 to Google. However it doens't do any sort of nice reformat document, this would have been a really nice feature but we can't have it all.

Whilst looking for View Source I discovered that Chrome has a DOM Inspector built in, I got to it by "inspecting an element". This is far more than the DOM Inspector that you can get for FireFox, it gives you a nice DOM view, style information (computed, inherited, etc), Metrics, which shows the Box Model being applied to the element, and finally a properties tab giving you anything being applied to an element.


Next there's a funky search box, this allows you to search the DOM for anything, how many times have you needed to find the image with a class and you aren't sure where it renders? Now you could use inspect element, but if you are already in the inspector simply type "img" into the search box to find it lists all of the image tags within the document, now if it was really ace you could type image + class="photo" but this is not the case yet...


Resources and Debugging

All of that was only under the Elements section, there's another section... Resources This is similar to the net view tab in FireBug, it shows all of the "resources" requested by the page and shows them on a nice graph, showing how long they took to load and where in the process or you can compare the file sizes.
By clicking on the file the graph turns into a preview of the file, be it the image, JavaScript file etc.


I was slightly disapointed when I opened a JavaScript file to preview, I was expecting to be able to set breakpoints and watch's but alas no :( However there is a JavaScript Console, this is located at the bottom of the screen, the 2nd button from the left, this pops up the console.


Now this is really good, it has intelisense ;) So if you start typing document.getElementByID for example all you need to do is: do [tab].get[tab] and choose by ID. If you cant remember the name, for example getElementsByName you can just keep pressing [tab]

Now at the moment it only seems to do DOM but I'm hoping it may eventually pick up references and then you can do funky jQuery or something within the console...


Now there is soo much more I could talk about, however the final feature I used tonight was the JavaScript debugger, this is under Developer > Debug Javascript or you can use the keyboard shortcut.

Now I expected more than this, but maybe It does do more than I currently know, if you type help within the console you can see what you can do. You can attach breakpoints using the console, print variables, see what scripts are loaded, etc.


When attached to a tab the debugger will catch any errors and you can print out any variables that you need to inspect before typing continue to continue.

For me I still prefer firebug for JS debugging but I'm sure this will evolve further over time.


So that's it for tonight, I am loving Chrome, it's fast, it's slick but... there are still some bugs and glitches to iron out. For example I have seen quite a few pages where font-size is being inherited wrong within li's, so if I had 90% font size by the 5th li the text was unreadable :( There have been some other weird text issues but nothing that major.
I'm not going to make Chrome my default browser yet... but I'm not far off ;)

Tuesday, 27 May 2008

JavaScript Library and File Loader

OK so tonight I was going to blog about adding paging to a repeater using Linq, however Google today announced that they are now hosting JS Libraries and I couldnt resist whipping together a webcontrol for use in my projects. So I have postponed that post until tomorrow or later on in the week.

JSLoader 2.0

A few months ago I released a fairly basic webcontrol that you could use to import JavaScript files into your .Net pages, it had fairly configurable options and ensured that the file was only loaded once. This worked great, but at the time I thought wouldn't it be great to load JS Libraries from a shared location. At the time the libraries were all over the place and I couldn't decide on the best way to load the files so shelved the project. Today Google announced they are now hosting AJAX libraries, I immediately thought back to upgrading the JSLoader and tonight after a few bits and pieces I fired up Visual Studio 2008 and hacked together JSLoader 2.0

Using JSLoader 2.0

The basic principles remain the same as JSLoader. You reference the control and then create a new webcontrol when you want to load some JavaScript. The difference now is you can use the old way of specifying a directory, file, version type etc, see my JSLoader post on using the old technique, but you can now load up Libraries from Google. Google currently hosts dojo, prototype, jQuery, script.aculo.us and MooTools and as such these are the only libraries that JSLoader 2.0 supports. In time I'll add YUI but for now these will do. JSloader now includes an extra attribute on the control, JSLibrary, here you can specify the AJAX library to load.
<mjjames:jsLoader ID="jsLoader2" runat="server" JSLibrary="dojo"  />
This would then add the following code to your page:
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load("dojo" , "1");
</script>
You can also tell the loader to get Google to render the uncompressed version of the library, this is done by setting the type attribute to uncompressed
<mjjames:jsLoader ID="jsLoader1" runat="server" JSLibrary="mootools" Type="uncompressed" />
Thus:
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load("mootools" , "1" , {uncompressed:true});
</script>
Note: only jQuery, MooTools and Dojo have uncompressed versions, if you specify uncompressed for the other libraries the compressed versions are still served up. Finally you specify a version number, by default JSLoader 2.0 tries to load the latest 1.x release of each library however if you want the 1.2.3 release of jQuery simply set the Version Attribute to 1.2.3
<mjjames:jsLoader ID="jsLoader3" runat="server" JSLibrary="jquery" Version="1.2.3" />
Giving you:
<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
google.load("jquery" , "1.2.3");
</script>
It really is simple, it ensures only one version of each library is loaded and its quick and simple to use. Get the latest JSLoader 2.0, add a reference to it in your code, add the control to your site's web.config or register it on the page, and you are away.
<add tagPrefix="mjjames" namespace="mjjames.WebControls" assembly="jsLoader"/>
Hope you like it, any questions or issues let me know.

Side Note

Script.aculo.us depends on Prototype, however JSLoader 2.0 doesn't currently enforce this dependancy, would you like to see JSLoader 2.0 enforce this dependancy and load Prototype before Script.aculo.us or should it load it anyway and let the developer ensure Prototype is loaded? Would be good to see arguements for and against, then I can make a final decision some point this week.

Monday, 22 October 2007

Doing that mobile thing..... revisited

A few months ago I wrote a post about how I was finding the "mobile Internet". At the time I found it to be very good and was very happy with it. On the bus today I had a chance to chance to ponder over my usage since then and if any thing had changed. Now I must say that I use my mobile Internet daily, sometimes I'm on it more than I am on my Internet at home. It really is great on the whole, Opera Mini web browser allows you to view practically any site, MSN means I'm always in touch with people and again the Google Apps, GMail and Maps are always useful when on the move however I have found one gripe. My gripe is how intermittent mobile Internet is on the move. For example when on the bus your be lucky to be able to run msn let alone browse the web. The fact is when your on the move, for 3 anyway, the 3G signal just fades out and your Internet ability suffers. This is vastly magnified when your trying to read your blog feed on Google Reader as every time you loose Internet connectivity your session resets and you have to relogin !?! This annoyed the hell out of me. I'm now thinking when will someone or even Google release an offline rss reader for Google Reader for the mobile device. Now Google already have an offline mode for Google Reader in the form of Gears so I beg the question wheres the mobile edition? I suppose this will come in the form of some Java app which I don't mind about, i just hope you can use the app online, and then download you top 100 or even 50 unread. This would then allow many mobile commuters to catch up with their blog feeds whilst on the move. Here's hoping this happends sooner rather than later.....

Wednesday, 6 June 2007

Doing the Monster Mash....

Last Friday I came across the Google Mashup Editor, after glancing at the tour I decided to request an invite hoping to be lucky enough to try it out early on in the game. I was pleased to find this morning in my mail box an acceptance onto the beta. So today i decided to have a quick play and get to grips with it. I have to say after logging in I was quite impressed. Your presented with the all too familiar "Google blue" styling as I have named it and a nice ajax'd interface which is clear and easy to use.

Initial Meanderings

The first thing i decided to was to open one of the sample projects, this gave me the chance to see how google's tags worked and how it all fits together. The editor itself is a nice online editor, line numbers, basic highlighting, save etc. My only bad comment so far is that some times when editing the editor just pauses and then catches up. I'm hoping this is just a beta issue and gets ironed out, nothing worse than typing away and then noticing you have lost a couple of lines/ Any how, after playing with the various sample projects I decided to start tinking, as I was in a rush earlier I decided to only attempt to alter the Task List project to something more suitable for my needs. My aim was to play with some rendering, remove some fields and add another so that I could organise my tasks for the day and have a task list for each project I'm working on. Needless to say this simple task was very easy, and within 20 mins I had sussed out how it all worked and how i could import style sheets, JS etc. I should mention at this point that when you test your mashup project, the editor compiles your code to check for glaringly obvious mistakes and then gives you a nice preview. Thia quick and simple step is nice and compiling doesn't seem to take any more time than saving, not in my simple testing anyway. I did spot another annoyance while testing and compiling however. I assumed, which i think is a natural assumption, that when you compile and test that your project is saved. Much like Visual Studio. However sadly this is not the case :( Guess who tested his changes and quit the app by mistake only to find they weren't saved. :( :( I also had a quick gander at the very nice taglist feature. This list all of the tags and how they can be used. It's good to see Google haven't let us down with documentation, especially when you look at the entire help section.

Putting my MashUp Out There

My next step invloved publishing my simple mashup to the world. This was exceptionally easy -> Publish. You even get to choose a name for the url. .googlemashups.com Very nice. And that really was it, once you ok the domain the mashup publishes and you can go tell all your mates about how awesome your mashup is. Whats also good is how simple it is to republish your project or if you find you have published a project with a glaringly obvious error in it you can "unplubilsh it". Sweet.

Rounding it all up

Overall so far my experience with Google Mashup Editor, all though very much early days, has been good. Apart from the two niggles I noticed earlier I haven't found any major issues and I'm looking forward to playing with it more and using multiple feeds with it. In my eyes I see Google Mashup Editor as a more programmatic version of Yahoo! Pipes. Pipes for me so far has been a bit of a let down as I havn't really been able to do alot with it, I'm hoping that ill find Google Mashup Editor more useful, and you never know I may even write myself a widget for my Google Sidebar ;) If you really feel the need to look at my basic mashup then take a trip to the New Mind Project Task Manager

Saturday, 26 May 2007

Doing that mobile thing

For the last two months I have been using 3's unlimited X-Series Silver Internet package. This has allowed me to use multiple mobile applications and services. However until the last week I haven't had to solely rely on it for my daily dose of Internet goodness. Last week I was away at Cefn Lea, which is near Newtown in Mid Wales. Sadly I had no broadband Internet access so in order to pick up mail and keep up to date with all my blog's. Now I was expecting that doing this on my tiny Sony Ericsson K800i would be a bit of a drag. However I was pleasantly surprised, using the gMail Java application and Google Maps was great. These applications if you haven't tried them are very easy to use and really do add to the mobile Internet experience, using your keypad for quick access to your inbox and to compose well saves Lot's of time and emails render amazingly well on such a small screen and you still get to see Google convert and render basic attachments for your mobile pleasure. Google haven't let us mobile users down with Google Calendar mobile edition and Google Reader mobile edition either. These online applications really do work. In my opinion Google Calendar mobile is still a touch in its infant stage as when you try to add an event its always entered as the current hour's event, which doesn't help, but it does have great potential. Sadly though, even Google can not save the entire day for mobile users. Google tries to convert as many sites as possible for mobile viewing if you use their search engine, but sometimes this still doesn't work. Some sites just aren't mobile friendly, sadly i must admit that trying to use Yahoo mail was one of these, it just wasn't happy and had some odd rendering. Flickr, CricInfo, BBC just to name a few however are awesome and work really well. Flickr Mobile even allows you to upload images directly from your mobile phone, tag them and do all types of awesome things. So after a week of mobile Internet instead of broadband I have to say it's getting there. Being able to access email and basic websites on the move is now becoming far more than a fad or just for "business" people. Especially with the introduction of monthly flat rate mobile access pricing. I would expect with the introduction of flat rate access that mobile web usage should go up. This should also mean mobile web applications which are accessible should become the norm. However for this to happen developers need to ensure they either make mobile editions of there sites which will encure more development or test their sites in a mobile environment. Now I'm not sure how wide spread this will become, but I would hope at least that as the Internet becomes more accessible on a mobile device that more effort will be put into the mobile development area. If Google have a say in it, I'm sure it won't be long before most of their applications will be found as mobile apps. Here's hoping for Google Doc's on your mobile ;)

Saturday, 28 April 2007

The Importance of Knowing Your Data

I have been developing a custom Google Calendar plugin for a site I am developing and for use in Dot Net Nuke. However for a few hours I have had myself perplexed by the fact that when I was trying to ouput and render the events title, start / end date and location all that was rendered was the title. Initially I though my code was wrong, so I compared it to Thom Shannons PocketGCalSync code, and found that I was doing it right, if only a bit different, I was choosing to loop through the times and locations collections instead of specifying to use just the root. So I was stumped. In work yesterday Chris mentioned if I was sure the data structure was correct. Now at the time I said it was. According to the gData API :

<entry>
 <id>http://www.google.com/calendar/feeds/jo@gmail.com/private-magicCookie/full/entryID</id> 
<published>2006-03-30T22:00:00.000Z</published> 
<updated>2006-03-28T05:47:31.000Z</updated> 
<category scheme='http://schemas.google.com/g/2005#kind' term='http://schemas.google.com/g/2005#event'></category> 
<title type='text'>Lunch with Darcy</title> 
<content type='text'>Lunch to discuss future plans.</content> 
<link rel='alternate' type='text/html' href='http://www.google.com/calendar/event?eid=aTJxcnNqbW9tcTJnaTE5cnMybmEwaW04bXMgbWFyY2guam9AZ21haWwuY29t' title='alternate'></link>
 <link rel='self' type='application/atom+xml' href='http://www.google.com/calendar/feeds/jo@gmail.com/private-magicCookie/full/entryID'></link> 
<author 
<name>Jo March</name>
 <email>jo@gmail.com</email> 
</author> 
<gd:transparency value='http://schemas.google.com/g/2005#event.opaque'></gd:transparency>
 <gd:eventStatus value='http://schemas.google.com/g/2005#event.confirmed'></gd:eventStatus> 
<gd:comments>
 <gd:feedLink href='http://www.google.com/calendar/feeds/jo@gmail.com/private-magicCookie/full/entryID/comments/'></gd:feedLink> 
</gd:comments> 
<gd:when startTime='2006-03-30T22:00:00.000Z' endTime='2006-03-30T23:00:00.000Z'></gd:when>
 <gd:where></gd:where> 
</entry>
So I was assuming that the nodes gd:when and gd:where existed in my stream. However this is where I was wrong, what I had failed to spot whas that in the GData API its uses examples showing the basic and full versions of the feed. So i was using my basic feed url not the full one.
Using "basic" returns a basic Atom feed without any extension elements. Using "full" returns a feed that includes all event properties
Stupid I know but now i know, and so do you. So here's to wasting time for not checking the data feed your application is actually using ;) Now this is solved I may be closer to publishing my little addon and see if i can use in in DotNetNuke

Tuesday, 12 December 2006

It's all about the kitchen sink...

Well I came home to find that our friends over at Google have made public their "Web Toolkit". Very exciting news, well so I thought. Now I'm very big on Ajax and I want to see it used more wide spread, infact at the moment im developing 2 Ajax powered applications, one in ASP.Net 2 and one in PHP using the SAJAX. More on those when I get time, the point I'm trying to make is that making the development of such applications easier is almost a God send. So far I have explored the Web Toolkit using the demo's provided over at http://code.google.com/webtoolkit/ and taking a peak at some of the source code. Before I highlight some of the features of the toolkit I need to first and foremost state something that has bothered me since I first read the Official Google Blog.... "Google Web Toolkit (GWT) is an open source Java software development framework". Now with out trying to put a dampener on things does anyone else thing that developing web applications in Java and then compiling it into HTML and JavaScript seem insane to anyone?? I've written many an application in Java but never have i conceived or even given a second thought to writing a website/application in it and then compile it to HTML and JavaScript. However before I give up on Google's Toolkit its probably worth looking into it further and seeing what it can actually do. Enter our Kitchen Sink, the first demo I tried out was the Kitchen Sink which shows off everything. Now I won't bore everyone by going into every aspect in great detail but to give an overview the Google Toolkit does do some cool bits and pieces, I personally liked the way it implements tabs, funky popups that look more like something that should be in a desktop application and the tree structure. Now you may be thinking haven't I seen alot of this before else where, and in the Yahoo YUI library. It's true you probably have but Google has at least in the demo's made it look good and shows how easy it is to do, thus provoking alot of thoughts and ideas from this simple web developer anyway. Now the secret of the Google Toolkit is that it wraps everything up for you, all you will have to do is develop these Web 2.0 apps in Java, all the hard work and headaches to do with browser compatibility is handled by the toolkit's compiler. You can write in classes and be as object oriented as you like. This does sound great, as well as being able to use Eclipse and having a full debugger on hand but I some how feel code ownership and knowing exactly whats going on with ones code is being taken away. Maybe this isn't such a bad thing, if we all start developing better and compliant code maybe our support teams will have an easier job, who knows. As I mentioned earlier at present I have only dabbled with the toolkit. So far I have mixed feelings, learning to develop in Java again will frustrate some but will excite others, a lot of its features many will have seen else where, but the fact remains it appears to be wrapped up very nicely and with the Google machine backing it and it being Open source and all that should mean its kept up to date and any issues that crop up should be resolved swiftly. Before I make my final judgement on this latest offering from the Google machine I intend to spend some time using it, getting to grips with it and developing with it. I'm hoping to be pleasantly surprised and enjoy developing in Java again ...