Al Nyveldt

Adventures in Code and Other Stories

This week, the Live Writer team released the first release candidate for Live Writer 2009.  The latest version has continue to build on the betas from the fall and is just a really nice blogging tool.  The update has a new look and bunch of new stuff you can read about other places, but I wanted to write about the new server-side tagging feature that is available for the BlogEngine.NET bloggers using 1.4.5.9 and beyond.

tags When using the newest Live Writer and a fairly current build of BlogEngine.NET you will get a new Tags entry box right next to the categories drop down.  While BlogEngine.NET users have always been able to enter tags in Live Writer using the Keywords box, the new box does a lookup as you type so you can see the tags you’ve already entered and select them from a list. Our complete tag list button is still available for viewing all your tags, but this new list is pretty handy. 

tagsinaction I really like the way the Live Writer team is pushing the API and allowing developers to enhance the Live Writer experience. If the cool stuff Live Writer allows your favorite blog software to do isn’t enough, there are 100s of plug ins that add even more functionality. I look forward to seeing what new functionality they offer us next.

paths Many moons ago, I asked for some testers for my BlogEngine.NET Provider Migration tool and I’m finally getting back to everyone with a tool you can use to move your BlogEngine data from one backend to another.  If you’ve been using XML and wish you could start using VistaDB, SQLite, SQL Server, or even MySQL, this is your chance.  If you started with a database and wanted to get back to XML, this tool should be able to help you too.  Lastly, if you are a database such as SQL Server and wanted to go the simplicity of SQLite, this process can likely help you as well.

The process is simple.  You configure the new provider you’d like to use.  The tool will copy most of your blog data from your current provider to another provider you select.  Once it is finished, you change your default provider in your web.config.  The process will leave your current data in place after it makes the copy so you will still have it in case something isn’t right.

You might have noticed I wrote “most of your blog data” above.  This is because the tool only transfers your blog posts, pages, settings, and ping services.  Widget data, extension data, and user data is not dealt with.  If you are transferring your membership and roles at the same time, you’ll need to set up your users and passwords again.

Full details on my Provider Migration Instructions and Tool page.  Good luck switching over.

Link: BlogEngine.NET Provider Migration Instructions and Tool

boots This past week I was very blessed to be able to attend JP Boodhoo’s Nothin But .NET Bootcamp in Philidelphia, PA.  It was an intense week of advanced coding that I’m not likely to forget anytime soon.  JP is a very upbeat and passionate developer with a deep understanding of .NET, OO design, and BDD.  He is also a great communicator, teacher, and individual, so you can’t ask for a better combination to bring you through an advanced .NET bootcamp experience.

The bootcamp experience really started before the class even started.  JP sent out some material about a week before the course.  When was the last time you had a technical training that you need to do a bunch of prep work to even be ready to show up for the first day? He also sent out a warning about the hours that the course normally takes up to make sure everyone was expecting this to take up every ounce of time and energy they could give.  I had already heard about these things before, but just hearing about it is just not the same as experiencing it.

The prep work consisted of a bunch of PC prep work (software setup and configuration) as well as a sample project that we were going to start the week with. The project simply had a bunch of failing unit tests.  We simply had to make the tests pass and refactor.  There was lots of refactoring that could have been done and after a few hours I stopped.  We started Monday with someone’s version of this project and it just took off.  I was shocked at how fast JP could take the project that look very similar to my version and transform it into a far superior project with concise code that read beautifully so quickly.  He immediately starting introducing new concepts to me and I knew what others had said about this week was going to be true. JP never really slowed down until day 4, but by then it was time for the students to drive the course to completion.

The week was intense in every sense.  The hours were long. My days finished at about 11:15pm, 12:00am, 1:30am, 2:15am, and 9:30pm, and I left early on the last 2 nights. There wasn’t a lot of fluff time in there either.  Sure, we had some nice sized meal breaks but the group stayed together for the most part. It was a real test to be able to keep focused and concentrate. To be honest, I really failed that test at the end of the 3rd day, but JP tries to record screencasts of everything so I can go back and re-watch what I stared blankly at live in person.

The material was deep and I didn’t find much of anything I didn’t have to follow carefully to understand.  Through the first 3 days, he mixed in a nice amount of coding with giving the class a chance to work through small bits.  This usually consisted of JP writing a test and having us make it pass or having us write the test and make it pass for the next small feature.  He gave us a few more lengthy to-do items but we worked in small teams and I was always surprised that we could start with 4 people who really had no idea where to start but each time complete the exercise without getting JP to do it for us.  These small exercises were easily the best part of the course for me.  Each time I worked with different people, interacted with different people and interesting ideas, and was encouraged to see how most everyone was able to contribute to make the team successful.  The short time slot of an 2 hours or so just seemed like a sweet spot to me.

Starting on the 4th day, we were expected to just work with our team and complete the project we had been working through since Monday evening and make it special.  This was fun as well, but it felt different to me for some reason.  It was interesting to see how our team split up the work and how we attacked the problem.  We spent from Thursday after lunch until we quit early the next morning and then we continued with it on Friday after lunch until I left Friday night. 

I really enjoyed working and talking with other developers with a hunger to improve their craft and build great software. The people who want to come to a course like this are really striving to improve and it makes for a great experience. I learned a lot through the course of the week and I left encouraged to continue to improve as a developer. I leave with a number of areas I now know I need to focus on and a good place to start that learning.

Thanks to JP for a solid week, a great experience, and great foundation for continued work in my core .NET skills and testing practices.

The only other from my class who I know of who has blogged about the course was Rob Reynolds.  Rob gets into much more of the actual content details in his posts if you are interested in the actual course content.

October Happenings

find milan Some exciting things going on in October for me and I wanted to share about them.  First, tomorrow, October 3rd, I’ll be making a trip to New York City to hang out with Mads Kristensen (founder of BlogEngine.NET).  It will be very cool to meet him in person finally.  He’s invited anyone interested in talking BlogEngine.NET to join us around noon tomorrow if you are interested.  It should be a good time.

Also, on Monday, October 20th, I’ll be speaking at the Lehigh Valley .NET User Group.  I’ll be talking about the Provider Model, focusing on how to make your own custom providers while using BlogEngine.NET as the sample code.  (This will be very similar to the talk I gave earlier in the year at the Philly Code Camp.)  While the focus of the talk will be the provider model, we’ll be going through a lot of the BlogEngine core so you’ll learn a bit of how BlogEngine works through the evening.  I think it will be a fun evening.

As you might guess, I get asked a ton of questions regarding BlogEngine.  My inbox is often overloaded with questions that I just don’t have time to respond to.  Anyway, I thought I might start answering the more frequently asked questions here in my blog.

A very common question is in regards to database setup and changing table prefixes.  I guess there can be different reasons for this, but the most common is when you want to have a second blog’s data stored in your database.

BlogEngine.NET is designed as a single blog system and if you want to have a second blog with it, you need to have a second folder with BlogEngine installed.  If you want to use a database for both, you will need two sets of the BlogEngine tables as they will not share one set for instances.  If you can make a second database, this solves that problem, but many shared hosting situations will only allow you one SQL Server database.

If you find yourself in this situation or one similar and want to get a second set of BlogEngine tables in your database, you need to modify your setup script changing the table prefix from “be_” to whatever you’d like your tables to be prefixed with.  Once you have the script modified, you can create your new tables with the new prefixes by executing the SQL script.

Now in your second blog’s web.config, you need to tell the providers to use the new table prefix as well.  This usually means updating the BlogProvider, MembershipProvider, and RoleProvider, unless you are using the database Membership and Role providers of course.

To do this, you will need to add the tablePrefix attribute to the providers as I did below.  AS you can see, I used the prefix “be2_” for this example.

   1: <BlogEngine>
   2:     <blogProvider defaultProvider="DbBlogProvider">
   3:         <providers>
   4:             ...snip...
   5:             <add name="DbBlogProvider" 
   6:                  type="BlogEngine.Core.Providers.DbBlogProvider, BlogEngine.Core" 
   7:                  connectionStringName="BlogEngine"
   8:                  tablePrefix="be2_" />
   9:         </providers>
  10:     </blogProvider>
  11: </BlogEngine>
  12: ...snip...
  13: <membership defaultProvider="DbMembershipProvider">
  14:     <providers>
  15:         <clear/>
  16:         ...snip...
  17:         <add name="DbMembershipProvider" 
  18:              type="BlogEngine.Core.Providers.DbMembershipProvider, BlogEngine.Core" 
  19:              passwordFormat="Hashed" 
  20:              connectionStringName="BlogEngine"
  21:              tablePrefix="be2_" />
  22:     </providers>
  23: </membership>
  24: <roleManager defaultProvider="XmlRoleProvider" enabled="true" cacheRolesInCookie="true" cookieName=".BLOGENGINEROLES">
  25:     <providers>
  26:         <clear/>
  27:         ...snip...
  28:         <add name="DbRoleProvider" 
  29:              type="BlogEngine.Core.Providers.DbRoleProvider, BlogEngine.Core" 
  30:              connectionStringName="BlogEngine"
  31:              tablePrefix="be2_"/>
  32:     </providers>
  33: </roleManager>
  34:  
  35:  
  36:  

If you’d like more details on the configuration of the providers, I wrote up a full post explaining them earlier this year in much greater detail.

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

"Where there is no wood, the fire goes out; And where there is no talebearer, strife ceases."

- Proverbs 26:20

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 2009

Sign in