jeffaBlogger Status Report 2009-08-24

Whew!

Had a busy, but great weekend working on jeffaBlogger.

The biggest thing I did was implement CSS themes. BlogEngine.Net uses variations on themes (literally) from Free CSS Templates and I like BlogEngine.Net (you’re soaking in it now I mean you’re reading a blog that uses it), so I went to check them out.

Wow.

TONS and TONS of CSS themes, some great some not so great. Enough great that it is worth your time to check them out. Even if you don’t use one of their themes, you can learn a bunch about CSS.

At this point jeffaBlogger lets you select a theme very easily on the Site Settings screen and it will instantly switch over.

The process of implementing this made me search out some info I didn’t know I needed. Originally I was storing the app name in the Application settings the way you can in webforms. The only place you could do that, however, is in the default.aspx codebehind file. That pretty well breaks every concept of MVC right there.

I knew it was a bad idea, but I figured I would swap it out as I learned more about MVC. Sure enough, when it came time to dynamically pick the CSS theme, I just couldn’t stand the situation any longer. Not only was it a bad idea, it didn’t work very well, since you RARELY hit the default.aspx file in MVC. That meant changes didn’t show up right away.

The answer came from Stephen Walther in his book ASP.Net MVC Framework Unleased. I plan to write a real review of this book soon. Suffice it to say that this little tidbit gets a thumbs up…

The general gist is that you:

  1. Create an abstract base class for all your controllers (I had already done that)
  2. In that abstract class’ constructor you add the data to the View Data object (I hadn’t done that)
  3. You now have access to that data in every view (including the Master Page)

I’m still reading the book, but I skipped ahead to read that section. :-)

Well, even I have to sleep eventually, so goodnight all.

Posted on 8/24/2009 1:17:39 AM by jeffa

Permalink | Comments (4) | Post RSSRSS comment feed |

Categories:

Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Related posts

Comments

August 29. 2009 08:19

You share valuable! I would like to thank you for sharing your thoughts and time into the stuff you post!! Thumbs up.

hombres solteros us

September 25. 2009 04:24

That is great and really nice, thanks for posting that one.. keep it up!

car leasing UK

November 16. 2009 04:07

This is really nice post.


Regards
Hickman



Sexual Harassment Lawyers Ca us

November 17. 2009 05:38

I will bookmark and continue reading your blog in the future! Thanks alot for the informative post!


Regards
Bowe


honda pittsburgh us

Comments are closed