Showing posts with label Developers 42. Show all posts
Showing posts with label Developers 42. Show all posts

Friday, October 12, 2012

Time for a change

I've been considering this for several months and now got an opportunity to make a change. This post describes my next career move and why I decided to do this.

The history

The past four years I've been working for a software company that builds a product suite around Human Resources and Salary. The suite contains anything from salary calculation and HR registration to Employee and Manager Self Service systems. I was hired to help bring innovation and new technology to the existing team and work on the next version of the product.

As you might know we started with Silverlight 2 beta shortly after I joined the company. We worked on this product and upgraded it all the way to Silverlight 4 in two years time, until we decided that we needed to move away from Silverlight. For the past months our team has been working on delivering an ASP.NET solution.

My role has been to lead the team from a technical standpoint and architect the framework underlying the application. I've been happy to do this, however I still decided to change.

The Why

There are several reasons, some of which I'm not comfortable to discuss online, however the most important ones I can discuss.

The first reason, to me, is inherent to the assignment I had. If you complete the assignment, in this case developing a framework and getting a team up to speed on using it, you can't help but ask "What's next?". Unfortunately the answer was, "Finish the rest of the product." To me, this didn't (and still doesn't) sound very appealing. If you've been working on highly technical generic code and all of a sudden you're expected to do repetitive development, somethings got to give.

The second reason is more personal. I find it important to keep improving myself and I didn't see myself being challenged enough to improve on the skills I think are important to improve on as a senior developer, mainly soft skills. At some point you can get to comfortable in a certain situation.

The What

 So the final question is, what am I going to do? I've though about this and figured that in order to improve on soft skills a more customer facing role would suit my ambitions better. As I still wanted to be doing technical work as well a consultant role was the obvious choice. However I didn't want to be working with just another 'hour-factory' where you're just expected to bill as many hours to a customer as possible and I didn't feel much for being just another SharePoint 'specialist'.

I've been looking around and thinking about different routes to get what I'd like until an opportunity came along that I really liked. As of October 15th, I am working as a Senior Consultant in Enterprise Search. I've been working with enterprise search technology between 2004 and 2008 and I enjoyed it very much and always did want to go back to it and now I got the chance!

So what does a consultant in Enterprise Search do? I'll be working for customers that want to use Autonomy technology within their organization. Assignments can range from a simple advice all the way to a complete one off implementation for the customer. I'll be working multiple projects at a time and I'll be working with different programming languages and platforms a long the way.

So what about Developers 42?

What does all this mean for Developers 42? I will try to continue writing posts as time passes. However it does mean a change in direction for the topics I'll discuss. As I'll be using multiple programming languages, chances are I'll be writing more about my experiences with those.

Further more, as I explore more of the world of Enterprise Search and it's surroundings, I might be able to give some insight into what goes on in this field of expertise I'll be a part of once more.

I do hope you'll still be following this blog and to learn and teach together with you.


Follow me on twitter as well.

Friday, August 10, 2012

To Tweet or not to Tweet. That’s the question.

In this post I’d like to give an explanation of why I decided to start using Twitter and how it has worked out so far.

“Why on earth do you think you need to write a post explaining why you started using Twitter?”, you might ask.

I don’t like social networks

Well, people who now me, may have learned that I’m not a great fan of social media. I tried using several and most of them still don’t seem to add value for me.

Especially a network like Facebook appears like a serious waste of my, and others, time. I do have a Facebook profile, but I mostly use it to promote my blog posts.

The main reason I don’t like social networks is because I think most of us don’t have such an interesting live that you need to post updates about it every five minutes. Does anyone really care that I get up in the morning, go to work, when I drink coffee and when I go back home? Another question is, do I want others to know when I go to work and when I get home? To me it’s all a lot of noise and I don’t feel like spending time creating that noise for others to listen to.

Why Twitter might be different

So why go and use Twitter then? It seems like a lot of noise. Two things occurred to me. First of all, not a lot of people in my personal network actually use Twitter, so I don’t feel obligated to actually follow tweets by people that are close to me. The other thing is, and that applies to all Twitter users, Twitter is unique in the sense that it’s not automatically two way traffic. I can follow someone, but that doesn’t mean that someone will follow me.

This means that I can follow people who I think might have something interesting to say without me worrying about being intrusive and it also allows me to not follow a follower who I think is unlikely to tell me something interesting.

Besides the advantages of the platform I saw, I was looking for a platform to get some more interesting information about what others are doing in the field of software engineering.

I was also looking for a platform to promote this blog a bit better and a platform that allows me to post short updates appeared to me as a good way to do that and a challenge in the process. As some of you may know, I’m not blogging at a preset frequency. This does mean you may not hear anything from me for months. The reason for that can vary from being to busy to write something worth reading up to just not having a topic worth writing an entire post about (then again, maybe writing a post about why I joined Twitter might not qualify as a topic worth writing a post about Smile). With Twitter I can just write a one liner, share a link or a thought and it’s done.

Experience so far

So what has been my experience up to now? Well, I don’t have any real followers, so I don’t know about noise to others. I did tweet about ten times now of which two were retweets. I did find several Twitter accounts to follow that provided me with interesting Tweets. I got to some information I wouldn’t have got if I wasn’t on Twitter. I also stopped following some accounts as they provided me with to much noise. All in all that makes it meet my expectations.

This is another thing that struck me on Twitter. It seems more natural that people stop following other people. I had a follower and she stopped following me after about a day. I don’t know why and to be honest it doesn’t really matter. I see it more as a long running conversation. Once it stops being interesting for one of the parties involved, they leave the conversation. It makes sense to me.

Conclusion

So I have joined Twitter and up to now it has been a reasonable experience. I will continue to use Twitter for the upcoming months. If you think I might tweet something interesting, or if you want a tweeted update whenever I post something here, please join me on Twitter: @jvandeveen.

Feel free to share your experience with Twitter or other social media in the comments section below.

Monday, November 14, 2011

A new blogging opportunity

A little over a week ago I was contacted for a new blogging opportunity and I decided to give it a try.

When having a blog it’s nice to be noticed by people every once in a while. So when I was contacted by the Technorati Editorial Team (TET, really?) last week with an invitation to write for them I decided to at least investigate. It clearly was a mass-mailed invitation, so I was not as keen as I was when joining SilverlightShow.Net.

So what got me on board then? Well, let’s think about why I stopped writing for SilverlightShow, because let’s be honest, SilverlightShow did pay me for my articles and Technorati is not. Well, obviously there is the decision on stopping with Silverlight as our go-to UI technology, but it was not a deal breaker. In the end I was just to busy to crank out lengthy posts with lots of code and it became increasingly hard to find good topics to write about.

What makes writing for Technorati different is that they are looking for news and opinion posts in IT and they are looking for relatively short posts. Another thing that they allow, which I like, is reposting a post I wrote for Technorati here.

I finished my first post for Technorati last Friday and they published it a few hours later. By Saturday morning the link was Tweeted sixteen times, which means it generated more Tweets on its own than I did with all the posts I’ve done so far. I also got a very informative comment on the post, so to me this was a successful experiment. I do plan on writing more posts for Technorati and I also plan on reposting right here, for your convenience.

Enjoy.

Tuesday, September 20, 2011

Moving from Silverlight to MVC3

In this post I’d like to explain why we felt the need to abandon our Silverlight development in favor of MVC3.

As some of you may very well know, I’ve been pushing Silverlight within our company from as early as Silverlight 2 Beta 1, back in 2008. Still, this last summer I felt I had to raise the question: Is this still the right technology for our company?

Technology choices are about requirements

When we first chose Silverlight as our UI technology, we came up with a set of requirements. Our application should have a (near) zero footprint on client systems. It should be accessible through the web. Deployment on clients should be effortless or none existent. It should look great without a whole lot of effort. Silverlight checks all these boxes (it still does).

We write summer of 2010. The iPad has been around for several months now and it has been a great success. Smartphones are widely adopted to the point that we predict our customers will get interested in support for platforms like these when using our software.

Another thing we see is people working on more different platforms than before. Was it ok to ask for a certain browser in 2009, in 2010 our customers began to ask for a browser independent UI, not only on Windows, but also on a lot of other platforms.

To see what exactly would be the response of our customers we decided to build a native iPhone application with a limited set of functionality. We started the project early 2011 and published the first Dutch HRM app for any smartphone platform in may. It was a hit, not only because of responses by our clients, but also because of responses by our competitors.

Requirements shift, the world changes

This lead us to conclude that we needed to do something to support a new requirement. Our application, at least in part, should be available on mobile devices and tablets. And we should make sure we could drop the browser requirement we had active, even with our Silverlight 4 UI*.

That is why, during one of our meetings about what to build next, I felt the need to ask “Shouldn’t we move away from Silverlight and adopt ASP.NET MVC3 with HTML5?” It sure was painful, after investing over two and a half years in Silverlight to even suggest dropping it. However I felt then, and I still do, that a change had to be made. After some more debate on the consequences and some research, we are now putting in the effort to build the first parts of an MVC3 UI with the first steps into HTML 5 and CSS 3.

Luckily not all our efforts with Silverlight where in vain. We did deliver a good working product and we are committed to using, expanding and improving the middleware we developed for it. (Do you see the power of a Service Oriented Architecture?).

So is Silverlight really dead now?

Some of you may remember this post. In that post I state that Silverlight is actually the better technology for writing Line Of Business Applications. Even after researching ASP.NET MVC3 and HTML 5 further, I do still believe that, however because of the changes in how people use computers it simply fails to check one box for our customers.

Silverlight is no where near dead. It will still be used in many ways, including new platforms like Windows 8 and, for example Microsoft CRM 2011. Microsoft is integrating Silverlight in more and more of their own platforms. Also with the introduction of Silverlight 5 there will be many cool new features coming to the browser. Therefor I doubt Microsoft will drop Silverlight any time soon.

Consequences for Developers 42

Unfortunately our move away from Silverlight does have some consequences for this blog. First of all, my long running series of posts “Adventures while building a Silverlight Enterprise application has ended with part 41 (which is slightly painful for an obvious reason).

It also means I will no longer be writing posts for SilverlightShow.net. I’d like to use this opportunity to thank Svetla for supporting me for the past years.

And finally, it will also mean a lot less content on Silverlight, but hopefully a lot more content on MVC3, HTML 5, CSS 3, jQuery, etc..

It’s the end of another interesting period in my professional live and the start of a new one. I hope you have enjoyed my articles on Silverlight and I hope to see you around.

 

 

* The IE dependency was not actually caused by Silverlight, but by the integration with the Microsoft Report Viewer we used.

Friday, October 8, 2010

Developers 42 around for two years!

Today we celebrate the second anniversary of the Developers 42 Blog. In this article we look back at the past years and we look forward into the future.

Looking back

Wow, it’s been two years. Part of me feels like it’s been forever and part of me feels like I started yesterday. If I think about what I started this blog for, I guess it comes down to sharing my experiences as a developer with anyone who’s interested. However, if I now look back at what I got from this, I feel I got a lot more from building and maintaining Developers 42.

A learning experience

I guess I was a little ignorant when I first started out. I figured it would mostly come down to discipline to maintain a reasonable blog, but I found that it takes knowledge and skill to promote a blog and to keep everything running smoothly.

But also I found out that writing for a technical blog like this one, brings with it that you have to adapt your workflow to facilitate blog posts. One thing I find myself doing over and over, is generalizing scenario’s I run into in my day to day work. It can be very helpful in getting a better feel for the problems you work on, but it can also be a time consuming challenge to come up with good examples of something that is very specific to the field I work in.

Another thing I learned that surprised me, is the way referrals work. I never thought that putting a link in a signature for a forum would generate the results it did. Nor did I think republishing to CodeProject would bring me much hits but it does bring reasonable results.

Opportunity

Another thing I got from running Developers 42 is opportunity. Because of running a blog I get the occasional job offer, including offers to join interesting startups (unfortunately all kinds of reasons prevented me from jumping on to any of these so far). I also got invited to write for SilverlightShow.com, which I still enjoy doing from time to time.

I’ve also met new people and got the opportunity to help people from around the globe with issues they encountered, which is rewarding in itself.

Setbacks

Obviously is wasn’t all a big party. I’ve had to take a step back in posting at more then one occasion. Personal life and work life both interfered with my goals for Developers 42. This resulted in me only posting 18 times (not including this post) over the past year.

Defeat was also part of the deal. I decided to scrap the CodeEmbed4Web project, as it was clearly not going to a success. In fact I have lots of unfinished projects laying around, which I’m not likely to continue.

But enough of that. Let’s move on to more positive things.

The numbers

In fact the numbers might not all seem so positive. There was a reduction in both visitors and page views of around 27,5%. But if you compare that to the reduction of posts (around 35% less content), this suddenly becomes promising. If I would have posted the same amount as last year, hits could have doubled!

Looking at the number of subscribers reflects this positive image. There was actually an increase in subscribers of the past year. Check out the graph below!

RssGraph2010

I’m really happy with the progress made in this area. It it really motivating to know that people are interested enough to actually subscribe to my RSS feed.

Looking to the future

So what about the future? Well, if there is one thing I learned in the past year is that you can be to ambitious. I do have some plans for new things, but overall my main goal is to keep posting regularly. However if there is a topic you would like me to write about, even if it is only remotely connected to software development, I’d love to hear about it.

Further more, I hope to welcome more new readers in the coming year, both as subscribers, but also as loose visitors.

Thank you!

The last thing that remains is to thank you, the user of this blog, for sticking with me here. Without you this wouldn’t be much fun. I hope you have enjoyed yourself the past year as much as I have and that you have learned as much as I have.

A special thank you goes out to Dave Campbell from Wynapse, for so patiently following and linking to my blog. Another thanks goes out to Svetla from SilverlightShow.net for helping me out with getting published on their website.

I really value your feedback, especially if there is anything you would like to see different or added, or if you have any suggestions about topics to discuss. I hope to see you around this coming year and I hope we can share some insights.

Sunday, July 18, 2010

We’re getting it done

You might wonder what I mean by that. I’m referring to us moving into our new house. After about a month of hard labor, we’re finally seeing the results. We’re down to the details indoors and outdoors will be progressing in the coming week. I now have a decent place to work with a large desk and my PC right there.

That means it’s time to start going back to normal routine and blog a little. Last week I saw this keynote recording where Scott Hanselman talks about why all developers need a blog and how to make a blog suck less. Although I can come up with reasons why not all developers should have a blog, I do agree with him on the fact that you should engage in some form of social networking over the internet in order to be successful as a developer these days. And the pointers he gives on improving your blog inspired me to finally handle the spam issue I’ve been having here at Developers 42.

I already announced this earlier, but today I have finally turned on comment moderation. This will surely prevent any spam from reaching you as a reader. Unfortunately this also means having a delay between you posting an awesome comment and someone else being able to read that comment. I guess that’s just the way things are, the good having to suffer because of the evil spammers.

Still I hope this doesn’t prevent you from leaving your comments here so we can all interact and learn from one another.

Tuesday, May 25, 2010

Adventures while building a Silverlight Enterprise application part #33

In this post I want to look back and reflect. We’ve run into some issues with our project, so it seems like a good moment to learn some stuff from what we have and have not done.

Some housekeeping first

Before getting into all that though, I need to share some other stuff with you, dear reader. As you might have noticed I haven’t been posting as much as I used to. There are some reasons for that. One of them is that I’m busy building a new house (it’s almost finished) and it takes up a lot of time, getting everything organized, etc..

Another is the changes that went on in our company. I’m now heading up a team of developers and it takes more time and effort, leaving me with less time and energy to spend on writing posts.

And finally there is SilverlightShow.net. I’ve been writing some specific Silverlight articles for them. You can find all of them here. Writing for SilverlightShow means I have a more narrow format and there are some restrictions as to what I can write, but I do have a larger audience over there. This made me decide to write my specific Silverlight content for SilverlightShow and keep my other content here at Developers 42.

Something else I wanted to swing by you all is that I’m planning on enabling comment moderation. The reason being,  I’m receiving spam through the comments feature on a regular basis now. I do need to wait until I have moved into my new house and have a decent internet connection, so I can moderate any comments in a timely fashion.

Project issues

On to more important matters. Obviously I’m not going to go into detail about our internal affairs concerning the project. The goal here is to share some more generic pitfalls with you and think about what we need to do differently in the future to prevent it from happening again.

So what kind of issues are we running into? Let’s name some:

  1. Longer then anticipated Time-To-Market
  2. Organizational changes impacting the project
  3. Framework features don’t always map to implementation features

Let’s see how these issues manifested themselves and how we deal with them.

Longer then anticipated Time-To-Market

To have a better understanding as to how this happened, it’s important to know the history of the company and the team of people involved in the project. The company I work for already exists for over forty years. Obviously in the IT business this is forever. There are people working here for over twenty years (including developers). This company went from mainframe software to client-server and now to service oriented architecture. How is this relevant?

They calculated the amount of time it takes to build a client-server application with current tools, instead of looking into the more complex service oriented architecture and the extended time lines that come with it. This made for an unfounded estimate that is far from realistic.

Another issue contributed to this. As I started working for the company, there was no one dedicated to the project and priority was given to the current product. This meant that people with intimate knowledge of the current product where unavailable at critical points during the early stages of the project. To overcome this, I should have done more investigation on getting the scope of the project right, instead of taking other peoples word for it.

Changes have been implemented to reduce the problems caused by our project running for a longer time. At first there where plans to release the entire product suite at once and migrate our customers over a short period of time after that. It has become clear that this scenario will not work and we are working on a method for customers to migrate for a part of the software, running old and new next to each other (on the same data). Also a higher priority was given to our project so we can make more progress. And finally we’ve implemented some changes in how the project is organized, which leads me to the next topic.

Organizational changes impacting the project

Now, this wasn’t all bad, but it started out with some negative impact. Unfortunately we felt the impact of the financial crisis, which resulted in the loss of several developers. Most we’re reassigned to other departments, but some had to leave the company.

Also the project was reorganized several times, before the company reorganized altogether, impacting the project once more. Now we have a structure that works well, where we have only a couple of teams working on different parts of the product suite.

The problem with reorganizing is that it requires new procedures and reinventing the way people work together in a project. You need new forms of meetings and it takes time to get used to that. It can also create situations that take time to resolve. We’re now in the process of refining the current structure. So far we feel we can go forward with how everything works now.

Framework features don’t always map to implementation features

Because of the problems at the start of the project, we now have some mismatches between framework features and implementation features. This does slow us down. So why not just fix, them? Well, we could do this, but right now priority is given to get out the first deliverable version to a small customer group. This means most of the improvements we would like to make to the framework will have to wait until after we’ve delivered this first piece.

So what should we do differently to prevent this? Well, getting a better understanding of what the project entails, before actually starting to design a framework helps. Also a better analysis on how the bulk of the functionality is going to be built should help out here. We’re seeing several cases where using the tools developed is not working as we’d hoped. I guess knowing the users of a framework is every bit as important as knowing what features to include.

So did we do things right?

Absolutely! One of the things that keeps presenting itself is the way we have designed our generic business classes and how we have abstracted our service communication from the rest. This works great. As features are added to the generic code, we keep seeing how powerful this concept really is. The same goes for how we abstracted parts of the UI. We can add features in places we couldn’t have imagined as we started building the framework.

Conclusion

Just a short recap on what to look for when starting work on a framework:

  • Know the scale (both in terms of functionality as well as in data) of the software you’re building the framework for
  • Know the users of your framework
  • Analyze the way people need to be working in order to use your framework
  • Make sure you consult different types of users before committing to a certain work method
  • Make sure all the stakeholders understand what kind of effort is needed to build a decent framework

I hope you found it useful to read some of our experiences online. Please leave any comments below. They are greatly appreciated.

Wednesday, March 10, 2010

Adventures while building a Silverlight Enterprise application part #32

Today we want to look at a pitfall when debugging certain data binding code. But first I have some other stuff I wanted to share with you.

It’s been over a month. Where have you been?!?

I’m sorry I couldn’t post in the past month. I’ve been really busy with a lot of different stuff. As you might already know, I’m having a new house built and it takes a lot of my free time.

My working time has been busy as well. I have a new role as team lead for a small team now, which took a lot of time to prepare for. Also I’ve been training a group of people to build software with our new framework. All in all, it’s been a hectic time and I don’t think much will change in the next couple of months.

So you’ve been completely off the grid?

Well, not completely. I’ve written my second article for SilverlightShow.net, which you can find here. The article describes how I built a simple interactive spider, that uses JQuery from Silverlight to get pages from the web. There is some nice code to parse HTML to get links and there is a simple but effective data binding trick in there, so go check it out.

Also, I’ve done some thinking about where to go with this blog. One of the things I’ve decided is that I will stop development on CodeEmbed4Web as I found there are better ways of embedding code in my blog posts. It will still be up for download and if anyone is interested in the source, drop me a line.

But enough about all that, let’s get down to business.

Warning! Debugging can be hazardous for your health and it can even be deadly!

So here is the case. I was working on a feature in our application, where I needed some code to run whenever a certain property was set by the user. I went and tested my code and everything worked as expacted, until…

…I first entered a new value in a TextBox control and right after that I clicked a HyperlinkButton which should trigger code to save the change I made. Because of a breakpoint in the previously mentioned code, I ended up in Visual Studio. I pressed F5 to continue running the application and then I checked to see if my change was actually saved and to my surprise, it wasn’t!

I placed a breakpoint in the clicked event of the HyperlinkButton and tested again, only to find out that the clicked event never fired. I went on and started debugging the whole code trail that should have let up to the click event, but with no luck.

Eventually I decided to build a small test application, as I find them easier to analyze. I tried replicating the same behavior, but the only way I could get it not to register the clicked event, was by showing a MessageBox whenever the user changed a value right before clicking the HyperlinkButton. So I went back to the original application and tried to find any code that might have a similar impact and I obviously came back empty handed.

Finally, after trying out different controls, changing properties, etc., I decided to remove all the breakpoints from my code and try again. All of a sudden everything worked! As it turns out, debugging code that is triggered before a click event (like data binding code, which is triggered as a result of loosing focus, which is executed first), will prevent the click event from firing. Thinking about it, it all makes sense, but when you’re debugging it, it doesn’t. Debugging is deadly!

Tuesday, November 3, 2009

SilverlightShow.Net and me

It's been a bit of a crazy couple of weeks. I learned we'd have to move within the next two months, because the house we currently live in is sold. I've been quite busy with getting parts of our new application finished.
Also I received an invitation from the editors at SilverlightShow.net to write articles for them. Obviously I'm honored (and it's great for my career :-) ), so I got started right away.

On Tuesday my first article was published on SilverlightShow.net.
You can find it here.

Many thanks go out to the editors at SilverlightShow.net for their great support. A special word goes out to Svetla Stoycheva who has supported me through the process of getting this post on SilverlightShow.net.

Thursday, October 8, 2009

Developers 42 online for one year!

Today is the day, Developers 42's first anniversary!
In this post we'll look back to see what was hot and what was not. We'll also look forward to the coming year. You now, make plans, decide where to go from here, etc.. And of course their will be some words of gratitude as I couldn't have done it all by myself.

The past year
On October 1st 2008, I started to work for a new company in a role I hadn't been in for years. I was going to work on a product again. I decided I needed a blog to keep track of what I do and to share some of my experiences with you out there. It took some preparation, but on October 9th 2008 my first post went online. It was about a trick to layout a report in Reporting Services 2005 and in the first week it got... wait for it... zero hits, nothing. Obviously no one actually knew about my blog and I felt I needed to keep it that way until I was having some more content online.
This went on for a while, until I posted this article, called Lookup Combobox in Silverlight 2. Now hits started dribbling in, still one at a time, but they did come. This article proofed to be a winner. It is actually the single most visited article of the past year, with 1169 unique page views, it is only second to the home page.

My big break came on October 26st, when an article I wrote a couple of weeks before was picked up by Dave Campbell and put on his Wynapse Blog. All of a sudden page views skyrocketed to 148 unique views the next day! Things didn't slow down until March 2009. By then I hit a pique of 306 unique views on February 20th, which is still the all time high.

But having page views isn't the only thing. I looked at the RSS feed stats and there is the real cool stuff. The feed has seen a steady growth throughout the past ten months, from 5 to 10 subscribers in December all the way up to around 85 subscribers right now. How cool is that?
Check out the graph:

And I've done some stuff as well. I published beta 1 of CodeEmbed4Web (not with great success unfortunately). I've written 25 posts in the Adventures series and I now have my articles published on CodeProject.com as well. Some of my articles are getting serious hits there, exceeding anything I get on my blog. Overall it's been a hectic year with ups and downs, but I'm still happy to be here.
What kept me going was a comment every now and then with a 'Thank you, I needed that.' or a 'I was stuck on this and you fixed it' kind of message. These are a great encouragement to keep posting.

Plans for the coming year
As I promised, I'll also give a peek into what we want to do next year. Off course I'd like to see some growth in traffic, both through the site as well as through the RSS feed. But that's not the only thing. I'm still working on moving the blog to a new custom platform. In fact I've got something to show you right now:


This is the new logo. The music was done by Kevin MacLeod. You can find his website here.

I'm still planning on releasing CodeEmbed4Web RTM. As for true content, I'm looking into doing more nitty-gritty stuff on C# and .NET, maybe diving into some of the inner workings of the framework, especially with the launch of C# 4.0 coming up.

Some words of gratitude
There are some people I'd like to say thank you to. First of all I'd like to thank Dave Campbell for sending all this traffic my way. I'd also like to thank Sean Ewington from CodeProject.com for being a great help with publishing my articles there. Another thank you must go to Drew Bennet from I'm not a famous blogger. His work encouraged me to go on when things didn't go so well.
The last big thank you goes out to you! Yeah, you there on the other side of the line, thanks for being here.

Callout to all readers
Please let me know if there are things you'd like to see changing on my blog. It could be there is some subject you'd like to see discussed, it could be you'd like to see a different format, have more content or less, or you just don't like the font I use, but please give me feedback so I can improve.
Another thing I'd like to ask you all is to spread the word if you really like my blog or a particular article. Please let your peers know.

Thanks again, and I'm looking forward to your comments.

Friday, August 21, 2009

Pimpin' the blog part #3

Today we'll look at how I've build my own RSS feed in ASP.NET 3.5 and using Linq2SQL.

Before we dive into that, I would like to announce that my articles are now fed trough this RSS feed to CodeProject.com. The latest of my articles (at least most of them) are now available there too. I would like to thank Shawn Ewington from the CodeProject for working with me an supporting me, so I could achieve this bigger audience.

Now, back to business. As you may remember from part #1 of this series, the first goal for me was to customize my RSS feed, so I could add categories to my feed without messing up my navigation. I also lined out the fases I would go trough to get to my new and improved blog and after leaving you in part #2 I reached step three, wich means I now have my content up and running in a database on the new platform and it gets updated trough RSS from the Blogger.com platform.

I've now used the code I wrote for part #2 as a starting point for building the new RSS feed. As I had a great experience with the SyndicationFeed class for parsing a feed, I figured I might as well use it to publish a feed as well. The general steps needed to get the feed published are these:
  1. Setup a SyndicationFeed object with some general information like title, author, etc.
  2. Load the articles from the database and convert them into feed items
  3. Publish the feed
The first step actually did take some work as I wanted a lot of things to be configurable trough my web.config and also it takes some extra code to set most of the properties. To help me out with loading these settings I've build a SyndicationSettings class which holds the constants for the config key names and accesses the ConfigurationManager to get the actual values. I've made it a static class, so it is as easy to use as possible.

Setting up the feed is done in the SetupFeed method:
private static SyndicationFeed SetupFeed()
{
SyndicationFeed feed = new SyndicationFeed();
SyndicationPerson person = new SyndicationPerson(SyndicationSettings.SyndicationPersonEmail,
SyndicationSettings.SyndicationPersonName, SyndicationSettings.SyndicationPersonUrl);
feed.Authors.Add(person);
feed.Contributors.Add(person);

feed.Categories.Add(new SyndicationCategory("CodeProject"));

feed.Copyright = new TextSyndicationContent(SyndicationSettings.Copyright,
TextSyndicationContentKind.Plaintext);
feed.Description = new TextSyndicationContent(SyndicationSettings.Description);
feed.Generator = GeneratorName;
feed.Id = SyndicationSettings.FeedId;
feed.Links.Add(new SyndicationLink(new Uri(SyndicationSettings.HomePageLink)));
feed.Title = new TextSyndicationContent(SyndicationSettings.FeedTitle);
return feed;
}

As you can see I've created a SyndicationPerson object to be reused both as the author and a contributor.

The next step is to load the articles from the database and convert them into SyndicationItem instances. First I needed to get them from the database, for which I expanded the functionality of the StorageConnection class I wrote in part #2. The basics are pretty straight forward, but as I was still fairly new to Linq2Sql I struggled a bit with getting the categories to load with the data automatically. Here is the GetArticles method from the StorageConnection:
public static List<Article> GetArticles(bool loadCategories, int maxNumberOfArticles)
{
List<Article> articles = new List<Article>();

DataLoadOptions dataLoadOptions = new DataLoadOptions();
if (loadCategories)
{
dataLoadOptions.LoadWith<Article>(article => article.ArticleCategories);
dataLoadOptions.LoadWith<ArticleCategory>(articleCategory => articleCategory.Category);
}
using (Developers42_DataClassesDataContext context = new Developers42_DataClassesDataContext())
{
context.LoadOptions = dataLoadOptions;
articles = context.Articles.OrderByDescending(article => article.PublicationDate).Take(
maxNumberOfArticles).ToList();
}
return articles;
}

I've used the LoadOptions property to let the Linq2Sql framework know I want to include both the ArticleCategory and the Article entities while loading the Articles. Further more I used the OrderByDescending method to specify that I want the Articles on PublicationDate and I used the Take method to specify that I only want to load up to 25 articles at a time.
Converting the Article objects into SyndicationItem objects is as simple as calling the constructor including most of the properties and then adding the categories.

As the final step all that needs to be done is to publish the result to the client. To do this, we need to first clear the existing response buffer, to make sure we don't send anything already in the template. Next we can simply create and XmlWriter that has the response stream as the underlying stream and call the SaveToRss20 method on the SyndicationFeed with the XmlWriter as a parameter. This is how the code looks:

XmlWriterSettings settings = new XmlWriterSettings();
settings.Encoding = Encoding.UTF8;
XmlWriter writer = XmlWriter.Create(Page.Response.OutputStream, settings);

Page.Response.ClearContent();
feed.SaveAsRss20(writer);
writer.Flush();

As you may have noticed, building your own RSS feed is easy when using the SyndicationFeed class. To help you even further I've included a link to the source here. It also includes the code from part #2 for parsing an RSS feed.

I hope this post was useful to you. Next time we'll look at parts of the new version of the Developers 42 blog.

Thursday, August 13, 2009

Pimpin' the blog part #2

In this episode of Pimpin' the blog we are going to have a look at how I will sync my data between Blogger.com and my new hosting platform. This involves a not well known feature from .NET in relation to RSS and using Linq2SQL. Eventually we'll end up with a tool that reads by Blogger RSS Feed and stores it in a SQL Server 2005 Database (or any other compatible database for that matter).

Thoughts on synchronization
As I laid out in part #1 I'm far from ready to give up my Blogger account as I still have many things to replace before I can do so. However I don't feel much for keeping two stores for the same information synchronized by hand. I have better things to do with my time than that (altough not that much better :-) ).
The first thing that came to mind was actually RSS as it keeps all the blog aggregate sites up to date as well, so why not use that? Besides, the final trigger to do all this was to customize my RSS feed in the first place, so why not use it as a source?
As a good developer I also went to see if I had any alternatives. I could opt for a HTTP/HTML spider, but it would be awkward, messy and complex. I could try and automate the export process for Blogger blogs, but again, awkward, messy and complex.

Loading a feed
So RSS it is then. The entire process is relatively simple:
  1. Get the feeds xml content
  2. Parse the feed into articles, etc.
  3. Store the articles and related data in the database
The first step is easy. Just take an HttpWebRequest and point it at the feed. Here is the code:

HttpWebRequest request = (HttpWebRequest)HttpWebRequest.Create(FeedUrl);
if (UseProxy)
{
request.Proxy = newWebProxy(ProxyUrl);
}

HttpWebResponse response = (HttpWebResponse)request.GetResponse();
Stream responseStream = response.GetResponseStream();

So as you can see. it first sets up the HttpWebRequest, so it can get to the RSS Feed (using a proxy if needed). Then it just gets the response stream which then contains the XML for the RSS Feed.

The next step got me thinking. The first solution that popped into my mind was to use Linq2Xml. However that would involve a lot of code to get to all the different parts of information I needed. I googled around, read some blogs, until I ran into someone mentioning the SyndicationFeed object that's new in .NET Framework 3.5. I figured I would give that a try to see how it works and I could always go back to parsing the feed myself.

Here is the code to actually load the response stream into a SyndicationFeed instance:

XmlReader reader = XmlReader.Create(responseStream);

Feed = SyndicationFeed.Load(reader);

Wow, that was easy, now wasn't it? Keep in mind however that you do need to add a reference to both System.ServiceModel and System.ServiceModel.Web to make this work.
What I ended up with is a class that would handle loading the feed into a SyndicationFeed object that handled everything I needed in under fifty lines of code!

So that tackled step two of the process.
All that's left is to store it into the database. As I mentioned earlier, I chose to use Linq2Sql to handle this for me. Why? I have had extensive experience with Entity Framework and I do think that for large solutions it can be a good choice, however it does take a lot of effort to make it do what you want, which is not what I needed here.
I read up on Microsofts strategy on data access and why both Entity Framework and Linq2Sql are pushed and found out that Linq2Sql is actually meant to support RAD on smaller projects, or at least for smaller data access layers. As my data model only consists of three tables, I guess my project would qualify as small.



I'm not going to bother you with the details on how I stored my articles trough Linq2Sql and just go ahead and post a link to the code below.
The main program to control this is more interesting:

string feedUrl = ConfigurationManager.AppSettings[FeedUrlConfigKey];
RssFeedReader reader = newRssFeedReader(feedUrl);
reader.UseProxy = UseProxyTrueValue.Equals(ConfigurationManager.AppSettings[UseProxyConfigKey],
StringComparison.OrdinalIgnoreCase);
if (reader.UseProxy)
{
reader.ProxyUrl = ConfigurationManager.AppSettings[ProxyUrlConfigKey];
}
reader.ReadFeed();

foreach (SyndicationItem feedItem in reader.Feed.Items)
{
List<string> categories = newList<string>();
foreach (SyndicationCategory category in feedItem.Categories)
{
categories.Add(category.Name);
}
StorageConnection.AddArticle(feedItem.Title.Text, feedItem.Summary.Text, feedItem.PublishDate.Date,
feedItem.Id, categories.ToArray());
}


First I set up my RssFeedReader instance and call ReadFead on it. This results in a SyndicationFeed on which I iterate trough the Items collection. Then I get the categories and feed them into my StorageConnection class which makes sure everything is properly stored in the database. The StorageConnection class makes sure nothing is duplicated even if the same article is added more then once.

Here is the source:


In part #3 of this series, we'll look into building a new RSS feed with some customizations, based on the data we've retrieved today.

Sunday, August 9, 2009

Pimpin' the blog part #1

In this article I will describe to you why I want to change my blog, what I'm trying to achieve, how I plan to do that and whats in it all for you.

Why?
After writing only a few articles in Blogger and reading up on how to build a usable blog, I knew that at some point I would have to replace Blogger with something custom build. As time passed and I tried to do more and more things with my blog, I ran into more and more things that I couldn't do as I wanted to do them.

Recently, as some of you may have noticed, I got a comment from Sean Ewington, who is the Chief Technical Editor for The Code Project. He invited me to publish my blog on CodeProject.com (thanks, Sean). To do this I would simply add my blog's RSS feed to their system and add a category to my articles, stating that they should be available on CodeProject as well. Unfortunately that last step is not possible for me, as that would mean I would now have a CodeProject category on my blog, which is not what I want.

This latest thing on the list of things you can't do with Blogger, triggered me to finaly get to work on this and plan some new code.

What?
Some things I want to be able to do after the complete transformation has happened:
  • Customize my RSS feed
  • Easier to customize styling
  • Have more control on advertising (individual posts have specific ads, etc.)
  • Use Silverlight for at least some part of my blog
  • Have a better layout with three columns
  • Have an easier to maintain and easier to use navigation
How?
To get this all done requires some planning. It won't happen all in one go, obviously. First thing I should state is that I had a windows hosting account lying around for a while now and I will be leveraging that account for my blog 2.0.
Here are the steps I plan to follow for getting up and running with a new platform.
  1. Get a database up and running to store content
  2. Get the content on the new platform to sync with the content on Blogger
  3. Build a new RSS feed and publish it trough my feedburner account (so if you have a subscription, you won't notice the change).
  4. Design a new layout for my blog
  5. Implement the new layout
  6. Test the two blogs side by side
After that I'm not sure. I might want to redirect all traffic coming to http://jvdveen.blogger.com/ to my new site, but I'm not sure what will happen with search engines and their spiders and I'm not sure if I'm even allowed to do this. However I'm still happy with the Blogger editor and I'm not sure if I want to build a completely new editor so I can then kill my Blogger account. This is something I'll be thinking about later on. If you have any suggestions, please let me know.

Why should you care?
Well, you don't have to care, however... as the title of this post suggests, I will be publishing about the whole process of creating my new blogging platform and then moving in. Not only might you learn something, I will also make available handy code in the process, that you might use yourself. So stick around, learn and benefit.