kenegozi.com

<form id='kenegozi' action='post'></form>

   
2006 Nov 27

Nullable Object Must Have a Value

tagged as: miscellanea

Must it? Are you sure?

Well, this is a screenshot taken today by my colleague, Moran Benisty (aka the localhost blogger):

Nullable object must have a value

2006 Nov 27

AspView rev 38 is out

What we have:

1. Default Helpers are now declared in the AspViewBase. It means that you can use <%=FormHelper.LabelFor(...) %> without the need to declare the helper at the begining of the view.

2. the compiler was refactored to allow for better testing, and for implementation of further view languages. vurrently I've started with VB.NET but it is not working yet, since I have no time to make sure the VB syntax is correct. The tests of the compiler are missing due to some stupidity on my side, of not commiting the TestCase ...

I've wanted to let svn access but I have some trouble with that. I've started a sourceforge project but I cannot upload the repo to the site. I did all they've asked on the site but the import process reporting failure no matter what I do. I guess that the best way will be if the Castle team would allow AspView into it's codebase, maybe on the Contrib repo to begin with ...

So meanwhile you can download the current bits from here.

Keep me posted,

Ken.

2006 Nov 26

Hammet likes AspView

tagged as: castle | monorail | aspview

Just read it.

I started commenting to that post, but I figured that the people who've downloaded AspView up to now (I have about 30 or so downloads last week) will want to read it, so I'm posting it here.

So, as Hammet said, the extension is determined on the web.config.
The .aspx is used for the view source files so VSNET will color and intellisense them. however, the actions are mapped to an extension that is mapped in the web.config.
Still, AspView have some .aspx hard-coded in it, simply cuz I needed to get something working, and working fast.
This is why I've left non-crucial features out for the moment, such as:
1. Dynamic compilation (It is non crucial. IMHO real applications should be pre-compiled, while the dynamic thingie is for design time only)
2. Nicer code (more maintainable, less typos such as "extention", refactoring for testability).
3. View Components (subviews are doing the trick for me for now, but in order to mature there must be implementation for it)
4. using the .config.
5. A lot more

btw, helpers ARE supported, You just need to add the declaration in the place, like

<%
    Post[] posts;
    AjaxHelper AjaxHelper;
    AjaxHelper AjaxHelper;
%>

In the trunk there is some improvements, such as refactored AspViewCompiler, so it uses a PreProcessor that has subtypes. Currently it has a working CSharpPreProcessor, and a non-working VbPreProcessor. I intend to try adding a BrailPreProcessor ... I hope to be able to mix view languages in the same site. each language group will be compiled to a module, and linked to the CompiledViews.dll assembly.

Since I haven't set any public repository yet, and since I do not have much time for uploading bits manually, you cannot see the work in progress, and it's my bad. I'll upload the latest stuff soon, and I'm working on setting up a repo somewhere. btw - do you have recommendation? (CodePlex? Sf? )

2006 Nov 19

Trackbacks are off

tagged as: miscellanea

Sorry. To much spam.

2006 Nov 16

AspView - first release

So I'm releasing AspView.

You can download the source from here.

It was written against the Castle 1.1 from the trunk, build no. 152.

Please note that in order to run the TestCases you'd have to make sure that the latest Castle.MonoRail.TestSupport is in the GAC.

The documentation is poor since I have a little time now. I am working on a website for my employer (that utilizes AspView and AR) and until the first beta release I won't have time to do anything but major bugfixes. This project isn't open sourced so I won't be able to share it's sources, however since this will be a public site, it would serve as a Proof Of Concept to the MonoRail and AspView.

The views MUST have the following structure:
    a. Page header - Must be present for intellisense to work:

   1:  <%@ Page Language="C#" Inherits="Castle.MonoRail.Views.AspView.ViewAtDesignTime" %>

    b. Directives - Not mandatory:

   1:  <%@ Import Namespace="System.Text" %>
2: <%@ Import Namespace="System.Drawing" %>

    c. Properties decleration - Currently it's mandatory. If you have no properties you mast have an empty block:

   1:  <%
2: string[] strings;
3: DateTime today;
4: int index;
5: %>

or just

   1:  <%
2: %>

    d. View body

In a layout view you place the inner view using the ViewContents property, like this:

   1:  blah
2: blah
3: <%=ViewContents%>
4: blah
5: blah
2006 Nov 15

Wireless Enregy Transfer

tagged as: miscellanea

I've read an interesting post today on Scientific American.

They say that researchers are after a way to deliver power wirelessly to devices.

So in the near future I'll be able to use my laptop without worrying for power supply cords. Just turn it on and start to work. no need to dim the screen or scale down the cpu.

2006 Nov 14

AspView - Yet another MonoRail ViewEngine

So what is AspView?

It is a Visual Studio 2005 friendly ViewEngine implementation.

The scripting is done using VisualStudio languages (c# and VB.NET). The views are precompiled, (or can be compiled on-demand, but anyway not interpreted).

The project was inspired by the Brail ViewEngine, but since it doesn't use Boo it is more Management-Friendly, since they need not worry about getting out of the "safe" microsoft world.

I tend to like Boo as a language very much, and I like Brail a lot, too (since it allows for less code in the view thanks to the Boo magic) but I lack the tight Visual Studio integration (opening .boo files in #Develop messes up my desktop), and the intellisense is quite important, at least for the developers I worl with.

So I will post in the next few days about it, and I'll make it available to be downloaded (source and binary) as soon as I'll test it a little more. I hope to have a public svn repository soon.

A little demo view:

   1:  <%@ Page Language="C#" Inherits="Castle.MonoRail.Views.AspView.ViewAtDesignTime" %>
2: <%
3: string[] strings;
4: %>
5:
6:
7: hello from index<br />
8: This are the strings:<br />
9: <% foreach (string s in strings) { %>
10: <%=s %><br />
11: <% } %>
12:
13: <br />
14: End of normal view
15: <br />
16: <% OutputSubView("Home/SubViewSample"); %>
2006 Nov 5

Building Application using Castle RC2

Ayende has recently posted a walkthrough for building Web Apps using the Castle Project's libraries.

He covers ActiveRecord and MonoRail basics, showing off some of the shiny and new abilities (AR scaffolding, ARSmartDispatchers, Generics integration and so on).

The only thing missing is IoC-ing using Winsdor or even Binsdor. Maybe to hook some BL layer or something.

So it concludes (as of now) a Part I, Part II , and source-code.

If you wanna see a decent web development framework at action - tune up to those posts.

2006 Nov 1

Duck Type in .NET

tagged as: architecture | c# | tools

There is a great article on CodeProject, by Guenter Prossliner.

A simple class in presented there, that makes Duck Typing possible for Generics enabled CLS languages (VB.NET 8 and C#2.0 for instance).

I'll present it here in short form:

let's say we have two classes:

   1:  class Foo1
2: {
3: public string Bar() { }
4: }
5: class Foo2
6: {
7: public string Bar() { }
8: }

Now you have a method that can work with instances of eiether one, and invoke Bar on it:

   1:  void SimpleMethodOnFoo1(Foo1 foo)
2: {
3: foo.Bar();
4: }
5: void SimpleMethodOnFoo2(Foo2 foo)
6: {
7: foo.Bar();
8: }

Subscribe

Statistics

283
440

Related Books

Related Jobs

Related Ads

search page | Blog's home | About me