<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/"><channel><title>General</title><link>http://janetandkevin.com/Blog/category/2.aspx</link><description>Life in general.</description><managingEditor>Kevin</managingEditor><dc:language>en-US</dc:language><generator>.Text Version 0.95.2004.102</generator><item><dc:creator>Kevin</dc:creator><title>Client side logging for your Ajax app. with Google Gears</title><link>http://janetandkevin.com/Blog/archive/2007/07/06/443.aspx</link><pubDate>Fri, 06 Jul 2007 12:09:00 GMT</pubDate><guid>http://janetandkevin.com/Blog/archive/2007/07/06/443.aspx</guid><wfw:comment>http://janetandkevin.com/Blog/comments/443.aspx</wfw:comment><comments>http://janetandkevin.com/Blog/archive/2007/07/06/443.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://janetandkevin.com/Blog/comments/commentRss/443.aspx</wfw:commentRss><trackback:ping>http://janetandkevin.com/Blog/services/trackbacks/443.aspx</trackback:ping><description>&lt;P&gt;In today's Web 2.0 world developers are creating very rich clients with plenty of JavaScript code and little to no logging.&amp;nbsp; With the tools available today there is no reason not to log on the client side.&lt;/P&gt;
&lt;P&gt;Logging is an important tool in any developers toolbox.&amp;nbsp; If done right logging gives the developer detailed context for application failures.&amp;nbsp; Logging should not be confused with testing or debugging although in certain instances it can help with the later.&lt;/P&gt;
&lt;P&gt;The following is a quick example of how logging on the client side can easily be acheived using &lt;A href="http://gears.google.com/"&gt;Google Gears&lt;/A&gt;.&amp;nbsp; There is potential to expand this small demo into a more sophisticated logging mechanismn with reporting features and server-side transfer of logs if desired.&lt;/P&gt;
&lt;P&gt;The basic code and idea behind client side logging is very simple.&amp;nbsp; Let's look at a little sample logger that uses Google Gears:&lt;/P&gt;
&lt;BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px"&gt;
&lt;P&gt;&lt;A href="http://www.janetandkevin.com/blog/projects/Glogger/glogger.html"&gt;Sample Client Side Logger using Google Gears&lt;/A&gt;&lt;BR&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;To get client side logging running on your site all you need to do is include the following JavaScript files in your head section as follows:&lt;/P&gt;&lt;PRE class=csharpcode&gt;  &amp;lt;script type=&lt;SPAN class=str&gt;"text/javascript"&lt;/SPAN&gt;  src=&lt;SPAN class=str&gt;"gears_init.js"&lt;/SPAN&gt;&amp;gt;&amp;lt;/script&amp;gt;
  &amp;lt;script type=&lt;SPAN class=str&gt;"text/javascript"&lt;/SPAN&gt;  src=&lt;SPAN class=str&gt;"glogger.js"&lt;/SPAN&gt;&amp;gt;&amp;lt;/script&amp;gt;&lt;/PRE&gt;
&lt;P&gt;Then you are set to add client side logging in your scripts like this:&lt;/P&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;PRE class=csharpcode&gt;  &lt;SPAN class=rem&gt;// Log to Google Gears client side database&lt;/SPAN&gt;
  log(&lt;SPAN class=str&gt;"INFO"&lt;/SPAN&gt;, &lt;SPAN class=str&gt;"Hello World"&lt;/SPAN&gt;);&lt;/PRE&gt;
&lt;P&gt;The client side database creation is done in the initialization function of the included glogger.js script.&amp;nbsp; You can see here how it checks for existence of Google Gears and the database before it tries to&amp;nbsp;create it.&lt;/P&gt;&lt;!-- code formatted by http://manoli.net/csharpformat/ --&gt;&lt;PRE class=csharpcode&gt;  &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (!window.google || !google.gears) {
    &lt;SPAN class=kwrd&gt;return&lt;/SPAN&gt;;
  }
  &lt;SPAN class=kwrd&gt;try&lt;/SPAN&gt; {
    db = google.gears.factory.create(&lt;SPAN class=str&gt;'beta.database'&lt;/SPAN&gt;, &lt;SPAN class=str&gt;'1.0'&lt;/SPAN&gt;);
  } &lt;SPAN class=kwrd&gt;catch&lt;/SPAN&gt; (ex) {
    setError(&lt;SPAN class=str&gt;'Could not create database: '&lt;/SPAN&gt; + ex.message);
  }
  &lt;SPAN class=kwrd&gt;if&lt;/SPAN&gt; (db) {
    db.open(&lt;SPAN class=str&gt;'database-glogger'&lt;/SPAN&gt;);
    db.execute(&lt;SPAN class=str&gt;'create table if not exists glogger'&lt;/SPAN&gt; +
               &lt;SPAN class=str&gt;' (level varchar(50), msg varchar(1024), timestamp int)'&lt;/SPAN&gt;);
  }&lt;/PRE&gt;
&lt;P&gt;Inserting, selecting, and deleting from the log table is just as easy.&amp;nbsp; There are examples of each of these in glogger.js.&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The Code:&lt;BR&gt;&lt;/STRONG&gt;&lt;A href="http://www.janetandkevin.com/blog/projects/Glogger/glogger.html"&gt;glogger.html&lt;/A&gt; - Web page that logs to client&lt;BR&gt;&lt;A href="http://www.janetandkevin.com/blog/projects/Glogger/glogger.js"&gt;glogger.js&lt;/A&gt; - Logging implementation&lt;BR&gt;&lt;A href="http://www.janetandkevin.com/blog/projects/Glogger/gears_init.js"&gt;gears_init.js&lt;/A&gt; - Main Google Gears code&lt;/P&gt;
&lt;P&gt;&lt;BR&gt;&lt;STRONG&gt;Helper Utilities:&lt;/STRONG&gt;&lt;BR&gt;&lt;A href="http://sqlitebrowser.sourceforge.net/"&gt;sqlitebrowser.sourceforge.net&lt;/A&gt; - SQLiteDatabase Browser&lt;BR&gt;&lt;A href="http://www.janetandkevin.com/blog/projects/Glogger/dbquery.html"&gt;dbquery.html &lt;/A&gt;- Web interface to SQLite query analyzer&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Happy Client Side Logging!&lt;/STRONG&gt; &lt;/P&gt;
&lt;P&gt;Let me know if you make any extensions to this code...&lt;/P&gt;&lt;img src ="http://janetandkevin.com/Blog/aggbug/443.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Kevin</dc:creator><title>Firefox Bookmarks</title><link>http://janetandkevin.com/Blog/archive/2007/02/16/428.aspx</link><pubDate>Fri, 16 Feb 2007 20:02:00 GMT</pubDate><guid>http://janetandkevin.com/Blog/archive/2007/02/16/428.aspx</guid><wfw:comment>http://janetandkevin.com/Blog/comments/428.aspx</wfw:comment><comments>http://janetandkevin.com/Blog/archive/2007/02/16/428.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://janetandkevin.com/Blog/comments/commentRss/428.aspx</wfw:commentRss><trackback:ping>http://janetandkevin.com/Blog/services/trackbacks/428.aspx</trackback:ping><description>If you're like me you have a ton of bookmarks.  Some you go back to frequently and some you only use every so often.  The problem is keeping them in sync on all your computers or remembering how to Google the page back.  The answer is simple and easy to get used to.  The answer is &lt;a href="http://www.foxmarks.com/"&gt;Foxmarks&lt;/a&gt;.  If you don't use this extension go grab it.  Try actually organizing your bookmarks and use ctrl-b to bring them up, and quickly search through them.&lt;br/&gt;&lt;br/&gt;

While I'm talking about Firefox extensions, if you are a web developer you have to try out &lt;a href="https://addons.mozilla.org/firefox/1843/"&gt;Firebug&lt;/a&gt;.&lt;br/&gt;&lt;br/&gt;

For a more complete list of useful extensions, check out this &lt;a href="http://scottwater.com/blog/"&gt;list&lt;/a&gt;.&lt;img src ="http://janetandkevin.com/Blog/aggbug/428.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Kevin</dc:creator><title>Windows is not the most important OS.</title><link>http://janetandkevin.com/Blog/archive/2004/04/07/163.aspx</link><pubDate>Wed, 07 Apr 2004 08:31:00 GMT</pubDate><guid>http://janetandkevin.com/Blog/archive/2004/04/07/163.aspx</guid><wfw:comment>http://janetandkevin.com/Blog/comments/163.aspx</wfw:comment><comments>http://janetandkevin.com/Blog/archive/2004/04/07/163.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://janetandkevin.com/Blog/comments/commentRss/163.aspx</wfw:commentRss><trackback:ping>http://janetandkevin.com/Blog/services/trackbacks/163.aspx</trackback:ping><description>Bill Hill&amp;nbsp;explains on &lt;A href="http://channel9.msdn.com/"&gt;Channel9&lt;/A&gt; how Windows is &lt;STRONG&gt;not&lt;/STRONG&gt; &lt;A href="http://channel9.msdn.com/ShowPost.aspx?PostID=114"&gt;the most important OS&lt;/A&gt;.&lt;img src ="http://janetandkevin.com/Blog/aggbug/163.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Kevin</dc:creator><title>Office Update</title><link>http://janetandkevin.com/Blog/archive/2004/03/24/153.aspx</link><pubDate>Wed, 24 Mar 2004 09:05:00 GMT</pubDate><guid>http://janetandkevin.com/Blog/archive/2004/03/24/153.aspx</guid><wfw:comment>http://janetandkevin.com/Blog/comments/153.aspx</wfw:comment><comments>http://janetandkevin.com/Blog/archive/2004/03/24/153.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://janetandkevin.com/Blog/comments/commentRss/153.aspx</wfw:commentRss><trackback:ping>http://janetandkevin.com/Blog/services/trackbacks/153.aspx</trackback:ping><description>We all always run &lt;A href="http://windowsupdate.microsoft.com/"&gt;Windows update&lt;/A&gt; to make sure we have all the critical patches, but did you know there is also an &lt;A href="http://office.microsoft.com/officeupdate"&gt;Office&lt;/A&gt; update that has some good things on it like an updated junk-email filter.&lt;img src ="http://janetandkevin.com/Blog/aggbug/153.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Kevin</dc:creator><title>Access Forbidden: Too many users are connected to Internet Information Services</title><link>http://janetandkevin.com/Blog/archive/2004/03/22/150.aspx</link><pubDate>Mon, 22 Mar 2004 20:31:00 GMT</pubDate><guid>http://janetandkevin.com/Blog/archive/2004/03/22/150.aspx</guid><wfw:comment>http://janetandkevin.com/Blog/comments/150.aspx</wfw:comment><comments>http://janetandkevin.com/Blog/archive/2004/03/22/150.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://janetandkevin.com/Blog/comments/commentRss/150.aspx</wfw:commentRss><trackback:ping>http://janetandkevin.com/Blog/services/trackbacks/150.aspx</trackback:ping><description>&lt;P&gt;Thanks to a post by &lt;A href="http://www.gazitt.com/OhmBlog/PermaLink.aspx/f850bebf-97b0-4ebb-99ce-072bdcb4422f"&gt;Omri Gazit&lt;/A&gt; I am able to minimize the number of 403.9's (Access Forbidden: Too many users are connected to&amp;nbsp;Internet Information Services)&amp;nbsp;I was seeing on my web server today.&amp;nbsp; It turns out Windows XP Professional only allows 10 simultaneous connections by default (What were they thinking $$$).&amp;nbsp; To top it off it turns out that&amp;nbsp;many browsers will open more than one connection.&lt;/P&gt;
&lt;P&gt;I bumped up the number of connections by running:&amp;nbsp; &lt;STRONG&gt;adsutil set w3svc/MaxConnections 40&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;I also set my connection timeout to 120 seconds and turned off HTTP Keep alives.&amp;nbsp; Not the best for performance, but better than an Access Forbidden error.&lt;/P&gt;
&lt;P&gt;Hopefully this helps.&amp;nbsp; I don't want to change servers.&lt;/P&gt;&lt;img src ="http://janetandkevin.com/Blog/aggbug/150.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Kevin</dc:creator><title>New Blogger in Town.</title><link>http://janetandkevin.com/Blog/archive/2004/03/20/146.aspx</link><pubDate>Sat, 20 Mar 2004 18:52:00 GMT</pubDate><guid>http://janetandkevin.com/Blog/archive/2004/03/20/146.aspx</guid><wfw:comment>http://janetandkevin.com/Blog/comments/146.aspx</wfw:comment><comments>http://janetandkevin.com/Blog/archive/2004/03/20/146.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://janetandkevin.com/Blog/comments/commentRss/146.aspx</wfw:commentRss><trackback:ping>http://janetandkevin.com/Blog/services/trackbacks/146.aspx</trackback:ping><description>That's right people.&amp;nbsp; There is a new blogger in town.&lt;img src ="http://janetandkevin.com/Blog/aggbug/146.aspx" width = "1" height = "1" /&gt;</description></item><item><dc:creator>Kevin</dc:creator><title>Welcome!</title><link>http://janetandkevin.com/Blog/archive/2004/03/20/145.aspx</link><pubDate>Sat, 20 Mar 2004 17:36:00 GMT</pubDate><guid>http://janetandkevin.com/Blog/archive/2004/03/20/145.aspx</guid><wfw:comment>http://janetandkevin.com/Blog/comments/145.aspx</wfw:comment><comments>http://janetandkevin.com/Blog/archive/2004/03/20/145.aspx#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://janetandkevin.com/Blog/comments/commentRss/145.aspx</wfw:commentRss><trackback:ping>http://janetandkevin.com/Blog/services/trackbacks/145.aspx</trackback:ping><description>Welcome to &lt;A href="http://www.janetandkevin.com/blog"&gt;www.janetandkevin.com/blog&lt;/A&gt;.&amp;nbsp; Hopefully this blog will keep you entertained with useful information.&lt;img src ="http://janetandkevin.com/Blog/aggbug/145.aspx" width = "1" height = "1" /&gt;</description></item></channel></rss>