Archive for the 'NBlogr' Category

08JulThis blog has been moved and upgraded

I moved my blog to be on webhost4life.com

I’m also changing blogging engines and announcing that I will stop development on nblogr.
NBlogr was almost ready for a v1 release but it has too big of a memory footprint. The footprint is 70MB which is too much for a blog.
To fix this I would have to change my data access layer to a different approach.  I decided instead to switch to subtext and I’ll see which features I can provide from nblogr for subtext as plugins. I also don’t have the time anymore to occupy myself with nblogr.
The feed should remain working without a change. I upgraded my blog to subtext using Ayende’s instructions
Which means that the permalinks should still work but urls that contain a guid won’t work anymore.
The reason for moving from dasblog to subtext are the same as why i started nblogr in the first place. Dasblog has been nothing but a hassle for me. It is often down, does only trackbacks to my own domain, and many more annoyances.

01MayNBlogr Presentation in Wellington


Tonight I got the chance to present my nblogr application to a larger audience. Unfortunately I’m in the process of fixing bugs in NBlogr and one of those bugs required me to make a change to NBlogr.Web/views/default/shared/mainmenu.boo . I had made this change on sunday around midnight right before I went to bed. Of course I forgot to test the application because and it wouldn’t run on my presentation.  When I got home it took me about 3 minutes to fix. I had to import a reference to Base4.Storage in the mainmenu.boo file.

I’d like to thank everybody for coming, their patience and listening to my ramblings.

Anyway I’ve included my slide deck in this post and I think it might be a good idea to post a couple more links to some of the people I mentioned in my talk.
http://www.base4.net  – Alex James, Auckland
http://blog.bittercoder.com – Alex Henderson, Auckland
http://www.ayende.com/blog
http://hammet.castleproject.org

http://www.castleproject.org
http://www.nunit.org
http://www.nblogr.com

svn repository:
https://svn.koolkraft.net/nblogr/trunk

NBlogr-Wellington 02 _05_2007.ppt (440 KB)

To get nblogr running on your machine follow these steps :

Make sure you have a subversion client installed or subversion itself.

C:\Projects> svn co https://svn.koolkraft.net/nblogr/trunk
C:\Projects> osql -E
1> create database nblogr
2> go
1> quit

open the nblogr solution.

change the connection string in web.config

The different configuration options are explained in the web.config

If you want to use a different extension than aspx you have to change the httphandler configuration and set the extension in nblogr/routing

if you want urls to be rewritten without an extension you will have to enable wildcard handling.

hit ctrl-f5 and it should take you through the configuration. If ctrl-f5 doesn’t work try setting up the application in IIS.

Update:
James Hippolite from telecom was so kind to blog most of the bullet points of my slides. Which can be found here http://tvornz.spaces.live.com/blog/cns!A93B6100E328706D!388.entry?_c=BlogPart&_c02_owner=1

12DecFinally back to nblogr

I can finally spend a couple of days on nblogr. I hope I get enough done to have a releasable version after this time.

14NovAnother view engine for castle

Ken Egozi has created a c# and vb view engine for castle. It’s not yet available for download but looks promising

You can check it out at : AspView – Yet another MonoRail ViewEngine

As I mentioned previously that I do like boo but i miss intellisense in visual studio and let’s face it at this moment NOTHING beats visual studio as an IDE. Although sharpdevelop scores a lot higher than eclipse in my book. And what an amazing tool they built with so little resources in comparison to the other IDE projects.

I like c# obviously but have been toying around with ironpython a little lately. Once i pass the decorator bit I’d sure love to port the brail view engine to an ironpython view engine (the only problem i see there is that i don’t have time :S to really do it.)

Anyway I thought I might share with you what i have planned as non-workrelated projects for the year that is to come.

1. Finish nblogr
2. Make nblogr work on linux and on mysql and/or postgres
3. Create the ironpython view engine (from here onwards i want to be able to use ironpython as my primary language)
4. Add forums to nblogr
5. Add CMS capabilities to nblogr (very distant future)

Let me know what you think about the ironpython view engine ?

As stated before I would love some help in any one of my side projects of course. Just drop me a line and I’ll figure out where to fit you in :)

I whished I had some more interesting stuff to talk about but the last 5-6 weeks I’ve been buried in some application and hoping to finish it this week.

16OctBase4 on Castle continued… The facility

Much of what I’m going to show today has been borrowed from Alex Henderson on the storage facility.

This post continues the hosting base4 inside your web application post

To integrate base4 in castle you can register either components or create a facility which allows it to hook into some bits of the castle life-cycle.

It doesn’t make such a big difference when actually writing code except for the fact that you have transactions managed by castle, caching etc practically for free.

The ObjectTransaction that is available in base4 is built on the transaction scope and uses TransactionOptions.Required. Translated freely this means it will attach itself to an existing transaction if one exists if not it will create one.

So below I’ll first put the code for the storage facility and the base4TransactionManager and the configuration in the config files.  The full version of these files and the classes can be found in the source control repository of NBlogr

The storage facility

namespace NBlogr.Common.Base4Integration

{

    public class Base4StorageFacility : AbstractFacility

    {

        protected override void Init()

        {

            // If no context has been set yet (but should be done in application_start) set the default context.

            if (StorageContext.Default == null)

            {

                string base4Context = FacilityConfig.Attributes["base4Context"];

 

                if (string.IsNullOrEmpty(base4Context))

                {

                    throw new StorageException(“The Base4StorageFacility requires a \”base4Context\” attribute to be set”);

                }

 

                StorageContext.SetDefault(base4Context);

            }

 

            // Add the transactionmanager to the registered components

            Kernel.AddComponent(“base4.transactionManager”, typeof(ITransactionManager), typeof(Base4TransactionManager));

 

            // Add the IItemcontext to the registered components

            Kernel.AddComponentInstance(“base4.defaultContext”, typeof(IItemContext), StorageContext.Default);

 

            // Add the base4Dataobject

            Kernel.AddComponent(“base4.dataObject”, typeof(IDataObject<>), typeof(BaseDataObject<>));

 

        }

    }

}

 

 

The transaction manager

 

 

namespace NBlogr.Common.Base4Integration

{

    [PerThread]

    public class Base4TransactionManager : DefaultTransactionManager

    {

    }

}

 

The IDataObject interface

 

 

public interface IDataObject : IBaseDataObject

    where T : class, IItem, new()

    {

        void Delete(T item);

        Base4.Storage.IItemList Find(ObjectPath oPath, string sortExpression);

        Base4.Storage.IItemList Find(string oPath, string sortExpression, int pageNumber, int pageSize, out int pageCount);

        Base4.Storage.IItemList Find(ObjectPath oPath, string sortExpression, int pageNumber, int pageSize, out int pageCount);

        Base4.Storage.IItemList Find(string oPath);

        Base4.Storage.IItemList Find(ObjectPath oPath);

        Base4.Storage.IItemList Find(string oPath, string sortExpression);

        Base4.Storage.IItemList FindAll(string sortExpression, int pageNumber, int pageSize, out int pageCount);

        Base4.Storage.IItemList FindAll(string sortExpression);

        Base4.Storage.IItemList FindAll();

        Base4.Storage.IItemList FindById(Guid Id);

        T GetById(Guid Id);

        T GetOne(string oPath, params object[] parameters);

        T GetOne(string oPath);

        T GetOne(ObjectPath oPath);

        T GetOneUsingSQL(string SQL);

        T GetOneUsingSQL(string SQL, ObjectScope scope);

        T GetOne(string opath, ObjectScope scope);

        T GetOne(ObjectPath path, ObjectScope scope);

        T Save(T item);

        string SortExpression { get; set; }

        void DeleteAll();

        void Delete(ObjectPath path);

        void Delete(string path);

        void Delete(string path, params string[] replaces);

        IItemList Find(ObjectPath path, ObjectScope scope);

        IItemList FindUsingSQL(string SQL);

        IItemList FindUsingSQL(string SQL, ObjectScope scope);

        IItemList Find(ObjectPath path, ObjectScope scope, string sortExpression, int pageNumber, int pageSize, out int pageCount);

        IItemList FindAll(ObjectScope scope, string sortExpression, int pageNumber, int pageSize, out int pageCount);

    }

 

The facilities.config file

 

 

<configuration>

 

  <facilities>

   

14OctSome news on nblogr

NBlogr isn’t dead.. It just underwent a transformation for the better.

I also changed the title of the application from NBlogr – An atlas blogging engine to NBlogr – a blogging engine built on simplicity
The reason for this change is the fact that it is currently built using jquery as javascript library.  I will look at atlas again when it releases.

I moved NBlogr to run on castle.  During the course of the next week I’ll complete my posts on how to do Castle development with base4

If you’re interested in how it looks or you want a preview the last source in the repository builds and you should be able to run it in the development server of visual studio

I had a chat with JD a while ago and he asked me about plugins. At that time I knew already I wanted to provide something for users to be able to add plugin’s to the database.  But I hadn’t really given it much thought on how I would do that.

My reasoning on this subject is :
I want users to be able to add a plug in at runtime. Plugin’s for a blog are lately both server related client side. So I will create a plugin factory with a couple of providers like a google video provider, grouper video, flickr, bookmark services.  And you can write a plugin using javascript and ironpython code. The engine will evaluate that code at runtime and there has been no application restarting etc. If somebody has a better plan for doing a plugin infrastructure please let me know I haven’t done any of the ground work for this yet but create a schema in base4 so now would be the best time to stop me from making big mistakes.

Another improvement is the fact that when nblogr reaches release it will come with a couple of templates for you to chose from. I’ll try to include one that is built on the css scheme of csszengarden that way you’ll have an infinite repository of css to make your blog look differently instantaneously.

The next improvement is that a user is now able to mimic wildcard requests and nblogr will handle those. So there is no need for appending aspx to pages for rewriting (routing it is called in monorail)  You get the choice in the config file to have your webserver handle the wild card mapping or nblogr. When you choose for nblogr nblogr will need write access to 2 folders in your website and create a shadow folder structure to represent the rewrite tree structure. There is weaker point here and that is that the first default document in IIS must be set to Default.aspx If you can map an extension to aspnet_isapi.dll at your webserver then you can also have the urls rewritten using a branded extension.

I think that this are the 3 major changes for the moment to the engine.  This did set me back for the next release with a couple of weeks but in the end the final release can be done much more quickly than it would have been possible using the code I had before.

I also promise that this time things mostly stay as they are. There will be no more experimenting but just getting Nblogr to a proper release state and shipped.

02SepPreview release of NBlogr

Today I put a preview release of NBlogr online.

I still have to change the online site but will do so very shortly.

This release has very basic functionality and is not yet feature complete so a lot may change later on.

If anybody feels like joining the project do not hesitate :) All help I get is extremely welcome.

http://www.codeplex.com/Release/ProjectReleases.aspx?ProjectName=Nblogr

I’m heading into a very busy week/couple of weeks so I’m not sure if I will be able to spend as much time as I’ve been spending lately on the project.  But I think every week I will be able to show some progress at least.

If you feel like it go ahead and give it a try but don’t upgrade your blog just yet :) .

I’d be keen to know what your thoughts are on the subject.

01SepFileUploading for NBlogr

To upload files in nblogr. I wanted the user to have the possibility to upload as many files as they wanted but only show one file element.

The upload procedure has to work without reloading the page entirely but there is no way of getting the size or the bytes of a file through the html input file control from clientscript without popping up a security warning.
And what do I personally think about security warnings : they are a necessary evil but limit you a lot in the development of contemporary sites with rich client interaction.
If I am to present a site to my parents and they have to figure stuff out themselves I’m pretty sure that once the read the words : Security warning, Potential risk etc… they will click no ==> site doesn’t work ==> site == crap

I wanted to include an upload with progress bar but decided to let that idea go and just give an implementation of a multiple file upload with a single inputelement. Maybe I will put this in during the next iteration. That way I can probably release a ctp this weekend and start thinking about a plugin architecture (thanks for the idea JD)

Because of the file issues i have to run it in an iframe :-s and have the page and the frame talk to eachother.

Recent Flickrs

    Blogroll

    Recent Listening

    Scrobbler