Tegud.NET

Blog - 2009

Wednesday, 20 May 2009

Downloaded the beta of Visual Studio 2010 today.  I was expecting WPF to have worked its way in deeper than it has done, currently its only in the editor, but the changes are very nice.  Oddly enough I espcially like the text selection effect, as well as the scaling and general look and feel.  In addition the changes of Intellisense now filtering is very nice.

Havent had much chance to try out the .NET 4.0 additions, I am quite looking forward to playing around with the new dynamic types.  One change that caught my eye on the Web Forms was the ClientID addition, with the added ability to control the client id of server controls directly it'll bypass the need to "tell" javascript what server control IDs are.

Will post again once I've had some more time with the new changes.

Friday, 03 April 2009

Well, did it again, still working on the RSS Feed widget thing which you can now see on the right.  Its still very early on, but it does do things!  Basically my long term aim for it to tell you if theres new RSS items and also allow it to be configurable per user, with a set of default ones for users who arent logged in. I dont plan for it to update automatically, but it does have a refresh button.

As I say, its REALLY early on, much like the majority of this site its a little rough at the moment, but its been a good test bed for some more JQuery fun.  As you may have noticed from the menu system across the site I'm kinda liking the slidey menu thing at the moment and thats been once more used in the RSS Feed display.  Basically if you click on the title of the RSS Feed (with the zoom icon) it'll bring up a full list from the RSS feed, the top one item from the feed is displayed immediatly below.  Its all done via JQuery AJAX, however instead of pulling the feed direct off the sites, I used an ASP.NET page local to this server to go get them, then the JQuery to process that, means I wont have any Javascript permissions issues...

Wednesday, 01 April 2009

Opps, it would appear to be 1am, and on a school night no less. I may have got slightly carried away with the JQuery RSS feed reader I'm writing for the front page. I'm taking a break from the photo gallery to work on something else. I reached the stage where I have to write the interface for loading photos into the database, which is less than fun, but needs doing. I need to work out how to import photos from a folder into the DB with minimal effort.  I am thinking of also including some kind of location based system accross the site soonish as well.

The site is now technically live, but really all that means is that it can be accessed from the web, I'll be surprised if it gets any hits currently.  I plan on going through and working out the SEO in a week or so, once I've completed the Gallery and the RSS thing. If you do stumble upon here feel free to say hi.

Wednesday, 25 March 2009

Been playing around with JQuery alot lately, really enjoying it. It takes away alot of the pain of doing things in javascript. I was talking to some guys at work today about what it can do, them being difficult were mainly pointing out you could do it all in javascript anyway, which is true, but its hardly going to do something you cant do in javascript.  But what it does do is enable you to do it much easier.  Animations for example, you could use timeouts to move things gradually, or you can use $("#someId").animate();, which is obviously way easier.  And with more people using JQuery instead of writing their own stuff, code becomes more readable and maintainable.

Alot of this website has been an experiment for me in using JQuery, so somethings could be done better, but its all part of the learning process for me.  The only real area I havent explored properly is the AJAX functions, but apart from that I've been using the other parts quite alot.  The photo gallery has some of the more advanced JQuery on the website, it handles basically all of it.  I combined that with a ASP.net image resizer and the gallery slide view was basically done. Next thing I plan on doing is the list view, which will show one gallery at a time and allow the user to scroll through it.  It will most likely also use lots of JQuery.

Saturday, 07 March 2009

This is a problem I encountered whilst working on a configuration XSD at work, I wanted to have a node that had content, with an enforced type along with attributes.  An example of the XML I wanted to allow is below.

<Quotes>
    <Quote author="George W. Bush">Rarely is the questioned asked: Is our children learning?</Quote>
</Quotes>

To specify a type for the node contents as well as some attributes, we need to use a type extension, specifying the type we want for the content as the base type.   This is shown below.

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Quotes">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="Quote">
            <xs:complexType>
              <xs:simpleContent>
                <xs:extension base="xs:string">
                  <xs:attribute name="author" type="xs:string" />
                </xs:extension>
              </xs:simpleContent>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </xs:element>
  </xs:schema>

The XSD above will permit the XML we want, and allow content and attributes on the same node.  I'll probably do some more stuff on XSDs in the near future.