Al Nyveldt

Adventures in Code and Other Stories

A week from this Saturday, I'll be at the Philly.NET Code Camp 2008.2.  I was at the January Code Camp and had a great time.  There were lots of great people to talk with and interesting sessions that got me thinking about things.

phillydotnet I had met Bill Wolfe, the head of Philly.NET, at MIX08 in March and had offered to be a speaker in the spring Code Camp.  He said to get in touch closer to the camp.  So when the call for speakers went out in early April, I responded.  I was accepted and told a talk on BlogEngine.NET would be great.  I wasn't initially thinking of a BlogEngine.NET talk, but since it is a comfort zone for me I figured it would work out.  There are lots of things I could talk about in relation to BlogEngine.NET so I sent in 3 session summaries and one was chosen.

My topic will be "Learning the ASP.NET Provider model with BlogEngine.NET".  It is a talk that goes into one of the things I really appreciate about BlogEngine.NET.  BlogEngine.NET is an easy to follow, simple project that is great to learn from.  It is a great project to just poke around in the code and see how things work.  Being a relatively small solution with just a web site and a class library project, there isn't much room to get lost.  Also, since there are no 3rd party libraries, you can see how everything works.

My session will get in to the provider model and how BlogEngine.NET uses it.  We'll look at implementing the built in providers like membership and go over making your own implementations of built in providers  Then, we'll spend some time talking about custom providers like the BlogProvider in BlogEngine.NET.  We'll make our own implementation of the BlogProvider as well.  It should be a fun time.

While the talk is very focused on the Provider model, it should be interesting to people curious about BlogEngine.NET as we'll really get into some of the inner workings of how the software works.  Of course, if you are interested in talking BlogEngine.NET or have specific questions, look me up at the Code Camp.  I'd be happy to talk BlogEngine or most any other topic after the session.

ThemePic

I've been asked a few times recently about my Visual Studio look and decided to share about it here.  Visual Studio gives the developer a lot of control over how the development environment looks.  From my experience, only a small percentage of people actually take advantage of it, but it is sometimes nice to change things up a bit.

Finding a Theme

The easiest way to give Visual Studio a "makeover" is to download someone else's custom Visual Studio theme and import it into your environment.  My current theme is based on Ragnarok Grey by Tomas RestrepoTomas is a master dev environment themer and has made a bunch of Visual Studio themes.  That said, the best place to start looking for your theme is likely at Scott Hanselman's VS Theme gallery post.  Scott has put together a nice list of VS Themes along with pictures and links.

Installing a Theme

importwiz1 Once you've found a theme that you like and found a download link, you should have a .vssettings file.  (Note: Make sure you get the file for the version of Visual Studio you are using.  They can be converted, but that is another topic.)

Now, you simply need to import it in Visual Studio.  Luckily, there is a simple Visual Studio wizard to walk you through the process and make a backup of your current settings should you want to go back to what you have now.

The wizard is found under the Tools menu and the option is called Import and Export Settings.  In 3 simple steps, you chose import settings, save your theme (or skip), and then browse out to find your downloaded theme and apply it.

Customizing a Theme

options The changes from a downloaded theme can be pretty dramatic and you might want to tweak it a bit.  You might want the font size smaller or larger.  Maybe just a different font.  You might all find that you have some things that just don't look nice.

Head on into options (Tools...Options) and make the changes that you need.  The Fonts and Colors sections gives you a nice preview of what you'll be getting for the different types of items.

My theme

As I mentioned earlier, I've been using pretty much the stock Ragnorak Grey theme.  I have made a few small changes for ReSharper 4.0 EAP.  The theme didn't cover the ReSharper Styles and a few of them were just unreadable.  So if you a ReSharper guy or gal, you'll likely need to check those ReSharper display items and make sure they are readable in the theme you choose.

My MIX 08 Recap

vectormark_blue Well, I just got back yesterday from my first MIX experience and wanted to write up a recap of the event.  Everyone likely came to MIX from a slightly different place, with slightly different expectations, and left with there own feelings on the event.  For me, it was a good overall event.  It really comes down to 3 things for me.  People, Passion, and Content.

I came to MIX knowing almost no one there.  I can honestly say I saw only two people I had met before at MIX.  One of them, Dave Laribee, I had met just the week before at the Philly ALT.NET meeting and the other was a man who had taught a college class I took many years ago.  (I racked my brain trying to figure out who he was and by the time I figured it out, I never saw him again.)  So other than talking with Dave again, everyone else I talked with was someone I was meeting for the first time during the event.

While knowing no one was tough, just about everyone I talked with was very nice and I appreciated meeting so many cool people at MIX.  There were a few people I had hoped to meet and I ended up getting to talk with most of them.  I also met a bunch of people I didn't expect to meet and really enjoyed getting to know them a little as well.

These outside of session conversations where really the best part of MIX.  One could not help be feel the passion and energy of some people as they talked about software and what they were working on.  It was cool to talk with people who are excited about what they were doing and just really into making great software and experiences.  Sharing ideas, discussing issues, and getting insightful feedback with a bunch of people with varied background was awesome.

The Content was good overall.  I went to a bunch of sessions and enjoyed most of them.  I'm sure the keynotes have been covered, so I won't say too much other than they were cool and that Steve Ballmer was great.

Scott Hanselman's session was very good.  He had the only session on ASP.NET MVC.  I had hoped to hear more about it at MIX then I did, but this session was just excellent.  Scott is an excellent presenter and I'm glad I was able to catch this talk.

I sat in on some of the Astoria (ADO Data Services) sessions and it is a lot cooler than I thought it was coming to the conference.  I'm not sure I'll use this in my work, but it really has given me something to think about.

I really enjoyed some of the panel sessions as well.  I attended 2 of them and both were interesting.  I really enjoyed hearing different views on the same questions.  The panelists were well chosen as far as I could see.

The best session I missed was the Story of the Ribbon.  You might be wondering how I would know what the best session I missed was, but I'm pretty sure this was it.  If you missed it at the conference, go and watch it.  (It is only 72 minutes if you skip the Q&A.) 

I was sitting at lunch with Jon Galloway who I had met earlier and some others when Miguel de Icaza joins the table.  Miguel could not stop telling us how awesome the Ribbon presentation was so I decided I had to see it although I must admit I was still skeptical.  Anyway, I watched it today and it rocks.  It is all about UI research and the process used to in making the new Office UI.  It is very informative and gave me a term to something I often think about when designing UI, Longitudinal Usability.  Anyway, this session was so cool I'll likely take time to go back and watch some of the other User Experience track sessions.

If you missed the conference, you should really take the opportunity to watch some of the presentations which are all available over the web.

Well, that is my 2 cents on MIX 08.  I'm glad I was able to attend.  (and yes, I got to play around with the Surface, and it rocked as well.)

A few weeks back, I read a post from Damien Guard on his favorite WordPress plugins.  While reading over his list, I felt BlogEngine.NET really had them all cover and then I got the last one, WP-PostViews.  The plug in as you might guess, counts, post views and has a side bar widget for displaying the most popular content.  Damien writes:

Another visitor-retention seeking effort. By presenting the most popular content in the sidebar I'm hoping to entice people to look at a couple of other posts and hit the magic RSS subscribe button.

Well, I decided to whip up the BlogEngine.NET version which consists of an extension to count the post views and a widget to use in your theme.  The extension could certainly be more elegant, but it gets the job done.

TopPosts The widget is a little more complex, but not much.  It reads in the counters, determines the top posts, and displays them in a list.  You can control how many of the top post will display in the widget with the Top property (which is expecting an integer of how may posts to display).  There is also a ShowViewCount property which is expecting a true or false.  If you set it to true, it will show the world the actual post counts it is generating.  If you set it to false, it is only visible when you are logged in.  (Note: The top posts are cached and will only update on your site every 30 minutes.  No point in calculating these number too frequently.)

To set this up, download the files below and unzip them.  The extension file (TopPosts.cs) needs to be placed in your extensions folder which is at App_Code/Extensions.  The Widget files should go in the theme you plan to add the widget to.  Once you have the widget files in the theme folder, you can go ahead and add the widget to the site.master file or wherever you'd like.  The correct syntax for the user control will look something like the following.

<%@ Register src="TopPosts.ascx" TagName="topPosts" TagPrefix="uc3" %>


<uc3:topPosts ID="TopPosts1" runat="server" Top="5" ShowViewCount="false" />

If you have issues installing the widget, please see the Installing the Quote of the Day widget screencast.  The process is very similar.

I put together a screencast on the creation of the extension and was planning to do the same for the widget, but they seem so simple and redundant, I'm not sure I'll follow through with completing them. Let me know if you are interested in these.  If there is enough interest, I'll make them happen.

Downloads

Over the past few weeks, I've received a bunch of questions on using the Quote of the Day widget so I had been planning to put together a quick walk through screencast to show you how to use since I really didn't cover usage very thoroughly in my earlier post.

QuotesInstall Since I was working on a new theme earlier this week, it seemed like the right time to do this, but I also find a minor bug with the control when previewing themes so I made a small change to correct this.  It was a minor fix, but if you are starting fresh or feel like upgrading, I'll include the updated control at the end of this post.

The screencast walks you through adding the widget from download to theme update.  I don't cover making changes to your CSS to make it look the way you want in your theme, but I've tried in in 4 themes already and haven't needed to do anything special to make the widget look right.  I'll include the register and usage line below so you can see them more clearly and don't have to copy notes while watching the screencast.

<%@ Register src="QuoteOfTheDay.ascx" TagName="quote" TagPrefix="uc2" %>


<uc2:quote ID="QotD" runat="server" />

Again, this widget works fine in 1.2 and 1.3.  I'll make an updated version when 1.4 gets closer.  You can download the QuotesWidget 1.0.1 here.

About

BioPic Hi. My name is Al Nyveldt and I'm a software developer from central Pennsylvania, USA.

I'm on the BlogEngine.NET development team and write on a variety of development related topics. More...

Follow me on Twitter
Contact me via email

Recent Comments

Quote of the Day

"We know what a person thinks not when he tells us what he thinks, but by his actions."

- Isaac Bashevis Singer

Sponsor

Recommended Books



Archives


Disclaimer

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008

Sign in